#include <Track.h>
Public Types | |
enum | TrackType { Velo = 1, VeloR = 2, Backward = 4, Long = 8, Upstream = 16, Downstream = 32, Ttrack = 64 } |
enumeration for the track type More... | |
enum | HistoryFlag { LongTrack = 1, Seeding = 2, TrKshort = 4, TrMatching = 8, VeloTrack = 16, VeloTT = 32, TrgForward = 64, TrgVelo = 128, TrgVeloTT = 256 } |
enumeration for the track history More... | |
enum | Flag { Valid = 1, Unique = 2 } |
enumeration for the track flags More... | |
Public Member Functions | |
Track () | |
Default Constructor. | |
virtual | ~Track () |
Default Destructor. | |
virtual const CLID & | clID () const |
StatusCode | positionAndMomentum (HepPoint3D &pos, HepVector3D &mom, HepSymMatrix &cov6D) const |
Retrieve the position and momentum vectors and the corresponding 6D covariance matrix (pos:1->3,mom:4-6) of a track closest to the beam-line. | |
StatusCode | position (HepPoint3D &pos, HepSymMatrix &errPos) const |
Retrieve the 3D-position (+ errors) of a track closest to the beam-line. | |
StatusCode | slopes (HepVector3D &slopes, HepSymMatrix &errSlopes) const |
Retrieve the slopes (dx/dz,dy/dz,1) of a track closest to the beam-line. | |
double | p () const |
Retrieve the momentum of a track closest to the beam-line. | |
double | pt () const |
Retrieve the transverse momentum of a track closest to the beam-line. | |
StatusCode | momentum (HepVector3D &mom, HepSymMatrix &errMom) const |
Retrieve the momentum vector (+ errors) of a track closest to the beam-line. | |
StatusCode | posMomCovariance (HepSymMatrix &cov6D) const |
Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of a track closest to the beam-line. | |
int | charge () const |
Retrieve the charge assigned to the track. | |
unsigned int | nStates () const |
number of states on track | |
void | addToStates (State *value) |
Add a State to the list of states associated to the track. | |
void | removeFromStates (State *value) |
Remove a State from the list of states associated to the track. | |
virtual State * | closestState (double z) |
Retrieve the pointer to the state closest to the given z-position. | |
virtual const State * | closestState (double z) const |
Retrieve the pointer to the state closest to the given z-position. | |
virtual State * | closestState (HepPlane3D &plane) |
Retrieve the pointer to the state closest to the given plane. | |
virtual const State * | closestState (HepPlane3D &plane) const |
Retrieve the pointer to the state closest to the given plane. | |
virtual State * | stateAt (const State::Location &value) |
Retrieve the pointer to the state at a certain predefined location. See State class. | |
virtual const State * | stateAt (const State::Location &value) const |
Retrieve the pointer to the state at a certain predefined location. See State class. | |
double | chi2 () const |
Retrieve the Chi^2 of the track. | |
virtual void | reset () |
Clear the track before re-use. | |
virtual Track * | clone () const |
Clone the track. | |
std::vector< LHCbID > & | LHCbIDs () |
Retrieve the LHCbIDs associated to the track. | |
const std::vector< LHCbID > & | LHCbIDs () const |
Retrieve the LHCbIDs associated to the track. | |
void | setLHCbIDs (const std::vector< LHCbID > &value) |
Update the LHCbIDs associated to the track. | |
void | addToLHCbIDs (const LHCbID &value) |
Add an LHCbID to the list of LHCbIDs associated to the track. | |
void | removeFromLHCbIDs (const LHCbID &value) |
Remove an LHCbID from the list of LHCbIDs associated to the track. | |
virtual bool | producedByAlgo (const HistoryFlag &value) const |
Check whether the track was produced by a given algorithm. | |
virtual void | setProducedByAlgo (const HistoryFlag &value) |
Update the name of the algorithm that produced the track. | |
double | chi2PerDoF () const |
Retrieve const chi^2 per degree of freedom of the track. | |
void | setChi2PerDoF (double value) |
Update chi^2 per degree of freedom of the track. | |
int | nDoF () const |
Retrieve const number of degrees of freedom of the track. | |
void | setNDoF (int value) |
Update number of degrees of freedom of the track. | |
unsigned int | flags () const |
Retrieve const the variety of track flags. | |
void | setType (const TrackType &value) |
Update track type. | |
bool | checkType (const TrackType &value) const |
Check track type. | |
void | setFlag (const Flag &value) |
Update track flags. | |
bool | checkFlag (const Flag &value) const |
Check track flags. | |
const State & | physicsState () const |
Retrieve const State closest to the beam-line. | |
State & | physicsState () |
Retrieve State closest to the beam-line. | |
void | setPhysicsState (const State &value) |
Update State closest to the beam-line. | |
const std::vector< State * > & | states () const |
Retrieve const container with pointers to all the states. | |
std::vector< State * > & | states () |
Retrieve container with pointers to all the states. | |
void | setStates (const std::vector< State * > &value) |
Update container with pointers to all the states. | |
Static Public Member Functions | |
const CLID & | classID () |
Private Types | |
enum | flagsBits { typeBits = 0, historyBits = 7, flagBits = 16 } |
Offsets of bitfield flags. More... | |
enum | flagsMasks { typeMask = 0x7FL, historyMask = 0xFF80L, flagMask = 0x30000L } |
Bitmasks for bitfield flags. More... | |
Private Attributes | |
double | m_chi2PerDoF |
chi^2 per degree of freedom of the track | |
int | m_nDoF |
number of degrees of freedom of the track | |
unsigned int | m_flags |
the variety of track flags | |
std::vector< LHCbID > | m_lhcbids |
container of LHCbIDs | |
State | m_physicsState |
State closest to the beam-line. | |
std::vector< State * > | m_states |
container with pointers to all the states |
Definition at line 64 of file Track.h.
|
enumeration for the track flags
Definition at line 87 of file Track.h.
|
|
Offsets of bitfield flags.
Definition at line 241 of file Track.h.
00241 {typeBits = 0, 00242 historyBits = 7, 00243 flagBits = 16}; |
|
Bitmasks for bitfield flags.
Definition at line 246 of file Track.h.
00246 {typeMask = 0x7FL, 00247 historyMask = 0xFF80L, 00248 flagMask = 0x30000L}; |
|
enumeration for the track history
Definition at line 77 of file Track.h.
00077 { LongTrack=1, 00078 Seeding=2, 00079 TrKshort=4, 00080 TrMatching=8, 00081 VeloTrack=16, 00082 VeloTT=32, 00083 TrgForward=64, 00084 TrgVelo=128, 00085 TrgVeloTT=256 }; |
|
enumeration for the track type
Definition at line 69 of file Track.h.
|
|
Default Constructor.
Definition at line 91 of file Track.h. References m_chi2PerDoF, m_flags, m_lhcbids, m_nDoF, m_physicsState, and m_states. Referenced by clone().
00091 : m_chi2PerDoF(0.0), 00092 m_nDoF(0), 00093 m_flags(0), 00094 m_lhcbids(), 00095 m_physicsState(), 00096 m_states() {} |
|
Default Destructor.
Definition at line 99 of file Track.h.
00099 {} |
|
Add an LHCbID to the list of LHCbIDs associated to the track.
Definition at line 431 of file Track.h. References m_lhcbids.
00432 { 00433 00434 m_lhcbids.push_back( value ); 00435 00436 } |
|
Add a State to the list of states associated to the track.
Definition at line 375 of file Track.h. References m_states.
00376 { 00377 00378 m_states.push_back( value ); 00379 00380 } |
|
Retrieve the charge assigned to the track.
Definition at line 360 of file Track.h. References m_physicsState, and State::qOverP().
00361 { 00362 00363 double qP = m_physicsState.qOverP(); 00364 return ( qP != 0. ? int(fabs(qP)/qP) : 0 ); 00365 00366 } |
|
Check track flags.
Definition at line 325 of file Track.h. References flagMask, and m_flags.
|
|
Check track type.
Definition at line 313 of file Track.h. References m_flags, and typeMask.
|
|
Retrieve the Chi^2 of the track.
Definition at line 391 of file Track.h. References m_chi2PerDoF, and m_nDoF.
00392 { 00393 00394 return ( m_chi2PerDoF * double(m_nDoF) ); 00395 00396 } |
|
Retrieve const chi^2 per degree of freedom of the track.
Definition at line 281 of file Track.h. References m_chi2PerDoF.
00282 { 00283 return m_chi2PerDoF; 00284 } |
|
Definition at line 276 of file Track.h. References CLID_Track. Referenced by clID().
00277 { 00278 return CLID_Track; 00279 } |
|
Definition at line 271 of file Track.h. References classID().
00272 { 00273 return Track::classID(); 00274 } |
|
Clone the track.
Definition at line 188 of file Track.cpp. References Track().
|
|
Retrieve the pointer to the state closest to the given plane.
Definition at line 145 of file Track.cpp. References m_states, and position().
00146 { 00147 double minDist = 999999999.; 00148 double dist; 00149 State* best = 0; 00150 for ( std::vector<State*>::const_iterator it = m_states.begin() ; 00151 m_states.end() != it; it++ ) { 00152 dist = plane.distance( ((*it) -> position()) ); 00153 if ( minDist > dist ) { 00154 minDist = dist; 00155 best = *it; 00156 } 00157 } 00158 return best; 00159 }; |
|
Retrieve the pointer to the state closest to the given plane.
Definition at line 126 of file Track.cpp. References m_states, and position().
00127 { 00128 double minDist = 999999999.; 00129 double dist; 00130 State* best = 0; 00131 for ( std::vector<State*>::iterator it = m_states.begin() ; 00132 m_states.end() != it; it++ ) { 00133 dist = plane.distance( ((*it) -> position()) ); 00134 if ( minDist > dist ) { 00135 minDist = dist; 00136 best = *it; 00137 } 00138 } 00139 return best; 00140 }; |
|
Retrieve the pointer to the state closest to the given z-position.
Definition at line 109 of file Track.cpp. References m_states.
00110 { 00111 double minDist = 999999999.; 00112 State* best = 0; 00113 for ( std::vector<State*>::const_iterator it = m_states.begin() ; 00114 m_states.end() != it; it++ ) { 00115 if ( minDist > fabs( z - (*it)->z() ) ) { 00116 minDist = fabs( z-(*it)->z() ); 00117 best = *it; 00118 } 00119 } 00120 return best; 00121 }; |
|
Retrieve the pointer to the state closest to the given z-position.
Definition at line 92 of file Track.cpp. References m_states.
00093 { 00094 double minDist = 999999999.; 00095 State* best = 0; 00096 for ( std::vector<State*>::iterator it = m_states.begin() ; 00097 m_states.end() != it; it++ ) { 00098 if ( minDist > fabs( z - (*it)->z() ) ) { 00099 minDist = fabs( z-(*it)->z() ); 00100 best = *it; 00101 } 00102 } 00103 return best; 00104 }; |
|
Retrieve const the variety of track flags.
Definition at line 301 of file Track.h. References m_flags.
00302 { 00303 return m_flags; 00304 } |
|
Retrieve the LHCbIDs associated to the track.
Definition at line 417 of file Track.h. References m_lhcbids.
00418 { 00419 00420 return m_lhcbids; 00421 00422 } |
|
Retrieve the LHCbIDs associated to the track.
Definition at line 410 of file Track.h. References m_lhcbids.
00411 { 00412 00413 return m_lhcbids; 00414 00415 } |
|
Retrieve the momentum vector (+ errors) of a track closest to the beam-line.
Definition at line 69 of file Track.cpp. References State::errMomentum(), m_physicsState, and State::momentum().
00071 { 00072 mom = m_physicsState.momentum(); 00073 errMom = m_physicsState.errMomentum(); 00074 00075 return StatusCode::SUCCESS; 00076 }; |
|
Retrieve const number of degrees of freedom of the track.
Definition at line 291 of file Track.h. References m_nDoF.
00292 { 00293 return m_nDoF; 00294 } |
|
number of states on track
Definition at line 368 of file Track.h. References m_states.
00369 { 00370 00371 return m_states.size(); 00372 00373 } |
|
Retrieve the momentum of a track closest to the beam-line.
Definition at line 53 of file Track.cpp. References m_physicsState, and State::p().
00054 { 00055 return m_physicsState.p(); 00056 }; |
|
Retrieve State closest to the beam-line.
Definition at line 335 of file Track.h. References m_physicsState.
00336 { 00337 return m_physicsState; 00338 } |
|
Retrieve const State closest to the beam-line.
Definition at line 330 of file Track.h. References m_physicsState.
00331 { 00332 return m_physicsState; 00333 } |
|
Retrieve the 3D-position (+ errors) of a track closest to the beam-line.
Definition at line 29 of file Track.cpp. References State::errPosition(), m_physicsState, and State::position(). Referenced by closestState().
00031 { 00032 pos = m_physicsState.position(); 00033 errPos = m_physicsState.errPosition(); 00034 00035 return StatusCode::SUCCESS; 00036 }; |
|
Retrieve the position and momentum vectors and the corresponding 6D covariance matrix (pos:1->3,mom:4-6) of a track closest to the beam-line.
Definition at line 17 of file Track.cpp. References m_physicsState, and State::positionAndMomentum().
00020 { 00021 m_physicsState.positionAndMomentum( pos, mom, cov6D ); 00022 00023 return StatusCode::SUCCESS; 00024 }; |
|
Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of a track closest to the beam-line.
Definition at line 82 of file Track.cpp. References m_physicsState, and State::posMomCovariance().
00083 { 00084 cov6D = m_physicsState.posMomCovariance(); 00085 00086 return StatusCode::SUCCESS; 00087 }; |
|
Check whether the track was produced by a given algorithm.
Definition at line 198 of file Track.cpp. References historyMask, and m_flags.
00199 { 00200 unsigned int val = (unsigned int)value; 00201 return 0 != ( m_flags & historyMask & val ); 00202 }; |
|
Retrieve the transverse momentum of a track closest to the beam-line.
Definition at line 61 of file Track.cpp. References m_physicsState, and State::pt().
00062 { 00063 return m_physicsState.pt(); 00064 }; |
|
Remove an LHCbID from the list of LHCbIDs associated to the track.
Definition at line 438 of file Track.h. References m_lhcbids.
|
|
Remove a State from the list of states associated to the track.
Definition at line 382 of file Track.h. References m_states.
|
|
Clear the track before re-use.
Definition at line 398 of file Track.h. References m_chi2PerDoF, m_flags, m_lhcbids, m_nDoF, m_physicsState, m_states, and State::reset().
00399 { 00400 00401 m_chi2PerDoF = 0; 00402 m_nDoF = 0; 00403 m_flags = 0; 00404 m_physicsState.reset(); 00405 m_states.clear(); 00406 m_lhcbids.clear(); 00407 00408 } |
|
Update chi^2 per degree of freedom of the track.
Definition at line 286 of file Track.h. References m_chi2PerDoF.
00287 { 00288 m_chi2PerDoF = value; 00289 } |
|
Update track flags.
Definition at line 318 of file Track.h. References flagBits, flagMask, and m_flags.
|
|
Update the LHCbIDs associated to the track.
Definition at line 424 of file Track.h. References m_lhcbids.
00425 { 00426 00427 m_lhcbids = value; 00428 00429 } |
|
Update number of degrees of freedom of the track.
Definition at line 296 of file Track.h. References m_nDoF.
00297 { 00298 m_nDoF = value; 00299 } |
|
Update State closest to the beam-line.
Definition at line 340 of file Track.h. References m_physicsState.
00341 { 00342 m_physicsState = value; 00343 } |
|
Update the name of the algorithm that produced the track.
Definition at line 207 of file Track.cpp. References historyBits, historyMask, and m_flags.
00208 { 00209 unsigned int val = (unsigned int)value; 00210 m_flags &= ~historyMask; 00211 m_flags |= ((((unsigned int)val) << historyBits) & historyMask); 00212 }; |
|
Update container with pointers to all the states.
Definition at line 355 of file Track.h. References m_states.
00356 { 00357 m_states = value; 00358 } |
|
Update track type.
Definition at line 306 of file Track.h. References m_flags, typeBits, and typeMask.
|
|
Retrieve the slopes (dx/dz,dy/dz,1) of a track closest to the beam-line.
Definition at line 41 of file Track.cpp. References State::errSlopes(), m_physicsState, and State::slopes().
00043 { 00044 slopes = m_physicsState.slopes(); 00045 errSlopes = m_physicsState.errSlopes(); 00046 00047 return StatusCode::SUCCESS; 00048 }; |
|
Retrieve the pointer to the state at a certain predefined location. See State class.
Definition at line 176 of file Track.cpp. References m_states.
|
|
Retrieve the pointer to the state at a certain predefined location. See State class.
Definition at line 164 of file Track.cpp. References m_states.
|
|
Retrieve container with pointers to all the states.
Definition at line 350 of file Track.h. References m_states.
00351 { 00352 return m_states; 00353 } |
|
Retrieve const container with pointers to all the states.
Definition at line 345 of file Track.h. References m_states.
00346 { 00347 return m_states; 00348 } |
|
chi^2 per degree of freedom of the track
Definition at line 251 of file Track.h. Referenced by chi2(), chi2PerDoF(), reset(), setChi2PerDoF(), and Track(). |
|
the variety of track flags
Definition at line 253 of file Track.h. Referenced by checkFlag(), checkType(), flags(), producedByAlgo(), reset(), setFlag(), setProducedByAlgo(), setType(), and Track(). |
|
container of LHCbIDs
Definition at line 254 of file Track.h. Referenced by addToLHCbIDs(), LHCbIDs(), removeFromLHCbIDs(), reset(), setLHCbIDs(), and Track(). |
|
number of degrees of freedom of the track
Definition at line 252 of file Track.h. Referenced by chi2(), nDoF(), reset(), setNDoF(), and Track(). |
|
State closest to the beam-line.
Definition at line 255 of file Track.h. Referenced by charge(), momentum(), p(), physicsState(), position(), positionAndMomentum(), posMomCovariance(), pt(), reset(), setPhysicsState(), slopes(), and Track(). |
|
container with pointers to all the states
Definition at line 256 of file Track.h. Referenced by addToStates(), closestState(), nStates(), removeFromStates(), reset(), setStates(), stateAt(), states(), and Track(). |