Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

TrTrack Class Reference

#include <TrTrack.h>

List of all members.

Public Types

enum  TrackType {
  Long, Velotrack, Backward, Ttrack,
  Upstream, Downstream, L1Long, L1RZVelo,
  L1SpaceVelo, L1VeloTT, L1MuonMatched, L1KShort,
  L1Downstream, HLTRZVelo, HLTSpaceVelo, HLTVeloTT
}
enum  HistoryFlag {
  LongTrack, Seeding, TrKshort, TrMatching,
  VeloTrack, VeloTT, TrgForward, TrgVelo,
  TrgVeloTT
}

Public Methods

 TrTrack ()
 Default Constructor. More...

virtual ~TrTrack ()
 Destructor. More...

virtual const CLID & clID () const
 Retrieve pointer to class definition structure. More...

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. More...

StatusCode position (HepPoint3D &pos, HepSymMatrix &errPos) const
 Retrieve the 3D-position (+ errors) of a track closest to the beam-line. More...

StatusCode slopes (HepVector3D &slopes, HepSymMatrix &errSlopes) const
 Retrieve the slopes (dx/dz,dy/dz,1) of a track closest to the beam-line. More...

double p () const
 Retrieve the momentum of a track closest to the beam-line. More...

double pt () const
 Retrieve the transverse momentum of a track closest to the beam-line. More...

StatusCode momentum (HepVector3D &mom, HepSymMatrix &errMom) const
 Retrieve the momentum vector (+ errors) of a track closest to the beam-line. More...

StatusCode posMomCovariance (HepSymMatrix &cov6D) const
 Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of a track closest to the beam-line. More...

int charge () const
 Retrieve the charge assigned to the track. More...

unsigned int nStates () const
 number of states on track. More...

void addToStates (TrState *value)
 Add a TrState to the list of states associated to the track. More...

void removeFromStates (const TrState &value)
 Remove a TrState from the list of states associated to the track. More...

virtual TrStateclosestState (double z)
 Retrieve the pointer to the state closest to the given z-position. More...

virtual const TrStateclosestState (double z) const
 Retrieve the pointer to the state closest to the given z-position. More...

virtual TrStateclosestState (HepPlane3D &plane)
 Retrieve the pointer to the state closest to the given plane. More...

virtual const TrStateclosestState (HepPlane3D &plane) const
 Retrieve the pointer to the state closest to the given plane. More...

double chi2 () const
 Retrieve the Chi^2 of the track. More...

virtual void reset ()
 Clear the track before re-use. More...

virtual TrTrack * clone () const
 Clone the track. More...

std::vector< LHCbID > & LHCbIDs ()
 Retrieve the LHCbIDs associated to the track. More...

const std::vector< LHCbID > & LHCbIDs () const
 Retrieve the LHCbIDs associated to the track. More...

void setLHCbIDs (const std::vector< LHCbID > &value)
 Update the LHCbIDs associated to the track. More...

void addToLHCbIDs (const LHCbID &value)
 Add an LHCbID to the list of LHCbIDs associated to the track. More...

void removeFromLHCbIDs (const LHCbID &value)
 Remove an LHCbID from the list of LHCbIDs associated to the track. More...

bool type (unsigned value) const
 Check the type of the track. More...

void setType (unsigned value)
 Update the type of the track. More...

bool history (unsigned value) const
 Check the history of the track. More...

void setHistory (unsigned value)
 Update the history of the track. More...

virtual bool producedByAlgo (const TrTrack::HistoryFlag &flag) const
 Check whether the track was produced by a given algorithm. More...

bool flag (unsigned value) const
 Check the flag of the track. More...

void setFlag (unsigned value)
 Update the flag of the track. More...

double chi2PerDoF () const
 Retrieve chi^2 per degree of freedom of the track. More...

void setChi2PerDoF (double value)
 Update chi^2 per degree of freedom of the track. More...

int nDoF () const
 Retrieve number of degrees of freedom of the track. More...

void setNDoF (int value)
 Update number of degrees of freedom of the track. More...

unsigned flags () const
 Retrieve Variety of track flags. More...

