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 {
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) { }
107
108 // accessors
110 float getChi2D() const { return m_chi2D; }
112 float getChi3D() const { return m_chi3D; }
114 float getTime() const { return m_time; }
118 double getPt() const
119 {
120 const double bField = BFieldManager::getField(0, 0, getZ0()).Z() / Unit::T;
121 return getTransverseMomentum(bField);
122 }
124 short getQuadrant() const
125 {
126 return m_quadrant;
127 }
129 std::vector<bool> getFoundOldTrack() const {return m_foundoldtrack;}
130
132 bool getValidStereoBit() const {return m_valstereobit;}
133
135 std::vector<bool> getDriftThreshold() const {return m_driftthreshold;}
136
138 int getExpert() const {return m_expert;}
139
142 std::vector<unsigned> getTSVector() const {return m_tsvector;}
147 void setQualityVector(const unsigned newbits)
148 {
150 }
151 unsigned getQualityVector() const {return m_qualityvector;}
152 void setHasETFTime(bool x) {m_hasETFTime = x;}
153 bool getHasETFTime() const {return m_hasETFTime;}
155 int getETF_unpacked() const {return m_etf_unpacked;}
156 int getETF_recalced() const {return m_etf_recalced;}
157 void setETF_unpacked(int x) {m_etf_unpacked = x;}
158 void setETF_recalced(int x) {m_etf_recalced = x;}
160 void setRawPhi0(const int phi0)
161 {
162 m_rawphi0 = phi0;
163 }
164 void setRawOmega(const int omega)
165 {
166 m_rawomega = omega;
167 }
168 void setRawZ(const int z)
169 {
170 m_rawz = z;
171 }
172 void setRawTheta(const int theta)
173 {
174 m_rawtheta = theta;
175 }
176 void setRawInput(const std::vector<int> input)
177 {
178 m_rawinput = input;
179 }
180 void setNNTToGDL(const bool nntgdl)
181 {
182 m_nntgdl = nntgdl;
183 }
184 void setSTTToGDL(const bool sttgdl)
185 {
186 m_sttgdl = sttgdl;
187 }
188 int getRawPhi0() const {return m_rawphi0;}
189 int getRawOmega() const {return m_rawomega;}
190 int getRawZ() const {return m_rawz;}
191 int getRawTheta() const {return m_rawtheta;}
192 std::vector<int> getRawInput() const {return m_rawinput;}
193 bool getNNTToGDL() const {return m_nntgdl;}
194 bool getSTTToGDL() const {return m_sttgdl;}
195
196 protected:
197 float m_chi2D;
199 float m_chi3D;
201 short m_time;
205 std::vector<bool> m_foundoldtrack;
207 std::vector<bool> m_driftthreshold;
214 std::vector<unsigned> m_tsvector;
234 int m_rawphi0{0};
235 int m_rawomega{0};
236 int m_rawz{0};
237 int m_rawtheta{0};
238 std::vector<int> m_rawinput;
240 bool m_nntgdl{0};
242 bool m_sttgdl{0};
245
246 };
248}
249#endif
Track created by the CDC trigger.
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
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
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.
Definition: BFieldManager.h:91
Abstract base class for different kinds of events.