MarlinTrk  2.2.0
Public Member Functions | Static Public Attributes | List of all members
MarlinTrk::IMarlinTrack Class Referenceabstract

Interface for generic tracks in MarlinTrk. More...

#include <IMarlinTrack.h>

Inheritance diagram for MarlinTrk::IMarlinTrack:
MarlinTrk::MarlinAidaTTTrack MarlinTrk::MarlinDDKalTestTrack MarlinTrk::MarlinKalTestTrack

Public Member Functions

virtual ~IMarlinTrack ()
 default d'tor
 
virtual void setMass (double mass)=0
 set the mass of the charged particle (GeV) that is used for energy loss and multiple scattering - default value if this method is not called is the pion mass.
 
virtual double getMass ()=0
 return the of the charged particle (GeV) that is used for energy loss and multiple scattering.
 
virtual int addHit (EVENT::TrackerHit *hit)=0
 add hit to track - the hits have to be added ordered in time ( i.e. More...
 
virtual int initialise (bool fitDirection)=0
 initialise the fit using the hits added up to this point - the fit direction has to be specified using IMarlinTrack::backward or IMarlinTrack::forward. More...
 
virtual int initialise (const EVENT::TrackState &ts, double bfield_z, bool fitDirection)=0
 initialise the fit with a track state, and z component of the B field in Tesla. More...
 
virtual int fit (double maxChi2Increment=DBL_MAX)=0
 perform the fit of all current hits, returns error code ( IMarlinTrack::success if no error ) . More...
 
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. More...
 
virtual int testChi2Increment (EVENT::TrackerHit *hit, double &chi2increment)=0
 obtain the chi2 increment which would result in adding the hit to the fit. More...
 
virtual int smooth ()=0
 smooth all track states
 
virtual int smooth (EVENT::TrackerHit *hit)=0
 smooth track states from the last filtered hit back to the measurement site associated with the given hit
 
virtual int getTrackState (IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
 get track state, returning TrackState, chi2 and ndf via reference
 
virtual int getTrackState (EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
 get track state at measurement associated with the given hit, returning TrackState, chi2 and ndf via reference
 
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. More...
 
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 than threshold, Pointers to the hits together with their chi2 contribution will be filled into a vector of pairs consitining of the pointer as the first part of the pair and the chi2 contribution as the second.
 
virtual int getNDF (int &ndf)=0
 get the current number of degrees of freedom for the fit.
 
virtual int getTrackerHitAtPositiveNDF (EVENT::TrackerHit *&trkhit)=0
 get TrackeHit at which fit became constrained, i.e. More...
 
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 propagate (const gear::Vector3D &point, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
 propagate the fit at the measurement site associated with the given hit, to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference
 
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 intersected sensitive detector element via reference
 
virtual int propagateToLayer (int layerID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)=0
 propagate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of the intersected sensitive detector element via reference
 
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 propagateToDetElement (int detEementID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)=0
 propagate the fit at the measurement site associated with the given hit, to sensitive detector element, returning TrackState, chi2 and ndf via reference
 
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, chi2 and ndf via reference
 
virtual int extrapolate (const gear::Vector3D &point, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)=0
 extrapolate the fit at the measurement site associated with the given hit, to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference
 
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 the intersected sensitive detector element via reference
 
virtual int extrapolateToLayer (int layerID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)=0
 extrapolate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of the intersected sensitive detector element via reference
 
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 extrapolateToDetElement (int detEementID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)=0
 extrapolate the fit at the measurement site associated with the given hit, 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 and integer ID of the intersected sensitive detector element via reference
 
virtual int intersectionWithLayer (int layerID, EVENT::TrackerHit *hit, gear::Vector3D &point, int &detElementID, int mode=modeClosest)=0
 extrapolate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning intersection point in global coordinates and integer ID of the intersected sensitive detector element via reference
 
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 coordinates via reference
 
virtual int intersectionWithDetElement (int detEementID, EVENT::TrackerHit *hit, gear::Vector3D &point, int mode=modeClosest)=0
 extrapolate the fit at the measurement site associated with the given hit, to sensitive detector element, returning intersection point in global coordinates via reference
 
virtual std::string toString ()
 Dump this track to a string for debugging - implementation dependant.
 

Static Public Attributes

static const bool backward = false
 boolean constant for defining backward direction - to be used for intitialise
 
static const bool forward = ! IMarlinTrack::backward
 boolean constant for defining backward direction - to be used for intitialise
 
static const int modeBackward = - 1
 
static const int modeClosest = 0
 
static const int modeForward = + 1
 
static const int success = 0
 
static const int error = 1
 
static const int bad_intputs = 3
 
static const int no_intersection = 4
 
static const int site_discarded = 5
 
static const int site_fails_chi2_cut = 6
 
static const int all_sites_fail_fit = 7
 

Detailed Description

Interface for generic tracks in MarlinTrk.

The interface should provide the functionality to perform track finding and fitting. It is asssumed that the underlying implemetation will by a Kalman Filter or a similar algorithm.

Version
Id:
IMarlinTrack.h 5559 2016-06-07 16:14:02Z gaede
Author
S.Aplin, F. Gaede DESY

Member Function Documentation

virtual int MarlinTrk::IMarlinTrack::addAndFit ( EVENT::TrackerHit *  hit,
double &  chi2increment,
double  maxChi2Increment = DBL_MAX 
)
pure virtual

update the current fit using the supplied hit, return code via int.

Provides the Chi2 increment to the fit from adding the hit via reference. the given hit will not be added if chi2increment > maxChi2Increment.

virtual int MarlinTrk::IMarlinTrack::addHit ( EVENT::TrackerHit *  hit)
pure virtual

add hit to track - the hits have to be added ordered in time ( i.e.

typically outgoing ) this order will define the direction of the energy loss used in the fit

Referenced by MarlinTrk::createFit().

virtual int MarlinTrk::IMarlinTrack::fit ( double  maxChi2Increment = DBL_MAX)
pure virtual

perform the fit of all current hits, returns error code ( IMarlinTrack::success if no error ) .

the fit will be performed in the order specified at initialise() wrt the order used in addHit(), i.e. IMarlinTrack::backward implies fitting from the outside to the inside for tracks comming from the IP.

Referenced by MarlinTrk::createFit().

virtual int MarlinTrk::IMarlinTrack::getHitsInFit ( std::vector< std::pair< EVENT::TrackerHit *, double > > &  hits)
pure virtual

get the list of hits included in the fit, together with the chi2 contributions of the hits.

Pointers to the hits together with their chi2 contribution will be filled into a vector of pairs consitining of the pointer as the first part of the pair and the chi2 contribution as the second.

Referenced by MarlinTrk::finaliseLCIOTrack(), and toString().

virtual int MarlinTrk::IMarlinTrack::getTrackerHitAtPositiveNDF ( EVENT::TrackerHit *&  trkhit)
pure virtual

get TrackeHit at which fit became constrained, i.e.

ndf >= 0

Referenced by MarlinTrk::finaliseLCIOTrack(), and toString().

virtual int MarlinTrk::IMarlinTrack::initialise ( bool  fitDirection)
pure virtual

initialise the fit using the hits added up to this point - the fit direction has to be specified using IMarlinTrack::backward or IMarlinTrack::forward.

this is the order wrt the order used in addHit() that will be used in the fit()

Referenced by MarlinTrk::createFit().

virtual int MarlinTrk::IMarlinTrack::initialise ( const EVENT::TrackState &  ts,
double  bfield_z,
bool  fitDirection 
)
pure virtual

initialise the fit with a track state, and z component of the B field in Tesla.

the fit direction has to be specified using IMarlinTrack::backward or IMarlinTrack::forward. this is the order that will be used in the fit(). it is the users responsibility that the track state is consistent with the order of the hits used in addHit() ( i.e. the direction of energy loss )

virtual int MarlinTrk::IMarlinTrack::testChi2Increment ( EVENT::TrackerHit *  hit,
double &  chi2increment 
)
pure virtual

obtain the chi2 increment which would result in adding the hit to the fit.

This method will not alter the current fit, and the hit will not be stored in the list of hits or outliers


The documentation for this class was generated from the following files: