Belle II Software  release-06-00-14
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:
26  false), m_valstereobit(false) , m_expert(-1), m_tsvector(9, false), 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, false),
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, false),
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<bool>& tsvector = std::vector<bool>(9, false),
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) { }
96 
97  // accessors
99  float getChi2D() const { return m_chi2D; }
101  float getChi3D() const { return m_chi3D; }
103  float getTime() const { return m_time; }
107  double getPt() const
108  {
109  const double bField = BFieldManager::getField(TVector3(0, 0, getZ0())).Z() / Unit::T;
110  return getTransverseMomentum(bField);
111  }
113  short getQuadrant()
114  {
115  return m_quadrant;
116  }
118  std::vector<bool> getFoundOldTrack() const {return m_foundoldtrack;}
119 
121  bool getValidStereoBit() const {return m_valstereobit;}
122 
124  std::vector<bool> getDriftThreshold() const {return m_driftthreshold;}
125 
127  int getExpert() const {return m_expert;}
128 
131  std::vector<bool> getTSVector() const {return m_tsvector;}
136  void setQualityVector(const unsigned newbits)
137  {
138  m_qualityvector = m_qualityvector ^ newbits;
139  }
140  unsigned getQualityVector() const {return m_qualityvector;}
141 
142  protected:
144  float m_chi2D;
146  float m_chi3D;
148  short m_time;
150  short m_quadrant;
152  std::vector<bool> m_foundoldtrack;
154  std::vector<bool> m_driftthreshold;
158  int m_expert;
161  std::vector<bool> m_tsvector;
165  unsigned m_qualityvector;
168  };
170 }
171 #endif
Track created by the CDC trigger.
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
int m_expert
store value for used expert network
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< bool > &tsvector=std::vector< bool >(9, false), short time=0, short quadrant=-1, unsigned qualityvector=0)
3D constructor
std::vector< bool > m_tsvector
store which track segments were used.
CDCTriggerTrack()
default constructor, initializing everything to 0.
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
ClassDef(CDCTriggerTrack, 9)
Needed to make the ROOT object storable.
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.
~CDCTriggerTrack()
destructor, empty because we don't allocate memory anywhere.
short getQuadrant()
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< bool > getDriftThreshold() const
returns true, if the drift time was fitted into the time window
float m_chi2D
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 > getTSVector() const
return the vector of used Track Segments.
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
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.