BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnGlobalTrack.h
Go to the documentation of this file.
1/** BmnGlobalTrack.h
2 *@author S.Merts
3 **
4 ** Data class for Global BMN track. Data level RECO.
5 **
6 **/
7
8#ifndef BmnGlobalTrack_H_
9#define BmnGlobalTrack_H_ 1
10
11#include "BmnTrack.h"
12
13class BmnGlobalTrack : public BmnTrack
14{
15 public:
16 /** Default constructor **/
18
19 /** Destructor **/
20 virtual ~BmnGlobalTrack();
21
23 {
24 kCommon = 0,
25 kPion = 1,
26 kProton = 2,
27 kDeutron = 3,
28 kTriton = 4,
30 };
32
33 /** Accessors **/
36 Int_t GetTof1HitIndex() const { return fTof400Hit[0]; }
37 Int_t GetTof2HitIndex() const { return fTof700Hit[0]; }
38 Int_t GetTof1HitIndex(ParticleType type) const { return fTof400Hit[type]; }
39 Int_t GetTof2HitIndex(ParticleType type) const { return fTof700Hit[type]; }
42
43 Float_t GetMass2(Int_t tofID) const
44 {
45 return (tofID == 1) ? fMass2Tof400[0] : (tofID == 2) ? fMass2Tof700[0] : -1000.0;
46 };
48 {
49 return (tofID == 1) ? fMass2Tof400[type] : (tofID == 2) ? fMass2Tof700[type] : -1000.0;
50 };
51 Float_t GetResX(Int_t tofID) const
52 {
53 return (tofID == 1) ? fTof400ResX[0] : (tofID == 2) ? fTof700ResX[0] : -1000.0;
54 };
56 {
57 return (tofID == 1) ? fTof400ResX[type] : (tofID == 2) ? fTof700ResX[type] : -1000.0;
58 };
59 Float_t GetResY(Int_t tofID) const
60 {
61 return (tofID == 1) ? fTof400ResY[0] : (tofID == 2) ? fTof700ResY[0] : -1000.0;
62 };
64 {
65 return (tofID == 1) ? fTof400ResY[type] : (tofID == 2) ? fTof700ResY[type] : -1000.0;
66 };
68 Float_t GetDedx() const { return fDedx; }
69 Int_t GetQ() { return fQ; }
77
78 Int_t GetRefIndex() { return -1; } // save for compatibility
81
82 /** Modifiers **/
83 void SetGemTrackIndex(Int_t iGem) { fInnerTrack = iGem; }
84 void SetTof1HitIndex(Int_t iTof1Hit) { fTof400Hit[0] = iTof1Hit; }
85 void SetTof2HitIndex(Int_t iTof2Hit) { fTof700Hit[0] = iTof2Hit; }
86 void SetTof1HitIndex(Int_t iTof1Hit, ParticleType type) { fTof400Hit[type] = iTof1Hit; }
87 void SetTof2HitIndex(Int_t iTof2Hit, ParticleType type) { fTof700Hit[type] = iTof2Hit; }
88 void SetNdetHitIndex(Int_t iNdet) { fNDetHitIndex = iNdet; }
89 void SetScWallCellId(Int_t iScWall) { fScWallCellId = iScWall; }
91
92 void SetQ(Int_t q) { fQ = q; }
93 void SetDedx(Float_t dedx) { fDedx = dedx; }
94 void SetMass2(Int_t tofID, Float_t m2)
95 {
96 if (tofID == 1) // tof400
97 fMass2Tof400[0] = m2;
98 else if (tofID == 2) // tof700
99 fMass2Tof700[0] = m2;
100 }
101 void SetMass2(Int_t tofID, ParticleType type, Float_t m2)
102 {
103 if (tofID == 1) // tof400
104 fMass2Tof400[type] = m2;
105 else if (tofID == 2) // tof700
106 fMass2Tof700[type] = m2;
107 }
108 void SetResX(Int_t tofID, Float_t res)
109 {
110 if (tofID == 1) // tof400
111 fTof400ResX[0] = res;
112 else if (tofID == 2) // tof700
113 fTof700ResX[0] = res;
114 }
115 void SetResX(Int_t tofID, ParticleType type, Float_t res)
116 {
117 if (tofID == 1) // tof400
118 fTof400ResX[type] = res;
119 else if (tofID == 2) // tof700
120 fTof700ResX[type] = res;
121 }
122 void SetResY(Int_t tofID, Float_t res)
123 {
124 if (tofID == 1) // tof400
125 fTof400ResY[0] = res;
126 else if (tofID == 2) // tof700
127 fTof700ResY[0] = res;
128 }
129 void SetResY(Int_t tofID, ParticleType type, Float_t res)
130 {
131 if (tofID == 1) // tof400
132 fTof400ResY[type] = res;
133 else if (tofID == 2) // tof700
134 fTof700ResY[type] = res;
135 }
136
139
140 void Print();
141
142 private:
143 /** Indices of local parts of global track **/
147
148 // vectors of indices of tof hits for different hypothesis:
149 vector<Int_t> fTof400Hit;
150 vector<Int_t> fTof700Hit;
151
152 // vectors of residuals of tof hits for different hypothesis:
153 vector<Float_t> fTof400ResX;
154 vector<Float_t> fTof700ResX;
155 vector<Float_t> fTof400ResY;
156 vector<Float_t> fTof700ResY;
157
158 // vectors of mass for different hypothesis:
159 vector<Float_t> fMass2Tof400;
160 vector<Float_t> fMass2Tof700;
161
164 Short_t fQ;
167
169};
170
171#endif
int Int_t
float Float_t
short Short_t
#define ClassDef(name, id)
BmnGlobalTrack.h.
vector< Float_t > fTof400ResY
void SetDedx(Float_t dedx)
void SetMass2(Int_t tofID, Float_t m2)
vector< Float_t > fMass2Tof700
void SetResX(Int_t tofID, Float_t res)
vector< Int_t > fTof700Hit
TString GetParticleName(ParticleType type)
virtual ~BmnGlobalTrack()
Destructor.
vector< Float_t > fTof700ResY
void SetNdetHitIndex(Int_t iNdet)
void SetDCAInVertex(Float_t chi)
void SetChi2InVertex(Float_t chi)
Float_t GetTheta()
Float_t GetPt()
void SetQ(Int_t q)
Float_t GetResY(Int_t tofID, ParticleType type)
void SetResX(Int_t tofID, ParticleType type, Float_t res)
Float_t GetPz()
void SetTof2HitIndex(Int_t iTof2Hit, ParticleType type)
void SetTof1HitIndex(Int_t iTof1Hit, ParticleType type)
Float_t GetDedx() const
void SetGemTrackIndex(Int_t iGem)
Modifiers.
BmnGlobalTrack()
Default constructor.
Int_t GetTof2HitIndex() const
Float_t GetResX(Int_t tofID) const
Float_t GetMass2(Int_t tofID, ParticleType type)
Float_t GetResX(Int_t tofID, ParticleType type)
vector< Float_t > fTof400ResX
Float_t GetPhi()
Float_t GetPx()
void SetTof2HitIndex(Int_t iTof2Hit)
Int_t GetGemTrackIndex() const
Accessors.
vector< Float_t > fMass2Tof400
Int_t GetTof1HitIndex(ParticleType type) const
Int_t GetTof2HitIndex(ParticleType type) const
void SetScWallSignal(Float_t sig)
vector< Float_t > fTof700ResX
Float_t GetPy()
void SetMass2(Int_t tofID, ParticleType type, Float_t m2)
Float_t GetDCAInVertex()
Int_t GetTof1HitIndex() const
Float_t GetScWallSignal() const
Int_t GetNdetHitIndex() const
Int_t fInnerTrack
Indices of local parts of global track.
vector< Int_t > fTof400Hit
void SetResY(Int_t tofID, ParticleType type, Float_t res)
Float_t GetEta()
void SetScWallCellId(Int_t iScWall)
Int_t GetInnerTrackIndex() const
Float_t GetResY(Int_t tofID) const
Float_t GetChi2InVertex()
void SetResY(Int_t tofID, Float_t res)
void SetTof1HitIndex(Int_t iTof1Hit)
Int_t GetScWallCellId() const
Float_t GetMass2(Int_t tofID) const