LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
IMPL::TrackImpl Class Reference

Implementation of the LCIO track class. More...

#include <TrackImpl.h>

+ Inheritance diagram for IMPL::TrackImpl:

Public Member Functions

 TrackImpl ()
 Default constructor, initializes values to 0. More...
 
 TrackImpl (const TrackImpl &)
 Copy constructor - creates shallow copy, i.e. More...
 
const TrackImploperator= (const TrackImpl &o)
 
virtual ~TrackImpl ()
 Destructor. More...
 
virtual int id () const
 Returns an object id for internal (debugging) use in LCIO. More...
 
virtual int getType () const
 Flagword that defines the type of track. More...
 
virtual float getD0 () const
 Impact paramter of the track in (r-phi). More...
 
virtual float getPhi () const
 Phi of the track at reference point. More...
 
virtual float getOmega () const
 Omega is the signed curvature of the track in [1/mm]. More...
 
virtual float getZ0 () const
 Impact paramter of the track in (r-z). More...
 
virtual float getTanLambda () const
 Lambda is the dip angle of the track in r-z at the reference point. More...
 
virtual const EVENT::FloatVecgetCovMatrix () const
 Covariance matrix of the track parameters. More...
 
virtual const float * getReferencePoint () const
 Reference point of the track parameters. More...
 
virtual float getChi2 () const
 True if the reference point is the point of closest approach. More...
 
virtual int getNdf () const
 Number of degrees of freedom of the track fit. More...
 
virtual float getdEdx () const
 dEdx of the track. More...
 
virtual float getdEdxError () const
 Error of dEdx. More...
 
virtual float getRadiusOfInnermostHit () const
 The radius of the innermost hit that has been used in the track fit. More...
 
virtual const EVENT::IntVecgetSubdetectorHitNumbers () const
 A vector that holds the number of hits in particular subdetectors. More...
 
virtual const EVENT::TrackVecgetTracks () const
 The tracks (as Track objects) that have been combined to this track. More...
 
virtual const
EVENT::TrackStateVec
getTrackStates () const
 Returns track states associtated with this track. More...
 
virtual const EVENT::TrackStategetClosestTrackState (float x, float y, float z) const
 Returns track state closest to the given point. More...
 
virtual const EVENT::TrackStategetTrackState (int location) const
 Returns track state for the given location - or NULL if not found. More...
 
virtual const
EVENT::TrackerHitVec
getTrackerHits () const
 Optionaly ( check/set flag(LCIO::TRBIT_HITS)==1) return the hits that have been used to create this track. More...
 
virtual void setTypeBit (int index, bool val=true)
 
virtual void setD0 (float d0)
 
virtual void setPhi (float phi)
 
virtual void setOmega (float omega)
 
virtual void setZ0 (float z0)
 
virtual void setTanLambda (float tanLambda)
 
virtual void setCovMatrix (const float *cov)
 
virtual void setCovMatrix (const EVENT::FloatVec &cov)
 
virtual void setReferencePoint (const float *rPnt)
 
virtual void setChi2 (float chi2)
 
virtual void setNdf (int ndf)
 
virtual void setdEdx (float dEdx)
 
virtual void setdEdxError (float dEdxError)
 
virtual void addTrack (EVENT::Track *trk)
 
virtual void addTrackState (EVENT::TrackState *trkstate)
 
virtual void addHit (EVENT::TrackerHit *hit)
 
virtual EVENT::TrackStateVectrackStates ()
 
virtual void setRadiusOfInnermostHit (float r)
 
virtual EVENT::IntVecsubdetectorHitNumbers ()
 Allows modification of the subdetectorHitNumbers, e.g. More...
 
- Public Member Functions inherited from EVENT::Track
virtual ~Track ()
 Destructor. More...
 
- Public Member Functions inherited from EVENT::LCObject
virtual ~LCObject ()
 Destructor. More...
 
virtual LCObjectclone () const
 Returns an object id for internal (debugging) use in LCIO. More...
 
- Public Member Functions inherited from lcrtrel::LCRTRelations
template<class V >
V::ext_type ext ()
 Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... More...
 
template<class V >
const V::ext_type ext () const
 Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... More...
 
template<class V >
V::rel_type rel ()
 Provides read access to relations - the object types and their connectivity are defined by the class V which has to be a subtype of either LC1To1Relation, LC1ToNRelation or LCNToNRelation. More...
 
- Public Member Functions inherited from IMPL::AccessChecked
 AccessChecked ()
 
virtual ~AccessChecked ()
 
virtual int simpleUID () const
 

Protected Member Functions

virtual void setType (int type)
 
- Protected Member Functions inherited from IMPL::AccessChecked
virtual void setReadOnly (bool readOnly)
 
void checkAccess ()
 
void checkAccess (const char *what)
 

Protected Attributes

std::bitset< 32 > _type {0}
 
float _chi2 {0}
 
int _ndf {0}
 
float _dEdx {0}
 
float _dEdxError {0}
 
float _radiusOfInnermostHit {0}
 
EVENT::IntVec _subdetectorHitNumbers {}
 
EVENT::TrackVec _tracks {}
 
EVENT::TrackerHitVec _hits {}
 
EVENT::TrackStateVec _trackStates {}
 
- Protected Attributes inherited from IMPL::AccessChecked
bool _readOnly {false}
 
int _id {-1}
 

Static Protected Attributes

static const TrackStateImpl _dummy
 
- Static Protected Attributes inherited from IMPL::AccessChecked
static std::atomic_int _lCObjectId
 

Additional Inherited Members

- Public Types inherited from EVENT::Track
typedef Track lcobject_type
 Useful typedef for template programming with LCIO. More...
 
- Public Types inherited from lcrtrel::LCRTRelations
typedef std::type_index ext_index
 
typedef std::shared_ptr< void > ext_type
 
typedef std::map< ext_index,
ext_type
ext_map
 

Detailed Description

Implementation of the LCIO track class.

The helix parameterization follows that of the L3 experiment at LEP. A detailed description of the track parameters is given in the LC-Note LC-DET-2006-004 "Track Parameters in LCIO" (pdf).

See Also
Track
Author
gaede
Version
Id:
TrackImpl.h,v 1.15 2007-09-18 09:47:10 gaede Exp

Definition at line 30 of file TrackImpl.h.

Constructor & Destructor Documentation

IMPL::TrackImpl::TrackImpl ( )

Default constructor, initializes values to 0.

Definition at line 13 of file TrackImpl.cc.

IMPL::TrackImpl::TrackImpl ( const TrackImpl o)

Copy constructor - creates shallow copy, i.e.

all data members are copied but pointers to other LCObjects i.e. TrackerHits and Tracks are preserved.

Definition at line 23 of file TrackImpl.cc.

IMPL::TrackImpl::~TrackImpl ( )
virtual

Destructor.

Definition at line 54 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

Member Function Documentation

void IMPL::TrackImpl::addHit ( EVENT::TrackerHit hit)
virtual

Definition at line 341 of file TrackImpl.cc.

References _hits, and std::vector< T >::push_back().

void IMPL::TrackImpl::addTrack ( EVENT::Track trk)
virtual
void IMPL::TrackImpl::addTrackState ( EVENT::TrackState trkstate)
virtual
float IMPL::TrackImpl::getChi2 ( ) const
virtual

True if the reference point is the point of closest approach.

Chi^2 of the track fit.

Implements EVENT::Track.

Definition at line 109 of file TrackImpl.cc.

References _chi2.

const TrackState * IMPL::TrackImpl::getClosestTrackState ( float  x,
float  y,
float  z 
) const
virtual

Returns track state closest to the given point.

See Also
TrackState.

Implements EVENT::Track.

Definition at line 134 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

const FloatVec & IMPL::TrackImpl::getCovMatrix ( ) const
virtual

Covariance matrix of the track parameters.

Stored as lower triangle matrix where the order of parameters is: d0, phi, omega, z0, tan(lambda). So we have cov(d0,d0), cov( phi, d0 ), cov( phi, phi), ... Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 94 of file TrackImpl.cc.

References _dummy, _trackStates, IMPL::TrackStateImpl::getCovMatrix(), and std::vector< T >::size().

float IMPL::TrackImpl::getD0 ( ) const
virtual

Impact paramter of the track in (r-phi).

Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 89 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

float IMPL::TrackImpl::getdEdx ( ) const
virtual

dEdx of the track.

Implements EVENT::Track.

Definition at line 111 of file TrackImpl.cc.

References _dEdx.

float IMPL::TrackImpl::getdEdxError ( ) const
virtual

Error of dEdx.

Implements EVENT::Track.

Definition at line 112 of file TrackImpl.cc.

References _dEdxError.

int IMPL::TrackImpl::getNdf ( ) const
virtual

Number of degrees of freedom of the track fit.

Implements EVENT::Track.

Definition at line 110 of file TrackImpl.cc.

References _ndf.

float IMPL::TrackImpl::getOmega ( ) const
virtual

Omega is the signed curvature of the track in [1/mm].

The sign is that of the particle's charge. Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 91 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

float IMPL::TrackImpl::getPhi ( ) const
virtual

Phi of the track at reference point.

Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 90 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

float IMPL::TrackImpl::getRadiusOfInnermostHit ( ) const
virtual

The radius of the innermost hit that has been used in the track fit.

Helps to detect V0 tracks with small impact paramters or haevy mesons. To be used as convenient information or if hits are not stored in the data set, e.g. DST or FastMC.

Implements EVENT::Track.

Definition at line 115 of file TrackImpl.cc.

References _radiusOfInnermostHit.

const float * IMPL::TrackImpl::getReferencePoint ( ) const
virtual

Reference point of the track parameters.

The default for the reference point is the point of closest approach. Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 98 of file TrackImpl.cc.

References _dummy, _trackStates, IMPL::TrackStateImpl::getReferencePoint(), and std::vector< T >::size().

const IntVec & IMPL::TrackImpl::getSubdetectorHitNumbers ( ) const
virtual

A vector that holds the number of hits in particular subdetectors.

The mapping of indices to subdetectors is implementation dependent. To be used as convenient information or if hits are not stored in the data set, e.g. DST or FastMC. TODO: Provide way to store mapping in event/run header.

Implements EVENT::Track.

Definition at line 119 of file TrackImpl.cc.

References _subdetectorHitNumbers.

float IMPL::TrackImpl::getTanLambda ( ) const
virtual

Lambda is the dip angle of the track in r-z at the reference point.

Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 93 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

const TrackerHitVec & IMPL::TrackImpl::getTrackerHits ( ) const
virtual

Optionaly ( check/set flag(LCIO::TRBIT_HITS)==1) return the hits that have been used to create this track.

Implements EVENT::Track.

Definition at line 122 of file TrackImpl.cc.

References _hits.

const TrackVec & IMPL::TrackImpl::getTracks ( ) const
virtual

The tracks (as Track objects) that have been combined to this track.

Implements EVENT::Track.

Definition at line 126 of file TrackImpl.cc.

References _tracks.

const TrackState * IMPL::TrackImpl::getTrackState ( int  location) const
virtual

Returns track state for the given location - or NULL if not found.

See Also
TrackState. location can be set to: AtIP, AtFirstHit, AtLastHit, AtCalorimeter, AtVertex, AtOther

Implements EVENT::Track.

Definition at line 151 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

Referenced by addTrackState().

const TrackStateVec & IMPL::TrackImpl::getTrackStates ( ) const
virtual

Returns track states associtated with this track.

See Also
TrackState.

Implements EVENT::Track.

Definition at line 130 of file TrackImpl.cc.

References _trackStates.

int IMPL::TrackImpl::getType ( ) const
virtual

Flagword that defines the type of track.

Bits 0-15 can be used to denote the subdetectors that have contributed hits used in the track fit. The definition of the hits has to be done elsewhere, e.g. in the run header. Before LCIO 2.0 bit 31 was used to encode isReferencePointPCA (now deprecated).

Implements EVENT::Track.

Definition at line 75 of file TrackImpl.cc.

References _type, and std::bitset< Bits >::to_ulong().

float IMPL::TrackImpl::getZ0 ( ) const
virtual

Impact paramter of the track in (r-z).

Information is stored in the first TrackState of this Track,

See Also
TrackState.

Implements EVENT::Track.

Definition at line 92 of file TrackImpl.cc.

References _trackStates, and std::vector< T >::size().

virtual int IMPL::TrackImpl::id ( ) const
inlinevirtual

Returns an object id for internal (debugging) use in LCIO.

Implements EVENT::LCObject.

Definition at line 48 of file TrackImpl.h.

References IMPL::AccessChecked::simpleUID().

const TrackImpl & IMPL::TrackImpl::operator= ( const TrackImpl o)
void IMPL::TrackImpl::setChi2 ( float  chi2)
virtual

Definition at line 324 of file TrackImpl.cc.

References _chi2, and IMPL::AccessChecked::checkAccess().