void setFlags (unsigned value)
 Update Variety of track flags. More...

void setValid (bool value)
 Update Track validity (0=non-valid track, 1=valid track). More...

bool valid () const
 Retrieve Track validity (0=non-valid track, 1=valid track). More...

const TrStatephysicsState () const
 Retrieve TrState closest to the beam-line. More...

TrStatephysicsState ()
 Retrieve TrState closest to the beam-line (non-const). More...

void setPhysicsState (const TrState &value)
 Update TrState closest to the beam-line. More...

const std::vector< TrState * > & states () const
 Retrieve container with pointers to all the states. More...

std::vector< TrState * > & states ()
 Retrieve container with pointers to all the states (non-const). More...

void setStates (const std::vector< TrState * > &value)
 Update container with pointers to all the states. More...

virtual StreamBuffer & serialize (StreamBuffer &s) const
 Serialize the object for writing. More...

virtual StreamBuffer & serialize (StreamBuffer &s)
 Serialize the object for reading. More...

virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream. More...


Static Public Methods

const CLID & classID ()

Private Types

enum  flagsBits { validBits = 0 }
enum  flagsMasks { validMask = 0x00000001 }

Private Attributes

double m_chi2PerDoF
 chi^2 per degree of freedom of the track. More...

int m_nDoF
 number of degrees of freedom of the track. More...

unsigned m_flags
 Variety of track flags. More...

std::vector< LHCbID > m_lhcbids
 container of LHCbIDs. More...

TrState m_physicsState
 TrState closest to the beam-line. More...

std::vector< TrState * > m_states
 container with pointers to all the states. More...


Detailed Description

TrTrack is the base class for offline and online tracks.

Author:
Jose Hernando, Eduardo Rodrigues created Tue Dec 7 10:29:41 2004

Definition at line 58 of file TrTrack.h.


Member Enumeration Documentation

enum TrTrack::flagsBits [private]
 

Enumeration values:
validBits 

Definition at line 227 of file TrTrack.h.

00227 {validBits = 0}; 

enum TrTrack::flagsMasks [private]
 

Enumeration values:
validMask 

Definition at line 228 of file TrTrack.h.

00228 {validMask = 0x00000001}; 

enum TrTrack::HistoryFlag
 

Enumeration values:
LongTrack 
Seeding 
TrKshort 
TrMatching 
VeloTrack 
VeloTT 
TrgForward 
TrgVelo 
TrgVeloTT 

Definition at line 64 of file TrTrack.h.

enum TrTrack::TrackType
 

Enumeration values:
Long 
Velotrack 
Backward 
Ttrack 
Upstream 
Downstream 
L1Long 
L1RZVelo 
L1SpaceVelo 
L1VeloTT 
L1MuonMatched 
L1KShort 
L1Downstream 
HLTRZVelo 
HLTSpaceVelo 
HLTVeloTT 

Definition at line 63 of file TrTrack.h.


Constructor & Destructor Documentation

TrTrack::TrTrack   [inline]
 

Default Constructor.

Definition at line 67 of file TrTrack.h.

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

Referenced by clone.

00068     : m_chi2PerDoF(0.0),
00069     m_nDoF(0),
00070     m_flags(0),
00071     m_lhcbids(),
00072     m_physicsState(),
00073     m_states() {}

virtual TrTrack::~TrTrack   [inline, virtual]
 

Destructor.

Definition at line 76 of file TrTrack.h.

00076 {}


Member Function Documentation

void TrTrack::addToLHCbIDs const LHCbID &    value [inline]
 

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

Definition at line 317 of file TrTrack.h.

References m_lhcbids.

00318 {
00319    
00320   m_lhcbids.push_back( value );
00321         
00322 }

void TrTrack::addToStates TrState   value [inline]
 

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

Definition at line 261 of file TrTrack.h.

References m_states.

00262 {
00263    
00264   m_states.push_back( value );
00265         
00266 }

int TrTrack::charge   const
 

Retrieve the charge assigned to the track.

double TrTrack::chi2   const [inline]
 

Retrieve the Chi^2 of the track.

Definition at line 277 of file TrTrack.h.

