BmnRoot
Loading...
Searching...
No Matches
BmnSsdPoint.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- BmnSsdPoint header file -----
3// ----- Created 13.12.2018 by D. Baranov -----
4// -------------------------------------------------------------------------
5
6
17#ifndef BMNSSDPOINT_H
18#define BMNSSDPOINT_H
19
20#include <string>
21#include "FairMCPoint.h"
22#include "FairLogger.h"
23
24class TVector3;
25
26class BmnSsdPoint : public FairMCPoint
27{
28
29 public:
30
33
34
50 BmnSsdPoint(Int_t trackID, Int_t detID, TVector3 posIn,
51 TVector3 posOut, TVector3 momIn, TVector3 momOut,
52 Double_t tof, Double_t length, Double_t eLoss,
53 Int_t pid = 0, Int_t eventId = 0, Int_t index = 0,
54 Short_t flag = 3);
55
56
63 BmnSsdPoint(const BmnSsdPoint& point,
64 Int_t eventId = -1,
65 Double_t eventTime = 0.,
66 Double_t epochTime = 0.);
67
68
70 virtual ~BmnSsdPoint();
71
72
74 Double_t GetXIn() const { return fX; }
75 Double_t GetYIn() const { return fY; }
76 Double_t GetZIn() const { return fZ; }
77 Double_t GetXOut() const { return fX_out; }
78 Double_t GetYOut() const { return fY_out; }
79 Double_t GetZOut() const { return fZ_out; }
80 Double_t GetPxOut() const { return fPx_out; }
81 Double_t GetPyOut() const { return fPy_out; }
82 Double_t GetPzOut() const { return fPz_out; }
83 Int_t GetPid() const { return fPid; }
84 Int_t GetIndex() const { return fIndex; }
85 Bool_t IsEntry() const { return ( fFlag == 1 || fFlag == 3 ); }
86 Bool_t IsExit() const { return ( fFlag == 2 || fFlag == 3 ); }
87
88 void PositionIn(TVector3& pos) { pos.SetXYZ(fX, fY, fZ); }
89 void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out,fY_out,fZ_out); }
90 void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out,fPy_out,fPz_out); }
91
92
94 Double_t GetX(Double_t z) const;
95 Double_t GetY(Double_t z) const;
96
97
99 Bool_t IsUsable() const;
100
101
103 void SetPositionOut(TVector3 pos);
104 void SetMomentumOut(TVector3 mom);
105 virtual void SetTrackID(Int_t id){
106 //SetLink(kMCTrack, id);
107 FairMCPoint::SetTrackID(id);
108 };
109
110
112 std::string ToString() const;
113
114
115
116
117 protected:
118
119 Double32_t fX_out, fY_out, fZ_out;
120 Double32_t fPx_out, fPy_out, fPz_out;
121 Int_t fPid;
122 Int_t fIndex;
123 Short_t fFlag;
124
125
126
127 ClassDef(BmnSsdPoint,3)
128
129};
130
131
132
133inline void BmnSsdPoint::SetPositionOut(TVector3 pos) {
134 fX_out = pos.X();
135 fY_out = pos.Y();
136 fZ_out = pos.Z();
137}
138
139
140inline void BmnSsdPoint::SetMomentumOut(TVector3 mom) {
141 fPx_out = mom.Px();
142 fPy_out = mom.Py();
143 fPz_out = mom.Pz();
144}
145
146
147
148#endif
Int_t GetPid() const
Definition BmnSsdPoint.h:83
Double_t GetPzOut() const
Definition BmnSsdPoint.h:82
Short_t fFlag
‍Index of point in its TClonesArray
void SetMomentumOut(TVector3 mom)
Double_t GetXIn() const
Definition BmnSsdPoint.h:74
virtual void SetTrackID(Int_t id)
Double_t GetYIn() const
Definition BmnSsdPoint.h:75
void MomentumOut(TVector3 &mom)
Definition BmnSsdPoint.h:90
Int_t fIndex
‍Particle ID [PDG code]
Bool_t IsUsable() const
Double_t GetPxOut() const
Definition BmnSsdPoint.h:80
Double_t GetY(Double_t z) const
std::string ToString() const
Double32_t fPy_out
Double32_t fPz_out
void PositionIn(TVector3 &pos)
Definition BmnSsdPoint.h:88
Double32_t fZ_out
Double_t GetXOut() const
Definition BmnSsdPoint.h:77
Int_t GetIndex() const
Definition BmnSsdPoint.h:84
virtual ~BmnSsdPoint()
Double32_t fX_out
Double_t GetZOut() const
Definition BmnSsdPoint.h:79
Double32_t fY_out
Bool_t IsEntry() const
Definition BmnSsdPoint.h:85
Double32_t fPx_out
void PositionOut(TVector3 &pos)
Definition BmnSsdPoint.h:89
Double_t GetYOut() const
Definition BmnSsdPoint.h:78
Double_t GetZIn() const
Definition BmnSsdPoint.h:76
void SetPositionOut(TVector3 pos)
Double_t GetX(Double_t z) const
Double_t GetPyOut() const
Definition BmnSsdPoint.h:81
Bool_t IsExit() const
Definition BmnSsdPoint.h:86