Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

TrTrack Class Reference

#include <TrTrack.h>

List of all members.

Public Types

enum  TrackType {
  Velotrack, Backward, Long, Upstream,
  Downstream, Ttrack
}
enum  HistoryFlag {
  LongTrack, Seeding, TrKshort, TrMatching,
  VeloTrack, VeloTT
}

Public Methods

 TrTrack (const TrTrack &track)
 TrTrack copy constructor. More...

 TrTrack ()
 Default Constructor. More...

virtual ~TrTrack ()
 Destructor. More...

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

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

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

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

virtual unsigned int nNodes () const
 number of track nodes. More...

virtual const std::vector<
TrMeasurement * > 
measurements () const
 Retrieve container with pointers to the track measurements. More...

virtual void setMeasurements (const const &std::vector< TrState * >)
 Update the container with the pointers to the measurements. More...

virtual double chi2PerDoF () const
 Retrieve the Chi^2/nDoF of the track. More...

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

virtual void setChi2 (double value)
 Update the Chi^2 of the track. More...

virtual unsigned int nDoF () const
 number of degrees of freedom. More...

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

virtual int errorFlag () const
 Retrieve the error flag of the track. More...

virtual void setErrorFlag (int value)
 Update the error flag of the track. More...

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

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

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

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

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

const std::vector< TrNode * > & nodes () const
 Retrieve container with pointers to the nodes. More...

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

void setNodes (const std::vector< TrNode * > &value)
 Update container with pointers to the nodes. More...

double charge () const
 Retrieve the track's charge. More...

void setCharge (double value)
 Update the track's charge. More...

int type () const
 Retrieve the type of the track. More...

void setType (int value)
 Update the type of the track. 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 Attributes

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

std::vector< TrNode * > m_nodes
 container with pointers to the nodes. More...

double m_chi2
 chi^2 of the track. More...

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

double m_charge
 the track's charge. More...

int m_errorFlag
 error flag. More...

int m_type
 the type of the track. More...


Detailed Description

TrTrack is the base class for offline and online tracks.

Author:
Jose Hernando, Eduardo Rodrigues created Tue Sep 28 17:55:56 2004


Member Enumeration Documentation

enum TrTrack::HistoryFlag
 

Enumeration values:
LongTrack 
Seeding 
TrKshort 
TrMatching 
VeloTrack 
VeloTT 

enum TrTrack::TrackType
 

Enumeration values:
Velotrack 
Backward 
Long 
Upstream 
Downstream 
Ttrack 


Constructor & Destructor Documentation

TrTrack::TrTrack const TrTrack &    track
 

TrTrack copy constructor.

TrTrack::TrTrack   [inline]
 

Default Constructor.

00057     : m_states(),
00058     m_nodes(),
00059     m_chi2(0.0),
00060     m_ndof(0),
00061     m_charge(0.0),
00062     m_errorFlag(0),
00063     m_type(0) {}

virtual TrTrack::~TrTrack   [inline, virtual]
 

Destructor.

00066 {}


Member Function Documentation

double TrTrack::charge   const [inline]
 

Retrieve the track's charge.

00237 {
00238   return m_charge;
00239 }

virtual double TrTrack::chi2   const [virtual]
 

Retrieve the Chi^2 of the track.

double TrTrack::chi2PerDoF   const [inline, virtual]
 

Retrieve the Chi^2/nDoF of the track.

00186 {
00187    
00188    return ( ( m_ndof > 0 ) ? m_chi2/double(m_ndof) : 0. );
00189         
00190 }

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

00181 {
00182   return CLID_TrTrack;
00183 }

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

Retrieve pointer to class definition structure.

00176 {
00177   return TrTrack::classID();
00178 }

virtual void TrTrack::clone TrTrack *    track [virtual]
 

Clone the track.

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

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

virtual int TrTrack::errorFlag   const [virtual]
 

Retrieve the error flag of the track.

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

Fill the ASCII output stream.

