NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcJet.h
Go to the documentation of this file.
1#ifndef NcJet_h
2#define NcJet_h
3// Copyright(c) 1997 NCFS/IIHE, All Rights Reserved.
4// See cxx source for full Copyright notice.
5
6#include <cstdlib>
7#include <math.h>
8
9#include "TNamed.h"
10#include "TObjArray.h"
11
12#include "Nc4Vector.h"
13#include "NcTrack.h"
14
16
17class NcJet : public TNamed,public Nc4Vector
18{
19 public:
20 NcJet(); // Default constructor
21 NcJet(Int_t n); // Create a Jet to hold initially n Tracks
22 virtual ~NcJet(); // Default destructor
23 NcJet(const NcJet& j); // Copy constructor
24 virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
25 virtual void SetOwner(Bool_t own=kTRUE); // Set ownership of all added objects
26 virtual void Reset(); // Reset all values
27 void AddTrack(NcTrack& t); // Add a track to the jet
28 void AddTrack(NcTrack* t) { AddTrack(*t); }
29 virtual void Data(TString f="car",TString u="rad"); // Print jet information in frame f and ang units u
30 virtual void List(TString f="car",TString u="rad",TObjArray* tracks=0); // Jet prim. track info for frame f and ang units u
31 virtual void ListAll(TString f="car",TString u="rad",TObjArray* tracks=0);// Jet prim. and decay track info for frame f and ang units u
32 Double_t GetEnergy(Float_t scale=-1); // Provide the total jet energy
33 Double_t GetMomentum(Float_t scale=-1); // Provide the value of the total jet 3-momentum
34 Nc3Vector Get3Momentum(Float_t scale=-1) const; // Provide the total jet 3-momentum
35 Double_t GetInvmass(Float_t scale=-1); // Provide the invariant mass
36 Float_t GetCharge() const; // Provide the total charge of the jet
37 Int_t GetNtracks(Int_t idmode=0,Int_t chmode=2,Int_t pcode=0); // Provide the number of selected tracks in the jet
38 Int_t GetNtracks(TString name,Int_t mode=0); // Provide the number of tracks with a certain name
39 NcTrack* GetTrack(Int_t i) const; // Provide i-th track of the jet (1=first track)
40 NcTrack* GetIdTrack(Int_t id) const; // Provide the track with user identifier "id"
41 TObjArray* GetTracks(Int_t idmode=0,Int_t chmode=2,Int_t pcode=0,TObjArray* tracks=0); // Provide references to selected tracks
42 TObjArray* GetTracks(TString name,Int_t mode=0,TObjArray* tracks=0); // Provide references to all tracks with a certain name
43 void RemoveTrack(NcTrack* t); // Remove the track with the specified reference
44 void RemoveTracks(Int_t idmode=0,Int_t chmode=2,Int_t pcode=0); // Remove selected tracks
45 void RemoveTracks(TString name,Int_t mode=0); // Remove all tracks with a certain name
46 void ReplaceTrack(NcTrack* told,NcTrack* tnew); // Replace the existing track "told" with the "tnew" one
47 void ShowTracks(Int_t mode=1,TString f="car",TString u="rad",TObjArray* tracks=0); // Provide on overview of the available tracks
48 Double_t GetPt(Float_t scale=-1); // Provide trans. momentum w.r.t. z-axis
49 Double_t GetPl(Float_t scale=-1); // Provide long. momentum w.r.t. z-axis
50 Double_t GetEt(Float_t scale=-1); // Provide trans. energy w.r.t. z-axis
51 Double_t GetEl(Float_t scale=-1); // Provide long. energy w.r.t. z-axis
52 Double_t GetMt(Float_t scale=-1); // Provide trans. mass w.r.t. z-axis
53 Double_t GetRapidity(); // Provide rapidity value w.r.t. z-axis
54 void SetTrackCopy(Int_t j); // (De)activate creation of private copies in fTracks
55 Int_t GetTrackCopy() const; // Provide TrackCopy flag value
56 void SetId(Int_t id); // Set the user defined identifier
57 Int_t GetId() const; // Provide the user defined identifier
58 void SetReferencePoint(NcPosition& p); // Set the jet reference-point
59 NcPosition* GetReferencePoint(); // Provide the jet reference-point
60 TObjArray* SortTracks(Int_t mode=-1,TObjArray* tracks=0,TObjArray* ordered=0); // Sort tracks by a certain observable
61 Double_t GetDistance(NcPosition* p,Float_t scale=-1); // Provide distance to position p
62 Double_t GetDistance(NcPosition& p,Float_t scale=-1) { return GetDistance(&p,scale); }
63 Double_t GetDistance(NcTrack* t,Float_t scale=-1); // Provide distance to track t
64 Double_t GetDistance(NcTrack& t,Float_t scale=-1) { return GetDistance(&t,scale); }
65 Double_t GetDistance(NcJet* j,Float_t scale=-1); // Provide distance to jet j
66 Double_t GetDistance(NcJet& j,Float_t scale=-1) { return GetDistance(&j,scale); }
67 Int_t GetNsignals(TString classname="TObject",Int_t par=0) const; // Provide the number of selected signals associated to the jet tracks
68 TObjArray* GetSignals(TString classname,Int_t par=0,TObjArray* signals=0); // Provide the selected signals associated to the jet tracks
69 void ShowSignals(TString classname,Int_t par=0,Int_t mode=1,TString f="car",TString u="rad"); // Overview of all selected associated signals
70 Double_t GetSignalValue(TString classname,TString varname,Int_t mode=0,Int_t par=2); // Provide total signal value of all selected associated signals
71 void SetEscale(Float_t scale); // Set the scale of the energy/momentum units of the jet
72 Float_t GetEscale() const; // Provide the scale of the energy/momentum units of the jet
73
74 protected:
75 void Init(); // Initialisation of pointers etc...
76 void SetNtinit(Int_t n=2); // Set the initial max. number of tracks for this Jet
77 void AddTrack(NcTrack& t,Int_t copy); // Internal memberfunction to add a track to the jet
78 void AddTrack(NcTrack* t,Int_t copy) { AddTrack(*t,copy); }
79 void RemoveTrack(NcTrack* t,Int_t compress); // Internal memberfunction to remove a track from the jet
80 Int_t fNtinit; // The initial max. number of tracks for this jet
81 Int_t fNtmax; // The maximum number of tracks for this Jet
82 Float_t fQ; // The total charge of the jet
83 Int_t fNtrk; // The number of tracks in the jet
84 TObjArray* fTracks; // Array to hold the pointers to the tracks of the jet
85 Int_t fTrackCopy; // Flag to denote creation of private copies in fTracks
86 Int_t fUserId; // The user defined identifier
87 NcPositionObj* fRef; // The reference-point of the jet
88 TObjArray* fSelected;
89 Float_t fEscale; // The scale of the energy/momentum units of the jet
90
91 ClassDef(NcJet,8) // Creation and investigation of a jet of particle tracks.
92};
93#endif
Handling of 3-vectors in various reference frames.
Definition Nc3Vector.h:15
Creation and investigation of a jet of particle tracks.
Definition NcJet.h:18
Double_t GetInvmass(Float_t scale=-1)
Definition NcJet.cxx:703
Double_t GetEnergy(Float_t scale=-1)
Definition NcJet.cxx:628
void SetReferencePoint(NcPosition &p)
Definition NcJet.cxx:1481
void ShowTracks(Int_t mode=1, TString f="car", TString u="rad", TObjArray *tracks=0)
Definition NcJet.cxx:1159
Double_t GetEl(Float_t scale=-1)
Definition NcJet.cxx:1326
NcPosition * GetReferencePoint()
Definition NcJet.cxx:1501
virtual void List(TString f="car", TString u="rad", TObjArray *tracks=0)
Definition NcJet.cxx:438
virtual ~NcJet()
Definition NcJet.cxx:177
Double_t GetDistance(NcJet &j, Float_t scale=-1)
Definition NcJet.h:66
TObjArray * GetTracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0, TObjArray *tracks=0)
Definition NcJet.cxx:792
Int_t fNtrk
Definition NcJet.h:83
Double_t GetPl(Float_t scale=-1)
Definition NcJet.cxx:1267
Int_t fNtinit
Definition NcJet.h:80
void AddTrack(NcTrack *t)
Definition NcJet.h:28
Int_t GetNtracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
Definition NcJet.cxx:564
void RemoveTracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
Definition NcJet.cxx:1057
Int_t GetTrackCopy() const
Definition NcJet.cxx:1446
NcTrack * GetTrack(Int_t i) const
Definition NcJet.cxx:751
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
Definition NcJet.cxx:1703
Double_t GetRapidity()
Definition NcJet.cxx:1385
NcTrack * GetIdTrack(Int_t id) const
Definition NcJet.cxx:773
Double_t GetDistance(NcTrack &t, Float_t scale=-1)
Definition NcJet.h:64
Double_t GetDistance(NcPosition &p, Float_t scale=-1)
Definition NcJet.h:62
void RemoveTrack(NcTrack *t)
Definition NcJet.cxx:1005
TObjArray * fSelected
! Temp. array to hold user selected or ordered objects
Definition NcJet.h:88
NcPositionObj * fRef
Definition NcJet.h:87
Double_t GetMomentum(Float_t scale=-1)
Definition NcJet.cxx:659
Int_t GetId() const
Definition NcJet.cxx:1470
Double_t GetSignalValue(TString classname, TString varname, Int_t mode=0, Int_t par=2)
Definition NcJet.cxx:2052
void AddTrack(NcTrack *t, Int_t copy)
Definition NcJet.h:78
NcJet()
Definition NcJet.cxx:121
Double_t GetPt(Float_t scale=-1)
Definition NcJet.cxx:1239
void Init()
Definition NcJet.cxx:136
Int_t fNtmax
Definition NcJet.h:81
Int_t fTrackCopy
Definition NcJet.h:85
Double_t GetEt(Float_t scale=-1)
Definition NcJet.cxx:1301
void SetEscale(Float_t scale)
Definition NcJet.cxx:2089
Int_t fUserId
Definition NcJet.h:86
TObjArray * GetSignals(TString classname, Int_t par=0, TObjArray *signals=0)
Definition NcJet.cxx:1897
virtual void Reset()
Definition NcJet.cxx:296
Float_t fQ
Definition NcJet.h:82
void ShowSignals(TString classname, Int_t par=0, Int_t mode=1, TString f="car", TString u="rad")
Definition NcJet.cxx:2006
virtual void SetOwner(Bool_t own=kTRUE)
Definition NcJet.cxx:202
TObjArray * fTracks
Definition NcJet.h:84
virtual TObject * Clone(const char *name="") const
Definition NcJet.cxx:2128
TObjArray * SortTracks(Int_t mode=-1, TObjArray *tracks=0, TObjArray *ordered=0)
Definition NcJet.cxx:1520
void SetId(Int_t id)
Definition NcJet.cxx:1459
Float_t GetCharge() const
Definition NcJet.cxx:740
virtual void Data(TString f="car", TString u="rad")
Definition NcJet.cxx:408
void SetNtinit(Int_t n=2)
Definition NcJet.cxx:273
void SetTrackCopy(Int_t j)
Definition NcJet.cxx:1413
Float_t fEscale
Definition NcJet.h:89
Double_t GetMt(Float_t scale=-1)
Definition NcJet.cxx:1352
virtual void ListAll(TString f="car", TString u="rad", TObjArray *tracks=0)
Definition NcJet.cxx:501
Int_t GetNsignals(TString classname="TObject", Int_t par=0) const
Definition NcJet.cxx:1839
void ReplaceTrack(NcTrack *told, NcTrack *tnew)
Definition NcJet.cxx:1086
Float_t GetEscale() const
Definition NcJet.cxx:2113
Nc3Vector Get3Momentum(Float_t scale=-1) const
Definition NcJet.cxx:684
void AddTrack(NcTrack &t)
Definition NcJet.cxx:313
Handling of positions (with timestamps) in various reference frames.
Definition NcPosition.h:18
Handling of positions in various reference frames.
Handling of the attributes of a reconstructed particle track.
Definition NcTrack.h:19