void IMPL::TrackImpl::setCovMatrix ( const float *  cov)
virtual
void IMPL::TrackImpl::setCovMatrix ( const EVENT::FloatVec cov)
virtual
void IMPL::TrackImpl::setD0 ( float  d0)
virtual
void IMPL::TrackImpl::setdEdx ( float  dEdx)
virtual

Definition at line 332 of file TrackImpl.cc.

References _dEdx, and IMPL::AccessChecked::checkAccess().

void IMPL::TrackImpl::setdEdxError ( float  dEdxError)
virtual

Definition at line 336 of file TrackImpl.cc.

References _dEdxError, and IMPL::AccessChecked::checkAccess().

void IMPL::TrackImpl::setNdf ( int  ndf)
virtual

Definition at line 328 of file TrackImpl.cc.

References _ndf, and IMPL::AccessChecked::checkAccess().

void IMPL::TrackImpl::setOmega ( float  omega)
virtual
void IMPL::TrackImpl::setPhi ( float  phi)
virtual
void IMPL::TrackImpl::setRadiusOfInnermostHit ( float  r)
virtual

Definition at line 372 of file TrackImpl.cc.

References _radiusOfInnermostHit, and IMPL::AccessChecked::checkAccess().

void IMPL::TrackImpl::setReferencePoint ( const float *  rPnt)
virtual
void IMPL::TrackImpl::setTanLambda ( float  tanLambda)
virtual
void IMPL::TrackImpl::setType ( int  type)
protectedvirtual

Definition at line 171 of file TrackImpl.cc.

References _type, and IMPL::AccessChecked::checkAccess().

void IMPL::TrackImpl::setTypeBit ( int  index,
bool  val = true 
)
virtual
void IMPL::TrackImpl::setZ0 ( float  z0)
virtual
IntVec & IMPL::TrackImpl::subdetectorHitNumbers ( )
virtual

Allows modification of the subdetectorHitNumbers, e.g.


track->subdetectorHitNumbers().resize(5) ;
track->subdetectorHitNumbers()[4] = 42 ;

Definition at line 367 of file TrackImpl.cc.

References _subdetectorHitNumbers, and IMPL::AccessChecked::checkAccess().

TrackStateVec & IMPL::TrackImpl::trackStates ( )
virtual

Definition at line 362 of file TrackImpl.cc.

References _trackStates, and IMPL::AccessChecked::checkAccess().

Member Data Documentation

float IMPL::TrackImpl::_chi2 {0}
protected

Definition at line 201 of file TrackImpl.h.

Referenced by getChi2(), operator=(), and setChi2().

float IMPL::TrackImpl::_dEdx {0}
protected

Definition at line 203 of file TrackImpl.h.

Referenced by getdEdx(), operator=(), and setdEdx().

float IMPL::TrackImpl::_dEdxError {0}
protected

Definition at line 204 of file TrackImpl.h.

Referenced by getdEdxError(), operator=(), and setdEdxError().

const TrackStateImpl IMPL::TrackImpl::_dummy
staticprotected

Definition at line 213 of file TrackImpl.h.

Referenced by getCovMatrix(), and getReferencePoint().

EVENT::TrackerHitVec IMPL::TrackImpl::_hits {}
protected

Definition at line 209 of file TrackImpl.h.

Referenced by addHit(), getTrackerHits(), and operator=().

int IMPL::TrackImpl::_ndf {0}
protected

Definition at line 202 of file TrackImpl.h.

Referenced by getNdf(), operator=(), and setNdf().

float IMPL::TrackImpl::_radiusOfInnermostHit {0}
protected

Definition at line 205 of file TrackImpl.h.

Referenced by getRadiusOfInnermostHit(), operator=(), and setRadiusOfInnermostHit().

EVENT::IntVec IMPL::TrackImpl::_subdetectorHitNumbers {}
protected

Definition at line 206 of file TrackImpl.h.

Referenced by getSubdetectorHitNumbers(), operator=(), and subdetectorHitNumbers().

EVENT::TrackVec IMPL::TrackImpl::_tracks {}
protected

Definition at line 208 of file TrackImpl.h.

Referenced by addTrack(), getTracks(), and operator=().

EVENT::TrackStateVec IMPL::TrackImpl::_trackStates {}
protected
std::bitset<32> IMPL::TrackImpl::_type {0}
protected

Definition at line 198 of file TrackImpl.h.

Referenced by getType(), operator=(), setType(), and setTypeBit().


The documentation for this class was generated from the following files: