MarlinTrk  02.08
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MarlinAidaTTTrack.h
Go to the documentation of this file.
1 #ifndef MarlinAidaTTTrack_h
2 #define MarlinAidaTTTrack_h
3 
4 #include "IMarlinTrack.h"
5 #include "IMarlinTrkSystem.h"
6 
7 #include "aidaTT/AidaTT.hh"
8 
9 #include <cmath>
10 
11 namespace MarlinTrk {
12  class MarlinAidaTT;
13 }
14 
15 namespace EVENT{
16  class TrackerHit ;
17 }
18 
19 
20 
28 namespace MarlinTrk{
29 
31 
32 public:
33 
34 
36 
38 
39 protected:
40 
41 private:
42 
43  MarlinAidaTTTrack(const MarlinAidaTTTrack&) ; // Prevent copy-construction
44  MarlinAidaTTTrack& operator=(const MarlinAidaTTTrack&) ; // Prevent assignment
45 
46  // make member functions private to force use through interface
47 
51  void setMass(double mass) ;
52 
55  double getMass() ;
56 
60  int addHit(EVENT::TrackerHit* hit) ;
61 
66  int initialise( bool /*fitDirection*/ );
67 
76  int initialise( const EVENT::TrackState& ts, double /*bfield_z*/, bool /*fitDirection*/ ) ;
77 
78 
83  int fit( double maxChi2Increment=DBL_MAX ) ;
84 
85 
89  int smooth() ;
90 
91 
95  int smooth( EVENT::TrackerHit* ) ;
96 
97 
101  int addAndFit( EVENT::TrackerHit* , double& , double) ;
102 
103 
108  int testChi2Increment( EVENT::TrackerHit* , double& ) ;
109 
110 
111  // Track State Accessesors
112 
115  int getTrackState( IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
116 
117 
120  int getTrackState( EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
121 
122 
129 
137 
138 
141  int getNDF( int& ndf ) ;
142 
146 
147  // PROPAGATORS
148 
151  int propagate( const Vector3D& point, IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
152 
153 
157  int propagate( const Vector3D& point, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
158 
159 
162  int propagateToLayer( int layerID, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int& detElementID, int mode=modeClosest ) ;
163 
167  int propagateToLayer( int layerID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int& detElementID, int mode=modeClosest ) ;
168 
171  int propagateToDetElement( int detElementID, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int mode=modeClosest ) ;
172 
176  int propagateToDetElement( int detEementID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int mode=modeClosest ) ;
177 
178 
179 
180  // EXTRAPOLATORS
181 
184  int extrapolate( const Vector3D& point, IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
185 
189  int extrapolate( const Vector3D& point, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
190 
191 
194  int extrapolateToLayer( int layerID, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int& detElementID, int mode=modeClosest ) ;
195 
199  int extrapolateToLayer( int layerID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int& detElementID, int mode=modeClosest ) ;
200 
203  int extrapolateToDetElement( int detElementID, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int mode=modeClosest ) ;
204 
208  int extrapolateToDetElement( int detEementID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts, double& chi2, int& ndf, int mode=modeClosest ) ;
209 
210 
214 
215  // INTERSECTORS
216 
217 
221  int intersectionWithLayer( int layerID, Vector3D& point, int& detElementID, int mode=modeClosest ) ;
222 
226  int intersectionWithLayer( int layerID, EVENT::TrackerHit* hit, Vector3D& point, int& detElementID, int mode=modeClosest ) ;
227 
230  int intersectionWithDetElement( int detElementID, Vector3D& point, int mode=modeClosest ) ;
231 
235  int intersectionWithDetElement( int detElementID, EVENT::TrackerHit* hit, Vector3D& point, int mode=modeClosest ) ;
236 
237 
238  //** end of memeber functions from IMarlinTrack interface
239 
241  inline double toBaseRange( double phi) const {
242  while( phi <= -M_PI ){ phi += 2. * M_PI ; }
243  while( phi > M_PI ){ phi -= 2. * M_PI ; }
244  return phi ;
245  }
246 
247 protected:
248 
249  aidaTT::trackParameters createPreFit(aidaTT::trackParameters& tp ) ;
250 
251  void getHitInfo( const EVENT::TrackerHit* hit, double* hitpos, std::vector<double>& precision, const aidaTT::ISurface* surf ) ;
252 
253  int getTrackState( const aidaTT::Vector3D& refPoint, int label, IMPL::TrackStateImpl& ts, double& chi2, int& ndf ) ;
254 
256  int myInit() ;
257 
258  // memeber variables
259 
261 
264  bool _initialised=false;
265 
268  bool _smoothed=false;
269 
271 
272  aidaTT::trackParameters _initialTrackParams{};
273 
274  aidaTT::trajectory* _fitTrajectory{};
275 
277 
279 
280  double _mass=0.0;
281 } ;
282 
283 } // end of namespace MarlinTrk
284 
285 #endif
int fit(double maxChi2Increment=DBL_MAX)
perform the fit of all current hits, returns error code ( IMarlinTrack::success if no error ) ...
int initialise(bool)
initialise the fit using the hits added up to this point - the fit direction has to be specified usin...
int extrapolateToDetElement(int detElementID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)
extrapolate the fit to sensitive detector element, returning TrackState, chi2 and ndf via reference ...
int intersectionWithLayer(int layerID, Vector3D &point, int &detElementID, int mode=modeClosest)
extrapolate the fit to numbered sensitive layer, returning intersection point in global coordinates a...
int getTrackState(IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
get track state, returning TrackState, chi2 and ndf via reference
void getHitInfo(const EVENT::TrackerHit *hit, double *hitpos, std::vector< double > &precision, const aidaTT::ISurface *surf)
Interface to KaltTest Kalman fitter - instantiates and holds the detector geometry.
Definition: MarlinAidaTT.h:43
int propagateToLayer(int layerID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)
propagate the fit to the numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of ...
#define M_PI
int myInit()
common initialization
double toBaseRange(double phi) const
helper function to restrict the range of the azimuthal angle to ]-pi,pi]
static const int modeClosest
Definition: IMarlinTrack.h:49
int intersectionWithDetElement(int detElementID, Vector3D &point, int mode=modeClosest)
extrapolate the fit to numbered sensitive detector element, returning intersection point in global co...
std::string toString()
Dump this track to a string for debugging.
int extrapolate(const Vector3D &point, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
extrapolate the fit to the point of closest approach to the given point, returning TrackState...
int testChi2Increment(EVENT::TrackerHit *, double &)
this method has no effect for aidaTT/GBL ...
dd4hep::rec::Vector3D Vector3D
the Vector3D used for the tracking interface
Definition: IMarlinTrack.h:26
aidaTT::trackParameters createPreFit(aidaTT::trackParameters &tp)
const std::vector< std::pair< double, const aidaTT::ISurface * > > * _intersections
STL class.
int getOutliers(std::vector< std::pair< EVENT::TrackerHit *, double > > &)
this method has no effect for aidaTT/GBL ...
std::map< int, int > _indexMap
int getHitsInFit(std::vector< std::pair< EVENT::TrackerHit *, double > > &hits)
get the list of hits included in the fit, together with the chi2 contributions of the hits...
aidaTT::trajectory * _fitTrajectory
MarlinAidaTTTrack & operator=(const MarlinAidaTTTrack &)
int propagateToDetElement(int detElementID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)
propagate the fit to sensitive detector element, returning TrackState, chi2 and ndf via reference ...
Interface for generic tracks in MarlinTrk.
Definition: IMarlinTrack.h:36
int smooth()
this method has no effect for aidaTT/GBL ...
int addAndFit(EVENT::TrackerHit *, double &, double)
this method has no effect for aidaTT/GBL ...
int getTrackerHitAtPositiveNDF(EVENT::TrackerHit *&trkhit)
get TrackeHit at which fit became constrained, i.e.
int extrapolateToLayer(int layerID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)
extrapolate the fit to numbered sensitive layer, returning TrackState via provided reference ...
int propagate(const Vector3D &point, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
propagate the fit to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference
int getNDF(int &ndf)
get the current number of degrees of freedom for the fit.
STL class.
void setMass(double mass)
set the mass of the charged particle (GeV) that is used for energy loss and multiple scattering - def...
bool _smoothed
used to store whether smoothing has been performed
std::vector< EVENT::TrackerHit * > _lcioHits
bool _initialised
used to store whether initial track state has been supplied or created
double getMass()
return the of the charged particle (GeV) that is used for energy loss and multiple scattering...
int addHit(EVENT::TrackerHit *hit)
add hit to track - the hits have to be added ordered in time ( i.e.
aidaTT::trackParameters _initialTrackParams
MarlinAidaTTTrack(MarlinAidaTT *aidaTT)