PandaRoot
PndMCPoint.h
Go to the documentation of this file.
1 
9 #ifndef PNDDATA_PNDMCPOINT_H_
10 #define PNDDATA_PNDMCPOINT_H_
11 
12 #include <FairMCPoint.h>
13 
14 class PndMCPoint : public FairMCPoint {
15  public:
16  PndMCPoint();
17  virtual ~PndMCPoint();
18 
19  PndMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 posOut, TVector3 mom, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss, UInt_t EventId = 0);
20 
21  Double_t GetXOut() const { return fXOut; };
22  Double_t GetYOut() const { return fYOut; };
23  Double_t GetZOut() const { return fZOut; };
24 
25  Double_t GetPxOut() const { return fPxOut; }
26  Double_t GetPyOut() const { return fPyOut; }
27  Double_t GetPzOut() const { return fPzOut; }
28 
29  TVector3 GetPosition() const { return TVector3(fX, fY, fZ); }
30  TVector3 GetPositionOut() const { return TVector3(fXOut, fYOut, fZOut); }
31  TVector3 GetMeanPosition() const { return TVector3((fX + fXOut) / 2., (fY + fYOut) / 2., (fZ + fZOut) / 2.0); }
32  void PositionOut(TVector3 &pos) const { pos.SetXYZ(fXOut, fYOut, fZOut); };
33 
34  TVector3 GetMomentum() const { return TVector3(fPx, fPy, fPz); }
35  TVector3 GetMomentumOut() const { return TVector3(fPxOut, fPyOut, fPzOut); }
36  void MomentumOut(TVector3 &mom) const { mom.SetXYZ(fPxOut, fPyOut, fPzOut); }
37 
38  void SetPositionOut(TVector3 pos);
39  void SetMomentumOut(TVector3 mom);
40 
41  protected:
42  Double32_t fXOut = 0.;
43  Double32_t fYOut = 0.;
44  Double32_t fZOut = 0.;
45 
46  Double32_t fPxOut = 0.;
47  Double32_t fPyOut = 0.;
48  Double32_t fPzOut = 0.;
49 
50  ClassDef(PndMCPoint, 1);
51 };
52 
53 inline void PndMCPoint::SetPositionOut(TVector3 pos)
54 {
55  fXOut = pos.X();
56  fYOut = pos.Y();
57  fZOut = pos.Z();
58 }
59 
60 inline void PndMCPoint::SetMomentumOut(TVector3 mom)
61 {
62  fPxOut = mom.Px();
63  fPyOut = mom.Py();
64  fPzOut = mom.Pz();
65 }
66 
67 #endif /* PNDDATA_PNDMCPOINT_H_ */
void MomentumOut(TVector3 &mom) const
Definition: PndMCPoint.h:36
Double_t GetPyOut() const
Definition: PndMCPoint.h:26
TVector3 GetMomentumOut() const
Definition: PndMCPoint.h:35
Double_t GetZOut() const
Definition: PndMCPoint.h:23
Double32_t fYOut
Definition: PndMCPoint.h:43
Double_t GetYOut() const
Definition: PndMCPoint.h:22
Double32_t fPyOut
Definition: PndMCPoint.h:47
Double32_t fZOut
Definition: PndMCPoint.h:44
virtual ~PndMCPoint()
Double_t GetPxOut() const
Definition: PndMCPoint.h:25
TVector3 GetMeanPosition() const
Definition: PndMCPoint.h:31
void SetMomentumOut(TVector3 mom)
Definition: PndMCPoint.h:60
TVector3 GetMomentum() const
Definition: PndMCPoint.h:34
Double32_t fPxOut
Definition: PndMCPoint.h:46
void PositionOut(TVector3 &pos) const
Definition: PndMCPoint.h:32
ClassDef(PndMCPoint, 1)
TVector3 GetPositionOut() const
Definition: PndMCPoint.h:30
TVector3 GetPosition() const
Definition: PndMCPoint.h:29
Double_t GetPzOut() const
Definition: PndMCPoint.h:27
Double32_t fPzOut
Definition: PndMCPoint.h:48
void SetPositionOut(TVector3 pos)
Definition: PndMCPoint.h:53
Double_t GetXOut() const
Definition: PndMCPoint.h:21
Double32_t fXOut
Definition: PndMCPoint.h:42