00286 {
00287   s << "{ "
00288     << " states:\t" << m_states << std::endl
00289     << "   nodes:\t" << m_nodes << std::endl
00290     << "   chi2:\t" << (float)m_chi2 << std::endl
00291     << "   ndof:\t" << m_ndof << std::endl
00292     << "   charge:\t" << (float)m_charge << std::endl
00293     << "   errorFlag:\t" << m_errorFlag << std::endl
00294     << "   type:\t" << m_type << " } ";
00295   return s;
00296 }

virtual const std::vector<TrMeasurement*> TrTrack::measurements   const [virtual]
 

Retrieve container with pointers to the track measurements.

virtual unsigned int TrTrack::nDoF   const [virtual]
 

number of degrees of freedom.

virtual unsigned int TrTrack::nNodes   const [virtual]
 

number of track nodes.

std::vector< TrNode * > & TrTrack::nodes   [inline]
 

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

00227 {
00228   return m_nodes;
00229 }

const std::vector< TrNode * > & TrTrack::nodes   const [inline]
 

Retrieve container with pointers to the nodes.

00222 {
00223   return m_nodes;
00224 }

virtual unsigned int TrTrack::nStates   const [virtual]
 

number of states on track.

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

Check wether the track was produced by a given algorithm.

void TrTrack::reset   [inline, virtual]
 

Clear the track before re-use.

00193 {
00194    
00195    m_closestState.reset();
00196    m_states.clear();
00197    m_nodes.clear();
00198    m_chi2      = 0;
00199    m_ndof      = 0;
00200    m_charge    = 0;
00201    m_errorFlag = 0;
00202    m_type      = 0;
00203         
00204 }

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

Serialize the object for reading.

00270 {
00271   float l_chi2, l_charge;
00272   KeyedObject<int>::serialize(s);
00273   s >> m_states
00274     >> m_nodes
00275     >> l_chi2
00276     >> m_ndof
00277     >> l_charge
00278     >> m_errorFlag
00279     >> m_type;
00280   m_chi2 = l_chi2;
00281   m_charge = l_charge;
00282   return s;
00283 }

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

Serialize the object for writing.

00257 {
00258   KeyedObject<int>::serialize(s);
00259   s << m_states
00260     << m_nodes
00261     << (float)m_chi2
00262     << m_ndof
00263     << (float)m_charge
00264     << m_errorFlag
00265     << m_type;
00266   return s;
00267 }

void TrTrack::setCharge double    value [inline]
 

Update the track's charge.

00242 {
00243   m_charge = value; 
00244 }

virtual void TrTrack::setChi2 double    value [virtual]
 

Update the Chi^2 of the track.

virtual void TrTrack::setErrorFlag int    value [virtual]
 

Update the error flag of the track.

virtual void TrTrack::setMeasurements const const &std::vector< TrState * >    [virtual]
 

Update the container with the pointers to the measurements.

virtual void TrTrack::setNDoF unsigned int    value [virtual]
 

Update the number of degrees of freedom of the track.

void TrTrack::setNodes const std::vector< TrNode * > &    value [inline]
 

Update container with pointers to the nodes.

00232 {
00233   m_nodes = value; 
00234 }

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

Update container with pointers to the states.

00217 {
00218   m_states = value; 
00219 }

void TrTrack::setType int    value [inline]
 

Update the type of the track.

00252 {
00253   m_type = value; 
00254 }

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

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

00212 {
00213   return m_states;
00214 }

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

Retrieve container with pointers to the states.

00207 {
00208   return m_states;
00209 }

int TrTrack::type   const [inline]
 

Retrieve the type of the track.

00247 {
00248   return m_type;
00249 }


Member Data Documentation

double TrTrack::m_charge [private]
 

the track's charge.

double TrTrack::m_chi2 [private]
 

chi^2 of the track.

int TrTrack::m_errorFlag [private]
 

error flag.

int TrTrack::m_ndof [private]
 

number of degrees of freedom of the track.

std::vector<TrNode*> TrTrack::m_nodes [private]
 

container with pointers to the nodes.

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

container with pointers to the states.

int TrTrack::m_type [private]
 

the type of the track.


The documentation for this class was generated from the following file:
Generated on Tue Sep 28 18:11:18 2004 for New Track Event Model by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002