LCIO
02.17
|
Implementation of the LCIO track class. More...
#include <TrackImpl.h>
Public Member Functions | |
TrackImpl () | |
Default constructor, initializes values to 0. More... | |
TrackImpl (const TrackImpl &) | |
Copy constructor - creates shallow copy, i.e. More... | |
const TrackImpl & | operator= (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::FloatVec & | getCovMatrix () 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::IntVec & | getSubdetectorHitNumbers () const |
A vector that holds the number of hits in particular subdetectors. More... | |
virtual const EVENT::TrackVec & | getTracks () 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::TrackState * | getClosestTrackState (float x, float y, float z) const |
Returns track state closest to the given point. More... | |
virtual const EVENT::TrackState * | getTrackState (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::TrackStateVec & | trackStates () |
virtual void | setRadiusOfInnermostHit (float r) |
virtual EVENT::IntVec & | subdetectorHitNumbers () |
Allows modification of the subdetectorHitNumbers, e.g. More... | |
![]() | |
virtual | ~Track () |
Destructor. More... | |
![]() | |
virtual | ~LCObject () |
Destructor. More... | |
virtual LCObject * | clone () const |
Returns an object id for internal (debugging) use in LCIO. More... | |
![]() | |
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... | |
![]() | |
AccessChecked () | |
virtual | ~AccessChecked () |
virtual int | simpleUID () const |
Protected Member Functions | |
virtual void | setType (int type) |
![]() | |
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 {} |
![]() | |
bool | _readOnly {false} |
int | _id {-1} |
Static Protected Attributes | |
static const TrackStateImpl | _dummy |
![]() | |
static std::atomic_int | _lCObjectId |
Additional Inherited Members | |
![]() | |
typedef Track | lcobject_type |
Useful typedef for template programming with LCIO. More... | |
![]() | |
typedef std::type_index | ext_index |
typedef std::shared_ptr< void > | ext_type |
typedef std::map< ext_index, ext_type > | ext_map |
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).
Definition at line 30 of file TrackImpl.h.
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.
|
virtual |
Destructor.
Definition at line 54 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
virtual |
Definition at line 341 of file TrackImpl.cc.
References _hits, and std::vector< T >::push_back().
|
virtual |
Definition at line 345 of file TrackImpl.cc.
References _tracks, IMPL::AccessChecked::checkAccess(), and std::vector< T >::push_back().
|
virtual |
Definition at line 350 of file TrackImpl.cc.
References _trackStates, IMPL::AccessChecked::checkAccess(), EVENT::TrackState::getLocation(), getTrackState(), std::vector< T >::push_back(), and std::stringstream::str().
|
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.
|
virtual |
Returns track state closest to the given point.
Implements EVENT::Track.
Definition at line 134 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
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,
Implements EVENT::Track.
Definition at line 94 of file TrackImpl.cc.
References _dummy, _trackStates, IMPL::TrackStateImpl::getCovMatrix(), and std::vector< T >::size().
|
virtual |
Impact paramter of the track in (r-phi).
Information is stored in the first TrackState of this Track,
Implements EVENT::Track.
Definition at line 89 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
virtual |
dEdx of the track.
Implements EVENT::Track.
Definition at line 111 of file TrackImpl.cc.
References _dEdx.
|
virtual |
Error of dEdx.
Implements EVENT::Track.
Definition at line 112 of file TrackImpl.cc.
References _dEdxError.
|
virtual |
Number of degrees of freedom of the track fit.
Implements EVENT::Track.
Definition at line 110 of file TrackImpl.cc.
References _ndf.
|
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,
Implements EVENT::Track.
Definition at line 91 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
virtual |
Phi of the track at reference point.
Information is stored in the first TrackState of this Track,
Implements EVENT::Track.
Definition at line 90 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
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.
|
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,
Implements EVENT::Track.
Definition at line 98 of file TrackImpl.cc.
References _dummy, _trackStates, IMPL::TrackStateImpl::getReferencePoint(), and std::vector< T >::size().
|
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.
|
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,
Implements EVENT::Track.
Definition at line 93 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
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.
|
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.
|
virtual |
Returns track state for the given location - or NULL if not found.
Implements EVENT::Track.
Definition at line 151 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
Referenced by addTrackState().
|
virtual |
Returns track states associtated with this track.
Implements EVENT::Track.
Definition at line 130 of file TrackImpl.cc.
References _trackStates.
|
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().
|
virtual |
Impact paramter of the track in (r-z).
Information is stored in the first TrackState of this Track,
Implements EVENT::Track.
Definition at line 92 of file TrackImpl.cc.
References _trackStates, and std::vector< T >::size().
|
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().
Definition at line 30 of file TrackImpl.cc.
References _chi2, _dEdx, _dEdxError, _hits, _ndf, _radiusOfInnermostHit, _subdetectorHitNumbers, _tracks, _trackStates, _type, std::back_inserter(), std::vector< T >::begin(), std::copy(), std::vector< T >::end(), std::vector< T >::push_back(), std::vector< T >::reserve(), and std::vector< T >::size().
|
virtual |
Definition at line 324 of file TrackImpl.cc.
References _chi2, and IMPL::AccessChecked::checkAccess().
|
virtual |
Definition at line 262 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
virtual |
Definition at line 280 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
virtual |
Definition at line 181 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
virtual |
Definition at line 332 of file TrackImpl.cc.
References _dEdx, and IMPL::AccessChecked::checkAccess().
|
virtual |
Definition at line 336 of file TrackImpl.cc.
References _dEdxError, and IMPL::AccessChecked::checkAccess().
|
virtual |
Definition at line 328 of file TrackImpl.cc.
References _ndf, and IMPL::AccessChecked::checkAccess().
|
virtual |
Definition at line 213 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
virtual |
Definition at line 197 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
virtual |
Definition at line 372 of file TrackImpl.cc.
References _radiusOfInnermostHit, and IMPL::AccessChecked::checkAccess().
|
virtual |
Definition at line 299 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
virtual |
Definition at line 245 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
protectedvirtual |
Definition at line 171 of file TrackImpl.cc.
References _type, and IMPL::AccessChecked::checkAccess().
|
virtual |
Definition at line 165 of file TrackImpl.cc.
References _type, IMPL::AccessChecked::checkAccess(), and std::bitset< Bits >::set().
|
virtual |
Definition at line 229 of file TrackImpl.cc.
References _trackStates, std::vector< T >::push_back(), and std::vector< T >::size().
|
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().
|
virtual |
Definition at line 362 of file TrackImpl.cc.
References _trackStates, and IMPL::AccessChecked::checkAccess().
|
protected |
Definition at line 201 of file TrackImpl.h.
Referenced by getChi2(), operator=(), and setChi2().
|
protected |
Definition at line 203 of file TrackImpl.h.
Referenced by getdEdx(), operator=(), and setdEdx().
|
protected |
Definition at line 204 of file TrackImpl.h.
Referenced by getdEdxError(), operator=(), and setdEdxError().
|
staticprotected |
Definition at line 213 of file TrackImpl.h.
Referenced by getCovMatrix(), and getReferencePoint().
|
protected |
Definition at line 209 of file TrackImpl.h.
Referenced by addHit(), getTrackerHits(), and operator=().
|
protected |
Definition at line 202 of file TrackImpl.h.
Referenced by getNdf(), operator=(), and setNdf().
|
protected |
Definition at line 205 of file TrackImpl.h.
Referenced by getRadiusOfInnermostHit(), operator=(), and setRadiusOfInnermostHit().
|
protected |
Definition at line 206 of file TrackImpl.h.
Referenced by getSubdetectorHitNumbers(), operator=(), and subdetectorHitNumbers().
|
protected |
Definition at line 208 of file TrackImpl.h.
Referenced by addTrack(), getTracks(), and operator=().
|
protected |
Definition at line 211 of file TrackImpl.h.
Referenced by addTrackState(), getClosestTrackState(), getCovMatrix(), getD0(), getOmega(), getPhi(), getReferencePoint(), getTanLambda(), getTrackState(), getTrackStates(), getZ0(), operator=(), setCovMatrix(), setD0(), setOmega(), setPhi(), setReferencePoint(), setTanLambda(), setZ0(), trackStates(), and ~TrackImpl().
|
protected |
Definition at line 198 of file TrackImpl.h.
Referenced by getType(), operator=(), setType(), and setTypeBit().