Belle II Software  release-08-01-10
CDCTriggerTrack Class Reference

Track created by the CDC trigger. More...

#include <CDCTriggerTrack.h>

Inheritance diagram for CDCTriggerTrack:
Collaboration diagram for CDCTriggerTrack:

Public Member Functions

 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. More...
 
 CDCTriggerTrack (double phi0, double omega, double chi2, short time=0, short quadrant=-1)
 
 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 More...
 
 ~CDCTriggerTrack ()
 destructor, empty because we don't allocate memory anywhere.
 
float getChi2D () const
 get chi2 value of 2D fitter
 
float getChi3D () const
 get chi2 value of 3D fitter
 
float getTime () const
 get the track found time
 
double getPt () const
 get the absolute value of the transverse momentum at the perigee assuming d0 = 0
 
short getQuadrant () const
 get the quadrant
 
std::vector< bool > getFoundOldTrack () const
 returns true, if old 2dtrack was found
 
bool getValidStereoBit () const
 returns true, if at least 3 stereo ts were found
 
std::vector< bool > getDriftThreshold () const
 returns true, if the drift time was fitted into the time window
 
int getExpert () const
 return sl pattern of neurotrack
 
std::vector< unsigned > getTSVector () const
 return the vector of used Track Segments. More...
 
void setQualityVector (const unsigned newbits)
 setter and getter for the quality vector. More...
 
unsigned getQualityVector () const
 
void setHasETFTime (bool x)
 
bool getHasETFTime () const
 
int getETF_unpacked () const
 getter and setter functions for etf timing
 
int getETF_recalced () const
 
void setETF_unpacked (int x)
 
void setETF_recalced (int x)
 
void setRawPhi0 (const int phi0)
 setter and getter functions for raw track values
 
void setRawOmega (const int omega)
 
void setRawZ (const int z)
 
void setRawTheta (const int theta)
 
void setRawInput (const std::vector< int > input)
 
void setNNTToGDL (const bool nntgdl)
 
void setSTTToGDL (const bool sttgdl)
 
int getRawPhi0 () const
 
int getRawOmega () const
 
int getRawZ () const
 
int getRawTheta () const
 
std::vector< int > getRawInput () const
 
bool getNNTToGDL () const
 
bool getSTTToGDL () const
 
const HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
 
const HepPoint3Dpivot (void) const
 returns pivot position.
 
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 Sets pivot position.
 
double radius (void) const
 returns radious of helix.
 
HepPoint3D x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction. More...
 
double * x (double dPhi, double p[3]) const
 returns position after rotating angle dPhi in phi direction. More...
 
