Belle II Software  release-06-01-15
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 #include <TVector3.h>
14 
15 namespace Belle2 {
22  class CDCTriggerTrack : public Helix {
23  public:
25  CDCTriggerTrack(): Helix(), m_chi2D(0.), m_chi3D(0.), m_time(0), m_quadrant(-1), m_foundoldtrack(6, false), m_driftthreshold(9,
26  false), m_valstereobit(false) , m_expert(-1), m_tsvector(9, 0), m_qualityvector(0) { }
27 
36 #pragma GCC diagnostic push
37 #pragma GCC diagnostic ignored "-Wuninitialized"
38  CDCTriggerTrack(double phi0, double omega, double chi2,
39  const std::vector<bool>& foundoldtrack,
40  const std::vector<bool>& driftthreshold,
41  bool valstereobit = false,
42  int expert = -1,
43  short time = 0,
44  short quadrant = -1):
45  Helix(0., phi0, omega, 0., 0.), m_chi2D(chi2), m_chi3D(0.),
46  m_time(time),
47  m_quadrant(quadrant),
48  m_foundoldtrack(foundoldtrack),
49  m_driftthreshold(driftthreshold),
50  m_valstereobit(valstereobit),
51  m_expert(expert),
52  m_tsvector(9, 0),
53  m_qualityvector(0) { }
54 
55  CDCTriggerTrack(double phi0, double omega, double chi2,
56  short time = 0,
57  short quadrant = -1):
58  Helix(0., phi0, omega, 0., 0.), m_chi2D(chi2), m_chi3D(0.),
59  m_time(time),
60  m_quadrant(quadrant),
61  m_foundoldtrack(6, false),
62  m_driftthreshold(9, false),
63  m_valstereobit(false),
64  m_expert(-1),
65  m_tsvector(9, 0),
66  m_qualityvector(0) { }
67 
78  CDCTriggerTrack(double phi0, double omega, double chi2D,
79  double z0, double cotTheta, double chi3D,
80  const std::vector<bool>& foundoldtrack = std::vector<bool>(6, false),
81  const std::vector<bool>& driftthreshold = std::vector<bool>(9, false),
82  bool valstereobit = false,
83  int expert = -1,
84  const std::vector<unsigned>& tsvector = std::vector<unsigned>(9, 0),
85  short time = 0, short quadrant = -1,
86  unsigned qualityvector = 0):
87  Helix(0., phi0, omega, z0, cotTheta), m_chi2D(chi2D), m_chi3D(chi3D), m_time(time), m_quadrant(quadrant),
88  m_foundoldtrack(foundoldtrack),
89  m_driftthreshold(driftthreshold),
90  m_valstereobit(valstereobit),
91  m_expert(expert),
92  m_tsvector(tsvector),
93  m_qualityvector(qualityvector),
94  m_etf_unpacked(0),
95  m_etf_recalced(0) { }
98 
99  // accessors
101  float getChi2D() const { return m_chi2D; }
103  float getChi3D() const { return m_chi3D; }
105  float getTime() const { return m_time; }
109  double getPt() const
110  {
111  const double bField = BFieldManager::getField(TVector3(0, 0, getZ0())).Z() / Unit::T;
112  return getTransverseMomentum(bField);
113  }
115  short getQuadrant() const
116  {
117  return m_quadrant;
118  }
120  std::vector<bool> getFoundOldTrack() const {return m_foundoldtrack;}
121 
123  bool getValidStereoBit() const {return m_valstereobit;}
124 
126  std::vector<bool> getDriftThreshold() const {return m_driftthreshold;}
127 
129  int getExpert() const {return m_expert;}
130 
133  std::vector<unsigned> getTSVector() const {return m_tsvector;}
138  void setQualityVector(const unsigned newbits)
139  {
140  m_qualityvector = m_qualityvector ^ newbits;
141  }
142  unsigned getQualityVector() const {return m_qualityvector;}
143  void setHasETFTime(bool x) {m_hasETFTime = x;}
144  bool getHasETFTime() const {return m_hasETFTime;}
146  int getETF_unpacked() const {return m_etf_unpacked;}
147  int getETF_recalced() const {return m_etf_recalced;}
148  void setETF_unpacked(int x) {m_etf_unpacked = x;}
149  void setETF_recalced(int x) {m_etf_recalced = x;}
151  void setRawPhi0(const int phi0)
152  {
153  m_rawphi0 = phi0;
154  }
155  void setRawOmega(const int omega)
156  {
157  m_rawomega = omega;
158  }
159  void setRawZ(const int z)
160  {
161  m_rawz = z;
162  }
163  void setRawTheta(const int theta)
164  {
165  m_rawtheta = theta;
166  }
167  int getRawPhi0() const {return m_rawphi0;}
168  int getRawOmega() const {return m_rawomega;}
169  int getRawZ() const {return m_rawz;}
170  int getRawTheta() const {return m_rawtheta;}
171 
172  protected:
173  float m_chi2D;
175  float m_chi3D;
177  short m_time;
179  short m_quadrant;
181  std::vector<bool> m_foundoldtrack;
183  std::vector<bool> m_driftthreshold;
187  int m_expert;
190  std::vector<unsigned> m_tsvector;
202  unsigned m_qualityvector;
208  bool m_hasETFTime{0};
210  int m_rawphi0{0};
211  int m_rawomega{0};
212  int m_rawz{0};
213  int m_rawtheta{0};
216 
217  };
219 }
220 #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
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.
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.
int getETF_unpacked() const
getter and setter functions for etf timing
std::vector< bool > getDriftThreshold() const
returns true, if the drift time was fitted into the time window
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 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 > getFoundOldTrack() const
returns true, if old 2dtrack was found
std::vector< bool > m_foundoldtrack
array to store wether 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.
Abstract base class for different kinds of events.