FairRoot/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 
19  public:
20 
22  PndHypGePoint();
23 
24 
37  PndHypGePoint(Int_t trackID, Int_t evtID, Int_t pdgCode,Double_t charge,
38  TVector3 pos, TVector3 mom,
39  Double_t tof, Double_t length, Double_t eLoss,
40  Short_t copy);
41 
43  PndHypGePoint(const PndHypGePoint& point) { *this = point; };
44 
45 
47  virtual ~PndHypGePoint();
48 
49 
51  Int_t GetTrackID() const { return fTrackID; };
52  Int_t GetEventID() const { return fEventID; };
53  Int_t GetDetectorID() const { return fnCopy; };
54  Double_t GetX() const { return fX; };
55  Double_t GetY() const { return fY; };
56  Double_t GetZ() const { return fZ; };
57  Double_t GetPx() const { return fPx; };
58  Double_t GetPy() const { return fPy; };
59  Double_t GetPz() const { return fPz; };
60  Double_t GetTime() const { return fTime; };
61  Double_t GetLength() const { return fLength; };
62  Double_t GetEnergyLoss() const { return fELoss; };
63  Double_t GetpdgCode() const { return fpdgCode; };
64  void Position(TVector3& pos) { pos.SetXYZ(fX, fY, fZ); };
65  void Momentum(TVector3& mom) { mom.SetXYZ(fPx, fPy, fPz); };
66 
67  //Int_t GetCopy() const { return ();};
69  void SetTrackID(Int_t id) { fTrackID = id; };
70  void SetEventID(Int_t id) { fEventID = id; };
71  void SetDetectorID(Short_t copy) { fnCopy = copy; };
72  void SetTime(Double_t time) { fTime = time; };
73  void SetLength(Double_t length) { fLength = length; };
74  void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; };
75  void SetpdgCode(Int_t pdgCode) { fpdgCode = pdgCode; };
76  void SetPosition(const TVector3& pos);
77  void SetMomentum(const TVector3& mom);
78 
79 
81  virtual void Print(const Option_t* opt) const;
82 
83 
84  protected:
85  Int_t fEventID; // Event ID
86  TLorentzVector fPos; // position
87  TLorentzVector fMom; // momentum
88  Double_t fELoss ,fmass,fcharge, fTime;
89  Short_t fnCopy; // Copy number
90  Int_t fpdgCode;
91 
92  ClassDef(PndHypGePoint,1)
93 
94 };
95 
96 inline void PndHypGePoint::SetPosition(const TVector3& pos) {
97  fX = pos.X();
98  fY = pos.Y();
99  fZ = pos.Z();
100 }
101 
102 inline void PndHypGePoint::SetMomentum(const TVector3& mom) {
103  fPx = mom.Px();
104  fPy = mom.Py();
105  fPz = mom.Pz();
106 }
107 
108 #endif
MechFsc Print()
TVector3 pos
TLorentzVector fPos
Definition: PndHypGePoint.h:86
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t GetPz() const
Definition: PndHypGePoint.h:59
Int_t GetTrackID() const
Definition: PndHypGePoint.h:51
Double_t fTime
Definition: PndHypGePoint.h:88
Double_t mom
Definition: plot_dirc.C:14
void SetEventID(Int_t id)
Definition: PndHypGePoint.h:70
Double_t GetLength() const
Definition: PndHypGePoint.h:61
Double_t fZ
Definition: PndCaloDraw.cxx:34
PndHypGePoint(const PndHypGePoint &point)
Definition: PndHypGePoint.h:43
void SetLength(Double_t length)
Definition: PndHypGePoint.h:73
void SetpdgCode(Int_t pdgCode)
Definition: PndHypGePoint.h:75
Double_t
TLorentzVector fMom
Definition: PndHypGePoint.h:87
Double_t GetPy() const
Definition: PndHypGePoint.h:58
TClonesArray * point
Definition: anaLmdDigi.C:29
Double_t GetPx() const
Definition: PndHypGePoint.h:57
Double_t GetZ() const
Definition: PndHypGePoint.h:56
Int_t GetEventID() const
Definition: PndHypGePoint.h:52
void Momentum(TVector3 &mom)
Definition: PndHypGePoint.h:65
void SetTime(Double_t time)
Definition: PndHypGePoint.h:72
Double_t fY
Definition: PndCaloDraw.cxx:34
Double_t GetTime() const
Definition: PndHypGePoint.h:60
Double_t GetX() const
Definition: PndHypGePoint.h:54
Double_t GetY() const
Definition: PndHypGePoint.h:55
void SetMomentum(const TVector3 &mom)
void Position(TVector3 &pos)
Definition: PndHypGePoint.h:64
void SetEnergyLoss(Double_t eLoss)
Definition: PndHypGePoint.h:74
void SetDetectorID(Short_t copy)
Definition: PndHypGePoint.h:71
Int_t GetDetectorID() const
Definition: PndHypGePoint.h:53
void SetTrackID(Int_t id)
Definition: PndHypGePoint.h:69
Double_t GetEnergyLoss() const
Definition: PndHypGePoint.h:62
void SetPosition(const TVector3 &pos)
Definition: PndHypGePoint.h:96
Short_t fnCopy
Definition: PndHypGePoint.h:89
Double_t GetpdgCode() const
Definition: PndHypGePoint.h:63