Belle II Software development
CDCTriggerTrack.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#ifndef CDCTRIGGERTRACK_H
9#define CDCTRIGGERTRACK_H
10
11#include <framework/dataobjects/Helix.h>
12#include <framework/geometry/BFieldManager.h>
13
14namespace Belle2 {
19
21 class CDCTriggerTrack : public Helix {
22 public:
24 CDCTriggerTrack(): Helix(), m_chi2D(0.), m_chi3D(0.), m_time(0), m_quadrant(-1), m_foundoldtrack(6, false), m_driftthreshold(9,
25 false), m_valstereobit(false), m_expert(-1), m_tsvector(9, 0), m_qualityvector(0) { }
26
39#pragma GCC diagnostic push
40#pragma GCC diagnostic ignored "-Wuninitialized"
41 CDCTriggerTrack(double phi0, double omega, double chi2,
42 const std::vector<bool>& foundoldtrack,
43 const std::vector<bool>& driftthreshold,
44 bool valstereobit = false,
45 int expert = -1,
46 short time = 0,
47 short quadrant = -1):
48 Helix(0., phi0, omega, 0., 0.), m_chi2D(chi2), m_chi3D(0.),
49 m_time(time),
50 m_quadrant(quadrant),
51 m_foundoldtrack(foundoldtrack),
52 m_driftthreshold(driftthreshold),
53 m_valstereobit(valstereobit),
54 m_expert(expert),
55 m_tsvector(9, 0),
56 m_qualityvector(0) { }
57
58 CDCTriggerTrack(double phi0, double omega, double chi2,
59 short time = 0,
60 short quadrant = -1):
61 Helix(0., phi0, omega, 0., 0.), m_chi2D(chi2), m_chi3D(0.),
62 m_time(time),
63 m_quadrant(quadrant),
64 m_foundoldtrack(6, false),
65 m_driftthreshold(9, false),
66 m_valstereobit(false),
67 m_expert(-1),
68 m_tsvector(9, 0),
69 m_qualityvector(0) { }
70
87 CDCTriggerTrack(double phi0, double omega, double chi2D,
88 double z0, double cotTheta, double chi3D,
89 const std::vector<bool>& foundoldtrack = std::vector<bool>(6, false),
90 const std::vector<bool>& driftthreshold = std::vector<bool>(9, false),
91 bool valstereobit = false,
92 int expert = -1,
93 const std::vector<unsigned>& tsvector = std::vector<unsigned>(9, 0),
94 short time = 0, short quadrant = -1,
95 unsigned qualityvector = 0):
96 Helix(0., phi0, omega, z0, cotTheta), m_chi2D(chi2D), m_chi3D(chi3D), m_time(time), m_quadrant(quadrant),
97 m_foundoldtrack(foundoldtrack),
98 m_driftthreshold(driftthreshold),
99 m_valstereobit(valstereobit),
100 m_expert(expert),
101 m_tsvector(tsvector),
102 m_qualityvector(qualityvector),
104 m_etf_recalced(0) { }
105
106
124 CDCTriggerTrack(double phi0, double omega, double chi2D,
125 double z0, double cotTheta, double prob, double chi3D,
126 const std::vector<bool>& foundoldtrack = std::vector<bool>(6, false),
127 const std::vector<bool>& driftthreshold = std::vector<bool>(9, false),
128 bool valstereobit = false,
129 int expert = -1,
130 const std::vector<unsigned>& tsvector = std::vector<unsigned>(9, 0),
131 short time = 0, short quadrant = -1,
132 unsigned qualityvector = 0):
133 Helix(0., phi0, omega, z0, cotTheta), m_prob(prob), m_chi2D(chi2D), m_chi3D(chi3D), m_time(time), m_quadrant(quadrant),
134 m_foundoldtrack(foundoldtrack),
135 m_driftthreshold(driftthreshold),
136 m_valstereobit(valstereobit),
137 m_expert(expert),
138 m_tsvector(tsvector),
139 m_qualityvector(qualityvector),
141 m_etf_recalced(0) { }
142
143
144
147
148 // accessors
150 float getChi2D() const { return m_chi2D; }
152 float getChi3D() const { return m_chi3D; }
154 float getTime() const { return m_time; }
158 double getPt() const
159 {
160 const double bField = BFieldManager::getField(0, 0, getZ0()).Z() / Unit::T;
161 return getTransverseMomentum(bField);
162 }
163
164 short getQuadrant() const
165 {
166 return m_quadrant;
167 }
168
169 std::vector<bool> getFoundOldTrack() const {return m_foundoldtrack;}
170
172 bool getValidStereoBit() const {return m_valstereobit;}
173
175 std::vector<bool> getDriftThreshold() const {return m_driftthreshold;}
176
178 int getExpert() const {return m_expert;}
179
182 std::vector<unsigned> getTSVector() const {return m_tsvector;}
187 void setQualityVector(const unsigned newbits)
188 {
190 }
191
192 unsigned getQualityVector() const {return m_qualityvector;}
193 void setHasETFTime(bool x) {m_hasETFTime = x;}
194 bool getHasETFTime() const {return m_hasETFTime;}
196 int getETF_unpacked() const {return m_etf_unpacked;}
197 int getETF_recalced() const {return m_etf_recalced;}
198 void setETF_unpacked(int x) {m_etf_unpacked = x;}
199 void setETF_recalced(int x) {m_etf_recalced = x;}
201 void setRawPhi0(const int phi0)
202 {
203 m_rawphi0 = phi0;
204 }
205 void setRawOmega(const int omega)
206 {
207 m_rawomega = omega;
208 }
209 void setRawZ(const int z)
210 {
211 m_rawz = z;
212 }
213 void setRawTheta(const int theta)
214 {
215 m_rawtheta = theta;
216 }
217 void setRawInput(const std::vector<int> input)
218 {
219 m_rawinput = input;
220 }
221 void setProb(const float input)
222 {
223 m_prob = input;
224 }
225 void setNNTToGDL(const bool nntgdl)
226 {
227 m_nntgdl = nntgdl;
228 }
229 void setSTTToGDL(const bool sttgdl)
230 {
231 m_sttgdl = sttgdl;
232 }
233 int getRawPhi0() const {return m_rawphi0;}
234 int getRawOmega() const {return m_rawomega;}
235 int getRawZ() const {return m_rawz;}
236 int getRawTheta() const {return m_rawtheta;}
237 double getProb() const {return m_prob;}
238 std::vector<int> getRawInput() const {return m_rawinput;}
239 bool getNNTToGDL() const {return m_nntgdl;}
240 bool getSTTToGDL() const {return m_sttgdl;}
241
242 protected:
243 double m_prob;
244
245 float m_chi2D;
247 float m_chi3D;
249 short m_time;
253 std::vector<bool> m_foundoldtrack;
255 std::vector<bool> m_driftthreshold;
262 std::vector<unsigned> m_tsvector;
282 int m_rawphi0{0};
283 int m_rawomega{0};
284 int m_rawz{0};
285 int m_rawtheta{0};
286 std::vector<int> m_rawinput;
288 bool m_nntgdl{0};
290 bool m_sttgdl{0};
293
294 };
295
296}
297#endif
ClassDef(CDCTriggerTrack, 14)
Needed to make the ROOT object storable.
bool m_valstereobit
store if at least 3 valid stereo ts were found in the NNInput
std::vector< bool > getFoundOldTrack() const
returns true, if old 2dtrack was found
float getTime() const
get the track found time
short m_quadrant
iTracker of the unpacked quadrant
void setRawPhi0(const int phi0)
setter and getter functions for raw track values
int m_expert
store value for used expert network
CDCTriggerTrack()
default constructor, initializing everything to 0.
int m_etf_unpacked
unpacked etf time from the unpacker
CDCTriggerTrack(double phi0, double omega, double chi2, const std::vector< bool > &foundoldtrack, const std::vector< bool > &driftthreshold, bool valstereobit=false, int expert=-1, short time=0, short quadrant=-1)
2D constructor, initializing 3D values to 0.
bool m_sttgdl
stt decision that the firmware passed to gdl
int getExpert() const
return sl pattern of neurotrack
float getChi3D() const
get chi2 value of 3D fitter
int m_etf_recalced
etf time recalculated from the hw input
unsigned m_qualityvector
store bits for different quality flags.
float m_chi3D
chi2 value from 3D fitter
bool getValidStereoBit() const
returns true, if at least 3 stereo ts were found
void setQualityVector(const unsigned newbits)
setter and getter for the quality vector.
int m_rawphi0
values to store the raw network and 2dfinder output
~CDCTriggerTrack()
destructor, empty because we don't allocate memory anywhere.
short getQuadrant() const
get the quadrant
std::vector< bool > m_driftthreshold
store if drift time was within the timing window
float getChi2D() const
get chi2 value of 2D fitter
std::vector< unsigned > getTSVector() const
return the vector of used Track Segments.
bool m_nntgdl
nnt decision that the firmware passed to gdl
int getETF_unpacked() const
getter and setter functions for etf timing
std::vector< unsigned > m_tsvector
store which track segments were used.
bool m_hasETFTime
chi2 value from 2D fitter
double getPt() const
get the absolute value of the transverse momentum at the perigee assuming d0 = 0
CDCTriggerTrack(double phi0, double omega, double chi2D, double z0, double cotTheta, double prob, double chi3D, const std::vector< bool > &foundoldtrack=std::vector< bool >(6, false), const std::vector< bool > &driftthreshold=std::vector< bool >(9, false), bool valstereobit=false, int expert=-1, const std::vector< unsigned > &tsvector=std::vector< unsigned >(9, 0), short time=0, short quadrant=-1, unsigned qualityvector=0)
3D constructor with p
std::vector< bool > getDriftThreshold() const
returns true, if the drift time was fitted into the time window
CDCTriggerTrack(double phi0, double omega, double chi2D, double z0, double cotTheta, double chi3D, const std::vector< bool > &foundoldtrack=std::vector< bool >(6, false), const std::vector< bool > &driftthreshold=std::vector< bool >(9, false), bool valstereobit=false, int expert=-1, const std::vector< unsigned > &tsvector=std::vector< unsigned >(9, 0), short time=0, short quadrant=-1, unsigned qualityvector=0)
3D constructor
std::vector< bool > m_foundoldtrack
array to store whether an old 2dtrack was found
short m_time
number of trigger clocks of (the track output - L1 trigger)
Helix parameter class.
Definition Helix.h:48
Helix(const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
Constructor with pivot, helix parameter a, and its error matrix.
Definition Helix.cc:132
double phi0(void) const
Return helix parameter phi0.
Definition Helix.h:388
HepPoint3D x(double dPhi=0.) const
returns position after rotating angle dPhi in phi direction.
Definition Helix.cc:197
static const double T
[tesla]
Definition Unit.h:120
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Abstract base class for different kinds of events.