Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Track Class Reference

#include <Track.h>

Inheritance diagram for Track:

FitTrack List of all members.

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 positionAndMomentum (HepPoint3D &pos, HepVector3D &mom) const
 Retrieve the position and momentum vectors 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.
double chi2 () const
 Retrieve the Chi^2 of the track.
unsigned int nStates () const
 number of states on track
void addToStates (State &state)
 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.
StateclosestState (double z)
 Retrieve the reference to the state closest to the given z-position.
const StateclosestState (double z) const
 Retrieve the reference to the state closest to the given z-position.
StateclosestState (const HepPlane3D &plane)
 Retrieve the reference to the state closest to the given plane.
const StateclosestState (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.
StatestateAt (const State::Location &value)
 Retrieve the pointer to the state at a certain predefined location. See State class.
const StatestateAt (const State::Location &value) const
 Retrieve the pointer to the state at a certain predefined location. See State class.
unsigned int nMeasurements () const
 number of measurements on track
void addToMeasurements (Measurement &meas)
 add a measurement to the list associated to the track
void addToNodes (Node *node)
 add a Node to the list of nodes (nodes are own by 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.
void addToAncestors (Track &ancestor)
 add a track to the list of ancestors of this track
virtual void reset ()
 Clear the track before re-use.
virtual Trackclone () const
 Clone the track.
void setType (unsigned int value)
 set type of the track (values in TrackKeys::Types)
unsigned int type () const
 return the type of the track
void setHistory (unsigned int value)
 set the name of the algorithm (ParRec) thar made the track (see in TrackKeys::History)
unsigned int history () const
 return the algorithm that created the track
void setHistoryFit (unsigned int)
 set the algorithm that fitted the track (TrackKeys::HistoryFit)
unsigned int historyFit () const
 return the fitting algorithm
void setStatus (unsigned int)
 set the status of the track (see TrackKeys::Status)
unsigned int status () const
 return the status of the track
void setFlag (unsigned int, bool value)
 Update the flag (see TrackKeys::Flags).
bool checkFlag (unsigned int flag) const
 return the status of the flag
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 setFlags (unsigned int value)
 Update the variety of track flags.
unsigned int specific () const
 Retrieve track specific bits.
void setSpecific (unsigned int value)
 Update track specific bits.
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 StatephysicsState () const
 Retrieve const State closest to the beam-line.
StatephysicsState ()
 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.
const std::vector< Measurement * > & measurements () const
 Retrieve const container of Measurements.
std::vector< Measurement * > & measurements ()
 Retrieve container of Measurements.
const std::vector< Node * > & nodes () const
 Retrieve const container of Nodes.
std::vector< Node * > & nodes ()
 Retrieve container of Nodes.
const std::vector< Track * > & ancestors () const
 Retrieve const container of ancestors of the track.
std::vector< Track * > & ancestors ()
 Retrieve container of ancestors of the track.

Static Public Member Functions

static const CLID & classID ()

Protected Types

enum  flagsBits {
  typeBits = 0, historyBits = 5, historyFitBits = 10, statusBits = 15,
  flagBits = 18, specificBits = 28
}
 Offsets of bitfield flags. More...
enum  flagsMasks {
  typeMask = 0x1FL, historyMask = 0x3E0L, historyFitMask = 0x7C00L, statusMask = 0x38000L,
  flagMask = 0xFFC0000L, specificMask = 0xF0000000L
}
 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< LHCbIDm_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
std::vector< Measurement * > m_measurements
 container of Measurements
std::vector< Node * > m_nodes
 container of Nodes
std::vector< Track * > m_ancestors
 container of ancestors of the track

Detailed Description

Track is the base class for offline and online tracks.

Author:
Jose Hernando, Eduardo Rodrigues created Tue Apr 19 13:51:13 2005

Definition at line 61 of file Track.h.


Member Enumeration Documentation

enum Track::flagsBits [protected]
 

Offsets of bitfield flags.

Enumeration values:
typeBits 
historyBits 
historyFitBits 
statusBits 
flagBits 
specificBits 

Definition at line 282 of file Track.h.

00282                 {typeBits       = 0,
00283                  historyBits    = 5,
00284                  historyFitBits = 10,
00285                  statusBits     = 15,
00286                  flagBits       = 18,
00287                  specificBits   = 28};

enum Track::flagsMasks [protected]
 

Bitmasks for bitfield flags.

Enumeration values:
typeMask 
historyMask 
historyFitMask 
statusMask 
flagMask 
specificMask 

Definition at line 290 of file Track.h.

00290                  {typeMask       = 0x1FL,
00291                   historyMask    = 0x3E0L,
00292                   historyFitMask = 0x7C00L,
00293                   statusMask     = 0x38000L,
00294                   flagMask       = 0xFFC0000L,
00295                   specificMask   = 0xF0000000L};


Constructor & Destructor Documentation

Track::Track int  key  )  [inline]
 

Constructor with assigned key.

Definition at line 66 of file Track.h.

References m_chi2PerDoF, m_flags, m_lhcbIDs, m_nDoF, m_physicsState, and m_states.

00066                  : KeyedObject<int>( key ),
00067                    m_chi2PerDoF(0.0),
00068                    m_nDoF(0),
00069                    m_flags(0),
00070                    m_lhcbIDs(),
00071                    m_physicsState(),
00072                    m_states() {}

Track::Track  )  [inline]
 

