LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TrackImpl.h
Go to the documentation of this file.
1 #ifndef IMPL_TRACKIMPL_H
2 #define IMPL_TRACKIMPL_H 1
3 
4 
5 #include "EVENT/Track.h"
6 #include "EVENT/TrackState.h"
7 #include "AccessChecked.h"
8 #include <map>
9 #include <bitset>
10 
11 
12 #define BIT_ISREFERENCEPOINTDCA 31
13 
15 
16 
17 namespace IMPL {
18 
19  class TrackStateImpl ;
20 
30  class TrackImpl : public EVENT::Track, public AccessChecked {
31 
32  public:
33 
36  TrackImpl() ;
37 
41  TrackImpl( const TrackImpl& ) ;
42  const TrackImpl& operator = ( const TrackImpl& o ) ; // operator =
43 
44 
46  virtual ~TrackImpl() ;
47 
48  virtual int id() const { return simpleUID() ; }
49 
54  virtual int getType() const ;
55 
56 
60  virtual float getD0() const ;
61 
65  virtual float getPhi() const ;
66 
71  virtual float getOmega() const ;
72 
76  virtual float getZ0() const ;
77 
81  virtual float getTanLambda() const ;
82 
88  virtual const EVENT::FloatVec & getCovMatrix() const ;
89 
94  virtual const float* getReferencePoint() const ;
95 
97  // */
98  //virtual bool isReferencePointPCA() const ;
99 
102  virtual float getChi2() const ;
103 
106  virtual int getNdf() const ;
107 
110  virtual float getdEdx() const;
111 
114  virtual float getdEdxError() const;
115 
121  virtual float getRadiusOfInnermostHit() const ;
122 
129  virtual const EVENT::IntVec & getSubdetectorHitNumbers() const ;
130 
131 
134  virtual const EVENT::TrackVec & getTracks() const ;
135 
136 
139  virtual const EVENT::TrackStateVec & getTrackStates() const ;
140 
141 
144  virtual const EVENT::TrackState* getClosestTrackState( float x, float y, float z ) const ;
145 
146 
150  virtual const EVENT::TrackState* getTrackState( int location ) const ;
151 
152 
156  virtual const EVENT::TrackerHitVec & getTrackerHits() const ;
157 
158 
159  // setters
160  virtual void setTypeBit( int index , bool val=true) ;
161 
162  virtual void setD0( float d0 ) ; // stored in TrackState
163  virtual void setPhi( float phi ) ; // stored in TrackState
164  virtual void setOmega( float omega ) ; // stored in TrackState
165  virtual void setZ0( float z0 ) ; // stored in TrackState
166  virtual void setTanLambda( float tanLambda ) ; // stored in TrackState
167  virtual void setCovMatrix( const float* cov ) ; // stored in TrackState
168  virtual void setCovMatrix( const EVENT::FloatVec& cov ) ; // stored in TrackState
169  virtual void setReferencePoint( const float* rPnt) ; // stored in TrackState
170 
171  //virtual void setIsReferencePointPCA( bool val ) ;
172 
173  virtual void setChi2( float chi2 ) ;
174  virtual void setNdf( int ndf ) ;
175  virtual void setdEdx( float dEdx ) ;
176  virtual void setdEdxError( float dEdxError ) ;
177 
178  virtual void addTrack( EVENT::Track* trk ) ;
179  virtual void addTrackState( EVENT::TrackState* trkstate ) ;
180  virtual void addHit( EVENT::TrackerHit* hit) ;
181 
182  // direct access to the track state vector
183  virtual EVENT::TrackStateVec & trackStates() ;
184 
185 
186  virtual void setRadiusOfInnermostHit( float r ) ;
187 
193 
194  protected:
195 
196  virtual void setType( int type ) ;
197 
199 
200 
201  float _chi2{0} ;
202  int _ndf{0} ;
203  float _dEdx{0} ;
204  float _dEdxError{0} ;
207 
210 
212 
213  static const TrackStateImpl _dummy ;
214 
215 }; // class
216 
217 
218 
219 } // namespace IMPL
220 #endif /* ifndef IMPL_TRACKIMLP_H */
virtual float getRadiusOfInnermostHit() const
The radius of the innermost hit that has been used in the track fit.
Definition: TrackImpl.cc:115
virtual void setTypeBit(int index, bool val=true)
Definition: TrackImpl.cc:165
float _dEdxError
Definition: TrackImpl.h:204
virtual void setZ0(float z0)
Definition: TrackImpl.cc:229
virtual void addHit(EVENT::TrackerHit *hit)
Definition: TrackImpl.cc:341
A generic tracker hit to be used by pattern recognition.
Definition: TrackerHit.h:26
virtual EVENT::TrackStateVec & trackStates()
Definition: TrackImpl.cc:362
virtual void setNdf(int ndf)
Definition: TrackImpl.cc:328
virtual const EVENT::TrackState * getTrackState(int location) const
Returns track state for the given location - or NULL if not found.
Definition: TrackImpl.cc:151
virtual const EVENT::FloatVec & getCovMatrix() const
Covariance matrix of the track parameters.
Definition: TrackImpl.cc:94
virtual const EVENT::TrackVec & getTracks() const
The tracks (as Track objects) that have been combined to this track.
Definition: TrackImpl.cc:126
virtual void setOmega(float omega)
Definition: TrackImpl.cc:213
virtual void setReferencePoint(const float *rPnt)
Definition: TrackImpl.cc:299
virtual EVENT::IntVec & subdetectorHitNumbers()
Allows modification of the subdetectorHitNumbers, e.g.
Definition: TrackImpl.cc:367
Implementation of the LCIO track class.
Definition: TrackImpl.h:30
The LCIO TrackState class.
Definition: TrackState.h:26
virtual int getType() const
Flagword that defines the type of track.
Definition: TrackImpl.cc:75
std::map< std::string, EVENT::IntVec * > IndexMap
Definition: TrackImpl.h:14
Implementation of the LCIO TrackState class.
virtual float getOmega() const
Omega is the signed curvature of the track in [1/mm].
Definition: TrackImpl.cc:91
virtual int getNdf() const
Number of degrees of freedom of the track fit.
Definition: TrackImpl.cc:110
virtual void setD0(float d0)
Definition: TrackImpl.cc:181
virtual float getdEdx() const
dEdx of the track.
Definition: TrackImpl.cc:111
virtual const EVENT::IntVec & getSubdetectorHitNumbers() const
A vector that holds the number of hits in particular subdetectors.
Definition: TrackImpl.cc:119
TrackImpl()
Default constructor, initializes values to 0.
Definition: TrackImpl.cc:13
static const TrackStateImpl _dummy
Definition: TrackImpl.h:213
virtual void addTrack(EVENT::Track *trk)
Definition: TrackImpl.cc:345
virtual void setRadiusOfInnermostHit(float r)
Definition: TrackImpl.cc:372
virtual float getChi2() const
True if the reference point is the point of closest approach.
Definition: TrackImpl.cc:109
EVENT::IntVec _subdetectorHitNumbers
Definition: TrackImpl.h:206
EVENT::TrackStateVec _trackStates
Definition: TrackImpl.h:211
virtual float getZ0() const
Impact paramter of the track in (r-z).
Definition: TrackImpl.cc:92
const TrackImpl & operator=(const TrackImpl &o)
Definition: TrackImpl.cc:30
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
Definition: TrackImpl.h:48
virtual void setTanLambda(float tanLambda)
Definition: TrackImpl.cc:245
The LCIO track class.
Definition: Track.h:33
virtual void addTrackState(EVENT::TrackState *trkstate)
Definition: TrackImpl.cc:350
EVENT::TrackerHitVec _hits
Definition: TrackImpl.h:209
virtual const EVENT::TrackerHitVec & getTrackerHits() const
Optionaly ( check/set flag(LCIO::TRBIT_HITS)==1) return the hits that have been used to create this t...
Definition: TrackImpl.cc:122
virtual void setChi2(float chi2)
Definition: TrackImpl.cc:324
virtual void setType(int type)
Definition: TrackImpl.cc:171
EVENT::TrackVec _tracks
Definition: TrackImpl.h:208
virtual ~TrackImpl()
Destructor.
Definition: TrackImpl.cc:54
virtual int simpleUID() const
Definition: AccessChecked.h:26
virtual void setdEdxError(float dEdxError)
Definition: TrackImpl.cc:336
float _radiusOfInnermostHit
Definition: TrackImpl.h:205
virtual float getTanLambda() const
Lambda is the dip angle of the track in r-z at the reference point.
Definition: TrackImpl.cc:93
virtual void setPhi(float phi)
Definition: TrackImpl.cc:197
Controls access to objects.
Definition: AccessChecked.h:18
virtual const EVENT::TrackState * getClosestTrackState(float x, float y, float z) const
Returns track state closest to the given point.
Definition: TrackImpl.cc:134
virtual void setdEdx(float dEdx)
Definition: TrackImpl.cc:332
virtual const EVENT::TrackStateVec & getTrackStates() const
Returns track states associtated with this track.
Definition: TrackImpl.cc:130
virtual float getD0() const
Impact paramter of the track in (r-phi).
Definition: TrackImpl.cc:89
virtual float getdEdxError() const
Error of dEdx.
Definition: TrackImpl.cc:112
virtual void setCovMatrix(const float *cov)
Definition: TrackImpl.cc:262
std::bitset< 32 > _type
Definition: TrackImpl.h:198
virtual float getPhi() const
Phi of the track at reference point.
Definition: TrackImpl.cc:90
virtual const float * getReferencePoint() const
Reference point of the track parameters.
Definition: TrackImpl.cc:98