EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmTrack.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmTrack.h
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 "FairTrackParam.h"
20 #include "CbmBaseHit.h"
21 
22 #include "TObject.h"
23 
24 #include <vector>
25 
27 
28 class CbmTrack : public TObject
29 {
30 public:
32  CbmTrack();
33 
35  virtual ~CbmTrack();
36 
38  CbmTrack(const CbmTrack&);
39 
41  CbmTrack& operator=(const CbmTrack&);
42 
43 
48  void AddHit(
49  Int_t index,
50  HitType type);
51 
53  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  FairMultiLinkedData* GetLinks() const { return fLinks; }
64 
66  void SetPidHypo(Int_t pid){ fPidHypo = pid; }
67  void SetFlag(Int_t flag) { fFlag = flag; }
68  void SetChiSq(Double_t chiSq) { fChiSq = chiSq; }
69  void SetNDF(Int_t ndf) { fNDF = ndf; }
70  void SetPreviousTrackId(Int_t previousTrackId) { fPreviousTrackId = previousTrackId; }
71  void SetParamFirst(const FairTrackParam* par) { fParamFirst = *par; }
72  void SetParamLast(const FairTrackParam* par){ fParamLast = *par; }
73  void SetLinks(FairMultiLinkedData* links) { fLinks = links; }
74 
75  virtual void Print() const;
76 
77 private:
79  std::vector<Int_t> fHitIndex;
80 
82  std::vector<HitType> fHitType;
83 
85  Int_t fPidHypo;
86 
90 
92  Int_t fFlag;
93 
95  Double32_t fChiSq;
96  Int_t fNDF;
97 
100 
103 
104  ClassDef(CbmTrack, 2);
105 };
106 
107 #endif