References m_chi2PerDoF, and m_nDoF.

00278 {
00279    
00280   return ( m_chi2PerDoF * double(m_nDoF) );
00281         
00282 }

double TrTrack::chi2PerDoF   const [inline]
 

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

Definition at line 333 of file TrTrack.h.

References m_chi2PerDoF.

00334 {
00335   return m_chi2PerDoF;
00336 }

const CLID & TrTrack::classID   [inline, static]
 

Definition at line 249 of file TrTrack.h.

References CLID_TrTrack.

Referenced by clID.

00250 {
00251   return CLID_TrTrack;
00252 }

const CLID & TrTrack::clID   const [inline, virtual]
 

Retrieve pointer to class definition structure.

Definition at line 244 of file TrTrack.h.

References classID.

00245 {
00246   return TrTrack::classID();
00247 }

TrTrack * TrTrack::clone   const [virtual]
 

Clone the track.

Definition at line 126 of file TrTrack.cpp.

References TrTrack.

00127 {
00128   return new TrTrack(*this);
00129 };

virtual const TrState* TrTrack::closestState HepPlane3D &    plane const [virtual]
 

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

TrState * TrTrack::closestState HepPlane3D &    plane [virtual]
 

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

Definition at line 108 of file TrTrack.cpp.

References m_states, and position.

00108                                                   {
00109   double minDist = 999999999.;
00110   double dist;
00111   TrState* best = 0;
00112   for ( std::vector<TrState*>::iterator it = m_states.begin() ;
00113         m_states.end() != it; it++ ) {
00114     dist = plane.distance( ((*it) -> position()) );
00115     if ( minDist > dist ) {
00116       minDist = dist;
00117       best    = *it;
00118     }
00119   }
00120   return best;
00121 }

virtual const TrState* TrTrack::closestState double    z const [virtual]
 

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

TrState * TrTrack::closestState double    z [virtual]
 

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

Definition at line 92 of file TrTrack.cpp.

References m_states.

