CbmRoot
CbmTrack.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmTrack header file -----
3 // ----- Created 29/11/07 by V. Friese -----
4 // ----- Modified 26/05/09 by A. Lebedev -----
5 // -------------------------------------------------------------------------
6 
16 #ifndef CBMTRACK_H_
17 #define CBMTRACK_H_ 1
18 
19 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
20 #include <RtypesCore.h> // for Int_t, Double_t, Double32_t
21 #include <TObject.h> // for TObject
22 
23 #include <FairTrackParam.h> // for FairTrackParam
24 
25 #include <string> // for string
26 #include <vector> // for vector
27 
28 #include "CbmHit.h" // for HitType
29 
30 class CbmMatch;
31 
32 class CbmTrack : public TObject {
33 public:
35  CbmTrack();
36 
38  virtual ~CbmTrack();
39 
41  CbmTrack(const CbmTrack&);
42 
44  CbmTrack& operator=(const CbmTrack&);
45 
50  void AddHit(Int_t index, HitType type);
51 
53  virtual Int_t GetNofHits() const { return fHitIndex.size(); }
54  Int_t GetHitIndex(Int_t iHit) const { return fHitIndex[iHit]; }
55  HitType GetHitType(Int_t iHit) const { return fHitType[iHit]; }
56  Int_t GetPidHypo() const { return fPidHypo; }
57  Int_t GetFlag() const { return fFlag; }
58  Double_t GetChiSq() const { return fChiSq; }
59  Int_t GetNDF() const { return fNDF; }
60  Int_t GetPreviousTrackId() const { return fPreviousTrackId; }
61  const FairTrackParam* GetParamFirst() const { return &fParamFirst; }
62  const FairTrackParam* GetParamLast() const { return &fParamLast; }
63  CbmMatch* GetMatch() const { return fMatch; }
64  Double_t GetTime() const { return fTime; }
65  Double_t GetTimeError() const { return fTimeError; }
66 
68  void SetPidHypo(Int_t pid) { fPidHypo = pid; }
69  void SetFlag(Int_t flag) { fFlag = flag; }
70  void SetChiSq(Double_t chiSq) { fChiSq = chiSq; }
71  void SetNDF(Int_t ndf) { fNDF = ndf; }
72  void SetPreviousTrackId(Int_t previousTrackId) {
73  fPreviousTrackId = previousTrackId;
74  }
75  void SetParamFirst(const FairTrackParam* par) { fParamFirst = *par; }
76  void SetParamLast(const FairTrackParam* par) { fParamLast = *par; }
77  void SetMatch(CbmMatch* match);
78  void SetTime(Double_t time) { fTime = time; }
79  void SetTimeError(Double_t error) { fTimeError = error; }
80 
81  virtual std::string ToString() const;
82 
83 protected:
85  std::vector<Int_t> fHitIndex;
86 
88  std::vector<HitType> fHitType;
89 
91  Int_t fPidHypo;
92 
94  FairTrackParam fParamFirst;
95  FairTrackParam fParamLast;
96 
98  Double_t fTime;
99  Double_t fTimeError;
100 
102  Int_t fFlag;
103 
105  Double32_t fChiSq;
106  Int_t fNDF;
107 
110 
113 
115 };
116 
117 #endif
CbmTrack::fPidHypo
Int_t fPidHypo
Definition: CbmTrack.h:91
CbmTrack::GetChiSq
Double_t GetChiSq() const
Definition: CbmTrack.h:58
CbmMatch
Definition: CbmMatch.h:22
CbmTrack::GetParamLast
const FairTrackParam * GetParamLast() const
Definition: CbmTrack.h:62
CbmTrack::fTime
Double_t fTime
Definition: CbmTrack.h:98
CbmTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmTrack.h:53
CbmTrack::fNDF
Int_t fNDF
Definition: CbmTrack.h:106
CbmTrack::GetFlag
Int_t GetFlag() const
Definition: CbmTrack.h:57
CbmTrack::SetPreviousTrackId
void SetPreviousTrackId(Int_t previousTrackId)
Definition: CbmTrack.h:72
CbmTrack::SetTime
void SetTime(Double_t time)
Definition: CbmTrack.h:78
CbmTrack::fMatch
CbmMatch * fMatch
Definition: CbmTrack.h:112
CbmTrack::SetParamLast
void SetParamLast(const FairTrackParam *par)
Definition: CbmTrack.h:76
CbmTrack::SetNDF
void SetNDF(Int_t ndf)
Definition: CbmTrack.h:71
CbmTrack::fFlag
Int_t fFlag
Definition: CbmTrack.h:102
CbmTrack::SetFlag
void SetFlag(Int_t flag)
Definition: CbmTrack.h:69
CbmTrack
Definition: CbmTrack.h:32
CbmHit.h
CbmTrack::~CbmTrack
virtual ~CbmTrack()
Definition: CbmTrack.cxx:71
CbmTrack::GetMatch
CbmMatch * GetMatch() const
Definition: CbmTrack.h:63
CbmTrack::SetMatch
void SetMatch(CbmMatch *match)
Definition: CbmTrack.cxx:80
CbmTrack::fChiSq
Double32_t fChiSq
Definition: CbmTrack.h:105
HitType
HitType
Definition: CbmHit.h:16
CbmTrack::GetHitIndex
Int_t GetHitIndex(Int_t iHit) const
Definition: CbmTrack.h:54
CbmTrack::fParamFirst
FairTrackParam fParamFirst
Definition: CbmTrack.h:94
CbmTrack::SetPidHypo
void SetPidHypo(Int_t pid)
Definition: CbmTrack.h:68
CbmTrack::ToString
virtual std::string ToString() const
Definition: CbmTrack.cxx:85
CbmTrack::SetChiSq
void SetChiSq(Double_t chiSq)
Definition: CbmTrack.h:70
CbmTrack::GetNDF
Int_t GetNDF() const
Definition: CbmTrack.h:59
CbmTrack::GetPreviousTrackId
Int_t GetPreviousTrackId() const
Definition: CbmTrack.h:60
CbmTrack::GetHitType
HitType GetHitType(Int_t iHit) const
Definition: CbmTrack.h:55
CbmTrack::SetTimeError
void SetTimeError(Double_t error)
Definition: CbmTrack.h:79
CbmTrack::GetParamFirst
const FairTrackParam * GetParamFirst() const
Definition: CbmTrack.h:61
CbmTrack::operator=
CbmTrack & operator=(const CbmTrack &)
Definition: CbmTrack.cxx:51
CbmTrack::fHitType
std::vector< HitType > fHitType
Definition: CbmTrack.h:88
CbmTrack::SetParamFirst
void SetParamFirst(const FairTrackParam *par)
Definition: CbmTrack.h:75
CbmTrack::fHitIndex
std::vector< Int_t > fHitIndex
Definition: CbmTrack.h:85
CbmTrack::GetPidHypo
Int_t GetPidHypo() const
Definition: CbmTrack.h:56
CbmTrack::GetTime
Double_t GetTime() const
Definition: CbmTrack.h:64
CbmTrack::fParamLast
FairTrackParam fParamLast
Definition: CbmTrack.h:95
CbmTrack::fPreviousTrackId
Int_t fPreviousTrackId
Definition: CbmTrack.h:109
CbmTrack::GetTimeError
Double_t GetTimeError() const
Definition: CbmTrack.h:65
CbmTrack::AddHit
void AddHit(Int_t index, HitType type)
Definition: CbmTrack.cxx:75
CbmTrack::CbmTrack
CbmTrack()
Definition: CbmTrack.cxx:19
CbmTrack::ClassDef
ClassDef(CbmTrack, 4)
CbmTrack::fTimeError
Double_t fTimeError
Definition: CbmTrack.h:99