NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcTrack.h
Go to the documentation of this file.
1#ifndef NcTrack_h
2#define NcTrack_h
3// Copyright(c) 1997 NCFS/IIHE, All Rights Reserved.
4// See cxx source for full Copyright notice.
5
6#include "TObject.h"
7#include "TObjArray.h"
8#include "TArrayD.h"
9#include "TArrayI.h"
10
11#include "NcDevice.h"
12#include "NcBoost.h"
13#include "NcPositionObj.h"
14#include "NcTimestamp.h"
15
17
18class NcTrack : public TNamed,public Nc4Vector
19{
20 public:
21 NcTrack(); // Default constructor
22 virtual ~NcTrack(); // Destructor
23 NcTrack(const NcTrack& t); // Copy constructor
24 virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
25 virtual void Reset(); // Reset all values to 0
26 void Set4Momentum(Nc4Vector& p); // Set track 4-momentum
27 void Set3Momentum(Nc3Vector& p); // Set track 3-momentum
28 void SetMass(Double_t m,Double_t dm=0); // Set particle mass and error
29 void SetMass(); // Set mass and error to the values of the hyp. with highest prob.
30 void SetCharge(Float_t q); // Set particle charge
31 virtual void Data(TString f="car",TString u="rad"); // Print track information for frame f and ang units u
32 virtual void List(TString f="car",TString u="rad"); // Track and decay level 1 info for frame f and ang units u
33 virtual void ListAll(TString f="car",TString u="rad");// Track and all decay level info for frame f and ang units u
34 Nc3Vector Get3Momentum(Float_t scale=-1) const; // Provide track 3-momentum
35 Double_t GetMomentum(Float_t scale=-1); // Provide value of track 3-momentum
36 Double_t GetMass(Float_t scale=-1); // Provide particle mass
37 Float_t GetCharge() const; // Provide particle charge
38 Double_t GetEnergy(Float_t scale=-1); // Provide particle total energy
39 void Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms); // Perform 2-body decay
40 Int_t GetNdecay() const; // Provide number of decay products
41 NcTrack* GetDecayTrack(Int_t j) const; // Access to decay produced track number j
42 void RemoveDecays(); // Remove all the decay products of this track
43 void AddSignal(NcSignal& s,Int_t mode=0); // Relate an NcSignal to this track
44 void RemoveSignal(NcSignal& s,Int_t mode=1); // Remove related NcSignal from this track
45 void RemoveSignals(Int_t mode=1); // Remove all related NcSignals from this track
46 Int_t GetNsignals() const; // Provide number of related NcSignals
47 Int_t GetNsignals(const char* classname,Int_t par=0) const; // Provide the number of selected signals
48 NcSignal* GetSignal(Int_t j) const; // Access to the related NcSignal number j
49 TObjArray* GetSignals(const char* classname,Int_t par=0,TObjArray* signals=0); // Provide the selected associated signals
50 void ShowSignals(const char* classname,Int_t par=0,Int_t mode=1,TString f="car",TString u="rad"); // Overview of all selected associated signals
51 Double_t GetSignalValue(TString classname,TString varname,Int_t mode=0,Int_t par=2); // Provide total signal value all selected associated signals
52 void SetBeginPoint(NcPosition& p); // Set the track begin-point
53 NcPosition* GetBeginPoint(); // Provide the track begin-point
54 void SetEndPoint(NcPosition& p); // Set the track end-point
55 NcPosition* GetEndPoint(); // Provide the track end-point
56 void SetReferencePoint(NcPosition& p); // Set the track reference-point for the 3-momentum vector
57 NcPosition* GetReferencePoint(); // Provide the track reference-point for the 3-momentum vector
58 void SetHypCopy(Int_t flag); // (De)activate creation of private copies of hypothesis tracks
59 Int_t GetHypCopy() const; // Provide the HypCopy flag value
60 void AddTrackHypothesis(NcTrack& t); // Add track hypothesis
61 void AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm=0); // Add track hypothesis with mass data
62 Int_t GetNhypotheses() const; // Provide number of track hypotheses
63 NcTrack* GetTrackHypothesis(Int_t j=0) const; // Provide the j-th track hypothesis
64 void RemoveTrackHypothesis(NcTrack& t);// Remove the specified track hypothesis
65 void RemoveTrackHypotheses(); // Remove all track hypotheses
66 Double_t GetPt(Float_t scale=-1); // Provide trans. momentum w.r.t. z-axis
67 Double_t GetPl(Float_t scale=-1); // Provide long. momentum w.r.t. z-axis
68 Double_t GetEt(Float_t scale=-1); // Provide trans. energy w.r.t. z-axis
69 Double_t GetEl(Float_t scale=-1); // Provide long. energy w.r.t. z-axis
70 Double_t GetMt(Float_t scale=-1); // Provide trans. mass w.r.t. z-axis
71 Double_t GetRapidity(); // Provide rapidity value w.r.t. z-axis
72 void SetImpactPoint(NcPosition& p,TString q); // Set the impact-point in plane "q=0"
73 NcPosition* GetImpactPoint(TString q); // Provide the impact-point in plane "q=0"
74 void SetId(Int_t id); // Set the user defined unique track identifier
75 Int_t GetId() const; // Provide the user defined unique track identifier
76 void SetClosestPoint(NcPosition& p); // Set position p as point of closest approach w.r.t. some reference
77 NcPosition* GetClosestPoint(); // Provide point of closest approach w.r.t. some reference
78 void SetParticleCode(Int_t code); // Set the user defined particle id code (e.g. the PDF convention)
79 Int_t GetParticleCode() const; // Provide the user defined particle id code
80 void SetParentTrack(NcTrack* t); // Set pointer to the parent track
81 NcTrack* GetParentTrack(); // Provide pointer to the parent track
82 void SetProb(Double_t prob); // Set the hypothesis probability for this track
83 Float_t GetProb() const; // Provide the hypothesis probability for this track
84 void SetFitDetails(TObject* obj); // Enter the object containing the fit details
85 void SetFitDetails(TObject& obj) { SetFitDetails(&obj); }
86 TObject* GetFitDetails(); // Provide pointer to the object containing the fit details
87 void SetTimestamp(NcTimestamp& t); // Set the track timestamp
88 NcTimestamp* GetTimestamp(); // Provide the track timestamp
89 void RemoveTimestamp(); // Remove timestamp from this track
90 Double_t GetDistance(NcPosition* p,Float_t scale=-1); // Provide distance to position p
91 Double_t GetDistance(NcPosition& p,Float_t scale=-1) { return GetDistance(&p,scale); }
92 Double_t GetDistance(NcTrack* t,Float_t scale=-1); // Provide distance to track t
93 Double_t GetDistance(NcTrack& t,Float_t scale=-1) { return GetDistance(&t,scale); }
94 void SetEscale(Float_t scale); // Set the scale of the energy-momentum units of the track
95 Float_t GetEscale() const; // Provide the scale of the energy-momentum units of the track
96
97 protected:
98 void Init(); // Initialisation of pointers etc...
99 Float_t fQ; // The charge of the particle
100 TObjArray* fDecays; // The array of decay produced tracks
101 TObjArray* fSignals; // The array of related NcSignals
102 TObjArray* fHypotheses; // The array of track hypotheses
103 NcPositionObj* fBegin; // The begin-point of the track
104 NcPositionObj* fEnd; // The end-point of the track
105 NcPositionObj* fRef; // The reference-point of the track for the 3-momentum vector
106 NcPositionObj* fImpactXY; // The (extrapolated) impact-point in the plane z=0
107 NcPositionObj* fImpactXZ; // The (extrapolated) impact-point in the plane y=0
108 NcPositionObj* fImpactYZ; // The (extrapolated) impact-point in the plane x=0
109 Int_t fUserId; // The user defined identifier
110 NcPositionObj* fClosest; // The (extrapolated) point of closest approach w.r.t some reference
111 Int_t fCode; // The user defined particle id code
112 NcTrack* fParent; // Pointer to the parent track
113 Float_t fProb; // Probability for this track as a hypothesis
114 TObject* fFit; // Object containing details of the fit
115 NcTimestamp* fTstamp; // The track timestamp
116 Float_t fEscale; // The scale of the energy-momentum units of the track
117 TObjArray* fTemp;
118 Int_t fHypCopy; // Flag to denote storage of private copies of hypothesis tracks
119
120 private:
121 void Dumps(NcTrack* t,Int_t n,TString f,TString u); // Recursively print all decay levels
122
123 ClassDef(NcTrack,5) // Handling of the attributes of a reconstructed particle track.
124};
125#endif
Handling of 3-vectors in various reference frames.
Definition Nc3Vector.h:15
Handling of positions (with timestamps) in various reference frames.
Definition NcPosition.h:18
Handling of positions in various reference frames.
Generic handling of (extrapolated) detector signals.
Definition NcSignal.h:23
Handling of timestamps for (astro)particle physics research.
Definition NcTimestamp.h:20
Handling of the attributes of a reconstructed particle track.
Definition NcTrack.h:19
Int_t GetHypCopy() const
Definition NcTrack.cxx:1246
NcPosition * GetEndPoint()
Definition NcTrack.cxx:1458
NcPosition * GetBeginPoint()
Definition NcTrack.cxx:1435
void Set4Momentum(Nc4Vector &p)
Definition NcTrack.cxx:415
void SetFitDetails(TObject &obj)
Definition NcTrack.h:85
Double_t GetEt(Float_t scale=-1)
Definition NcTrack.cxx:1586
void RemoveSignals(Int_t mode=1)
Definition NcTrack.cxx:941
TObjArray * fTemp
! Temporary storage for exchange of object pointers
Definition NcTrack.h:117
virtual void ListAll(TString f="car", TString u="rad")
Definition NcTrack.cxx:541
Double_t GetDistance(NcTrack &t, Float_t scale=-1)
Definition NcTrack.h:93
NcTrack * GetTrackHypothesis(Int_t j=0) const
Definition NcTrack.cxx:1376
NcTrack * GetDecayTrack(Int_t j) const
Definition NcTrack.cxx:842
virtual void List(TString f="car", TString u="rad")
Definition NcTrack.cxx:504
void SetCharge(Float_t q)
Definition NcTrack.cxx:444
void SetBeginPoint(NcPosition &p)
Definition NcTrack.cxx:1423
NcPosition * GetImpactPoint(TString q)
Definition NcTrack.cxx:1738
void AddTrackHypothesis(NcTrack &t)
Definition NcTrack.cxx:1269
NcPositionObj * fImpactYZ
Definition NcTrack.h:108
TObjArray * fHypotheses
Definition NcTrack.h:102
NcPositionObj * fImpactXZ
Definition NcTrack.h:107
Double_t GetRapidity()
Definition NcTrack.cxx:1670
void RemoveDecays()
Definition NcTrack.cxx:871
TObjArray * fSignals
Definition NcTrack.h:101
NcTimestamp * GetTimestamp()
Definition NcTrack.cxx:1985
Float_t fProb
Definition NcTrack.h:113
void SetEndPoint(NcPosition &p)
Definition NcTrack.cxx:1446
NcPositionObj * fImpactXY
Definition NcTrack.h:106
NcTrack * GetParentTrack()
Definition NcTrack.cxx:1889
void SetReferencePoint(NcPosition &p)
Definition NcTrack.cxx:1469
NcTrack * fParent
Definition NcTrack.h:112
Int_t fHypCopy
Definition NcTrack.h:118
virtual TObject * Clone(const char *name="") const
Definition NcTrack.cxx:2167
Int_t GetId() const
Definition NcTrack.cxx:1783
Double_t GetPl(Float_t scale=-1)
Definition NcTrack.cxx:1552
NcSignal * GetSignal(Int_t j) const
Definition NcTrack.cxx:1017
Double_t GetDistance(NcPosition &p, Float_t scale=-1)
Definition NcTrack.h:91
Int_t GetNdecay() const
Definition NcTrack.cxx:829
void RemoveTimestamp()
Definition NcTrack.cxx:1996
Int_t GetParticleCode() const
Definition NcTrack.cxx:1867
Int_t GetNsignals() const
Definition NcTrack.cxx:970
void Decay(Double_t m1, Double_t m2, Double_t thcms, Double_t phicms)
Definition NcTrack.cxx:754
TObjArray * fDecays
Definition NcTrack.h:100
NcPositionObj * fBegin
Definition NcTrack.h:103
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
Definition NcTrack.cxx:2011
void SetParticleCode(Int_t code)
Definition NcTrack.cxx:1856
Double_t GetEl(Float_t scale=-1)
Definition NcTrack.cxx:1611
void Dumps(NcTrack *t, Int_t n, TString f, TString u)
Definition NcTrack.cxx:578
virtual void Data(TString f="car", TString u="rad")
Definition NcTrack.cxx:455
NcPosition * GetClosestPoint()
Definition NcTrack.cxx:1806
void RemoveTrackHypothesis(NcTrack &t)
Definition NcTrack.cxx:1329
void AddSignal(NcSignal &s, Int_t mode=0)
Definition NcTrack.cxx:886
NcPositionObj * fClosest
Definition NcTrack.h:110
void Set3Momentum(Nc3Vector &p)
Definition NcTrack.cxx:401
void SetProb(Double_t prob)
Definition NcTrack.cxx:1900
Float_t GetProb() const
Definition NcTrack.cxx:1911
Double_t GetEnergy(Float_t scale=-1)
Definition NcTrack.cxx:721
NcPositionObj * fEnd
Definition NcTrack.h:104
void SetFitDetails(TObject *obj)
Definition NcTrack.cxx:1922
NcPosition * GetReferencePoint()
Definition NcTrack.cxx:1485
Double_t GetMass(Float_t scale=-1)
Definition NcTrack.cxx:671
void SetMass()
Definition NcTrack.cxx:1500
void Init()
Definition NcTrack.cxx:133
Int_t fUserId
Definition NcTrack.h:109
Int_t fCode
Definition NcTrack.h:111
void ShowSignals(const char *classname, Int_t par=0, Int_t mode=1, TString f="car", TString u="rad")
Definition NcTrack.cxx:1126
Int_t GetNhypotheses() const
Definition NcTrack.cxx:1363
virtual void Reset()
Definition NcTrack.cxx:321
Nc3Vector Get3Momentum(Float_t scale=-1) const
Definition NcTrack.cxx:652
Double_t GetSignalValue(TString classname, TString varname, Int_t mode=0, Int_t par=2)
Definition NcTrack.cxx:1172
virtual ~NcTrack()
Definition NcTrack.cxx:159
Double_t GetMt(Float_t scale=-1)
Definition NcTrack.cxx:1637
Float_t GetEscale() const
Definition NcTrack.cxx:1841
TObject * GetFitDetails()
Definition NcTrack.cxx:1962
Float_t fQ
Definition NcTrack.h:99
NcPositionObj * fRef
Definition NcTrack.h:105
NcTimestamp * fTstamp
Definition NcTrack.h:115
TObjArray * GetSignals(const char *classname, Int_t par=0, TObjArray *signals=0)
Definition NcTrack.cxx:1046
Float_t fEscale
Definition NcTrack.h:116
void SetHypCopy(Int_t flag)
Definition NcTrack.cxx:1209
Float_t GetCharge() const
Definition NcTrack.cxx:710
Double_t GetPt(Float_t scale=-1)
Definition NcTrack.cxx:1524
void RemoveTrackHypotheses()
Definition NcTrack.cxx:1348
void SetClosestPoint(NcPosition &p)
Definition NcTrack.cxx:1794
void SetImpactPoint(NcPosition &p, TString q)
Definition NcTrack.cxx:1698
void SetId(Int_t id)
Definition NcTrack.cxx:1772
void RemoveSignal(NcSignal &s, Int_t mode=1)
Definition NcTrack.cxx:916
Double_t GetMomentum(Float_t scale=-1)
Definition NcTrack.cxx:627
TObject * fFit
Definition NcTrack.h:114
void SetParentTrack(NcTrack *t)
Definition NcTrack.cxx:1878
void SetTimestamp(NcTimestamp &t)
Definition NcTrack.cxx:1973
void SetEscale(Float_t scale)
Definition NcTrack.cxx:1817