Default Constructor.

Definition at line 75 of file Track.h.

References m_ancestors, m_chi2PerDoF, m_flags, m_lhcbIDs, m_measurements, m_nDoF, m_nodes, m_physicsState, and m_states.

Referenced by clone().

00075           : m_chi2PerDoF(0.0),
00076             m_nDoF(0),
00077             m_flags(0),
00078             m_lhcbIDs(),
00079             m_physicsState(),
00080             m_states(),
00081             m_measurements(),
00082             m_nodes(),
00083             m_ancestors() {}

Track::~Track  )  [inline]
 

Track destructor.

Definition at line 323 of file Track.h.

References reset().

00324 {
00325 
00326   reset();
00327         
00328 }


Member Function Documentation

void Track::addToAncestors Track ancestor  )  [inline]
 

add a track to the list of ancestors of this track

Definition at line 530 of file Track.h.

References m_ancestors.

Referenced by clone().

00531 {
00532 
00533   m_ancestors.push_back( (Track*) &ancestor );
00534         
00535 }

void Track::addToLhcbIDs const LHCbID value  )  [inline]
 

Add an LHCbID to the list of LHCbIDs associated to the track.

Definition at line 514 of file Track.h.

References m_lhcbIDs.

00515 {
00516 
00517   m_lhcbIDs.push_back( value );
00518         
00519 }

void Track::addToMeasurements Measurement meas  )  [inline]
 

add a measurement to the list associated to the track

Definition at line 500 of file Track.h.

References m_measurements.

Referenced by clone().

00501 {
00502 
00503   m_measurements.push_back( meas.clone() );
00504         
00505 }

void Track::addToNodes Node node  )  [inline]
 

add a Node to the list of nodes (nodes are own by Track)

Definition at line 507 of file Track.h.

References m_nodes.

Referenced by clone().

00508 {
00509 
00510   m_nodes.push_back( node );
00511         
00512 }

void Track::addToStates State state  )  [inline]
 

Add a State to the list of states associated to the track.

Definition at line 474 of file Track.h.

References m_states.

Referenced by clone().

00475 {
00476 
00477   m_states.push_back( state.clone() );
00478         
00479 }

std::vector< Track * > & Track::ancestors  )  [inline]
 

Retrieve container of ancestors of the track.

Definition at line 447 of file Track.h.

References m_ancestors.

00448 {
00449   return m_ancestors;
00450 }

const std::vector< Track * > & Track::ancestors  )  const [inline]
 

