PandaRoot
PndHypPoint.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // ----- CbmHyppoint header file -----
3 // ----- Created by A.Sanchez -----
4 // ------------------------------------------------------------------------
5 
6 #ifndef PNDHYPPOINT_H
7 #define PNDHYPPOINT_H
8 
9 #include "TObject.h"
10 #include "TVector3.h"
11 #include "TLorentzVector.h"
12 #include "FairMCPoint.h"
13 #include "TString.h"
14 
15 using namespace std;
16 
17 class PndHypPoint : public FairMCPoint {
18 
19  public:
21  PndHypPoint();
22 
37  PndHypPoint(Int_t trackID, Int_t evtID, Int_t detID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length,
38  Double_t eLoss, Double_t charge, Double_t mass, Int_t pdgCode, Double_t distance, Double_t PLin, Double_t PLout);
39 
41  PndHypPoint(const PndHypPoint &point)
42  : FairMCPoint(point), fEventID(point.fEventID), fPLin(point.fPLin), fPLout(point.fPLout), fmass(point.fmass), fcharge(point.fcharge), fXin(point.fXin), fYin(point.fYin),
43  fZin(point.fZin), fPxin(point.fPxin), fPyin(point.fPyin), fPzin(point.fPzin), fXout(point.fXout), fYout(point.fYout), fZout(point.fZout), fPxout(point.fPxout),
44  fPyout(point.fPyout), fPzout(point.fPzout), fdist(point.fdist), fDetName(point.fDetName), fVolumeID(point.fVolumeID), fpdgCode(point.fpdgCode)
45  {
46  *this = point;
47  };
48 
50  virtual ~PndHypPoint();
51 
53  // Int_t GetTrackID() const { return fTrackID; };
54  Int_t GetEventID() const { return fEventID; };
55  Int_t GetVolumeID() const { return fVolumeID; };
56  Double_t GetXin() const { return fXin; };
57  Double_t GetYin() const { return fYin; };
58  Double_t GetZin() const { return fZin; };
59  Double_t GetPxin() const { return fPxin; };
60  Double_t GetPyin() const { return fPyin; };
61  Double_t GetPzin() const { return fPzin; };
62 
63  /* Double_t GetXOutLocal() const { return fXout_local; }; */
64  /* Double_t GetYOutLocal() const { return fYout_local; }; */
65  /* Double_t GetZOutLocal() const { return fZout_local; }; */
66 
67  /* Double_t GetXInLocal() const { return fXin_local; }; */
68  /* Double_t GetYInLocal() const { return fYin_local; }; */
69  /* Double_t GetZInLocal() const { return fZin_local; }; */
70 
71  Double_t GetPLin() const { return fPLin; };
72  Double_t GetPLout() const { return fPLout; };
73 
74  Double_t GetXout() const { return fXout; };
75  Double_t GetYout() const { return fYout; };
76  Double_t GetZout() const { return fZout; };
77  Double_t GetPxout() const { return fPxout; };
78  Double_t GetPyout() const { return fPyout; };
79  Double_t GetPzout() const { return fPzout; };
80  Double_t Getdist() const { return fdist; };
81  // Double_t Gettheta() const { return ftheta; };
82 
83  TString GetDetName() const { return fDetName; };
84  Double_t GetMass() const { return fmass; };
85  // Double_t GetTime() const { return fTime; };
86  // Double_t GetLength() const { return fLength; };
87  // Double_t GetEnergyLoss() const { return fELoss; };
88 
89  void PositionIn(TVector3 &pos) { pos.SetXYZ(fXin, fYin, fZin); };
90  void MomentumIn(TVector3 &mom) { mom.SetXYZ(fPxin, fPyin, fPzin); };
91 
92  void PositionOut(TVector3 &pos) { pos.SetXYZ(fXout, fYout, fZout); };
93  void MomentumOut(TVector3 &mom) { mom.SetXYZ(fPxout, fPyout, fPzout); };
94 
95  /* void PositionOutLocal(TVector3& pos) { pos.SetXYZ(fXout_local, */
96  /* fYout_local, */
97  /* fZout_local); }; */
98  /* void PositionInLocal(TVector3& pos) { pos.SetXYZ(fXin_local, */
99  /* fYin_local, */
100  /* fZin_local); }; */
101 
103  // void SetTrackID(Int_t id) { fTrackID = id; } ;
104  void SetEventID(Int_t ev) { fEventID = ev; };
105  // void SetTime(Double_t tof) { fTime = tof; };
106  // void SetLength(Double_t length) { fLength = length; };
107  // void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; };
108 
109  void SetPositionIn(const TVector3 &pos);
110  void SetMomentumIn(const TVector3 &mom);
111  void SetPositionOut(const TVector3 &pos);
112  void SetMomentumOut(const TVector3 &mom);
113 
114  /* void SetPositionOutLocal(const TVector3& pos); */
115  /* void SetPositionInLocal(const TVector3& pos); */
116 
118  virtual void Print(const Option_t *opt) const;
119 
120  protected:
121  Int_t fEventID; // Event ID
122 
123  Double_t fPLin, fPLout; // momentum
124  // Int_t fTrackID ;
125  Double_t fmass, fcharge;
126 
127  Double_t fXin, fYin, fZin;
128  Double_t fPxin, fPyin, fPzin;
129  Double_t fXout, fYout, fZout;
130  Double_t fPxout, fPyout, fPzout, fdist;
131  /* Double_t fXout_local, fYout_local, fZout_local; */
132  /* Double_t fXin_local, fYin_local, fZin_local; */
133  TString fDetName;
134 
135  Int_t fVolumeID, fpdgCode;
136 
137  ClassDef(PndHypPoint, 7)
138 };
139 
140 inline void PndHypPoint::SetPositionIn(const TVector3 &pos)
141 {
142  fXin = pos.X();
143  fYin = pos.Y();
144  fZin = pos.Z();
145 }
146 
147 inline void PndHypPoint::SetMomentumIn(const TVector3 &mom)
148 {
149  fPxin = mom.X();
150  fPyin = mom.Py();
151  fPzin = mom.Pz();
152 }
153 
154 inline void PndHypPoint::SetPositionOut(const TVector3 &pos)
155 {
156  fXout = pos.X();
157  fYout = pos.Y();
158  fZout = pos.Z();
159 }
160 
161 inline void PndHypPoint::SetMomentumOut(const TVector3 &mom)
162 {
163  fPxout = mom.Px();
164  fPyout = mom.Py();
165  fPzout = mom.Pz();
166 }
167 
168 /* inline void PndHypPoint::SetPositionOutLocal(const TVector3& pos) { */
169 /* fXout_local = pos.X(); */
170 /* fYout_local = pos.Y(); */
171 /* fZout_local = pos.Z(); */
172 /* } */
173 
174 /* inline void PndHypPoint::SetPositionInLocal(const TVector3& pos) { */
175 /* fXin_local = pos.X(); */
176 /* fYin_local = pos.Y(); */
177 /* fZin_local = pos.Z(); */
178 /* } */
179 
180 #endif
Double_t GetPxout() const
Definition: PndHypPoint.h:77
void SetPositionIn(const TVector3 &pos)
Definition: PndHypPoint.h:140
void MomentumIn(TVector3 &mom)
Definition: PndHypPoint.h:90
Double_t GetPxin() const
Definition: PndHypPoint.h:59
TString fDetName
Definition: PndHypPoint.h:133
void SetPositionOut(const TVector3 &pos)
Definition: PndHypPoint.h:154
Double_t GetZin() const
Definition: PndHypPoint.h:58
Double_t fZin
Definition: PndHypPoint.h:127
Int_t GetEventID() const
Definition: PndHypPoint.h:54
Double_t fPLout
Definition: PndHypPoint.h:123
Double_t fZout
Definition: PndHypPoint.h:129
STL namespace.
Double_t GetPzin() const
Definition: PndHypPoint.h:61
Double_t GetPzout() const
Definition: PndHypPoint.h:79
void MomentumOut(TVector3 &mom)
Definition: PndHypPoint.h:93
Double_t GetYout() const
Definition: PndHypPoint.h:75
Double_t GetPLin() const
Definition: PndHypPoint.h:71
Double_t GetPyin() const
Definition: PndHypPoint.h:60
void PositionIn(TVector3 &pos)
Definition: PndHypPoint.h:89
void SetMomentumOut(const TVector3 &mom)
Definition: PndHypPoint.h:161
Double_t GetZout() const
Definition: PndHypPoint.h:76
Double_t fPzin
Definition: PndHypPoint.h:128
TString GetDetName() const
Definition: PndHypPoint.h:83
Double_t GetPLout() const
Definition: PndHypPoint.h:72
Double_t GetMass() const
Definition: PndHypPoint.h:84
void PositionOut(TVector3 &pos)
Definition: PndHypPoint.h:92
Double_t GetXin() const
Definition: PndHypPoint.h:56
Double_t fPzout
Definition: PndHypPoint.h:130
void SetEventID(Int_t ev)
Definition: PndHypPoint.h:104
PndHypPoint(const PndHypPoint &point)
Definition: PndHypPoint.h:41
Double_t fmass
Definition: PndHypPoint.h:125
Int_t GetVolumeID() const
Definition: PndHypPoint.h:55
Double_t GetXout() const
Definition: PndHypPoint.h:74
Double_t GetPyout() const
Definition: PndHypPoint.h:78
void SetMomentumIn(const TVector3 &mom)
Definition: PndHypPoint.h:147
Int_t fVolumeID
Definition: PndHypPoint.h:135
Double_t GetYin() const
Definition: PndHypPoint.h:57
Int_t fEventID
Definition: PndHypPoint.h:121
Double_t Getdist() const
Definition: PndHypPoint.h:80