PandaRoot
PndHypGePoint.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // ----- CbmHypGepoint header file -----
3 
4 // ------------------------------------------------------------------------
5 
6 #ifndef PNDHYPGEPOINT_H
7 #define PNDHYPGEPOINT_H
8 
9 #include "TObject.h"
10 #include "TVector3.h"
11 #include "TLorentzVector.h"
12 #include "FairMCPoint.h"
13 
14 using namespace std;
15 
16 class PndHypGePoint : public FairMCPoint {
17 
18  public:
20  PndHypGePoint();
21 
34  PndHypGePoint(Int_t trackID, Int_t evtID, Int_t pdgCode, Double_t charge, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t copy);
35 
37  PndHypGePoint(const PndHypGePoint &point) { *this = point; };
38 
40  virtual ~PndHypGePoint();
41 
43  Int_t GetTrackID() const { return fTrackID; };
44  Int_t GetEventID() const { return fEventID; };
45  Int_t GetDetectorID() const { return fnCopy; };
46  Double_t GetX() const { return fX; };
47  Double_t GetY() const { return fY; };
48  Double_t GetZ() const { return fZ; };
49  Double_t GetPx() const { return fPx; };
50  Double_t GetPy() const { return fPy; };
51  Double_t GetPz() const { return fPz; };
52  Double_t GetTime() const { return fTime; };
53  Double_t GetLength() const { return fLength; };
54  Double_t GetEnergyLoss() const { return fELoss; };
55  Double_t GetpdgCode() const { return fpdgCode; };
56  void Position(TVector3 &pos) { pos.SetXYZ(fX, fY, fZ); };
57  void Momentum(TVector3 &mom) { mom.SetXYZ(fPx, fPy, fPz); };
58 
59  // Int_t GetCopy() const { return ();};
61  void SetTrackID(Int_t id) { fTrackID = id; };
62  void SetEventID(Int_t id) { fEventID = id; };
63  void SetDetectorID(Short_t copy) { fnCopy = copy; };
64  void SetTime(Double_t time) { fTime = time; };
65  void SetLength(Double_t length) { fLength = length; };
66  void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; };
67  void SetpdgCode(Int_t pdgCode) { fpdgCode = pdgCode; };
68  void SetPosition(const TVector3 &pos);
69  void SetMomentum(const TVector3 &mom);
70 
72  virtual void Print(const Option_t *opt) const;
73 
74  protected:
75  Int_t fEventID; // Event ID
76  TLorentzVector fPos; // position
77  TLorentzVector fMom; // momentum
78  Double_t fELoss, fmass, fcharge, fTime;
79  Short_t fnCopy; // Copy number
80  Int_t fpdgCode;
81 
82  ClassDef(PndHypGePoint, 1)
83 };
84 
85 inline void PndHypGePoint::SetPosition(const TVector3 &pos)
86 {
87  fX = pos.X();
88  fY = pos.Y();
89  fZ = pos.Z();
90 }
91 
92 inline void PndHypGePoint::SetMomentum(const TVector3 &mom)
93 {
94  fPx = mom.Px();
95  fPy = mom.Py();
96  fPz = mom.Pz();
97 }
98 
99 #endif
Double_t GetPz() const
Definition: PndHypGePoint.h:51
TLorentzVector fPos
Definition: PndHypGePoint.h:76
Double_t GetY() const
Definition: PndHypGePoint.h:47
Double_t GetLength() const
Definition: PndHypGePoint.h:53
Double_t GetZ() const
Definition: PndHypGePoint.h:48
STL namespace.
Double_t fTime
Definition: PndHypGePoint.h:78
void SetEventID(Int_t id)
Definition: PndHypGePoint.h:62
Double_t GetTime() const
Definition: PndHypGePoint.h:52
PndHypGePoint(const PndHypGePoint &point)
Definition: PndHypGePoint.h:37
void SetLength(Double_t length)
Definition: PndHypGePoint.h:65
Int_t GetTrackID() const
Definition: PndHypGePoint.h:43
void SetpdgCode(Int_t pdgCode)
Definition: PndHypGePoint.h:67
Double_t GetPx() const
Definition: PndHypGePoint.h:49
TLorentzVector fMom
Definition: PndHypGePoint.h:77
Int_t GetDetectorID() const
Definition: PndHypGePoint.h:45
void Momentum(TVector3 &mom)
Definition: PndHypGePoint.h:57
void SetTime(Double_t time)
Definition: PndHypGePoint.h:64
Int_t GetEventID() const
Definition: PndHypGePoint.h:44
void SetMomentum(const TVector3 &mom)
Definition: PndHypGePoint.h:92
Double_t GetEnergyLoss() const
Definition: PndHypGePoint.h:54
void Position(TVector3 &pos)
Definition: PndHypGePoint.h:56
Double_t GetPy() const
Definition: PndHypGePoint.h:50
Double_t GetX() const
Definition: PndHypGePoint.h:46
void SetEnergyLoss(Double_t eLoss)
Definition: PndHypGePoint.h:66
void SetDetectorID(Short_t copy)
Definition: PndHypGePoint.h:63
void SetTrackID(Int_t id)
Definition: PndHypGePoint.h:61
void SetPosition(const TVector3 &pos)
Definition: PndHypGePoint.h:85
Double_t GetpdgCode() const
Definition: PndHypGePoint.h:55
Short_t fnCopy
Definition: PndHypGePoint.h:79