Retrieve const container of ancestors of the track.

Definition at line 442 of file Track.h.

References m_ancestors.

00443 {
00444   return m_ancestors;
00445 }

int Track::charge  )  const [inline]
 

Retrieve the charge assigned to the track.

Definition at line 452 of file Track.h.

References m_physicsState, and State::qOverP().

00453 {
00454 
00455   double qP = m_physicsState.qOverP();
00456   return ( qP != 0. ? int(fabs(qP)/qP) : 0 );
00457         
00458 }

bool Track::checkFlag unsigned int  flag  )  const
 

return the status of the flag

Definition at line 315 of file Track.cpp.

References flagBits, flagMask, and m_flags.

00316 {
00317   unsigned int val = ((unsigned int) flag << flagBits);  
00318   bool ok = (0 != ( m_flags & flagMask & val ));
00319   return ok;
00320 }

double Track::chi2  )  const [inline]
 

Retrieve the Chi^2 of the track.

Definition at line 460 of file Track.h.

References m_chi2PerDoF, and m_nDoF.

00461 {
00462 
00463   return ( m_chi2PerDoF * double(m_nDoF) );
00464         
00465 }

double Track::chi2PerDoF  )  const [inline]
 

Retrieve const chi^2 per degree of freedom of the track.

Definition at line 340 of file Track.h.

References m_chi2PerDoF.

Referenced by clone().

00341 {
00342   return m_chi2PerDoF;
00343 }

const CLID & Track::classID  )  [inline, static]
 

Reimplemented in FitTrack.

Definition at line 335 of file Track.h.

References CLID_Track.

Referenced by clID().

00336 {
00337   return CLID_Track;
00338 }

const CLID & Track::clID  )  const [inline, virtual]
 

Reimplemented in FitTrack.

Definition at line 330 of file Track.h.

References classID().

00331 {
00332   return Track::classID();
00333 }

Track * Track::clone  )  const [virtual]
 

Clone the track.

Reimplemented in FitTrack.

Definition at line 238 of file Track.cpp.

References addToAncestors(), addToMeasurements(), addToNodes(), addToStates(), chi2PerDoF(), flags(), lhcbIDs(), m_ancestors, m_measurements, m_nodes, m_states, nDoF(), physicsState(), setChi2PerDoF(), setFlags(), setLhcbIDs(), setNDoF(), setPhysicsState(), and Track().

00239 {
00240   Track* tr = new Track();
00241   tr->setChi2PerDoF(chi2PerDoF());
00242   tr->setNDoF(nDoF());
00243   tr->setFlags(flags());
00244   tr->setPhysicsState(physicsState());
00245   tr->setLhcbIDs(lhcbIDs());
00246   for (std::vector<State*>::const_iterator it = m_states.begin();
00247        it != m_states.end(); it++) tr->addToStates(*(*it));
00248   for (std::vector<Measurement*>::const_iterator it2 = m_measurements.begin();
00249        it2 != m_measurements.end(); it2++) tr->addToMeasurements(*(*it2));
00250   for (std::vector<Node*>::const_iterator it3 = m_nodes.begin();
00251        it3 != m_nodes.end(); it3++) tr->addToNodes( (*it3)->clone());
00252   for (std::vector<Track*>::const_iterator it4 = m_ancestors.begin();
00253        it4 != m_ancestors.end();  it4++) tr->addToAncestors( *(*it4) );
00254   return tr;
00255 };

const State & Track::closestState const HepPlane3D &  plane  )  const
 

Retrieve the reference to the state closest to the given plane.

Reimplemented in FitTrack.

Definition at line 158 of file Track.cpp.

References m_physicsState, m_states, State::position(), and position().