HepPoint3D x (double dPhi, HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi, HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 Return helix parameter dr.
 
double phi0 (void) const
 Return helix parameter phi0.
 
double kappa (void) const
 Return helix parameter kappa.
 
double dz (void) const
 Return helix parameter dz.
 
double tanl (void) const
 Return helix parameter tangent lambda.
 
double curv (void) const
 Return curvature of helix.
 
double sinPhi0 (void) const
 Return sin phi0.
 
double cosPhi0 (void) const
 Return cos phi0.
 
const HepVector & a (void) const
 Returns helix parameters.
 
const HepVector & a (const HepVector &newA)
 Sets helix parameters.
 
const HepSymMatrix & Ea (void) const
 Returns error matrix.
 
const HepSymMatrix & Ea (const HepSymMatrix &newdA)
 Sets helix paramters and error matrix.
 
void set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Sets helix pivot position, parameters, and error matrix.
 
void ignoreErrorMatrix (void)
 Unsets error matrix. More...
 
double bFieldZ (double bz)
 Sets/returns z componet of the magnetic field. More...
 
double bFieldZ (void) const
 Returns z componet of the magnetic field.
 
HepMatrix delApDelA (const HepVector &ap) const
 DAp/DA.
 
HepMatrix delXDelA (double phi) const
 DX/DA.
 
HepMatrix delMDelA (double phi) const
 DM/DA.
 
HepMatrix del4MDelA (double phi, double mass) const
 DM4/DA.
 
HepMatrix del4MXDelA (double phi, double mass) const
 DMX4/DA.
 

Static Public Member Functions

static void set_limits (const HepVector &a_min, const HepVector &a_max)
 set limit for parameter "a"
 
static bool set_exception (bool)
 set exception
 
static bool set_print (bool)
 Set print option for debugging.
 

Static Public Attributes

static const double ConstantAlpha = 222.376063
 Constant alpha for uniform field.
 

Protected Member Functions

 ClassDef (CDCTriggerTrack, 14)
 Needed to make the ROOT object storable.
 

Protected Attributes

float m_chi2D
 
float m_chi3D
 chi2 value from 3D fitter
 
short m_time
 number of trigger clocks of (the track output - L1 trigger)
 
short m_quadrant
 iTracker of the unpacked quadrant
 
std::vector< bool > m_foundoldtrack
 array to store wether an old 2dtrack was found
 
std::vector< bool > m_driftthreshold
 store if drift time was within the timing window
 
bool m_valstereobit
 store if at least 3 valid stereo ts were found in the NNInput
 
int m_expert
 store value for used expert network
 
std::vector< unsigned > m_tsvector
 store which track segments were used. More...
 
unsigned m_qualityvector
 store bits for different quality flags. More...
 
int m_etf_unpacked {0}
 unpacked etf time from the unpacker
 
int m_etf_recalced {0}
 etf time recalculated from the hw input
 
bool m_hasETFTime {0}
 chi2 value from 2D fitter
 
int m_rawphi0 {0}
 values to store the raw network and 2dfinder output
 
int m_rawomega {0}
 
int m_rawz {0}
 
int m_rawtheta {0}
 
std::vector< int > m_rawinput
 
bool m_nntgdl {0}
 nnt decision that the firmware passed to gdl
 
bool m_sttgdl {0}
 stt decision that the firmware passed to gdl
 

Private Member Functions

void updateCache (void)
 updateCache
 
void checkValid (void)
 Check whether helix parameters is valid or not. More...
 
void debugPrint (void) const
 Print the helix parameters to stdout.
 
void debugHelix (void) const
 Debug Helix.
 

Private Attributes

bool m_matrixValid
 True: matrix valid, False: matrix not valid.
 
bool m_helixValid
 True: helix valid, False: helix not valid.
 
double m_bField
 Magnetic field, assuming uniform Bz in the unit of kG.
 
double m_alpha
 10000.0/(speed of light)/B.
 
HepPoint3D m_pivot
 Pivot.
 
HepVector m_a
 Helix parameter.
 
HepSymMatrix m_Ea
 Error of the helix parameter.
 
HepPoint3D m_center
 Cache of the center position of Helix.
 
double m_cp
 Cache of the cos phi0.
 
double m_sp
 Cache of the sin phi0.
 
double m_pt
 Cache of the pt.
 
double m_r
 Cache of the r.
 
double m_ac [5]
 Cache of the helix parameter.
 

Static Private Attributes

static HepVector ms_amin
 minimum limit of Helix parameter a
 
static HepVector ms_amax
 maxiimum limit of Helix parameter a
 
static bool ms_check_range
 Check the helix parameter's range.
 
static bool ms_print_debug
 Debug option flag.
 
static bool ms_throw_exception
 Throw exception flag.
 
static const std::string invalidhelix
 String "Invalid Helix".
 

Detailed Description

Track created by the CDC trigger.

Definition at line 22 of file CDCTriggerTrack.h.

Constructor & Destructor Documentation

◆ CDCTriggerTrack() [1/2]

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 
)
inline

2D constructor, initializing 3D values to 0.

Parameters
phi0The angle between the transverse momentum and the x axis and in [-pi, pi].
omegaThe signed curvature of the track where the sign is given by the charge of the particle.
chi2Chi2 value of the 2D fit.
timefound time for firmware tracks.
quadrantiTracker of the unpacked quadrant.

Definition at line 38 of file CDCTriggerTrack.h.

