#include <Track.h>
Inheritance diagram for Track:
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, IPSelected = 4, MuSelected = 8 } |
enumeration for the track flags More... | |
Public Member Functions | |
Track (int key) | |
Constructor with assigned key. | |
Track () | |
Default Constructor. | |
~Track () | |
Track 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) at the physics state. | |
StatusCode | position (HepPoint3D &pos, HepSymMatrix &errPos) const |
Retrieve the 3D-position (+ errors) at the physics state. | |
StatusCode | slopes (HepVector3D &slopes, HepSymMatrix &errSlopes) const |
Retrieve the slopes (dx/dz,dy/dz,1) at the physics state. | |
double | p () const |
Retrieve the momentum at the physics state. | |
double | pt () const |
Retrieve the transverse momentum at the physics state. | |
StatusCode | momentum (HepVector3D &mom, HepSymMatrix &errMom) const |
Retrieve the momentum vector (+ errors) at the physics state. | |
StatusCode | posMomCovariance (HepSymMatrix &cov6D) const |
Retrieve the 6D covariance matrix (x,y,z,px,py,pz) at the physics state. | |
int | charge () const |
Retrieve the charge assigned to the track. | |
virtual unsigned int | nMeasurements () const |
number of measurements on 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 reference to the state closest to the given z-position. | |
virtual const State & | closestState (double z) const |
Retrieve the reference to the state closest to the given z-position. | |
virtual State & | closestState (const HepPlane3D &plane) |
Retrieve the reference to the state closest to the given plane. | |
virtual const State & | closestState (const HepPlane3D &plane) const |
Retrieve the reference to the state closest to the given plane. | |
bool | hasStateAt (const State::Location &value) const |
check the existence of a state at a certain predefined location. See State class. | |
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. | |
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 std::vector< LHCbID > & | lhcbIDs () const |
Retrieve const container of LHCbIDs. | |
std::vector< LHCbID > & | lhcbIDs () |
Retrieve container of LHCbIDs. | |
void | setLhcbIDs (const std::vector< LHCbID > &value) |
Update container of LHCbIDs. | |
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 | |
static const CLID & | classID () |
Protected Types | |
enum | flagsBits { typeBits = 0, historyBits = 7, flagBits = 16 } |
Offsets of bitfield flags. More... | |
enum | flagsMasks { typeMask = 0x7FL, historyMask = 0xFF80L, flagMask = 0xF0000L } |
Bitmasks for bitfield flags. More... | |
Protected 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 59 of file Track.h.
|
enumeration for the track flags
Reimplemented in FitTrack. Definition at line 82 of file Track.h. 00082 { Valid=1, 00083 Unique=2, 00084 IPSelected=4, 00085 MuSelected=8 };
|
|
Offsets of bitfield flags.
Definition at line 251 of file Track.h. 00251 {typeBits = 0, 00252 historyBits = 7, 00253 flagBits = 16};
|
|
Bitmasks for bitfield flags.
Definition at line 256 of file Track.h. 00256 {typeMask = 0x7FL, 00257 historyMask = 0xFF80L, 00258 flagMask = 0xF0000L};
|
|
enumeration for the track history
Reimplemented in FitTrack. Definition at line 72 of file Track.h. 00072 { LongTrack=1, 00073 Seeding=2, 00074 TrKshort=4, 00075 TrMatching=8, 00076 VeloTrack=16, 00077 VeloTT=32, 00078 TrgForward=64, 00079 TrgVelo=128, 00080 TrgVeloTT=256 };
|
|
enumeration for the track type
Reimplemented in FitTrack. Definition at line 64 of file Track.h. 00064 { Velo=1, 00065 VeloR=2, 00066 Backward=4, 00067 Long=8, 00068 Upstream=16, 00069 Downstream=32, 00070 Ttrack=64 };
|
|
Constructor with assigned key.
Definition at line 88 of file Track.h. References m_chi2PerDoF, m_flags, m_lhcbIDs, m_nDoF, m_physicsState, and m_states. 00088 : KeyedObject<int>( key ), 00089 m_chi2PerDoF(0.0), 00090 m_nDoF(0), 00091 m_flags(0), 00092 m_lhcbIDs(), 00093 m_physicsState(), 00094 m_states() {}
|
|
Default Constructor.
Definition at line 97 of file Track.h. References m_chi2PerDoF, m_flags, m_lhcbIDs, m_nDoF, m_physicsState, and m_states. Referenced by clone(). 00097 : m_chi2PerDoF(0.0), 00098 m_nDoF(0), 00099 m_flags(0), 00100 m_lhcbIDs(), 00101 m_physicsState(), 00102 m_states() {}
|
|
Track destructor.
Definition at line 283 of file Track.h. References m_states. 00284 { 00285 00286 for (std::vector<State*>::iterator iter = m_states.begin(); 00287 iter != m_states.end(); iter++) 00288 delete *iter; 00289 00290 }
|
|
Add an LHCbID to the list of LHCbIDs associated to the track.
Definition at line 454 of file Track.h. References m_lhcbIDs. 00455 { 00456 00457 m_lhcbIDs.push_back( value ); 00458 00459 }
|
|
Add a State to the list of states associated to the track.
Definition at line 419 of file Track.h. References m_states. Referenced by TrgTrackConverter::toTrack(). 00420 { 00421 00422 m_states.push_back( value ); 00423 00424 }
|
|
Retrieve the charge assigned to the track.
Definition at line 397 of file Track.h. References m_physicsState, and State::qOverP(). 00398 { 00399 00400 double qP = m_physicsState.qOverP(); 00401 return ( qP != 0. ? int(fabs(qP)/qP) : 0 ); 00402 00403 }
|
|
Check track flags.
Definition at line 346 of file Track.h. References flagBits, flagMask, and m_flags. 00347 { 00348 unsigned int val = (unsigned int)value; 00349 return 0 != ( m_flags & flagMask & ( val << flagBits )); 00350 }
|
|
Check track type.
Definition at line 334 of file Track.h. References m_flags, typeBits, and typeMask. 00335 { 00336 unsigned int val = (unsigned int)value; 00337 return 0 != ( m_flags & typeMask & ( val << typeBits )); 00338 }
|
|
Retrieve the Chi^2 of the track.
Definition at line 435 of file Track.h. References m_chi2PerDoF, and m_nDoF. Referenced by TrgTrackConverter::str(). 00436 { 00437 00438 return ( m_chi2PerDoF * double(m_nDoF) ); 00439 00440 }
|
|
Retrieve const chi^2 per degree of freedom of the track.
Definition at line 302 of file Track.h. References m_chi2PerDoF. 00303 { 00304 return m_chi2PerDoF; 00305 }
|
|
Reimplemented in FitTrack. Definition at line 297 of file Track.h. References CLID_Track. Referenced by clID(). 00298 { 00299 return CLID_Track; 00300 }
|
|
Reimplemented in FitTrack. Definition at line 292 of file Track.h. References classID(). 00293 { 00294 return Track::classID(); 00295 }
|
|
Clone the track.
Reimplemented in FitTrack. Definition at line 204 of file Track.cpp. References Track(). Referenced by TrFitTrack2TrackCnv::execute().
|
|
Retrieve the reference to the state closest to the given plane.
Reimplemented in FitTrack. Definition at line 147 of file Track.cpp. References m_physicsState, m_states, State::position(), and position(). 00148 { 00149 double minDist = 999999999.; 00150 double dist; 00151 State* best = 0; 00152 for ( std::vector<State*>::const_iterator it = m_states.begin() ; 00153 m_states.end() != it; it++ ) { 00154 dist = plane.distance( ((*it) -> position()) ); 00155 if ( minDist > dist ) { 00156 minDist = dist; 00157 best = *it; 00158 } 00159 } 00160 if ( fabs( plane.distance(m_physicsState.position()) ) < minDist ) 00161 return m_physicsState; 00162 00163 return *best; 00164 };
|
|
Retrieve the reference to the state closest to the given plane.
Reimplemented in FitTrack. Definition at line 127 of file Track.cpp. References m_physicsState, m_states, State::position(), and position(). 00128 { 00129 double minDist = 999999999.; 00130 double dist; 00131 State* best = 0; 00132 for ( std::vector<State*>::iterator it = m_states.begin() ; 00133 m_states.end() != it; it++ ) { 00134 dist = plane.distance( ((*it) -> position()) ); 00135 if ( minDist > dist ) { 00136 minDist = dist; 00137 best = *it; 00138 } 00139 } 00140 if ( fabs( plane.distance(m_physicsState.position())) < minDist ) return m_physicsState; 00141 return *best; 00142 };
|
|
Retrieve the reference to the state closest to the given z-position.
Reimplemented in FitTrack. Definition at line 109 of file Track.cpp. References m_physicsState, m_states, and State::z(). 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 if ( fabs(z - m_physicsState.z()) < minDist ) return m_physicsState; 00121 return *best; 00122 };
|
|
Retrieve the reference to the state closest to the given z-position.
Reimplemented in FitTrack. Definition at line 91 of file Track.cpp. References m_physicsState, m_states, and State::z(). 00092 { 00093 double minDist = 999999999.; 00094 State* best = 0; 00095 for ( std::vector<State*>::iterator it = m_states.begin() ; 00096 m_states.end() != it; it++ ) { 00097 if ( minDist > fabs( z - (*it)->z() ) ) { 00098 minDist = fabs( z-(*it)->z() ); 00099 best = *it; 00100 } 00101 } 00102 if ( fabs(z - m_physicsState.z()) < minDist ) return m_physicsState; 00103 return *best; 00104 };
|
|
Retrieve const the variety of track flags.
Definition at line 322 of file Track.h. References m_flags. Referenced by TrgTrackConverter::str(). 00323 { 00324 return m_flags; 00325 }
|
|
check the existence of a state at a certain predefined location. See State class.
Definition at line 169 of file Track.cpp. References stateAt(). 00170 { 00171 if ( NULL != stateAt(value) ) return true; 00172 return false; 00173 };
|
|
Retrieve container of LHCbIDs.
Definition at line 357 of file Track.h. References m_lhcbIDs. 00358 { 00359 return m_lhcbIDs; 00360 }
|
|
Retrieve const container of LHCbIDs.
Definition at line 352 of file Track.h. References m_lhcbIDs. 00353 { 00354 return m_lhcbIDs; 00355 }
|
|
Retrieve the momentum vector (+ errors) at the physics state.
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 312 of file Track.h. References m_nDoF. 00313 { 00314 return m_nDoF; 00315 }
|
|
number of measurements on track
Definition at line 405 of file Track.h. References m_lhcbIDs. 00406 { 00407 00408 return m_lhcbIDs.size(); 00409 00410 }
|
|
number of states on track
Definition at line 412 of file Track.h. References m_states. 00413 { 00414 00415 return m_states.size(); 00416 00417 }
|
|
Retrieve the momentum at the physics state.
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 372 of file Track.h. References m_physicsState. 00373 { 00374 return m_physicsState; 00375 }
|
|
Retrieve const State closest to the beam-line.
Definition at line 367 of file Track.h. References m_physicsState. Referenced by TrFitTrack2TrackCnv::execute(), and TrgTrackConverter::toTrack(). 00368 { 00369 return m_physicsState; 00370 }
|
|
Retrieve the 3D-position (+ errors) at the physics state.
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) at the physics state.
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) at the physics state.
Definition at line 81 of file Track.cpp. References m_physicsState, and State::posMomCovariance(). 00082 { 00083 cov6D = m_physicsState.posMomCovariance(); 00084 00085 return StatusCode::SUCCESS; 00086 };
|
|
Check whether the track was produced by a given algorithm.
Reimplemented in FitTrack. Definition at line 214 of file Track.cpp. References historyMask, and m_flags. 00215 { 00216 unsigned int val = (unsigned int)value; 00217 return 0 != ( m_flags & historyMask & val ); 00218 };
|
|
Retrieve the transverse momentum at the physics state.
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 461 of file Track.h. References m_lhcbIDs. 00462 { 00463 00464 std::vector<LHCbID>::iterator iter = 00465 std::remove( m_lhcbIDs.begin(), m_lhcbIDs.end(), value ); 00466 m_lhcbIDs.erase( iter, m_lhcbIDs.end() ); 00467 00468 }
|
|
Remove a State from the list of states associated to the track.
Definition at line 426 of file Track.h. References m_states. 00427 { 00428 00429 std::vector<State*>::iterator iter = 00430 std::remove( m_states.begin(), m_states.end(), value ); 00431 m_states.erase( iter, m_states.end() ); 00432 00433 }
|
|
Clear the track before re-use.
Reimplemented in FitTrack. Definition at line 442 of file Track.h. References m_chi2PerDoF, m_flags, m_lhcbIDs, m_nDoF, m_physicsState, m_states, and State::reset(). 00443 { 00444 00445 m_chi2PerDoF = 0; 00446 m_nDoF = 0; 00447 m_flags = 0; 00448 m_physicsState.reset(); 00449 m_states.clear(); 00450 m_lhcbIDs.clear(); 00451 00452 }
|
|
Update chi^2 per degree of freedom of the track.
Definition at line 307 of file Track.h. References m_chi2PerDoF. Referenced by TrgTrackConverter::toTrack(). 00308 { 00309 m_chi2PerDoF = value; 00310 }
|
|
Update track flags.
Definition at line 340 of file Track.h. References flagBits, flagMask, and m_flags. Referenced by TrgTrackConverter::toTrack(). 00341 { 00342 unsigned int val = (unsigned int)value; 00343 m_flags |= ((((unsigned int)val) << flagBits) & flagMask); 00344 }
|
|
Update container of LHCbIDs.
Definition at line 362 of file Track.h. References m_lhcbIDs. Referenced by TrgTrackConverter::toTrack(). 00363 { 00364 m_lhcbIDs = value; 00365 }
|
|
Update number of degrees of freedom of the track.
Definition at line 317 of file Track.h. References m_nDoF. Referenced by TrgTrackConverter::toTrack(). 00318 { 00319 m_nDoF = value; 00320 }
|
|
Update State closest to the beam-line.
Definition at line 377 of file Track.h. References m_physicsState. 00378 { 00379 m_physicsState = value; 00380 }
|
|
Update the name of the algorithm that produced the track.
Reimplemented in FitTrack. Definition at line 223 of file Track.cpp. References historyBits, historyMask, and m_flags. 00224 { 00225 unsigned int val = (unsigned int)value; 00226 m_flags &= ~historyMask; 00227 m_flags |= ((((unsigned int)val) << historyBits) & historyMask); 00228 };
|
|
Update container with pointers to all the states.
Definition at line 392 of file Track.h. References m_states. 00393 { 00394 m_states = value; 00395 }
|
|
Update track type.
Definition at line 327 of file Track.h. References m_flags, typeBits, and typeMask. Referenced by TrgTrackConverter::toTrack(). 00328 { 00329 unsigned int val = (unsigned int)value; 00330 m_flags &= ~typeMask; 00331 m_flags |= ((((unsigned int)val) << typeBits) & typeMask); 00332 }
|
|
Retrieve the slopes (dx/dz,dy/dz,1) at the physics state.
Definition at line 41 of file Track.cpp. References State::errSlopes(), m_physicsState, State::slopes(), and slopes(). Referenced by 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.
Reimplemented in FitTrack. Definition at line 191 of file Track.cpp. References State::checkLocation(), m_physicsState, and m_states. 00192 { 00193 for ( std::vector<State*>::const_iterator it = m_states.begin() ; 00194 m_states.end() != it; it++ ) { 00195 if ( (*it) -> checkLocation( value ) ) return (*it); 00196 } 00197 if (m_physicsState.checkLocation(value)) return &m_physicsState; 00198 return NULL; 00199 };
|
|
Retrieve the pointer to the state at a certain predefined location. See State class.
Reimplemented in FitTrack. Definition at line 178 of file Track.cpp. References State::checkLocation(), m_physicsState, and m_states. Referenced by hasStateAt(). 00179 { 00180 for ( std::vector<State*>::iterator it = m_states.begin() ; 00181 m_states.end() != it; it++ ) { 00182 if ( (*it) -> checkLocation( value ) ) return (*it); 00183 } 00184 if (m_physicsState.checkLocation(value)) return &m_physicsState; 00185 return NULL; 00186 };
|
|
Retrieve container with pointers to all the states.
Definition at line 387 of file Track.h. References m_states. 00388 { 00389 return m_states; 00390 }
|
|
Retrieve const container with pointers to all the states.
Definition at line 382 of file Track.h. References m_states. 00383 { 00384 return m_states; 00385 }
|
|
chi^2 per degree of freedom of the track
Definition at line 261 of file Track.h. Referenced by chi2(), chi2PerDoF(), reset(), setChi2PerDoF(), and Track(). |
|
the variety of track flags
Definition at line 263 of file Track.h. Referenced by checkFlag(), checkType(), flags(), producedByAlgo(), reset(), setFlag(), setProducedByAlgo(), setType(), and Track(). |
|
container of LHCbIDs
Definition at line 264 of file Track.h. Referenced by addToLhcbIDs(), lhcbIDs(), nMeasurements(), removeFromLhcbIDs(), reset(), setLhcbIDs(), and Track(). |
|
number of degrees of freedom of the track
Definition at line 262 of file Track.h. Referenced by chi2(), nDoF(), reset(), setNDoF(), and Track(). |
|
State closest to the beam-line.
Definition at line 265 of file Track.h. Referenced by charge(), closestState(), momentum(), p(), physicsState(), position(), positionAndMomentum(), posMomCovariance(), pt(), reset(), setPhysicsState(), slopes(), stateAt(), and Track(). |
|
container with pointers to all the states
Definition at line 266 of file Track.h. Referenced by addToStates(), closestState(), nStates(), removeFromStates(), reset(), setStates(), stateAt(), states(), Track(), and ~Track(). |