CbmRoot
CbmMvdPoint.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmMvdPoint header file -----
3 // ----- Created 06/11/06 by V. Friese -----
4 // -------------------------------------------------------------------------
5 
17 #ifndef CBMMVDPOINT_H
18 #define CBMMVDPOINT_H 1
19 
20 #include <Rtypes.h> // for ClassDef
21 #include <RtypesCore.h> // for Int_t, Double_t, Double32_t, Option_t
22 #include <TVector3.h> // for TVector3
23 
24 #include <FairMCPoint.h> // for FairMCPoint
25 
26 #include "CbmMvdDetectorId.h" // for CbmMvdDetectorId
27 
28 class CbmMvdPoint : public FairMCPoint, CbmMvdDetectorId {
29 
30 public:
32  CbmMvdPoint();
33 
34 
48  CbmMvdPoint(Int_t trackId,
49  Int_t pdgCode,
50  Int_t detId,
51  TVector3 posIn,
52  TVector3 posOut,
53  TVector3 momIn,
54  TVector3 momOut,
55  Double_t tof,
56  Double_t length,
57  Double_t eLoss,
58  Int_t frame = 0);
59 
60 
62  // CbmMvdPoint(const CbmMvdPoint& point) { *this = point; };
63 
64 
66  virtual ~CbmMvdPoint();
67 
68 
70  Double_t GetXOut() const { return fX_out; }
71  Double_t GetYOut() const { return fY_out; }
72  Double_t GetZOut() const { return fZ_out; }
73  Double_t GetPxOut() const { return fPx_out; }
74  Double_t GetPyOut() const { return fPy_out; }
75  Double_t GetPzOut() const { return fPz_out; }
76  Int_t GetPdgCode() const { return fPdgCode; }
77  Int_t GetSystemId() const { return SystemId(fDetectorID); }
78  Int_t GetStationNr() const { return StationNr(fDetectorID); }
79  Int_t GetPointId() const {
80  return fPointId;
81  } // Returns index of this object in its TClonesArray.
82  // By default not filled. Used internally in the MvdDigitizer.
83  void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out); }
84  void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out, fPy_out, fPz_out); }
85  Int_t GetFrame() const { return fFrame; }
86  Int_t GetAbsTime();
87 
89  void SetPositionOut(TVector3 pos);
90  void SetMomentumOut(TVector3 mom);
91  void SetPdgCode(Int_t pdg) { fPdgCode = pdg; }
92  void SetPointId(Int_t myId) { fPointId = myId; }
93  void SetFrameNr(Int_t frame) { fFrame = frame; }
94 
95 
97  virtual void Print(const Option_t* opt) const;
98 
99 
100 protected:
101  Double32_t fX_out, fY_out, fZ_out;
102  Double32_t fPx_out, fPy_out, fPz_out;
103  Int_t
104  fPdgCode; // index of the object in its TClonesArray. By default not filled => -1.
105  Int_t
106  fPointId; // index of the object in its TClonesArray. By default not filled => -1.
107  Int_t fFrame;
108  Double_t fStartTime;
109 
111 };
112 
113 
114 inline void CbmMvdPoint::SetPositionOut(TVector3 pos) {
115  fX_out = pos.X();
116  fY_out = pos.Y();
117  fZ_out = pos.Z();
118 }
119 
120 
121 inline void CbmMvdPoint::SetMomentumOut(TVector3 mom) {
122  fPx_out = mom.Px();
123  fPy_out = mom.Py();
124  fPz_out = mom.Pz();
125 }
126 
127 
128 #endif
CbmMvdDetectorId
Definition: CbmMvdDetectorId.h:32
CbmMvdPoint::Print
virtual void Print(const Option_t *opt) const
Definition: CbmMvdPoint.cxx:73
CbmMvdPoint::fPdgCode
Int_t fPdgCode
Definition: CbmMvdPoint.h:104
CbmMvdPoint::fZ_out
Double32_t fZ_out
Definition: CbmMvdPoint.h:101
CbmMvdPoint::SetPdgCode
void SetPdgCode(Int_t pdg)
Definition: CbmMvdPoint.h:91
CbmMvdPoint::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMvdPoint.h:76
CbmMvdPoint::GetSystemId
Int_t GetSystemId() const
Definition: CbmMvdPoint.h:77
CbmMvdPoint::~CbmMvdPoint
virtual ~CbmMvdPoint()
Definition: CbmMvdPoint.cxx:68
CbmMvdPoint::GetStationNr
Int_t GetStationNr() const
Definition: CbmMvdPoint.h:78
CbmMvdPoint::fX_out
Double32_t fX_out
Definition: CbmMvdPoint.h:101
CbmMvdPoint::SetMomentumOut
void SetMomentumOut(TVector3 mom)
Definition: CbmMvdPoint.h:121
CbmMvdPoint::fPx_out
Double32_t fPx_out
Definition: CbmMvdPoint.h:102
CbmMvdDetectorId.h
CbmMvdPoint::SetFrameNr
void SetFrameNr(Int_t frame)
Definition: CbmMvdPoint.h:93
CbmMvdPoint::GetPointId
Int_t GetPointId() const
Definition: CbmMvdPoint.h:79
CbmMvdPoint
Definition: CbmMvdPoint.h:28
CbmMvdDetectorId::SystemId
Int_t SystemId(Int_t detectorId) const
Definition: CbmMvdDetectorId.h:50
CbmMvdPoint::CbmMvdPoint
CbmMvdPoint()
Definition: CbmMvdPoint.cxx:16
CbmMvdPoint::PositionOut
void PositionOut(TVector3 &pos)
Definition: CbmMvdPoint.h:83
CbmMvdPoint::fPointId
Int_t fPointId
Definition: CbmMvdPoint.h:106
CbmMvdPoint::fPz_out
Double32_t fPz_out
Definition: CbmMvdPoint.h:102
CbmMvdPoint::GetPxOut
Double_t GetPxOut() const
Definition: CbmMvdPoint.h:73
CbmMvdPoint::GetFrame
Int_t GetFrame() const
Definition: CbmMvdPoint.h:85
CbmMvdPoint::SetPointId
void SetPointId(Int_t myId)
Definition: CbmMvdPoint.h:92
CbmMvdPoint::GetZOut
Double_t GetZOut() const
Definition: CbmMvdPoint.h:72
CbmMvdPoint::GetPyOut
Double_t GetPyOut() const
Definition: CbmMvdPoint.h:74
CbmMvdPoint::SetPositionOut
void SetPositionOut(TVector3 pos)
Definition: CbmMvdPoint.h:114
CbmMvdPoint::GetXOut
Double_t GetXOut() const
Definition: CbmMvdPoint.h:70
CbmMvdPoint::fY_out
Double32_t fY_out
Definition: CbmMvdPoint.h:101
CbmMvdPoint::GetPzOut
Double_t GetPzOut() const
Definition: CbmMvdPoint.h:75
CbmMvdPoint::fPy_out
Double32_t fPy_out
Definition: CbmMvdPoint.h:102
CbmMvdPoint::GetYOut
Double_t GetYOut() const
Definition: CbmMvdPoint.h:71
CbmMvdPoint::MomentumOut
void MomentumOut(TVector3 &mom)
Definition: CbmMvdPoint.h:84
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmMvdDetectorId::StationNr
Int_t StationNr(Int_t detectorId) const
Definition: CbmMvdDetectorId.h:61
CbmMvdPoint::fStartTime
Double_t fStartTime
Definition: CbmMvdPoint.h:108
CbmMvdPoint::GetAbsTime
Int_t GetAbsTime()
Definition: CbmMvdPoint.cxx:84
CbmMvdDetectorId::ClassDef
ClassDef(CbmMvdDetectorId, 1)
CbmMvdPoint::fFrame
Int_t fFrame
Definition: CbmMvdPoint.h:107