00001 #ifndef IMPL_TRACKIMPL_H
00002 #define IMPL_TRACKIMPL_H 1
00003
00004
00005 #include "EVENT/Track.h"
00006 #include "EVENT/TrackState.h"
00007 #include "AccessChecked.h"
00008 #include <map>
00009 #include <bitset>
00010
00011
00012 #define BIT_ISREFERENCEPOINTDCA 31
00013
00014 typedef std::map< std::string , EVENT::IntVec* > IndexMap ;
00015
00016
00017 namespace IMPL {
00018
00028 class TrackImpl : public EVENT::Track, public AccessChecked {
00029
00030 public:
00031
00034 TrackImpl() ;
00035
00039 TrackImpl( const TrackImpl& ) ;
00040 const TrackImpl& operator = ( const TrackImpl& o ) ;
00041
00042
00044 virtual ~TrackImpl() ;
00045
00046 virtual int id() const { return simpleUID() ; }
00047
00052 virtual int getType() const ;
00053
00054
00058 virtual float getD0() const ;
00059
00063 virtual float getPhi() const ;
00064
00069 virtual float getOmega() const ;
00070
00074 virtual float getZ0() const ;
00075
00079 virtual float getTanLambda() const ;
00080
00086 virtual const EVENT::FloatVec & getCovMatrix() const ;
00087
00092 virtual const float* getReferencePoint() const ;
00093
00095
00096
00097
00100 virtual float getChi2() const ;
00101
00104 virtual int getNdf() const ;
00105
00108 virtual float getdEdx() const;
00109
00112 virtual float getdEdxError() const;
00113
00119 virtual float getRadiusOfInnermostHit() const ;
00120
00127 virtual const EVENT::IntVec & getSubdetectorHitNumbers() const ;
00128
00129
00132 virtual const EVENT::TrackVec & getTracks() const ;
00133
00134
00137 virtual const EVENT::TrackStateVec & getTrackStates() const ;
00138
00139
00142 virtual const EVENT::TrackState* getClosestTrackState( float x, float y, float z ) const ;
00143
00144
00148 virtual const EVENT::TrackState* getTrackState( int location ) const ;
00149
00150
00154 virtual const EVENT::TrackerHitVec & getTrackerHits() const ;
00155
00156
00157
00158 virtual void setTypeBit( int index , bool val=true) ;
00159
00160 virtual void setD0( float d0 ) ;
00161 virtual void setPhi( float phi ) ;
00162 virtual void setOmega( float omega ) ;
00163 virtual void setZ0( float z0 ) ;
00164 virtual void setTanLambda( float tanLambda ) ;
00165 virtual void setCovMatrix( const float* cov ) ;
00166 virtual void setCovMatrix( const EVENT::FloatVec& cov ) ;
00167 virtual void setReferencePoint( const float* rPnt) ;
00168
00169
00170
00171 virtual void setChi2( float chi2 ) ;
00172 virtual void setNdf( int ndf ) ;
00173 virtual void setdEdx( float dEdx ) ;
00174 virtual void setdEdxError( float dEdxError ) ;
00175
00176 virtual void addTrack( EVENT::Track* trk ) ;
00177 virtual void addTrackState( EVENT::TrackState* trkstate ) ;
00178 virtual void addHit( EVENT::TrackerHit* hit) ;
00179
00180
00181 virtual EVENT::TrackStateVec & trackStates() ;
00182
00183
00184 virtual void setRadiusOfInnermostHit( float r ) ;
00185
00190 virtual EVENT::IntVec & subdetectorHitNumbers() ;
00191
00192 protected:
00193
00194 virtual void setType( int type ) ;
00195
00196 std::bitset<32> _type{0} ;
00197
00198
00199 float _chi2{0} ;
00200 int _ndf{0} ;
00201 float _dEdx{0} ;
00202 float _dEdxError{0} ;
00203 float _radiusOfInnermostHit{0} ;
00204 EVENT::IntVec _subdetectorHitNumbers{} ;
00205
00206 EVENT::TrackVec _tracks{} ;
00207 EVENT::TrackerHitVec _hits{} ;
00208
00209 EVENT::TrackStateVec _trackStates{} ;
00210
00211
00212
00213 };
00214
00215
00216
00217 }
00218 #endif