EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairMCPoint.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairMCPoint.h
1 
8 #ifndef FAIRMCPOINT_H
9 #define FAIRMCPOINT_H
10 
11 #include "FairMultiLinkedData.h"
12 #include "TVector3.h"
13 
15 {
16 
17  public:
18 
20  FairMCPoint();
21 
22 
33  FairMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom,
34  Double_t tof, Double_t length, Double_t eLoss, UInt_t EventId=0);
35 
36 
38  virtual ~FairMCPoint();
39 
40 
42  UInt_t GetEventID() const { return fEventId; }
43  Int_t GetTrackID() const { return fTrackID; }
44  Double_t GetPx() const { return fPx; }
45  Double_t GetPy() const { return fPy; }
46  Double_t GetPz() const { return fPz; }
47  Double_t GetTime() const { return fTime; }
48  Double_t GetLength() const { return fLength; }
49  Double_t GetEnergyLoss() const { return fELoss; }
50  void Momentum(TVector3& mom) { mom.SetXYZ(fPx, fPy, fPz); }
51  Int_t GetDetectorID() const { return fDetectorID; };
52  Double_t GetX() const { return fX; };
53  Double_t GetY() const { return fY; };
54  Double_t GetZ() const { return fZ; };
55  void Position(TVector3& pos) const;
56 
57 
58 
59 
61  void SetEventID(UInt_t eventId) { fEventId = eventId; }
62  virtual void SetTrackID(Int_t id) { fTrackID = id;}
63  void SetTime(Double_t time) { fTime = time; }
64  void SetLength(Double_t length) { fLength = length; }
65  void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; }
66  void SetMomentum(const TVector3& mom);
67  void SetDetectorID(Int_t detID) { fDetectorID = detID; }
68  void SetX(Double_t x) { fX = x; }
69  void SetY(Double_t y) { fY = y; }
70  void SetZ(Double_t z) { fZ = z; }
71  void SetXYZ(Double_t x, Double_t y, Double_t z);
72  void SetPosition(const TVector3& pos);
73 
74 
76  virtual void Print(const Option_t* opt = 0) const = 0;
77 
78 
79 
80  protected:
81 
82  Int_t fTrackID;
83  UInt_t fEventId;
84  Double32_t fPx, fPy, fPz;
85  Double32_t fTime;
86  Double32_t fLength;
87  Double32_t fELoss;
88  Int_t fDetectorID;
89  Double32_t fX, fY, fZ;
90 
91 
93 
94 };
95 
96 
97 inline void FairMCPoint::SetMomentum(const TVector3& mom)
98 {
99  fPx = mom.Px();
100  fPy = mom.Py();
101  fPz = mom.Pz();
102 }
103 inline void FairMCPoint::Position(TVector3& pos) const
104 {
105  pos.SetXYZ(fX, fY, fZ);
106 }
107 
108 
109 inline void FairMCPoint::SetXYZ(Double_t x, Double_t y, Double_t z)
110 {
111  fX = x;
112  fY = y;
113  fZ = z;
114 }
115 
116 
117 inline void FairMCPoint::SetPosition(const TVector3& pos)
118 {
119  fX = pos.X();
120  fY = pos.Y();
121  fZ = pos.Z();
122 }
123 
124 
125 
126 #endif