EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PndTrack.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PndTrack.h
1 /*
2  * PndTrack.h
3  *
4  * Created on: 05.03.2009
5  * Author: everybody
6  */
7 
8 #ifndef PNDTRACK_H_
9 #define PNDTRACK_H_
10 
11 #include "TObject.h"
12 #include "PndTrackCand.h"
13 #include "FairTrackParP.h"
14 #include "PndDetectorList.h"
15 #include "FairTimeStamp.h"
16 #include "TRef.h"
17 
19 {
20  public:
23 
24  bool IsValid ( void ) const { return mValid; };
25  TVector3 GetMoCaPosition( void ) const { return mMoCaPosition; };
26  TVector3 GetMoCaMomentum( void ) const { return mMoCaMomentum; };
27  TVector3 GetRecoPosition( void ) const { return mRecoPosition; };
28  TVector3 GetRecoMomentum( void ) const { return mRecoMomentum; };
29 
30  double DistanceToPlane(const TVector3 &x0, const TVector3 &n0) const {
31  // Use MC position here;
32  return fabs((x0 - mMoCaPosition).Dot(n0.Unit()));
33  };
34 
35  void SetValid( void ) { mValid = true; };
36  void SetMoCaPosition(const TVector3 &position) { mMoCaPosition = position; };
37  void SetMoCaMomentum(const TVector3 &momentum) { mMoCaMomentum = momentum; };
38  void SetRecoPosition(const TVector3 &position) { mRecoPosition = position; };
39  void SetRecoMomentum(const TVector3 &momentum) { mRecoMomentum = momentum; };
40 
41  private:
42  bool mValid;
43 
44  // Simulated and reconstructed 3D positions and momenta at this hit location;
46 
48 };
49 
50 class PndTrack : public FairTimeStamp{
51 public:
52  PndTrack();
53  PndTrack(const FairTrackParP& first, const FairTrackParP& last, const PndTrackCand& cand,
54  Int_t flag = 0, Double_t chi2 = -1., Int_t ndf = 0, Int_t pid = 0, Int_t id = -1, Int_t type = -1);
55 
56  void Print();
57 
58 
59  Int_t GetPidHypo() const { return fPidHypo; }
60  Int_t GetFlag() const { return fFlag; } //Quality flag
61  Double_t GetChi2() const { return fChi2; }
62  Int_t GetNDF() const { return fNDF; }
63  Int_t GetRefIndex() const { return fRefIndex; }
64  void SetPidHypo(Int_t i) { fPidHypo=i; }
65  void SetFlag(Int_t i) { fFlag=i; }
66  void SetChi2(Double_t d) { fChi2=d; }
67  void SetChiSquareCCDF(Double_t d){ fChiSquareCCDF=d; }
68  void SetNDF(Int_t i) { fNDF=i; }
69  void SetRefIndex(TString branch, Int_t i) { fRefIndex=i; SetLink(FairLink(branch, i)); }
70  void SetRefIndex(Int_t i){fRefIndex = i;}
71  void SetTrackCand(const PndTrackCand& cand) { fTrackCand = cand; };
72  void SetTrackCandRef(PndTrackCand* candPointer){ fRefToPndTrackCand = candPointer; }
74 
79 
80 private:
83 
86 
87  Int_t fPidHypo;
88  Int_t fFlag;
89  Double_t fChi2;
90  // Well, it is convenient to have this value handy in ROOT macros
91  // (even that it is redundant, clear);
92  Double_t fChiSquareCCDF;
93  Int_t fNDF;
94  Int_t fRefIndex;
95 
96 public:
97  // Parameterizations at the hit locations;
98  std::vector<NaiveTrackParameterization> mParameterizations;
99 
100  ClassDef(PndTrack,6)
101 
102 };
103 
104 #endif /* PNDTRACK_H_ */