44  :
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) { }
bool m_valstereobit
store if at least 3 valid stereo ts were found in the NNInput
short m_quadrant
iTracker of the unpacked quadrant
int m_expert
store value for used expert network
unsigned m_qualityvector
store bits for different quality flags.
float m_chi3D
chi2 value from 3D fitter
std::vector< bool > m_driftthreshold
store if drift time was within the timing window
std::vector< unsigned > m_tsvector
store which track segments were used.
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(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

◆ CDCTriggerTrack() [2/2]

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 
)
inline

3D constructor

Parameters
phi0The angle between the transverse momentum and the x axis and in [-pi, pi].
omegaThe signed curvature of the track where the sign is given by the charge of the particle.
chi2DChi2 value of the 2D fit.
z0The z coordinate of the perigee.
cotThetaThe slope of the track in the sz plane (dz/ds).
chi3DChi2 value of the 3D fit.
timefound time for firmware tracks.
quadrantiTracker of the unpacked quadrant.

Definition at line 78 of file CDCTriggerTrack.h.

Member Function Documentation

◆ bFieldZ()

double bFieldZ ( double  bz)
inlineinherited

Sets/returns z componet of the magnetic field.

Parameters
[in]bzz-component of the magnetic field.
Attention
Helix param. alpha is also stored.

Definition at line 473 of file Helix.h.

◆ checkValid()

void checkValid ( void  )
privateinherited

Check whether helix parameters is valid or not.

Sets m_helixValid.

Definition at line 895 of file Helix.cc.

◆ getTSVector()

std::vector<unsigned> getTSVector ( ) const
inline

return the vector of used Track Segments.

The First bit is the innermost TS, the last bit the outermost.

Definition at line 133 of file CDCTriggerTrack.h.

◆ ignoreErrorMatrix()

void ignoreErrorMatrix ( void  )
inherited

Unsets error matrix.

Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.

Definition at line 872 of file Helix.cc.

◆ setQualityVector()

void setQualityVector ( const unsigned  newbits)
inline

setter and getter for the quality vector.

For the setter, the given uint is xored with the current qualityvector, thus all bits with a 1 are changed.

Definition at line 138 of file CDCTriggerTrack.h.

◆ x() [1/2]

double * x ( double  dPhi,
double  p[3] 
) const
inherited

returns position after rotating angle dPhi in phi direction.

x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi)) y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi)) z = z0 + dz - (alpha / kappa) * tan(lambda) * phi

Returns
double[3]

Definition at line 216 of file Helix.cc.

◆ x() [2/2]

HepPoint3D x ( double  dPhi = 0.) const
inherited

returns position after rotating angle dPhi in phi direction.

x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi)) y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi)) z = z0 + dz - (alpha / kappa) * tan(lambda) * phi

Returns
HepPoint3D

Definition at line 197 of file Helix.cc.

Member Data Documentation

◆ m_qualityvector

unsigned m_qualityvector
protected

store bits for different quality flags.

2^0 : 0 if all axial ts are contained in the related 2dfindertrack; 1 otherwise. 2^1 : 0 if hwsim nntrack is less than 1cm in z away from hwtrack; 1 otherwise. 2^2 : 0 if all input values for the ID are exactly the same in hw and hwsim; 1 otherwise. 2^3 : 0 if all input values for alpa are exactly the same in hw and hwsim; 1 otherwise. 2^4 : 1 if dt in hw/hwsim is 0 and in hwsim/hw is 1; 0 otherwise. 2^5 : 1 if all inputs in hw are 0 but at least 1 is filled in hwsim; 0 otherwise. 2^6 : 1 if all inputs in hwsim are 0 but at least 1 is filled in hw; 0 otherwise. 2^7 : 1 if more than 1 etf time was recalculated from hw. this indicates, that an old input from a previous track was used in the network.

Definition at line 217 of file CDCTriggerTrack.h.

◆ m_tsvector

std::vector<unsigned> m_tsvector
protected

store which track segments were used.

The First bit is the innermost TS, the last bit the outermost.

Definition at line 205 of file CDCTriggerTrack.h.


The documentation for this class was generated from the following file: