CbmRoot
CbmStsPoint.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmStsPoint header file -----
3 // ----- Created 26/07/04 by V. Friese -----
4 // -------------------------------------------------------------------------
5 
6 
16 #ifndef CBMSTSPOINT_H
17 #define CBMSTSPOINT_H
18 
19 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
20 #include <RtypesCore.h> // for Double_t, Int_t, Double32_t, Bool_t, Short_t
21 #include <TVector3.h> // for TVector3
22 
23 #include <FairMCPoint.h> // for FairMCPoint
24 
25 #include <string> // for string
26 
27 class CbmStsPoint : public FairMCPoint {
28 
29 public:
31  CbmStsPoint();
32 
33 
49  CbmStsPoint(Int_t trackID,
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 pid = 0,
59  Int_t eventId = 0,
60  Int_t index = 0,
61  Short_t flag = 3);
62 
63 
70  CbmStsPoint(const CbmStsPoint& point,
71  Int_t eventId = -1,
72  Double_t eventTime = 0.,
73  Double_t epochTime = 0.);
74 
75 
77  virtual ~CbmStsPoint();
78 
79 
81  Double_t GetXIn() const { return fX; }
82  Double_t GetYIn() const { return fY; }
83  Double_t GetZIn() const { return fZ; }
84  Double_t GetXOut() const { return fX_out; }
85  Double_t GetYOut() const { return fY_out; }
86  Double_t GetZOut() const { return fZ_out; }
87  Double_t GetPxOut() const { return fPx_out; }
88  Double_t GetPyOut() const { return fPy_out; }
89  Double_t GetPzOut() const { return fPz_out; }
90  Int_t GetPid() const { return fPid; }
91  Int_t GetIndex() const { return fIndex; }
92  Bool_t IsEntry() const { return (fFlag == 1 || fFlag == 3); }
93  Bool_t IsExit() const { return (fFlag == 2 || fFlag == 3); }
94 
95  void PositionIn(TVector3& pos) { pos.SetXYZ(fX, fY, fZ); }
96  void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out); }
97  void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out, fPy_out, fPz_out); }
98 
99 
101  Double_t GetX(Double_t z) const;
102  Double_t GetY(Double_t z) const;
103 
104 
106  Bool_t IsUsable() const;
107 
108 
110  void SetPositionOut(TVector3 pos);
111  void SetMomentumOut(TVector3 mom);
112  virtual void SetTrackID(Int_t id) {
113  //SetLink(kMCTrack, id);
114  FairMCPoint::SetTrackID(id);
115  };
116 
117 
119  std::string ToString() const;
120 
121 
122 protected:
123  Double32_t fX_out, fY_out, fZ_out;
124  Double32_t fPx_out, fPy_out, fPz_out;
125  Int_t fPid;
126  Int_t fIndex;
127  Short_t fFlag;
128 
129 
130  ClassDef(CbmStsPoint, 3)
131 };
132 
133 
134 inline void CbmStsPoint::SetPositionOut(TVector3 pos) {
135  fX_out = pos.X();
136  fY_out = pos.Y();
137  fZ_out = pos.Z();
138 }
139 
140 
141 inline void CbmStsPoint::SetMomentumOut(TVector3 mom) {
142  fPx_out = mom.Px();
143  fPy_out = mom.Py();
144  fPz_out = mom.Pz();
145 }
146 
147 
148 #endif
CbmStsPoint::GetPid
Int_t GetPid() const
Definition: CbmStsPoint.h:90
CbmStsPoint::fZ_out
Double32_t fZ_out
Definition: CbmStsPoint.h:123
CbmStsPoint::fFlag
Short_t fFlag
Index of point in its TClonesArray
Definition: CbmStsPoint.h:127
CbmStsPoint::GetXOut
Double_t GetXOut() const
Definition: CbmStsPoint.h:84
CbmStsPoint::GetIndex
Int_t GetIndex() const
Definition: CbmStsPoint.h:91
CbmStsPoint::fPx_out
Double32_t fPx_out
Definition: CbmStsPoint.h:124
CbmStsPoint::GetPxOut
Double_t GetPxOut() const
Definition: CbmStsPoint.h:87
CbmStsPoint::SetMomentumOut
void SetMomentumOut(TVector3 mom)
Definition: CbmStsPoint.h:141
CbmStsPoint::GetZOut
Double_t GetZOut() const
Definition: CbmStsPoint.h:86
CbmStsPoint::IsUsable
Bool_t IsUsable() const
Definition: CbmStsPoint.cxx:116
CbmStsPoint::PositionIn
void PositionIn(TVector3 &pos)
Definition: CbmStsPoint.h:95
CbmStsPoint
Definition: CbmStsPoint.h:27
CbmStsPoint::IsEntry
Bool_t IsEntry() const
Definition: CbmStsPoint.h:92
CbmStsPoint::fIndex
Int_t fIndex
Particle ID [PDG code]
Definition: CbmStsPoint.h:126
CbmStsPoint::PositionOut
void PositionOut(TVector3 &pos)
Definition: CbmStsPoint.h:96
CbmStsPoint::fPz_out
Double32_t fPz_out
Definition: CbmStsPoint.h:124
CbmStsPoint::GetPyOut
Double_t GetPyOut() const
Definition: CbmStsPoint.h:88
CbmStsPoint::~CbmStsPoint
virtual ~CbmStsPoint()
Definition: CbmStsPoint.cxx:67
CbmStsPoint::IsExit
Bool_t IsExit() const
Definition: CbmStsPoint.h:93
CbmStsPoint::fPy_out
Double32_t fPy_out
Definition: CbmStsPoint.h:124
CbmStsPoint::GetYOut
Double_t GetYOut() const
Definition: CbmStsPoint.h:85
CbmStsPoint::MomentumOut
void MomentumOut(TVector3 &mom)
Definition: CbmStsPoint.h:97
CbmStsPoint::GetXIn
Double_t GetXIn() const
Definition: CbmStsPoint.h:81
CbmStsPoint::GetYIn
Double_t GetYIn() const
Definition: CbmStsPoint.h:82
CbmStsPoint::GetPzOut
Double_t GetPzOut() const
Definition: CbmStsPoint.h:89
CbmStsPoint::SetPositionOut
void SetPositionOut(TVector3 pos)
Definition: CbmStsPoint.h:134
CbmStsPoint::ToString
std::string ToString() const
Definition: CbmStsPoint.cxx:125
CbmStsPoint::GetX
Double_t GetX(Double_t z) const
Definition: CbmStsPoint.cxx:96
CbmStsPoint::GetZIn
Double_t GetZIn() const
Definition: CbmStsPoint.h:83
CbmStsPoint::SetTrackID
virtual void SetTrackID(Int_t id)
Definition: CbmStsPoint.h:112
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmStsPoint::fY_out
Double32_t fY_out
Definition: CbmStsPoint.h:123
CbmStsPoint::CbmStsPoint
CbmStsPoint()
Definition: CbmStsPoint.cxx:23
CbmStsPoint::GetY
Double_t GetY(Double_t z) const
Definition: CbmStsPoint.cxx:106
CbmStsPoint::fX_out
Double32_t fX_out
Definition: CbmStsPoint.h:123
CbmStsPoint::fPid
Int_t fPid
Definition: CbmStsPoint.h:125