00092                                          {
00093   double minDist = 999999999.;
00094   TrState* best = 0;
00095   for ( std::vector<TrState*>::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   return best;
00103 }

std::ostream & TrTrack::fillStream std::ostream &    s const [inline, virtual]
 

Fill the ASCII output stream.

Definition at line 427 of file TrTrack.h.

References m_chi2PerDoF, m_flags, m_lhcbids, m_nDoF, m_physicsState, m_states, and valid.

00428 {
00429   s << "{ "
00430     << " chi2PerDoF:\t" << (float)m_chi2PerDoF << std::endl
00431     << "   nDoF:\t" << m_nDoF << std::endl
00432     << "   flags:\t" << m_flags << std::endl
00433     << "   valid:\t" << valid() << std::endl
00434     << "   lhcbids:\t" << m_lhcbids << std::endl
00435     << "   physicsState:\t" << m_physicsState << std::endl
00436     << "   states:\t" << m_states << " } ";
00437   return s;
00438 }

bool TrTrack::flag unsigned    value const
 

Check the flag of the track.

unsigned TrTrack::flags   const [inline]
 

Retrieve Variety of track flags.

Definition at line 353 of file TrTrack.h.

References m_flags.

00354 {
00355   return m_flags;
00356 }

bool TrTrack::history unsigned    value const
 

Check the history of the track.

const std::vector< LHCbID > & TrTrack::LHCbIDs   const [inline]
 

Retrieve the LHCbIDs associated to the track.

Definition at line 303 of file TrTrack.h.

References m_lhcbids.

00304 {
00305    
00306   return m_lhcbids;
00307         
00308 }

std::vector< LHCbID > & TrTrack::LHCbIDs   [inline]
 

Retrieve the LHCbIDs associated to the track.

Definition at line 296 of file TrTrack.h.

References m_lhcbids.

00297 {
00298    
00299   return m_lhcbids;
00300         
00301 }

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

Retrieve the momentum vector (+ errors) of a track closest to the beam-line.

int TrTrack::nDoF   const [inline]
 

Retrieve number of degrees of freedom of the track.

Definition at line 343 of file TrTrack.h.

References m_nDoF.

00344 {
00345   return m_nDoF;
00346 }

unsigned int TrTrack::nStates   const [inline]
 

number of states on track.

Definition at line 254 of file TrTrack.h.

References m_states.

00255 {
00256    
00257   return m_states.size();
00258         
00259 }

double TrTrack::p   const
 

Retrieve the momentum of a track closest to the beam-line.

TrState & TrTrack::physicsState   [inline]
 

Retrieve TrState closest to the beam-line (non-const).

Definition at line 380 of file TrTrack.h.

References m_physicsState.

00381 {
00382   return m_physicsState;
00383 }

const TrState & TrTrack::physicsState   const [inline]
 

Retrieve TrState closest to the beam-line.

Definition at line 375 of file TrTrack.h.

References m_physicsState.

00376 {
00377   return m_physicsState;
00378 }

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

Retrieve the 3D-position (+ errors) of a track closest to the beam-line.

Referenced by closestState.

StatusCode TrTrack::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 TrTrack::posMomCovariance HepSymMatrix &    cov6D const
 

Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of a track closest to the beam-line.

virtual bool TrTrack::producedByAlgo const TrTrack::HistoryFlag   flag const [virtual]
 

Check whether the track was produced by a given algorithm.

double TrTrack::pt   const
 

Retrieve the transverse momentum of a track closest to the beam-line.

void TrTrack::removeFromLHCbIDs const LHCbID &    value [inline]
 

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

Definition at line 324 of file TrTrack.h.

References m_lhcbids.

00325 {
00326    
00327   std::vector<LHCbID>::iterator iter =
00328     std::remove( m_lhcbids.begin(), m_lhcbids.end(), value );
00329   m_lhcbids.erase( iter, m_lhcbids.end() );
00330         
00331 }

void TrTrack::removeFromStates const TrState   value [inline]
 

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

Definition at line 268 of file TrTrack.h.

References m_states.

00269 {
00270    
00271   std::vector<TrState*>::iterator iter =
00272     std::remove( m_states.begin(), m_states.end(), value );
00273   m_states.erase( iter, m_states.end() );
00274         
00275 }

void TrTrack::reset   [inline, virtual]
 

Clear the track before re-use.

Definition at line 284 of file TrTrack.h.

References m_chi2PerDoF, m_nDoF, m_physicsState, and m_states.

00285 {
00286    
00287   m_type         = 0;
00288   m_chi2PerDoF   = 0;
00289   m_nDoF         = 0;
00290   m_historyFlag  = 0;
00291   m_physicsState = 0;
00292   m_states.clear();
00293         
00294 }

StreamBuffer & TrTrack::serialize StreamBuffer &    s [inline, virtual]
 

Serialize the object for reading.

Definition at line 415 of file TrTrack.h.

References m_chi2PerDoF, m_flags, m_nDoF, and m_physicsState.

00416 {
00417   float l_chi2PerDoF;
00418   KeyedObject<int>::serialize(s);
00419   s >> l_chi2PerDoF
00420     >> m_nDoF
00421     >> m_flags
00422     >> m_physicsState;
00423   m_chi2PerDoF = l_chi2PerDoF;
00424   return s;
00425 }

StreamBuffer & TrTrack::serialize StreamBuffer &    s const [inline, virtual]
 

Serialize the object for writing.

Definition at line 405 of file TrTrack.h.

References m_chi2PerDoF, m_flags, m_nDoF, and m_physicsState.

00406 {
00407   KeyedObject<int>::serialize(s);
00408   s << (float)m_chi2PerDoF
00409     << m_nDoF
00410     << m_flags
00411     << m_physicsState;
00412   return s;
00413 }

void TrTrack::setChi2PerDoF double    value [inline]
 

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

Definition at line 338 of file TrTrack.h.

References m_chi2PerDoF.

00339 {
00340   m_chi2PerDoF = value; 
00341 }

void TrTrack::setFlag unsigned    value
 

Update the flag of the track.

void TrTrack::setFlags unsigned    value [inline]
 

Update Variety of track flags.

Definition at line 358 of file TrTrack.h.

References m_flags.

00359 {
00360   m_flags = value; 
00361 }

void TrTrack::setHistory unsigned    value
 

Update the history of the track.

void TrTrack::setLHCbIDs const std::vector< LHCbID > &    value [inline]
 

Update the LHCbIDs associated to the track.

Definition at line 310 of file TrTrack.h.

References m_lhcbids.

00311 {
00312    
00313   m_lhcbids = value;
00314         
00315 }

void TrTrack::setNDoF int    value [inline]
 

Update number of degrees of freedom of the track.

Definition at line 348 of file TrTrack.h.

References m_nDoF.

00349 {
00350   m_nDoF = value; 
00351 }

void TrTrack::setPhysicsState const TrState   value [inline]
 

Update TrState closest to the beam-line.

Definition at line 385 of file TrTrack.h.

References m_physicsState.

00386 {
00387   m_physicsState = value; 
00388 }

void TrTrack::setStates const std::vector< TrState * > &    value [inline]
 

Update container with pointers to all the states.

Definition at line 400 of file TrTrack.h.

References m_states.

00401 {
00402   m_states = value; 
00403 }

void TrTrack::setType unsigned    value
 

Update the type of the track.

void TrTrack::setValid bool    value [inline]
 

Update Track validity (0=non-valid track, 1=valid track).

Definition at line 363 of file TrTrack.h.

References m_flags, validBits, and validMask.

00364 {
00365   unsigned val  = (unsigned)value;
00366   m_flags &= ~validMask;
00367   m_flags |= ((((unsigned)val) << validBits) & validMask);
00368 }

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

Retrieve the slopes (dx/dz,dy/dz,1) of a track closest to the beam-line.

std::vector< TrState * > & TrTrack::states   [inline]
 

Retrieve container with pointers to all the states (non-const).

Definition at line 395 of file TrTrack.h.

References m_states.

00396 {
00397   return m_states;
00398 }

const std::vector< TrState * > & TrTrack::states   const [inline]
 

Retrieve container with pointers to all the states.

Definition at line 390 of file TrTrack.h.

References m_states.

00391 {
00392   return m_states;
00393 }

bool TrTrack::type unsigned    value const
 

Check the type of the track.

bool TrTrack::valid   const [inline]
 

Retrieve Track validity (0=non-valid track, 1=valid track).

Definition at line 370 of file TrTrack.h.

References m_flags, validBits, and validMask.

Referenced by fillStream.

00371 {
00372   return (bool)((m_flags & validMask) >> validBits);
00373 }


Member Data Documentation

double TrTrack::m_chi2PerDoF [private]
 

chi^2 per degree of freedom of the track.

Definition at line 230 of file TrTrack.h.

Referenced by chi2, chi2PerDoF, fillStream, reset, serialize, setChi2PerDoF, and TrTrack.

unsigned TrTrack::m_flags [private]
 

Variety of track flags.

Definition at line 232 of file TrTrack.h.

Referenced by fillStream, flags, serialize, setFlags, setValid, TrTrack, and valid.

std::vector<LHCbID> TrTrack::m_lhcbids [private]
 

container of LHCbIDs.

Definition at line 233 of file TrTrack.h.

Referenced by addToLHCbIDs, fillStream, LHCbIDs, removeFromLHCbIDs, setLHCbIDs, and TrTrack.

int TrTrack::m_nDoF [private]
 

number of degrees of freedom of the track.

Definition at line 231 of file TrTrack.h.

Referenced by chi2, fillStream, nDoF, reset, serialize, setNDoF, and TrTrack.

TrState TrTrack::m_physicsState [private]
 

TrState closest to the beam-line.

Definition at line 234 of file TrTrack.h.

Referenced by fillStream, physicsState, reset, serialize, setPhysicsState, and TrTrack.

std::vector<TrState*> TrTrack::m_states [private]
 

container with pointers to all the states.

Definition at line 235 of file TrTrack.h.

Referenced by addToStates, closestState, fillStream, nStates, removeFromStates, reset, setStates, states, and TrTrack.


The documentation for this class was generated from the following files:
Generated on Tue Dec 7 10:30:21 2004 for New Track Event Model by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002