NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcJet Class Reference

Creation and investigation of a jet of particle tracks. More...

#include "NcJet.h"

Inheritance diagram for NcJet:
Nc4Vector NcVertex NcEvent IceEvent RnoEvent

Detailed Description

Creation and investigation of a jet of particle tracks.


Copyright(c) 1997 NCFS/IIHE, All Rights Reserved. *
*
Authors: The Netherlands Center for Fundamental Studies (NCFS). *
The Inter-university Institute for High Energies (IIHE). *
Website : http://www.iihe.ac.be *
Contact : Nick van Eijndhoven (nickve.nl@gmail.com) *
*
Contributors are mentioned in the code where appropriate. *
*
No part of this software may be used, copied, modified or distributed *
by any means nor transmitted or translated into machine language for *
commercial purposes without written permission by the IIHE representative. *
Permission to use the software strictly for non-commercial purposes *
is hereby granted without fee, provided that the above copyright notice *
appears in all copies and that both the copyright notice and this *
permission notice appear in the supporting documentation. *
This software is provided "as is" without express or implied warranty. *
The authors make no claims that this software is free of error, or is *
consistent with any particular standard of merchantability, or that it *
will meet your requirements for any particular application, other than *
indicated in the corresponding documentation. *
This software should not be relied on for solving a problem whose *
incorrect solution could result in injury to a person or loss of property. *
If you do use this software in such a manner, it is at your own risk. *
The authors disclaim all liability for direct or consequential damage *
resulting from your use of this software. *

// Class NcJet
// Creation and investigation of a jet of particle tracks.
// An NcJet can be constructed by adding NcTracks.
//
// To provide maximal flexibility to the user, two modes of track storage
// are provided by means of the memberfunction SetTrackCopy().
//
// a) SetTrackCopy(0) (which is the default).
// Only the pointers of the 'added' tracks are stored.
// This mode is typically used by making jet studies based on a fixed list
// of tracks which stays under user control or is contained for instance
// in an NcEvent.
// In this way the NcJet just represents a 'logical structure' for the
// physics analysis which can be embedded in e.g. an NcEvent or NcVertex.
//
// Note :
// Modifications made to the original tracks also affect the NcTrack objects
// which are stored in the NcJet.
//
// b) SetTrackCopy(1).
// Of every 'added' track a private copy will be made of which the pointer
// will be stored.
// In this way the NcJet represents an entity on its own and modifications
// made to the original tracks do not affect the NcTrack objects which are
// stored in the NcJet.
// This mode will allow 'adding' many different NcTracks into an NcJet by
// creating only one NcTrack instance in the main programme and using the
// NcTrack::Reset() and NcTrack parameter setting memberfunctions.
//
// See also the documentation provided for the memberfunction SetOwner().
//
// Coding example to make 2 jets j1 and j2.
// ----------------------------------------
// j1 contains the NcTracks t1 and t2
// j2 contains 10 different NcTracks via tx
//
// NcTrack t1,t2;
// ...
// ... // code to fill the NcTrack data
// ...
// NcJet j1();
// j1.AddTrack(t1);
// j1.AddTrack(t2);
//
// NcJet j2();
// j2.SetTrackCopy(1);
// NcTrack* tx=new NcTrack();
// for (Int_t i=0; i<10; i++)
// {
// ...
// ... // code to set momentum etc... of the track tx
// ...
// j2.AddTrack(tx);
// tx->Reset();
// }
//
// j1.Data();
// j2.Data("sph");
//
// Float_t e1=j1.GetEnergy();
// Float_t pnorm=j1->GetMomentum();
// Nc3Vector p=j1->Get3Momentum();
// Float_t m=j1.GetInvmass();
// Int_t ntk=j1.GetNtracks();
// NcTrack* tj=j1.GetTrack(1);
//
// delete tx;
//
// Note : By default all quantities are in GeV, GeV/c or GeV/c**2
// but the user can indicate the usage of a different scale
// for the energy-momentum units via the SetEscale() memberfunction.
// The actual energy-momentum unit scale can be obtained via the
// GetEscale() memberfunction.
//
//--- Author: Nick van Eijndhoven 10-jul-1997 Utrecht University
//- Modified: Nick van Eijndhoven, IIHE-VUB, Brussel, May 4, 2021 11:29Z

Definition at line 17 of file NcJet.h.

Public Member Functions

 NcJet ()
 
 NcJet (const NcJet &j)
 
 NcJet (Int_t n)
 
virtual ~NcJet ()
 
void AddTrack (NcTrack &t)
 
void AddTrack (NcTrack *t)
 
virtual TObject * Clone (const char *name="") const
 
virtual void Data (TString f="car", TString u="rad")
 
Nc3Vector Get3Momentum (Float_t scale=-1) const
 
Float_t GetCharge () const
 
Double_t GetDistance (NcJet &j, Float_t scale=-1)
 
Double_t GetDistance (NcJet *j, Float_t scale=-1)
 
Double_t GetDistance (NcPosition &p, Float_t scale=-1)
 
Double_t GetDistance (NcPosition *p, Float_t scale=-1)
 
Double_t GetDistance (NcTrack &t, Float_t scale=-1)
 
Double_t GetDistance (NcTrack *t, Float_t scale=-1)
 
Double_t GetEl (Float_t scale=-1)
 
Double_t GetEnergy (Float_t scale=-1)
 
Float_t GetEscale () const
 
Double_t GetEt (Float_t scale=-1)
 
Int_t GetId () const
 
NcTrackGetIdTrack (Int_t id) const
 
Double_t GetInvmass (Float_t scale=-1)
 
Double_t GetMomentum (Float_t scale=-1)
 
Double_t GetMt (Float_t scale=-1)
 
Int_t GetNsignals (TString classname="TObject", Int_t par=0) const
 
Int_t GetNtracks (Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
 
Int_t GetNtracks (TString name, Int_t mode=0)
 
Double_t GetPl (Float_t scale=-1)
 
Double_t GetPt (Float_t scale=-1)
 
Double_t GetRapidity ()
 
NcPositionGetReferencePoint ()
 
TObjArray * GetSignals (TString classname, Int_t par=0, TObjArray *signals=0)
 
Double_t GetSignalValue (TString classname, TString varname, Int_t mode=0, Int_t par=2)
 
NcTrackGetTrack (Int_t i) const
 
Int_t GetTrackCopy () const
 
TObjArray * GetTracks (Int_t idmode=0, Int_t chmode=2, Int_t pcode=0, TObjArray *tracks=0)
 
TObjArray * GetTracks (TString name, Int_t mode=0, TObjArray *tracks=0)
 
virtual void List (TString f="car", TString u="rad", TObjArray *tracks=0)
 
virtual void ListAll (TString f="car", TString u="rad", TObjArray *tracks=0)
 
void RemoveTrack (NcTrack *t)
 
void RemoveTracks (Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
 
void RemoveTracks (TString name, Int_t mode=0)
 
void ReplaceTrack (NcTrack *told, NcTrack *tnew)
 
virtual void Reset ()
 
void SetEscale (Float_t scale)
 
void SetId (Int_t id)
 
virtual void SetOwner (Bool_t own=kTRUE)
 
void SetReferencePoint (NcPosition &p)
 
void SetTrackCopy (Int_t j)
 
void ShowSignals (TString classname, Int_t par=0, Int_t mode=1, TString f="car", TString u="rad")
 
void ShowTracks (Int_t mode=1, TString f="car", TString u="rad", TObjArray *tracks=0)
 
TObjArray * SortTracks (Int_t mode=-1, TObjArray *tracks=0, TObjArray *ordered=0)
 
- Public Member Functions inherited from Nc4Vector
 Nc4Vector ()
 
 Nc4Vector (const Nc4Vector &v)
 
virtual ~Nc4Vector ()
 
Double_t Dot (Nc4Vector &q)
 
Nc3Vector Get3Vector () const
 
Double_t GetBeta ()
 
Nc3Vector GetBetaVector () const
 
void GetErrors (Double_t *v, TString f, TString u="rad")
 
void GetErrors (Float_t *v, TString f, TString u="rad")
 
Double_t GetGamma ()
 
Double_t GetInvariant ()
 
virtual Double_t GetOpeningAngle (Nc3Vector &q, TString u="rad")
 
virtual Double_t GetOpeningAngle (Nc4Vector &q, TString u="rad")
 
Double_t GetPseudoRapidity ()
 
Double_t GetResultError () const
 
Double_t GetScalar ()
 
Int_t GetScalarFlag () const
 
NcSignalGetUserData () const
 
Nc3Vector GetVecLong () const
 
void GetVector (Double_t *v, TString f, TString u="rad")
 
void GetVector (Float_t *v, TString f, TString u="rad")
 
Nc3Vector GetVecTrans () const
 
Double_t GetX (Int_t i, TString f, TString u="rad")
 
Int_t HasErrors () const
 
Int_t HasVector () const
 
virtual void Load (Nc4Vector &q)
 
Nc4Vector operator* (Double_t s)
 
Nc4Vectoroperator*= (Double_t s)
 
Nc4Vector operator+ (Nc4Vector &q)
 
Nc4Vectoroperator+= (Nc4Vector &q)
 
Nc4Vector operator- (Nc4Vector &q)
 
Nc4Vectoroperator-= (Nc4Vector &q)
 
Nc4Vector operator/ (Double_t s)
 
Nc4Vectoroperator/= (Double_t s)
 
Nc4Vectoroperator= (const Nc4Vector &q)
 
void Set3Vector (Double_t *v, TString f, TString u="rad")
 
void Set3Vector (Double_t v1, Double_t v2, Double_t v3, TString f, TString u="rad")
 
void Set3Vector (Float_t *v, TString f, TString u="rad")
 
void Set3Vector (Nc3Vector &v)
 
void SetErrors (Double_t *v, TString f, TString u="rad")
 
void SetErrors (Double_t e0, Double_t e1, Double_t e2, Double_t e3, TString f, TString u="rad")
 
void SetErrors (Float_t *v, TString f, TString u="rad")
 
void SetInvariant (Double_t v2, Double_t dv2=0)
 
void SetInvariantError (Double_t dv2)
 
void SetScalar (Double_t v0, Double_t dv0=0)
 
void SetScalarError (Double_t dv0)
 
void SetUserData (NcSignal &s)
 
void SetUserData (NcSignal *s)
 
void SetVector (Double_t *v, TString f, TString u="rad")
 
void SetVector (Double_t v0, Double_t v1, Double_t v2, Double_t v3, TString f, TString u="rad")
 
void SetVector (Double_t v0, Nc3Vector &v)
 
void SetVector (Float_t *v, TString f, TString u="rad")
 
virtual void SetZero ()
 

Protected Member Functions

void AddTrack (NcTrack &t, Int_t copy)
 
void AddTrack (NcTrack *t, Int_t copy)
 
void Init ()
 
void RemoveTrack (NcTrack *t, Int_t compress)
 
void SetNtinit (Int_t n=2)
 
- Protected Member Functions inherited from Nc4Vector
Double_t GetScaLong ()
 
Double_t GetScaTrans ()
 

Protected Attributes

Float_t fEscale
 
Int_t fNtinit
 
Int_t fNtmax
 
Int_t fNtrk
 
Float_t fQ
 
NcPositionObjfRef
 
TObjArray * fSelected
 ! Temp. array to hold user selected or ordered objects
 
Int_t fTrackCopy
 
TObjArray * fTracks
 
Int_t fUserId
 
- Protected Attributes inherited from Nc4Vector
Double32_t fDresult
 ! The error on the scalar result of an operation (e.g. dotproduct)
 
Double32_t fDv0
 
Double32_t fDv2
 
Int_t fScalar
 
NcSignalfUser
 
Nc3Vector fV
 
Double32_t fV0
 
Double32_t fV2
 

Constructor & Destructor Documentation

◆ NcJet() [1/3]

NcJet::NcJet ( )
// Default constructor.
// All variables initialised to 0
// Initial maximum number of tracks is set to the default value

Definition at line 121 of file NcJet.cxx.

◆ NcJet() [2/3]

NcJet::NcJet ( Int_t n)
// Create a jet to hold initially a maximum of n tracks.
// All variables initialised to 0

Definition at line 152 of file NcJet.cxx.

◆ ~NcJet()

NcJet::~NcJet ( )
virtual
// Default destructor.

Definition at line 177 of file NcJet.cxx.

◆ NcJet() [3/3]

NcJet::NcJet ( const NcJet & j)
// Copy constructor.

Definition at line 233 of file NcJet.cxx.

Member Function Documentation

◆ AddTrack() [1/4]

void NcJet::AddTrack ( NcTrack & t)
// Add a track to the jet.
// In case the maximum number of tracks has been reached
// space will be extended to hold an additional amount of tracks as
// was initially reserved.
// See SetTrackCopy() to tailor the functionality of the stored structures.
//
// Notes :
// -------
// In case a private copy is made, this is performed via the Clone() memberfunction.
// All NcTrack and derived classes have the default TObject::Clone() memberfunction.
// However, derived classes generally contain an internal data structure which may
// include pointers to other objects. Therefore it is recommended to provide
// for all derived classes a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// An example for this may be seen from NcTrack.
//
// In case NO private copy is made, a check will be performed if this
// specific track is already present in the jet.
// If this is the case, no action is performed to prevent multiple
// additions of the same track.

Definition at line 313 of file NcJet.cxx.

◆ AddTrack() [2/4]

void NcJet::AddTrack ( NcTrack & t,
Int_t copy )
protected
// Internal memberfunction to actually add a track to the jet.
// In case the maximum number of tracks has been reached
// space will be extended to hold an additional amount of tracks as
// was initially reserved.
//
// If copy=0 NO copy of the track will be made, irrespective of the setting
// of the TrackCopy flag.
// This allows a proper treatment of automatically generated connecting
// tracks between vertices.
//
// In case NO copy of the track is made, a check will be performed if this
// specific track is already present in the jet.
// If this is the case, no action is performed to prevent multiple
// additions of the same track.
//
// Note :
// In case a private copy is made, this is performed via the Clone() memberfunction.

Definition at line 344 of file NcJet.cxx.

◆ AddTrack() [3/4]

void NcJet::AddTrack ( NcTrack * t)
inline

Definition at line 28 of file NcJet.h.

◆ AddTrack() [4/4]

void NcJet::AddTrack ( NcTrack * t,
Int_t copy )
inlineprotected

Definition at line 78 of file NcJet.h.

◆ Clone()

TObject * NcJet::Clone ( const char * name = "") const
virtual
// Make a deep copy of the current object and provide the pointer to the copy.
// This memberfunction enables automatic creation of new objects of the
// correct type depending on the object type, a feature which may be very useful
// for containers when adding objects in case the container owns the objects.
// This feature allows e.g. NcVertex to store either NcJet objects or
// objects derived from NcJet via the AddJet memberfunction, provided
// these derived classes also have a proper Clone memberfunction.

Reimplemented in IceEvent, NcEvent, NcVertex, and RnoEvent.

Definition at line 2128 of file NcJet.cxx.

◆ Data()

void NcJet::Data ( TString f = "car",
TString u = "rad" )
virtual
// Provide jet information within the coordinate frame f.
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".

Reimplemented from Nc4Vector.

Reimplemented in NcEvent, and NcVertex.

Definition at line 408 of file NcJet.cxx.

◆ Get3Momentum()

Nc3Vector NcJet::Get3Momentum ( Float_t scale = -1) const
// Return the the total jet 3-momentum.
// By default the components of the 3-momentum are returned in the units
// as they were stored in the jet structure.
// However, the user can select a different momentum unit scale for the
// components by specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV/c, so specification
// of scale=0.001 will provide the 3-momentum in MeV/c.

Definition at line 684 of file NcJet.cxx.

◆ GetCharge()

Float_t NcJet::GetCharge ( ) const
// Return the total charge of the jet.

Definition at line 740 of file NcJet.cxx.

◆ GetDistance() [1/6]

Double_t NcJet::GetDistance ( NcJet & j,
Float_t scale = -1 )
inline

Definition at line 66 of file NcJet.h.

◆ GetDistance() [2/6]

Double_t NcJet::GetDistance ( NcJet * j,
Float_t scale = -1 )
// Provide distance of the current jet to the jet j.
// The error on the result can be obtained as usual by invoking
// GetResultError() afterwards.
//
// By default the distance will be provided in the metric unit scale of
// the current jet.
// This implies that the results of j1.GetDistance(j2) and j2.GetDistance(j1)
// may be numerically different in case j1 and j2 have different metric units.
// However, the user can specify a required metric unit scale by specification
// of the scale parameter.
// The convention is that scale=1 corresponds to meter, so specification
// of scale=0.01 will provide the distance in cm.
// As such it is possible to obtain a correctly computed distance even in case
// the jet parameters have a different unit scale.
// However, it is recommended to work always with one single unit scale.
//
// Note : In case of incomplete information, a distance value of -1 is
// returned.

Definition at line 1793 of file NcJet.cxx.

◆ GetDistance() [3/6]

Double_t NcJet::GetDistance ( NcPosition & p,
Float_t scale = -1 )
inline

Definition at line 62 of file NcJet.h.

◆ GetDistance() [4/6]

Double_t NcJet::GetDistance ( NcPosition * p,
Float_t scale = -1 )
// Provide distance of the current jet to the position p.
// The error on the result can be obtained as usual by invoking
// GetResultError() afterwards.
//
// By default the distance will be provided in the metric unit scale of
// the NcPosition p.
// However, the user can select a different metric unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to meter, so specification
// of scale=0.01 will provide the distance in cm.
// As such it is possible to obtain a correctly computed distance even in case
// the jet parameters have a different unit scale.
// However, it is recommended to work always with one single unit scale.
//
// Note : In case of incomplete information, a distance value of -1 is
// returned.

Definition at line 1703 of file NcJet.cxx.

◆ GetDistance() [5/6]

Double_t NcJet::GetDistance ( NcTrack & t,
Float_t scale = -1 )
inline

Definition at line 64 of file NcJet.h.

◆ GetDistance() [6/6]

Double_t NcJet::GetDistance ( NcTrack * t,
Float_t scale = -1 )
// Provide distance of the current jet to the track t.
// The error on the result can be obtained as usual by invoking
// GetResultError() afterwards.
//
// By default the distance will be provided in the metric unit scale of
// the current jet.
// However, the user can specify a required metric unit scale by specification
// of the scale parameter.
// The convention is that scale=1 corresponds to meter, so specification
// of scale=0.01 will provide the distance in cm.
// As such it is possible to obtain a correctly computed distance even in case
// the jet and track parameters have a different unit scale.
// However, it is recommended to work always with one single unit scale.
//
// Note : In case of incomplete information, a distance value of -1 is
// returned.

Definition at line 1748 of file NcJet.cxx.

◆ GetEl()

Double_t NcJet::GetEl ( Float_t scale = -1)
// Provide longitudinal energy value w.r.t. z-axis.
// By default the value is returned in the units as it was stored in the jet
// structure. However, the user can select a different energy unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV, so specification
// of scale=0.001 will provide the longitudinal energy in MeV.
// Note : the returned value can also be negative.
// The error on the value can be obtained by GetResultError()
// after invokation of GetEl().

Definition at line 1326 of file NcJet.cxx.

◆ GetEnergy()

Double_t NcJet::GetEnergy ( Float_t scale = -1)
// Return the total energy of the jet.
// By default the energy is returned in the units as it was stored in the jet
// structure. However, the user can select a different energy unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV, so specification
// of scale=0.001 will provide the energy in MeV.
// The error can be obtained by invoking GetResultError() after
// invokation of GetEnergy().

Definition at line 628 of file NcJet.cxx.

◆ GetEscale()

Float_t NcJet::GetEscale ( ) const
// Provide the energy/momentum scale as used by the user.
// The convention is that scale=1 indicates values in units
// of GeV, GeV/c or GeV/c**2.
// So, a value of scale=0.001 indicates that energy/momentum values are
// stored in units of MeV, MeV/c or MeV/c**2.

Definition at line 2113 of file NcJet.cxx.

◆ GetEt()

Double_t NcJet::GetEt ( Float_t scale = -1)
// Provide transverse energy value w.r.t. z-axis.
// By default the value is returned in the units as it was stored in the jet
// structure. However, the user can select a different energy unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV, so specification
// of scale=0.001 will provide the transverse energy in MeV.
// The error on the value can be obtained by GetResultError()
// after invokation of GetEt().

Definition at line 1301 of file NcJet.cxx.

◆ GetId()

Int_t NcJet::GetId ( ) const
// Provide the user defined identifier of this jet.

Definition at line 1470 of file NcJet.cxx.

◆ GetIdTrack()

NcTrack * NcJet::GetIdTrack ( Int_t id) const
// Return the track with user identifier "id" of this jet.

Definition at line 773 of file NcJet.cxx.

◆ GetInvmass()

Double_t NcJet::GetInvmass ( Float_t scale = -1)
// Return the invariant mass of the jet.
// By default the mass is returned in the units as it was stored in the jet
// structure. However, the user can select a different mass unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV/c**2, so specification
// of scale=0.001 will provide the invariant mass in MeV/c**2.
// The error can be obtained by invoking GetResultError() after
// invokation of GetInvmass().

Definition at line 703 of file NcJet.cxx.

◆ GetMomentum()

Double_t NcJet::GetMomentum ( Float_t scale = -1)
// Return the value of the total jet 3-momentum.
// By default the momentum is returned in the units as it was stored in the jet
// structure. However, the user can select a different momentum unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV/c, so specification
// of scale=0.001 will provide the momentum in MeV/c.
// The error can be obtained by invoking GetResultError() after
// invokation of GetMomentum().

Definition at line 659 of file NcJet.cxx.

◆ GetMt()

Double_t NcJet::GetMt ( Float_t scale = -1)
// Provide transverse mass value w.r.t. z-axis.
// By default the value is returned in the units as it was stored in the jet
// structure. However, the user can select a different energy unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV, so specification
// of scale=0.001 will provide the transverse mass in MeV.
// The error on the value can be obtained by GetResultError()
// after invokation of GetMt().

Definition at line 1352 of file NcJet.cxx.

◆ GetNsignals()

Int_t NcJet::GetNsignals ( TString classname = "TObject",
Int_t par = 0 ) const
// Provide the number of signals (derived) of the specified class that are
// associated to the jet tracks.
// Multiple occurrences of the same signal are only counted once.
//
// par = 0 ==> The signal itself has to be (derived) of the specified class
// 1 ==> The parent device of the signal has to be (derived) of the specified class
// 2 ==> The signal or the parent device has to be (derived) of the specified class
//
// The default is classname="TObject" and par=0, which implies that in case no
// argument is provided the number of all associated signals is returned.
// This is backward compatible with the previous implementation of this member function.

Definition at line 1839 of file NcJet.cxx.

◆ GetNtracks() [1/2]

Int_t NcJet::GetNtracks ( Int_t idmode = 0,
Int_t chmode = 2,
Int_t pcode = 0 )
// Provide the number of user selected tracks in this jet based on the
// idmode, chmode and pcode selections as specified by the user.
// For specification of the selection parameters see GetTracks().
// The default parameters correspond to no selection, which implies
// that invokation of GetNtracks() just returns the total number of
// tracks registered in this jet.
//
// Note : In case certain selections are specified, this function
// invokes GetTracks(idmode,chmode,pcode) to determine the
// number of tracks corresponding to the selections.
// In case of many invokations of this memberfunction, invokation
// of GetTracks(idmode,chmode,pcode,tracks) with a user provided array "tracks"
// and subsequently invoking GetEntries() of the array might be slightly
// faster.

Definition at line 564 of file NcJet.cxx.

◆ GetNtracks() [2/2]

Int_t NcJet::GetNtracks ( TString name,
Int_t mode = 0 )
// Provide the number of tracks with the specified name.
// If name="*" all tracks will be provided, irrespective of the value of "mode".
//
// mode = 0 : The provided name should exactly match the trackname
// 1 : The provided name should be part of the trackname
//
// The default value is mode=0.
//
// Note :
// ------
// In case of many invokations of this memberfunction, invokation
// of GetTracks(name,mode,tracks) with a user provided array "tracks"
// and subsequently invoking GetEntries() of the array might be slightly
// faster.

Definition at line 599 of file NcJet.cxx.

◆ GetPl()

Double_t NcJet::GetPl ( Float_t scale = -1)
// Provide the longitudinal momentum value w.r.t. z-axis.
// By default the value is returned in the units as it was stored in the jet
// structure. However, the user can select a different momentum unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV/c, so specification
// of scale=0.001 will provide the longitudinal momentum in MeV/c.
// Note : the returned value can also be negative.
// The error on the value can be obtained by GetResultError()
// after invokation of GetPl().

Definition at line 1267 of file NcJet.cxx.

◆ GetPt()

Double_t NcJet::GetPt ( Float_t scale = -1)
// Provide the transverse momentum value w.r.t. z-axis.
// By default the value is returned in the units as it was stored in the jet
// structure. However, the user can select a different momentum unit scale by
// specification of the scale parameter.
// The convention is that scale=1 corresponds to GeV/c, so specification
// of scale=0.001 will provide the transverse momentum in MeV/c.
// The error on the value can be obtained by GetResultError()
// after invokation of GetPt().

Definition at line 1239 of file NcJet.cxx.

◆ GetRapidity()

Double_t NcJet::GetRapidity ( )
// Provide rapidity value w.r.t. z-axis.
// The error on the value can be obtained by GetResultError()
// after invokation of GetRapidity().
// Note : Also GetPseudoRapidity() is available since this class is
// derived from Nc4Vector.

Definition at line 1385 of file NcJet.cxx.

◆ GetReferencePoint()

NcPosition * NcJet::GetReferencePoint ( )
// Provide the position of the jet reference-point.
// The reference-point of a jet provides a means to define a generic
// space-time location for the jet as a whole.
// This doesn't have to be necessarily the location where all the constituent
// tracks originate (e.g. a bundle of parallel tracks doesn't have such
// a location). As such the meaning of this reference-point is different from
// a normal vertex position and allows to provide complimentary information.
// This reference point is the preferable point to start e.g. extrapolations
// and investigate coincidences in space and/or time.

Definition at line 1501 of file NcJet.cxx.

◆ GetSignals()

TObjArray * NcJet::GetSignals ( TString classname,
Int_t par = 0,
TObjArray * signals = 0 )
// Provide references to the signals (derived) of the specified class that are
// associated to the jet tracks.
// Multiple occurrences of the same signal will only appear once.
//
// par = 0 ==> The signal itself has to be (derived) of the specified class
// 1 ==> The parent device of the signal has to be (derived) of the specified class
// 2 ==> The signal or the parent device has to be (derived) of the specified class
//
// The default is par=0.
//
// Note :
// ------
// In case signals=0 the selected signal pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections (not restricted to signal selections).
// It is recommended to provide a user defined array via the argument "signals"
// to omit the danger of overwriting the selection and to allow to use the selected signal list
// amongst other selections.
// In case a user defined array "signals" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is signals=0.

Definition at line 1897 of file NcJet.cxx.

◆ GetSignalValue()

Double_t NcJet::GetSignalValue ( TString classname,
TString varname,
Int_t mode = 0,
Int_t par = 2 )
// Provide the total sum of the value of variable "varname" of all the
// signals (derived) from the specified class that are associated to the jet tracks.
//
// par = 0 ==> The signal itself has to be (derived) of the specified class
// 1 ==> The parent device of the signal has to be (derived) of the specified class
// 2 ==> The signal or the parent device has to be (derived) of the specified class
//
// The default is par=2.
//
// The argument "mode" has the same meaning as in the memberfunction GetSignal()
// of the class NcSignal.
// Also here the default value is mode=0.

Definition at line 2052 of file NcJet.cxx.

◆ GetTrack()

NcTrack * NcJet::GetTrack ( Int_t i) const
// Return the i-th track of this jet.

Definition at line 751 of file NcJet.cxx.

◆ GetTrackCopy()

Int_t NcJet::GetTrackCopy ( ) const
// Provide value of the TrackCopy mode.
// 0 ==> No private copies are made; pointers of original tracks are stored.
// 1 ==> Private copies of the tracks are made and these pointers are stored.

Definition at line 1446 of file NcJet.cxx.

◆ GetTracks() [1/2]

TObjArray * NcJet::GetTracks ( Int_t idmode = 0,
Int_t chmode = 2,
Int_t pcode = 0,
TObjArray * tracks = 0 )
// Provide references to user selected tracks based on the idmode, chmode
// and pcode selections as specified by the user.
//
// The following selection combinations are available :
// ----------------------------------------------------
// idmode = -1 ==> Select tracks with negative user identifier "id"
// 0 ==> No selection on user identifier
// 1 ==> Select tracks with positive user identifier "id"
//
// chmode = -1 ==> Select tracks with negative charge
// 0 ==> Select neutral tracks
// 1 ==> Select tracks with positive charge
// 2 ==> No selection on charge
// 3 ==> Select all charged tracks
//
// pcode = 0 ==> No selection on particle code
// X ==> Select tracks with particle code +X or -X
// This allows selection of both particles and anti-particles
// in case of PDG particle codes.
// Selection of either particles or anti-particles can be
// obtained in combination with the "chmode" selector.
//
// Examples :
// ----------
// idmode=-1 chmode=0 pcode=0 : Selection of all neutral tracks with negative id.
// idmode=0 chmode=2 pcode=211 : Selection of all charged pions (PDG convention).
// idmode=0 chmode=1 pcode=321 : Selection of all positive kaons (PDG convention).
//
// The default values are idmode=0 chmode=2 pcode=0 (i.e. no selections applied) and tracks=0.
//
// Notes :
// -------
// 1) In case the user has labeled simulated tracks with negative id and
// reconstructed tracks with positive id, this memberfunction provides
// easy access to either all simulated or reconstructed tracks.
// 2) Subsequent invokations of this memberfunction with e.g. chmode=-1 and chmode=1
// provides a convenient way to investigate particle pairs with opposite charge
// (e.g. for invariant mass analysis).
// 3) In case tracks=0 the selected track pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections (not restricted to track selections).
// It is recommended to provide a user defined array via the argument "tracks"
// to omit the danger of overwriting the selection and to allow to use the selected track list
// amongst other selections.
// In case a user defined array "tracks" is provided, this memberfunction returns 0 for the
// return argument.

Definition at line 792 of file NcJet.cxx.

◆ GetTracks() [2/2]

TObjArray * NcJet::GetTracks ( TString name,
Int_t mode = 0,
TObjArray * tracks = 0 )
// Provide references to all tracks with the specified name.
// If name="*" all tracks will be provided, irrespective of the value of "mode".
//
// mode = 0 : The provided name should exactly match the trackname
// 1 : The provided name should be part of the trackname
//
// The default values are mode=0 and tracks=0.
//
// Notes :
// -------
// 1) In case the user has labeled reconstructed tracks with the name of
// the applied reconstruction algorithm, this memberfunction provides
// easy access to all tracks reconstructed by a certain method.
// 2) In case tracks=0 the selected track pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections (not restricted to track selections).
// It is recommended to provide a user defined array via the argument "tracks"
// to omit the danger of overwriting the selection and to allow to use the selected track list
// amongst other selections.
// In case a user defined array "tracks" is provided, this memberfunction returns 0 for the
// return argument.

Definition at line 914 of file NcJet.cxx.

◆ Init()

void NcJet::Init ( )
protected
// Initialisation of pointers etc...

Definition at line 136 of file NcJet.cxx.

◆ List()

void NcJet::List ( TString f = "car",
TString u = "rad",
TObjArray * tracks = 0 )
virtual
// Provide jet and primary track information within the coordinate frame f.
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".
//
// In case the user provides the array "tracks" with selected track pointers, all tracks
// from that user array will be shown.
// In case tracks=0, all the available tracks from this jet will be shown.
//
// The default is tracks=0.

Reimplemented in NcVertex.

Definition at line 438 of file NcJet.cxx.

◆ ListAll()

void NcJet::ListAll ( TString f = "car",
TString u = "rad",
TObjArray * tracks = 0 )
virtual
// Provide jet and prim.+sec. track information within the coordinate frame f.
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".
//
// In case the user provides the array "tracks" with selected track pointers, all tracks
// from that user array will be shown.
// In case tracks=0, all the available tracks from this jet will be shown.
//
// The default is tracks=0.

Reimplemented in NcVertex.

Definition at line 501 of file NcJet.cxx.

◆ RemoveTrack() [1/2]

void NcJet::RemoveTrack ( NcTrack * t)
// Remove the track with the specified reference.
// In case t=0 no action will be taken.

Definition at line 1005 of file NcJet.cxx.

◆ RemoveTrack() [2/2]

void NcJet::RemoveTrack ( NcTrack * t,
Int_t compress )
protected
// Internal memberfunction to remove a track from the jet.
// In case t=0 no action will be taken.
//
// The input argument "compress" allows to select whether or not the storage
// array will be compressed after each track removal.
// Since the storage array dimension (and number of stored tracks) will change
// after each track removal with compression, it is advised to remove tracks
// without compression when invoked from within a loop and compress the array
// (and update the fNtrk counter) after all tracks have been removed.

Definition at line 1120 of file NcJet.cxx.

◆ RemoveTracks() [1/2]

void NcJet::RemoveTracks ( Int_t idmode = 0,
Int_t chmode = 2,
Int_t pcode = 0 )
// Remove user selected tracks based on the idmode, chmode and pcode
// selections as specified by the user.
// For defintions of these selections see the corresponding GetTracks()
// memberfunction.

Definition at line 1057 of file NcJet.cxx.

◆ RemoveTracks() [2/2]

void NcJet::RemoveTracks ( TString name,
Int_t mode = 0 )
// Remove all tracks with the specified name.
// If name="*" all tracks will be removed, irrespective of the value of "mode".
//
// mode = 0 : The provided name should exactly match the trackname
// 1 : The provided name should be part of the trackname
//
// The default value is mode=0.
//
// Note :
// ------
// In case the user has labeled reconstructed tracks with the name of
// the applied reconstruction algorithm, this memberfunction provides
// easy removal of all tracks reconstructed by a certain method.

Definition at line 1019 of file NcJet.cxx.

◆ ReplaceTrack()

void NcJet::ReplaceTrack ( NcTrack * told,
NcTrack * tnew )
// Replace the existing track "told" with the "tnew" one.
// In case told=0 or tnew=0 no action will be taken.

Definition at line 1086 of file NcJet.cxx.

◆ Reset()

void NcJet::Reset ( )
virtual
// Reset all variables to 0.
// The max. number of tracks is set to the initial value again
// Note : The scale for the energy/momentum units will not be changed.

Reimplemented in IceEvent, NcEvent, NcVertex, and RnoEvent.

Definition at line 296 of file NcJet.cxx.

◆ SetEscale()

void NcJet::SetEscale ( Float_t scale)
// Indicate the energy/momentum scale as used by the user.
// The convention is that scale=1 indicates values in units
// of GeV, GeV/c or GeV/c**2.
// So, in case one decides to store values in units of MeV, MeV/c or MeV/c**2
// the scale indicator should be set to scale=0.001.
//
// By default scale=1 is set in the constructor.

Definition at line 2089 of file NcJet.cxx.

◆ SetId()

void NcJet::SetId ( Int_t id)
// Set a user defined identifier for this jet.

Definition at line 1459 of file NcJet.cxx.

◆ SetNtinit()

void NcJet::SetNtinit ( Int_t n = 2)
protected
// Set the initial maximum number of tracks for this jet.

Definition at line 273 of file NcJet.cxx.

◆ SetOwner()

void NcJet::SetOwner ( Bool_t own = kTRUE)
virtual
// Set ownership of all added objects.
// The default parameter is own=kTRUE.
//
// Invokation of this memberfunction also sets all the copy modes
// (e.g. TrackCopy & co.) according to the value of own.
//
// This function (with own=kTRUE) is particularly useful when reading data
// from a tree/file, since Reset() will then actually remove all the
// added objects from memory irrespective of the copy mode settings
// during the tree/file creation process. In this way it provides a nice way
// of preventing possible memory leaks in the reading/analysis process.
//
// In addition this memberfunction can also be used as a shortcut to set all
// copy modes in one go during a tree/file creation process.
// However, in this case the user has to take care to only set/change the
// ownership (and copy mode) for empty objects (e.g. newly created objects
// or after invokation of the Reset() memberfunction) otherwise it will
// very likely result in inconsistent destructor behaviour.

Reimplemented in NcEvent, and NcVertex.

Definition at line 202 of file NcJet.cxx.

◆ SetReferencePoint()

void NcJet::SetReferencePoint ( NcPosition & p)
// Store the position of the jet reference-point.
// The reference-point of a jet provides a means to define a generic
// space-time location for the jet as a whole.
// This doesn't have to be necessarily the location where all the constituent
// tracks originate (e.g. a bundle of parallel tracks doesn't have such
// a location). As such the meaning of this reference-point is different from
// a normal vertex position and allows to provide complimentary information.
// This reference point is the preferable point to start e.g. extrapolations
// and investigate coincidences in space and/or time.

Definition at line 1481 of file NcJet.cxx.

◆ SetTrackCopy()

void NcJet::SetTrackCopy ( Int_t j)
// (De)activate the creation of private copies of the added tracks.
// j=0 ==> No private copies are made; pointers of original tracks are stored.
// j=1 ==> Private copies of the tracks are made and these pointers are stored.
//
// Note : Once the storage contains pointer(s) to NcTrack(s) one cannot
// change the TrackCopy mode anymore.
// To change the TrackCopy mode for an existing NcJet containing
// tracks one first has to invoke Reset().

Definition at line 1413 of file NcJet.cxx.

◆ ShowSignals()

void NcJet::ShowSignals ( TString classname,
Int_t par = 0,
Int_t mode = 1,
TString f = "car",
TString u = "rad" )
// Show all signals (derived) from the specified class that are associated to the jet tracks.
//
// par = 0 ==> The signal itself has to be (derived) of the specified class
// 1 ==> The parent device of the signal has to be (derived) of the specified class
// 2 ==> The signal or the parent device has to be (derived) of the specified class
//
// mode = 0 ==> Only the number of signals will be provided.
// 1 ==> Full listing of all the signals will be provided.
// 2 ==> Same as mode=1 but with additional location info of the owning device.
//
// Default values are par=0 and mode=1.
//
// The arguments "f" and "u" have the same meaning as in the memberfunction Data().

Definition at line 2006 of file NcJet.cxx.

◆ ShowTracks()

void NcJet::ShowTracks ( Int_t mode = 1,
TString f = "car",
TString u = "rad",
TObjArray * tracks = 0 )
// Provide an overview of the available tracks.
// The argument mode determines the amount of information as follows :
// mode = 0 ==> Only printout of the number of tracks
// 1 ==> Provide a listing with 1 line of info for each track
// 2 ==> Provide full listing of all primary tracks
// 3 ==> Provide full listing of all primary and secondary tracks.
//
// The default is mode=1.
//
// The arguments "f" and "u" have the same meaning as in the memberfunction Data().
//
// In case the user provides the array "tracks" with selected track pointers, all tracks
// from that user array will be shown.
// In case tracks=0, all the available tracks will be shown.
//
// The default is tracks=0.

Definition at line 1159 of file NcJet.cxx.

◆ SortTracks()

TObjArray * NcJet::SortTracks ( Int_t mode = -1,
TObjArray * tracks = 0,
TObjArray * ordered = 0 )
// Order the references to an array of tracks by looping over the input array "tracks"
// and checking the value of a certain observable.
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// In case tracks=0 (default), the registered tracks of the current jet are used.
// Note that the original track array is not modified.
// Via the "mode" argument the user can specify the observable to be checked upon
// and specify whether sorting should be performed in decreasing order (mode<0)
// or in increasing order (mode>0).
//
// The convention for the observable selection is the following :
// mode : 1 ==> Number of signals associated to the track
// 2 ==> Track energy
// 3 ==> Track momentum
// 4 ==> Mass of the track
// 5 ==> Transverse momentum of the track
// 6 ==> Longitudinal momentum of the track
// 7 ==> Transverse energy of the track
// 8 ==> Longitudinal energy of the track
// 9 ==> Transverse mass of the track
// 10 ==> Track rapidity
// 11 ==> Pseudo-rapidity of the track
// 12 ==> Charge of the track
// 13 ==> Probability of the track hypothesis
//
// The default values are : mode=-1, tracks=0 and ordered=0.
//
// Note :
// ------
// In case ordered=0 the ordered track pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to track ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered track list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.

Definition at line 1520 of file NcJet.cxx.

Member Data Documentation

◆ fEscale

Float_t NcJet::fEscale
protected

Definition at line 89 of file NcJet.h.

◆ fNtinit

Int_t NcJet::fNtinit
protected

Definition at line 80 of file NcJet.h.

◆ fNtmax

Int_t NcJet::fNtmax
protected

Definition at line 81 of file NcJet.h.

◆ fNtrk

Int_t NcJet::fNtrk
protected

Definition at line 83 of file NcJet.h.

◆ fQ

Float_t NcJet::fQ
protected

Definition at line 82 of file NcJet.h.

◆ fRef

NcPositionObj* NcJet::fRef
protected

Definition at line 87 of file NcJet.h.

◆ fSelected

TObjArray* NcJet::fSelected
protected

! Temp. array to hold user selected or ordered objects

Definition at line 88 of file NcJet.h.

◆ fTrackCopy

Int_t NcJet::fTrackCopy
protected

Definition at line 85 of file NcJet.h.

◆ fTracks

TObjArray* NcJet::fTracks
protected

Definition at line 84 of file NcJet.h.

◆ fUserId

Int_t NcJet::fUserId
protected

Definition at line 86 of file NcJet.h.


The documentation for this class was generated from the following files: