8 #include "EVENT/TrackerHit.h"
9 #include "IMPL/TrackStateImpl.h"
11 #include "gearimpl/Vector3D.h"
40 static const int modeBackward ;
41 static const int modeClosest ;
42 static const int modeForward ;
45 static const int success ;
46 static const int error ;
47 static const int bad_intputs ;
48 static const int no_intersection ;
49 static const int site_discarded ;
50 static const int site_fails_chi2_cut ;
51 static const int all_sites_fail_fit ;
60 virtual void setMass(
double mass) = 0 ;
69 virtual int addHit(EVENT::TrackerHit* hit) = 0 ;
75 virtual int initialise(
bool fitDirection ) = 0 ;
83 virtual int initialise(
const EVENT::TrackState& ts,
double bfield_z,
bool fitDirection ) = 0 ;
90 virtual int fit(
double maxChi2Increment=DBL_MAX ) = 0 ;
96 virtual int addAndFit( EVENT::TrackerHit* hit,
double& chi2increment,
double maxChi2Increment=DBL_MAX ) = 0 ;
101 virtual int testChi2Increment( EVENT::TrackerHit* hit,
double& chi2increment ) = 0 ;
106 virtual int smooth() = 0 ;
111 virtual int smooth( EVENT::TrackerHit* hit ) = 0 ;
119 virtual int getTrackState( IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf ) = 0 ;
124 virtual int getTrackState( EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf ) = 0 ;
131 virtual int getHitsInFit( std::vector<std::pair<EVENT::TrackerHit*, double> >& hits ) = 0 ;
138 virtual int getOutliers( std::vector<std::pair<EVENT::TrackerHit*, double> >& hits ) = 0 ;
142 virtual int getNDF(
int& ndf ) = 0 ;
152 virtual int propagate(
const gear::Vector3D& point, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf ) = 0 ;
158 virtual int propagate(
const gear::Vector3D& point, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf ) = 0 ;
163 virtual int propagateToLayer(
int layerID, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int& detElementID,
int mode=modeClosest ) = 0 ;
168 virtual int propagateToLayer(
int layerID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int& detElementID,
int mode=modeClosest ) = 0 ;
172 virtual int propagateToDetElement(
int detElementID, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int mode=modeClosest ) = 0 ;
177 virtual int propagateToDetElement(
int detEementID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int mode=modeClosest ) = 0 ;
185 virtual int extrapolate(
const gear::Vector3D& point, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf ) = 0 ;
190 virtual int extrapolate(
const gear::Vector3D& point, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf ) = 0 ;
194 virtual int extrapolateToLayer(
int layerID, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int& detElementID,
int mode=modeClosest ) = 0 ;
199 virtual int extrapolateToLayer(
int layerID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int& detElementID,
int mode=modeClosest ) = 0 ;
203 virtual int extrapolateToDetElement(
int detElementID, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int mode=modeClosest ) = 0 ;
208 virtual int extrapolateToDetElement(
int detEementID, EVENT::TrackerHit* hit, IMPL::TrackStateImpl& ts,
double& chi2,
int& ndf,
int mode=modeClosest ) = 0 ;
216 virtual int intersectionWithLayer(
int layerID, gear::Vector3D& point,
int& detElementID,
int mode=modeClosest ) = 0 ;
221 virtual int intersectionWithLayer(
int layerID, EVENT::TrackerHit* hit, gear::Vector3D& point,
int& detElementID,
int mode=modeClosest ) = 0 ;
231 virtual int intersectionWithDetElement(
int detEementID, EVENT::TrackerHit* hit, gear::Vector3D& point,
int mode=modeClosest ) = 0 ;
virtual int extrapolateToDetElement(int detElementID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)=0
extrapolate the fit to sensitive detector element, returning TrackState, chi2 and ndf via reference ...
virtual int smooth()=0
smooth all track states
virtual int propagateToLayer(int layerID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)=0
propagate fit to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of the inte...
virtual int getTrackState(IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
get track state, returning TrackState, chi2 and ndf via reference
static const bool backward
boolean constant for defining backward direction - to be used for intitialise
Definition: IMarlinTrack.h:33
virtual int getNDF(int &ndf)=0
get the current number of degrees of freedom for the fit.
static const bool forward
boolean constant for defining backward direction - to be used for intitialise
Definition: IMarlinTrack.h:36
virtual std::string toString()
Dump this track to a string for debugging - implementation dependant.
Definition: IMarlinTrack.cc:40
virtual int extrapolate(const gear::Vector3D &point, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
extrapolate the fit to the point of closest approach to the given point, returning TrackState...
virtual int getTrackerHitAtPositiveNDF(EVENT::TrackerHit *&trkhit)=0
get TrackeHit at which fit became constrained, i.e.
virtual int extrapolateToLayer(int layerID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)=0
extrapolate the fit to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of th...
virtual int testChi2Increment(EVENT::TrackerHit *hit, double &chi2increment)=0
obtain the chi2 increment which would result in adding the hit to the fit.
Interface for generic tracks in MarlinTrk.
Definition: IMarlinTrack.h:28
virtual int fit(double maxChi2Increment=DBL_MAX)=0
perform the fit of all current hits, returns error code ( IMarlinTrack::success if no error ) ...
virtual int getOutliers(std::vector< std::pair< EVENT::TrackerHit *, double > > &hits)=0
get the list of hits which have been rejected by from the fit due to the a chi2 increment greater tha...
virtual int propagate(const gear::Vector3D &point, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
propagate the fit to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference
virtual int addAndFit(EVENT::TrackerHit *hit, double &chi2increment, double maxChi2Increment=DBL_MAX)=0
update the current fit using the supplied hit, return code via int.
virtual int getHitsInFit(std::vector< std::pair< EVENT::TrackerHit *, double > > &hits)=0
get the list of hits included in the fit, together with the chi2 contributions of the hits...
virtual int addHit(EVENT::TrackerHit *hit)=0
add hit to track - the hits have to be added ordered in time ( i.e.
std::string errorCode(int error)
Helper function to convert error return code to string.
Definition: IMarlinTrack.cc:26
virtual double getMass()=0
return the of the charged particle (GeV) that is used for energy loss and multiple scattering...
virtual int propagateToDetElement(int detElementID, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)=0
propagate the fit to sensitive detector element, returning TrackState, chi2 and ndf via reference ...
virtual int intersectionWithLayer(int layerID, gear::Vector3D &point, int &detElementID, int mode=modeClosest)=0
extrapolate the fit to numbered sensitive layer, returning intersection point in global coordinates a...
virtual void setMass(double mass)=0
set the mass of the charged particle (GeV) that is used for energy loss and multiple scattering - def...
virtual ~IMarlinTrack()
default d'tor
Definition: IMarlinTrack.h:55
virtual int intersectionWithDetElement(int detElementID, gear::Vector3D &point, int mode=modeClosest)=0
extrapolate the fit to numbered sensitive detector element, returning intersection point in global co...
virtual int initialise(bool fitDirection)=0
initialise the fit using the hits added up to this point - the fit direction has to be specified usin...