00159 {
00160   double minDist = 999999999.;
00161   double dist;
00162   State* best = 0;
00163   for ( std::vector<State*>::const_iterator it = m_states.begin() ;
00164         m_states.end() != it; it++ ) {
00165     dist = plane.distance( ((*it) -> position()) );
00166     if ( minDist > dist ) {
00167       minDist = dist;
00168       best    = *it;
00169     }
00170   }
00171   if ( fabs( plane.distance(m_physicsState.position()) ) < minDist )
00172     return m_physicsState;
00173 
00174   return *best;
00175 };

State & Track::closestState const HepPlane3D &  plane  ) 
 

Retrieve the reference to the state closest to the given plane.

Reimplemented in FitTrack.

Definition at line 138 of file Track.cpp.

References m_physicsState, m_states, State::position(), and position().

00139 {
00140   double minDist = 999999999.;
00141   double dist;
00142   State* best = 0;
00143   for ( std::vector<State*>::iterator it = m_states.begin() ;
00144         m_states.end() != it; it++ ) {
00145     dist = plane.distance( ((*it) -> position()) );
00146     if ( minDist > dist ) {
00147       minDist = dist;
00148       best    = *it;
00149     }
00150   }
00151   if ( fabs( plane.distance(m_physicsState.position())) < minDist ) return m_physicsState;
00152   return *best;
00153 };

const State & Track::closestState double  z  )  const
 

Retrieve the reference to the state closest to the given z-position.

Reimplemented in FitTrack.

Definition at line 120 of file Track.cpp.

References m_physicsState, m_states, and State::z().

00121 {
00122   double minDist = 999999999.;
00123   State* best = 0;
00124   for ( std::vector<State*>::const_iterator it = m_states.begin() ;
00125         m_states.end() != it; it++ ) {
00126     if ( minDist > fabs( z - (*it)->z() ) ) {
00127       minDist = fabs( z-(*it)->z() );
00128       best    = *it;
00129     }
00130   }
00131   if ( fabs(z - m_physicsState.z()) < minDist ) return m_physicsState;
00132   return *best;
00133 };

State & Track::closestState double  z  ) 
 

Retrieve the reference to the state closest to the given z-position.

Reimplemented in FitTrack.

Definition at line 102 of file Track.cpp.

References m_physicsState, m_states, and State::z().

00103 {
00104   double minDist = 999999999.;
00105   State* best = 0;
00106   for ( std::vector<State*>::iterator it = m_states.begin() ;
00107         m_states.end() != it; it++ ) {
00108     if ( minDist > fabs( z - (*it)->z() ) ) {
00109       minDist = fabs( z-(*it)->z() );
00110       best    = *it;
00111     }
00112   }
00113   if ( fabs(z - m_physicsState.z()) < minDist ) return m_physicsState;
00114   return *best;
00115 };

unsigned int Track::flags  )  const [inline]
 

Retrieve const the variety of track flags.

Definition at line 360 of file Track.h.

References m_flags.

Referenced by clone().

00361 {
00362   return m_flags;
00363 }

bool Track::hasStateAt const State::Location value  )  const
 

check the existence of a state at a certain predefined location. See State class.

Definition at line 180 of file Track.cpp.

References stateAt().

00181 {
00182   if ( NULL != stateAt(value) ) return true;
00183   return false;
00184 };

unsigned int Track::history  )  const
 

return the algorithm that created the track

Definition at line 266 of file Track.cpp.

References historyBits, historyMask, and m_flags.

00267 {
00268   unsigned int val = ( m_flags & historyMask) >> historyBits;
00269   return val;
00270 };

unsigned int Track::historyFit  )  const
 

return the fitting algorithm

Definition at line 278 of file Track.cpp.

References historyFitBits, historyFitMask, and m_flags.

00279 {
00280   unsigned int val = ( m_flags & historyFitMask) >> historyFitBits;
00281   return val;
00282 };

std::vector< LHCbID > & Track::lhcbIDs  )  [inline]
 

Retrieve container of LHCbIDs.

Definition at line 387 of file Track.h.

References m_lhcbIDs.

00388 {
00389   return m_lhcbIDs;
00390 }

const std::vector< LHCbID > & Track::lhcbIDs  )  const [inline]
 

Retrieve const container of LHCbIDs.

Definition at line 382 of file Track.h.

References m_lhcbIDs.

Referenced by clone().

00383 {
00384   return m_lhcbIDs;
00385 }

std::vector< Measurement * > & Track::measurements  )  [inline]
 

Retrieve container of Measurements.

Reimplemented in FitTrack.

Definition at line 427 of file Track.h.

References m_measurements.

00428 {
00429   return m_measurements;
00430 }

const std::vector< Measurement * > & Track::measurements  )  const [inline]
 

Retrieve const container of Measurements.

Reimplemented in FitTrack.

Definition at line 422 of file Track.h.

References m_measurements.

00423 {
00424   return m_measurements;
00425 }

StatusCode Track::momentum HepVector3D &  mom,
HepSymMatrix &  errMom
const
 

Retrieve the momentum vector (+ errors) at the physics state.

Definition at line 80 of file Track.cpp.

References State::errMomentum(), m_physicsState, and State::momentum().

00082 {
00083   mom    = m_physicsState.momentum();
00084   errMom = m_physicsState.errMomentum();
00085 
00086   return StatusCode::SUCCESS;
00087 };

int Track::nDoF  )  const [inline]
 

Retrieve const number of degrees of freedom of the track.

Definition at line 350 of file Track.h.

References m_nDoF.

Referenced by clone().

00351 {
00352   return m_nDoF;
00353 }

unsigned int Track::nMeasurements  )  const [inline]
 

number of measurements on track

Definition at line 491 of file Track.h.

References m_lhcbIDs, and m_measurements.

00492 {
00493 
00494   unsigned int n = m_measurements.size();
00495   if (n == 0) n = m_lhcbIDs.size();
00496   return n;
00497         
00498 }

std::vector< Node * > & Track::nodes  )  [inline]
 

Retrieve container of Nodes.

Reimplemented in FitTrack.

Definition at line 437 of file Track.h.

References m_nodes.

00438 {
00439   return m_nodes;
00440 }

const std::vector< Node * > & Track::nodes  )  const [inline]
 

Retrieve const container of Nodes.

Reimplemented in FitTrack.

Definition at line 432 of file Track.h.

References m_nodes.

00433 {
00434   return m_nodes;
00435 }

unsigned int Track::nStates  )  const [inline]
 

number of states on track

Definition at line 467 of file Track.h.

References m_states.

00468 {
00469 
00470   return m_states.size();
00471         
00472 }

double Track::p  )  const
 

Retrieve the momentum at the physics state.

Definition at line 64 of file Track.cpp.

References m_physicsState, and State::p().

00065 {
00066   return m_physicsState.p();
00067 };

State & Track::physicsState  )  [inline]
 

Retrieve State closest to the beam-line.

Definition at line 402 of file Track.h.

References m_physicsState.

00403 {
00404   return m_physicsState;
00405 }

const State & Track::physicsState  )  const [inline]
 

Retrieve const State closest to the beam-line.

Definition at line 397 of file Track.h.

References m_physicsState.

Referenced by clone().

00398 {
00399   return m_physicsState;
00400 }

StatusCode Track::position HepPoint3D &  pos,
HepSymMatrix &  errPos
const
 

Retrieve the 3D-position (+ errors) at the physics state.

Definition at line 40 of file Track.cpp.

References State::errPosition(), m_physicsState, and State::position().

Referenced by closestState().

00042 {
00043   pos    = m_physicsState.position();
00044   errPos = m_physicsState.errPosition();
00045 
00046   return StatusCode::SUCCESS;
00047 };

StatusCode Track::positionAndMomentum HepPoint3D &  pos,
HepVector3D &  mom
const
 

Retrieve the position and momentum vectors at the physics state.

Definition at line 29 of file Track.cpp.

References m_physicsState, and State::positionAndMomentum().

00031 {
00032   m_physicsState.positionAndMomentum( pos, mom );
00033 
00034   return StatusCode::SUCCESS;
00035 };

StatusCode Track::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.

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 };

StatusCode Track::posMomCovariance HepSymMatrix &  cov6D  )  const
 

Retrieve the 6D covariance matrix (x,y,z,px,py,pz) at the physics state.

Definition at line 92 of file Track.cpp.

References m_physicsState, and State::posMomCovariance().

00093 {
00094   cov6D = m_physicsState.posMomCovariance();
00095 
00096   return StatusCode::SUCCESS;
00097 };

double Track::pt  )  const
 

Retrieve the transverse momentum at the physics state.

Definition at line 72 of file Track.cpp.

References m_physicsState, and State::pt().

00073 {
00074   return m_physicsState.pt();
00075 };

void Track::removeFromLhcbIDs const LHCbID value  )  [inline]
 

Remove an LHCbID from the list of LHCbIDs associated to the track.

Definition at line 521 of file Track.h.

References m_lhcbIDs.

00522 {
00523 
00524   std::vector<LHCbID>::iterator iter =
00525     std::remove( m_lhcbIDs.begin(), m_lhcbIDs.end(), value );
00526   m_lhcbIDs.erase( iter, m_lhcbIDs.end() );
00527         
00528 }

void Track::removeFromStates State value  )  [inline]
 

Remove a State from the list of states associated to the track.

Definition at line 481 of file Track.h.

References m_states.

00482 {
00483 
00484   std::vector<State*>::iterator iter =
00485     std::remove( m_states.begin(), m_states.end(), value );
00486   delete *iter;
00487   m_states.erase( iter, m_states.end() );
00488         
00489 }

void Track::reset  )  [virtual]
 

Clear the track before re-use.

Reimplemented in FitTrack.

Definition at line 215 of file Track.cpp.

References m_ancestors, m_chi2PerDoF, m_flags, m_lhcbIDs, m_measurements, m_nDoF, m_nodes, m_physicsState, m_states, and State::reset().

Referenced by ~Track().

00216 {
00217 
00218   m_chi2PerDoF = 0;
00219   m_nDoF       = 0;
00220   m_flags      = 0;
00221   m_physicsState.reset();
00222   m_lhcbIDs.clear();
00223   for (std::vector<State*>::iterator it = m_states.begin();
00224        it != m_states.end(); it++) delete *it;
00225   for (std::vector<Measurement*>::iterator it2 = m_measurements.begin();
00226        it2 != m_measurements.end(); it2++) delete *it2;
00227   for (std::vector<Node*>::iterator it3 = m_nodes.begin();
00228        it3 != m_nodes.end(); it3++) delete *it3;
00229   m_states.clear();
00230   m_measurements.clear();
00231   m_nodes.clear();
00232   m_ancestors.clear();
00233 };

void Track::setChi2PerDoF double  value  )  [inline]
 

Update chi^2 per degree of freedom of the track.

Definition at line 345 of file Track.h.

References m_chi2PerDoF.

Referenced by clone().

00346 {
00347   m_chi2PerDoF = value;
00348 }

void Track::setFlag unsigned  int,
bool  value
 

Update the flag (see TrackKeys::Flags).

Definition at line 308 of file Track.cpp.

References flagBits, flagMask, and m_flags.

00309 {
00310   unsigned int val = (((unsigned int) flag) << flagBits) & flagMask;
00311   if (ok) m_flags |= val;
00312   else m_flags &= ~val;
00313 }

void Track::setFlags unsigned int  value  )  [inline]
 

Update the variety of track flags.

Definition at line 365 of file Track.h.

References m_flags.

Referenced by clone().

00366 {
00367   m_flags = value;
00368 }

void Track::setHistory unsigned int  value  ) 
 

set the name of the algorithm (ParRec) thar made the track (see in TrackKeys::History)

Definition at line 260 of file Track.cpp.

References historyBits, historyMask, and m_flags.

00261 {
00262   m_flags &= ~historyMask;
00263   m_flags |= ((((unsigned int) key ) << historyBits) & historyMask);
00264 };

void Track::setHistoryFit unsigned  int  ) 
 

set the algorithm that fitted the track (TrackKeys::HistoryFit)

Definition at line 272 of file Track.cpp.

References historyFitBits, historyFitMask, and m_flags.

00273 {
00274   m_flags &= ~historyFitMask;
00275   m_flags |= ((((unsigned int) key) << historyFitBits) & historyFitMask);
00276 };

void Track::setLhcbIDs const std::vector< LHCbID > &  value  )  [inline]
 

Update container of LHCbIDs.

Definition at line 392 of file Track.h.

References m_lhcbIDs.

Referenced by clone().

00393 {
00394   m_lhcbIDs = value;
00395 }

void Track::setNDoF int  value  )  [inline]
 

Update number of degrees of freedom of the track.

Definition at line 355 of file Track.h.

References m_nDoF.

Referenced by clone().

00356 {
00357   m_nDoF = value;
00358 }

void Track::setPhysicsState const State value  )  [inline]
 

Update State closest to the beam-line.

Definition at line 407 of file Track.h.

References m_physicsState.

Referenced by clone().

00408 {
00409   m_physicsState = value;
00410 }

void Track::setSpecific unsigned int  value  )  [inline]
 

Update track specific bits.

Definition at line 375 of file Track.h.

References m_flags, specificBits, and specificMask.

00376 {
00377   unsigned int val = (unsigned int)value;
00378   m_flags &= ~specificMask;
00379   m_flags |= ((((unsigned int)val) << specificBits) & specificMask);
00380 }

void Track::setStatus unsigned  int  ) 
 

set the status of the track (see TrackKeys::Status)

Definition at line 296 of file Track.cpp.

References m_flags, statusBits, and statusMask.

00297 {
00298   m_flags &= ~statusMask;
00299   m_flags |= ((((unsigned int) key) << statusBits) & statusMask);
00300 };

void Track::setType unsigned int  value  ) 
 

set type of the track (values in TrackKeys::Types)

Definition at line 284 of file Track.cpp.

References m_flags, typeBits, and typeMask.

00285 {
00286   m_flags &= ~typeMask;
00287   m_flags |= ((((unsigned int) key) << typeBits) & typeMask);
00288 };

StatusCode Track::slopes HepVector3D &  slopes,
HepSymMatrix &  errSlopes
const
 

Retrieve the slopes (dx/dz,dy/dz,1) at the physics state.

Definition at line 52 of file Track.cpp.

References State::errSlopes(), m_physicsState, State::slopes(), and slopes().

Referenced by slopes().

00054 {
00055   slopes    = m_physicsState.slopes();
00056   errSlopes = m_physicsState.errSlopes();
00057 
00058   return StatusCode::SUCCESS;
00059 };

unsigned int Track::specific  )  const [inline]
 

Retrieve track specific bits.

Definition at line 370 of file Track.h.

References m_flags, specificBits, and specificMask.

00371 {
00372   return (unsigned int)((m_flags & specificMask) >> specificBits);
00373 }

const State * Track::stateAt const State::Location value  )  const
 

Retrieve the pointer to the state at a certain predefined location. See State class.

Reimplemented in FitTrack.

Definition at line 202 of file Track.cpp.

References State::checkLocation(), m_physicsState, and m_states.

00203 {
00204   for ( std::vector<State*>::const_iterator it = m_states.begin() ;
00205         m_states.end() != it; it++ ) {
00206     if ( (*it) -> checkLocation( value ) ) return (*it);
00207   }
00208   if  (m_physicsState.checkLocation(value)) return &m_physicsState;
00209   return NULL;
00210 };

State * Track::stateAt const State::Location value  ) 
 

Retrieve the pointer to the state at a certain predefined location. See State class.

Reimplemented in FitTrack.

Definition at line 189 of file Track.cpp.

References State::checkLocation(), m_physicsState, and m_states.

Referenced by hasStateAt().

00190 {
00191   for ( std::vector<State*>::iterator it = m_states.begin() ;
00192         m_states.end() != it; it++ ) {
00193     if ( (*it) -> checkLocation( value ) ) return (*it);
00194   }
00195   if  (m_physicsState.checkLocation(value)) return &m_physicsState;
00196   return NULL;
00197 };

std::vector< State * > & Track::states  )  [inline]
 

Retrieve container with pointers to all the states.

Definition at line 417 of file Track.h.

References m_states.

00418 {
00419   return m_states;
00420 }

const std::vector< State * > & Track::states  )  const [inline]
 

Retrieve const container with pointers to all the states.

Definition at line 412 of file Track.h.

References m_states.

00413 {
00414   return m_states;
00415 }

unsigned int Track::status  )  const
 

return the status of the track

Definition at line 302 of file Track.cpp.

References m_flags, statusBits, and statusMask.

00303 {
00304   unsigned int val = ( m_flags & statusMask) >> statusBits;
00305   return val;
00306 }

unsigned int Track::type  )  const
 

return the type of the track

Definition at line 290 of file Track.cpp.

References m_flags, typeBits, and typeMask.

00291 {
00292   unsigned int val = ( m_flags & typeMask) >> typeBits;
00293   return val;
00294 }


Member Data Documentation

std::vector<Track*> Track::m_ancestors [protected]
 

container of ancestors of the track

Definition at line 306 of file Track.h.

Referenced by addToAncestors(), ancestors(), clone(), reset(), and Track().

double Track::m_chi2PerDoF [protected]
 

chi^2 per degree of freedom of the track

Definition at line 298 of file Track.h.

Referenced by chi2(), chi2PerDoF(), reset(), setChi2PerDoF(), and Track().

unsigned int Track::m_flags [protected]
 

the variety of track flags

Definition at line 300 of file Track.h.

Referenced by checkFlag(), flags(), history(), historyFit(), reset(), setFlag(), setFlags(), setHistory(), setHistoryFit(), setSpecific(), setStatus(), setType(), specific(), status(), Track(), and type().

std::vector<LHCbID> Track::m_lhcbIDs [protected]
 

container of LHCbIDs

Definition at line 301 of file Track.h.

Referenced by addToLhcbIDs(), lhcbIDs(), nMeasurements(), removeFromLhcbIDs(), reset(), setLhcbIDs(), and Track().

std::vector<Measurement*> Track::m_measurements [protected]
 

container of Measurements

Reimplemented in FitTrack.

Definition at line 304 of file Track.h.

Referenced by addToMeasurements(), clone(), measurements(), nMeasurements(), reset(), and Track().

int Track::m_nDoF [protected]
 

number of degrees of freedom of the track

Definition at line 299 of file Track.h.

Referenced by chi2(), nDoF(), reset(), setNDoF(), and Track().

std::vector<Node*> Track::m_nodes [protected]
 

container of Nodes

Reimplemented in FitTrack.

Definition at line 305 of file Track.h.

Referenced by addToNodes(), clone(), nodes(), reset(), and Track().

State Track::m_physicsState [protected]
 

State closest to the beam-line.

Definition at line 302 of file Track.h.

Referenced by charge(), closestState(), momentum(), p(), physicsState(), position(), positionAndMomentum(), posMomCovariance(), pt(), reset(), setPhysicsState(), slopes(), stateAt(), and Track().

std::vector<State*> Track::m_states [protected]
 

container with pointers to all the states

Definition at line 303 of file Track.h.

Referenced by addToStates(), clone(), closestState(), nStates(), removeFromStates(), reset(), stateAt(), states(), and Track().


The documentation for this class was generated from the following files:
Generated on Wed May 4 11:52:39 2005 for New Track Event Model by doxygen 1.4.1