MarlinTrk  02.08
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MarlinTrk::MarlinDDKalTestTrack Class Reference

#include <MarlinDDKalTestTrack.h>

+ Inheritance diagram for MarlinTrk::MarlinDDKalTestTrack:

Public Member Functions

 MarlinDDKalTestTrack (MarlinDDKalTest *ktest)
 
 ~MarlinDDKalTestTrack ()
 
- Public Member Functions inherited from MarlinTrk::IMarlinTrack
virtual ~IMarlinTrack ()
 default d'tor More...
 

Private Member Functions

 MarlinDDKalTestTrack (const MarlinDDKalTestTrack &)
 
MarlinDDKalTestTrackoperator= (const MarlinDDKalTestTrack &)
 
void setMass (double mass)
 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. More...
 
double getMass ()
 return the of the charged particle (GeV) that is used for energy loss and multiple scattering. More...
 
int addHit (EVENT::TrackerHit *hit)
 add hit to track - the hits have to be added ordered in time ( i.e. More...
 
int addHit (EVENT::TrackerHit *trkhit, const DDVMeasLayer *ml)
 add hit to track - the hits have to be added ordered in time ( i.e. More...
 
int addHit (EVENT::TrackerHit *trkhit, DDVTrackHit *kalhit, const DDVMeasLayer *ml)
 add hit to track - the hits have to be added ordered in time ( i.e. More...
 
int initialise (bool fitDirection)
 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...
 
int initialise (const EVENT::TrackState &ts, double, bool fitDirection)
 initialise the fit with a track state the fit direction has to be specified using IMarlinTrack::backward or IMarlinTrack::forward. More...
 
int fit (double maxChi2Increment=DBL_MAX)
 perform the fit of all current hits, returns error code ( IMarlinTrack::success if no error ) . More...
 
int smooth ()
 smooth all track states More...
 
int smooth (EVENT::TrackerHit *hit)
 smooth track states from the last filtered hit back to the measurement site associated with the given hit More...
 
int addAndFit (EVENT::TrackerHit *hit, double &chi2increment, double maxChi2Increment=DBL_MAX)
 update the current fit using the supplied hit, return code via int. More...
 
int addAndFit (DDVTrackHit *kalhit, double &chi2increment, TKalTrackSite *&site, double maxChi2Increment=DBL_MAX)
 update the current fit using the supplied hit, return code via int. More...
 
int testChi2Increment (EVENT::TrackerHit *hit, double &chi2increment)
 obtain the chi2 increment which would result in adding the hit to the fit. More...
 
int getTrackState (IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
 get track state, returning TrackState, chi2 and ndf via reference More...
 
int getTrackState (EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
 get track state at measurement associated with the given hit, returning TrackState, chi2 and ndf via reference More...
 
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. More...
 
int getOutliers (std::vector< std::pair< EVENT::TrackerHit *, double > > &hits)
 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. More...
 
int getNDF (int &ndf)
 get the current number of degrees of freedom for the fit. More...
 
int getTrackerHitAtPositiveNDF (EVENT::TrackerHit *&trkhit)
 get TrackeHit at which fit became constrained, i.e. More...
 
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 More...
 
int propagate (const Vector3D &point, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
 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 More...
 
int propagate (const Vector3D &point, const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, const DDVMeasLayer *ml=0)
 propagate the fit at the provided measurement site, to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference More...
 
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 sensitive detector element via reference More...
 
int propagateToLayer (int layerID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)
 propagate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference More...
 
int propagateToLayer (int layerID, const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)
 propagate the fit at the measurement site, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference More...
 
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 More...
 
int propagateToDetElement (int detEementID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)
 propagate the fit at the measurement site associated with the given hit, to sensitive detector element, returning TrackState, chi2 and ndf via reference More...
 
int propagateToDetElement (int detEementID, const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)
 propagate the fit at the measurement site, to sensitive detector element, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference More...
 
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, chi2 and ndf via reference More...
 
int extrapolate (const Vector3D &point, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
 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 More...
 
int extrapolate (const Vector3D &point, const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf)
 extrapolate the fit at the measurement site, to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference More...
 
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 More...
 
int extrapolateToLayer (int layerID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)
 extrapolate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference More...
 
int extrapolateToLayer (int layerID, const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int &detElementID, int mode=modeClosest)
 extrapolate the fit at the measurement site, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference More...
 
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 More...
 
int extrapolateToDetElement (int detEementID, EVENT::TrackerHit *hit, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)
 extrapolate the fit at the measurement site associated with the given hit, to sensitive detector element, returning TrackState, chi2 and ndf via reference More...
 
int extrapolateToDetElement (int detEementID, const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf, int mode=modeClosest)
 extrapolate the fit at the measurement site, to sensitive detector element, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference More...
 
std::string toString ()
 Dump this track to a string for debugging. More...
 
int intersectionWithLayer (int layerID, Vector3D &point, int &detElementID, int mode=modeClosest)
 extrapolate the fit to numbered sensitive layer, returning intersection point in global coordinates and integer ID of the intersected sensitive detector element via reference More...
 
int intersectionWithLayer (int layerID, EVENT::TrackerHit *hit, Vector3D &point, int &detElementID, int mode=modeClosest)
 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 More...
 
int intersectionWithLayer (int layerID, const TKalTrackSite &site, Vector3D &point, int &detElementID, const DDVMeasLayer *&ml, int mode=modeClosest)
 extrapolate the fit at the measurement site, to numbered sensitive layer, returning intersection point in global coordinates and integer ID of the intersected sensitive detector element via reference More...
 
int intersectionWithDetElement (int detElementID, Vector3D &point, int mode=modeClosest)
 extrapolate the fit to numbered sensitive detector element, returning intersection point in global coordinates via reference More...
 
int intersectionWithDetElement (int detElementID, EVENT::TrackerHit *hit, Vector3D &point, int mode=modeClosest)
 extrapolate the fit at the measurement site associated with the given hit, to sensitive detector element, returning intersection point in global coordinates via reference More...
 
int intersectionWithDetElement (int detElementID, const TKalTrackSite &site, Vector3D &point, const DDVMeasLayer *&ml, int mode=modeClosest)
 extrapolate the fit at the measurement site, to sensitive detector element, returning intersection point in global coordinates via reference More...
 
int findIntersection (std::vector< DDVMeasLayer const * > &meas_modules, const TKalTrackSite &site, Vector3D &point, int &detElementID, const DDVMeasLayer *&ml, int mode=modeClosest)
 extrapolate the fit at the measurement site, to sensitive detector elements contained in the std::vector, and return intersection point in global coordinates via reference More...
 
int findIntersection (const DDVMeasLayer &meas_module, const TKalTrackSite &site, Vector3D &point, double &dphi, int &detElementIDconst, int mode=modeClosest)
 extrapolate the fit at the measurement site, to the DDVMeasLayer, and return intersection point in global coordinates via reference More...
 
void ToLCIOTrackState (const TKalTrackSite &site, IMPL::TrackStateImpl &ts, double &chi2, int &ndf) const
 fill LCIO Track State with parameters from helix and cov matrix More...
 
void ToLCIOTrackState (const THelicalTrack &helix, const TMatrixD &cov, IMPL::TrackStateImpl &ts, double &chi2, int &ndf) const
 fill LCIO Track State with parameters from helix and cov matrix More...
 
int getSiteFromLCIOHit (EVENT::TrackerHit *trkhit, TKalTrackSite *&site) const
 get the measurement site associated with the given lcio TrackerHit trkhit More...
 
double toBaseRange (double phi) const
 helper function to restrict the range of the azimuthal angle to ]-pi,pi] More...
 

Private Attributes

TKalTrack * _kaltrack =nullptr
 
EVENT::TrackerHitVec _lcioHits {}
 
TObjArray * _kalhits =nullptr
 
MarlinDDKalTest_ktest =nullptr
 
EVENT::TrackerHit_trackHitAtPositiveNDF =nullptr
 
int _hitIndexAtPositiveNDF =-1
 
bool _initialised =false
 used to store whether initial track state has been supplied or created More...
 
bool _fitDirection =false
 used to store the fit direction supplied to intialise More...
 
bool _smoothed =false
 used to store whether smoothing has been performed More...
 
std::map< EVENT::TrackerHit
*, TKalTrackSite * > 
_hit_used_for_sites {}
 map to store relation between lcio hits and measurement sites More...
 
std::map< EVENT::TrackerHit
*, DDVTrackHit * > 
_lcio_hits_to_kaltest_hits {}
 map to store relation between lcio hits kaltest hits More...
 
std::vector< EVENT::TrackerHit * > _hit_not_used_for_sites {}
 vector to store lcio hits rejected for measurement sites More...
 
std::vector< std::pair
< EVENT::TrackerHit *, double > > 
_hit_chi2_values {}
 vector to store the chi-sqaure increment for measurement sites More...
 
std::vector< std::pair
< EVENT::TrackerHit *, double > > 
_outlier_chi2_values {}
 vector to store the chi-sqaure increment for measurement sites More...
 

Additional Inherited Members

- Static Public Attributes inherited from MarlinTrk::IMarlinTrack
static const bool backward = false
 boolean constant for defining backward direction - to be used for intitialise More...
 
static const bool forward = ! IMarlinTrack::backward
 boolean constant for defining backward direction - to be used for intitialise More...
 
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

Definition at line 39 of file MarlinDDKalTestTrack.h.

Constructor & Destructor Documentation

MarlinTrk::MarlinDDKalTestTrack::MarlinDDKalTestTrack ( MarlinDDKalTest ktest)
MarlinTrk::MarlinDDKalTestTrack::~MarlinDDKalTestTrack ( )

Definition at line 100 of file MarlinDDKalTestTrack.cc.

References _kalhits, _kaltrack, and _ktest.

MarlinTrk::MarlinDDKalTestTrack::MarlinDDKalTestTrack ( const MarlinDDKalTestTrack )
private

Member Function Documentation

int MarlinTrk::MarlinDDKalTestTrack::addAndFit ( EVENT::TrackerHit hit,
double &  chi2increment,
double  maxChi2Increment = DBL_MAX 
)
privatevirtual
int MarlinTrk::MarlinDDKalTestTrack::addAndFit ( DDVTrackHit *  kalhit,
double &  chi2increment,
TKalTrackSite *&  site,
double  maxChi2Increment = DBL_MAX 
)
private

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.

Definition at line 584 of file MarlinDDKalTestTrack.cc.

References _initialised, _kaltrack, _ktest, std::endl(), KalTrackFilter::passedLastFilterStep(), KalTrackFilter::resetFilterStatus(), std::scientific(), MarlinTrk::IMarlinTrack::site_discarded, MarlinTrk::IMarlinTrack::site_fails_chi2_cut, and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::addHit ( EVENT::TrackerHit hit)
privatevirtual

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

Implements MarlinTrk::IMarlinTrack.

Definition at line 115 of file MarlinDDKalTestTrack.cc.

References _ktest, and MarlinTrk::MarlinDDKalTest::findMeasLayer().

Referenced by addAndFit(), and addHit().

int MarlinTrk::MarlinDDKalTestTrack::addHit ( EVENT::TrackerHit trkhit,
const DDVMeasLayer *  ml 
)
private

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

Definition at line 121 of file MarlinDDKalTestTrack.cc.

References addHit(), MarlinTrk::IMarlinTrack::bad_intputs, and std::endl().

int MarlinTrk::MarlinDDKalTestTrack::addHit ( EVENT::TrackerHit trkhit,
DDVTrackHit *  kalhit,
const DDVMeasLayer *  ml 
)
private

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

Definition at line 135 of file MarlinDDKalTestTrack.cc.

References _kalhits, _lcio_hits_to_kaltest_hits, MarlinTrk::IMarlinTrack::bad_intputs, std::endl(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::extrapolate ( const Vector3D point,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
privatevirtual

extrapolate the fit to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1047 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by extrapolate(), extrapolateToDetElement(), and extrapolateToLayer().

int MarlinTrk::MarlinDDKalTestTrack::extrapolate ( const Vector3D point,
EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
privatevirtual

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

Implements MarlinTrk::IMarlinTrack.

Definition at line 1055 of file MarlinDDKalTestTrack.cc.

References extrapolate(), getSiteFromLCIOHit(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::extrapolate ( const Vector3D point,
const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
private

extrapolate the fit at the measurement site, to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference

Definition at line 1066 of file MarlinDDKalTestTrack.cc.

References std::endl(), MarlinTrk::IMarlinTrack::success, ToLCIOTrackState(), dd4hep::rec::Vector3D::x(), dd4hep::rec::Vector3D::y(), and dd4hep::rec::Vector3D::z().

int MarlinTrk::MarlinDDKalTestTrack::extrapolateToDetElement ( int  detElementID,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit to sensitive detector element, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1134 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by extrapolateToDetElement().

int MarlinTrk::MarlinDDKalTestTrack::extrapolateToDetElement ( int  detEementID,
EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit at the measurement site associated with the given hit, to sensitive detector element, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1143 of file MarlinDDKalTestTrack.cc.

References extrapolateToDetElement(), getSiteFromLCIOHit(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::extrapolateToDetElement ( int  detEementID,
const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int  mode = modeClosest 
)
private

extrapolate the fit at the measurement site, to sensitive detector element, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Definition at line 1155 of file MarlinDDKalTestTrack.cc.

References std::endl(), extrapolate(), and intersectionWithDetElement().

int MarlinTrk::MarlinDDKalTestTrack::extrapolateToLayer ( int  layerID,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int &  detElementID,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit to numbered sensitive layer, returning TrackState via provided reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1097 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by extrapolateToLayer().

int MarlinTrk::MarlinDDKalTestTrack::extrapolateToLayer ( int  layerID,
EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int &  detElementID,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1106 of file MarlinDDKalTestTrack.cc.

References extrapolateToLayer(), getSiteFromLCIOHit(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::extrapolateToLayer ( int  layerID,
const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int &  detElementID,
int  mode = modeClosest 
)
private

extrapolate the fit at the measurement site, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Definition at line 1118 of file MarlinDDKalTestTrack.cc.

References std::endl(), extrapolate(), and intersectionWithLayer().

int MarlinTrk::MarlinDDKalTestTrack::findIntersection ( std::vector< DDVMeasLayer const * > &  meas_modules,
const TKalTrackSite &  site,
Vector3D point,
int &  detElementID,
const DDVMeasLayer *&  ml,
int  mode = modeClosest 
)
private

extrapolate the fit at the measurement site, to sensitive detector elements contained in the std::vector, and return intersection point in global coordinates via reference

Definition at line 1543 of file MarlinDDKalTestTrack.cc.

References MarlinTrk::IMarlinTrack::no_intersection, std::vector< T >::size(), and MarlinTrk::IMarlinTrack::success.

Referenced by intersectionWithDetElement(), and intersectionWithLayer().

int MarlinTrk::MarlinDDKalTestTrack::findIntersection ( const DDVMeasLayer &  meas_module,
const TKalTrackSite &  site,
Vector3D point,
double &  dphi,
int &  detElementIDconst,
int  mode = modeClosest 
)
private

extrapolate the fit at the measurement site, to the DDVMeasLayer, and return intersection point in global coordinates via reference

Definition at line 1495 of file MarlinDDKalTestTrack.cc.

References std::endl(), MarlinTrk::IMarlinTrack::no_intersection, and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::fit ( double  maxChi2Increment = DBL_MAX)
privatevirtual
int MarlinTrk::MarlinDDKalTestTrack::getHitsInFit ( std::vector< std::pair< EVENT::TrackerHit *, double > > &  hits)
privatevirtual

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.

Implements MarlinTrk::IMarlinTrack.

Definition at line 984 of file MarlinDDKalTestTrack.cc.

References _hit_chi2_values, std::back_inserter(), std::vector< T >::begin(), std::copy(), std::vector< T >::end(), and MarlinTrk::IMarlinTrack::success.

double MarlinTrk::MarlinDDKalTestTrack::getMass ( )
privatevirtual

return the of the charged particle (GeV) that is used for energy loss and multiple scattering.

Implements MarlinTrk::IMarlinTrack.

Definition at line 112 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

int MarlinTrk::MarlinDDKalTestTrack::getNDF ( int &  ndf)
privatevirtual

get the current number of degrees of freedom for the fit.

Implements MarlinTrk::IMarlinTrack.

Definition at line 1026 of file MarlinDDKalTestTrack.cc.

References _initialised, _kaltrack, MarlinTrk::IMarlinTrack::error, and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::getOutliers ( std::vector< std::pair< EVENT::TrackerHit *, double > > &  hits)
privatevirtual

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.

Implements MarlinTrk::IMarlinTrack.

Definition at line 1004 of file MarlinDDKalTestTrack.cc.

References _outlier_chi2_values, std::back_inserter(), std::vector< T >::begin(), std::copy(), std::vector< T >::end(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::getSiteFromLCIOHit ( EVENT::TrackerHit trkhit,
TKalTrackSite *&  site 
) const
private
int MarlinTrk::MarlinDDKalTestTrack::getTrackerHitAtPositiveNDF ( EVENT::TrackerHit *&  trkhit)
privatevirtual

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

ndf >= 0

Implements MarlinTrk::IMarlinTrack.

Definition at line 1039 of file MarlinDDKalTestTrack.cc.

References _trackHitAtPositiveNDF, and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::getTrackState ( IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
privatevirtual

get track state, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 952 of file MarlinDDKalTestTrack.cc.

References _kaltrack, std::endl(), MarlinTrk::IMarlinTrack::success, and ToLCIOTrackState().

int MarlinTrk::MarlinDDKalTestTrack::getTrackState ( EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
privatevirtual

get track state at measurement associated with the given hit, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 967 of file MarlinDDKalTestTrack.cc.

References std::endl(), EVENT::TrackerHit::getCellID0(), getSiteFromLCIOHit(), MarlinTrk::IMarlinTrack::success, and ToLCIOTrackState().

int MarlinTrk::MarlinDDKalTestTrack::initialise ( bool  fitDirection)
privatevirtual

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()

Implements MarlinTrk::IMarlinTrack.

Definition at line 156 of file MarlinDDKalTestTrack.cc.

References _fitDirection, _initialised, _kalhits, _kaltrack, _ktest, std::endl(), MarlinTrk::IMarlinTrack::error, M_PI, std::scientific(), std::setprecision(), std::sqrt(), MarlinTrk::IMarlinTrack::success, and toBaseRange().

int MarlinTrk::MarlinDDKalTestTrack::initialise ( const EVENT::TrackState ts,
double  ,
bool  fitDirection 
)
privatevirtual

initialise the fit with a track state 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 ) Note: the bfield_z is not taken from the argument but from the first hit should consider changing the interface ...

Implements MarlinTrk::IMarlinTrack.

Definition at line 346 of file MarlinDDKalTestTrack.cc.

References _fitDirection, _initialised, _kalhits, _kaltrack, _ktest, std::endl(), MarlinTrk::IMarlinTrack::error, MarlinTrk::IMarlinTrack::forward, EVENT::TrackState::getCovMatrix(), EVENT::TrackState::getD0(), EVENT::TrackState::getOmega(), EVENT::TrackState::getPhi(), EVENT::TrackState::getReferencePoint(), EVENT::TrackState::getTanLambda(), EVENT::TrackState::getZ0(), M_PI, std::sqrt(), MarlinTrk::IMarlinTrack::success, and toBaseRange().

int MarlinTrk::MarlinDDKalTestTrack::intersectionWithDetElement ( int  detElementID,
Vector3D point,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit to numbered sensitive detector element, returning intersection point in global coordinates via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1359 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by extrapolateToDetElement(), intersectionWithDetElement(), and propagateToDetElement().

int MarlinTrk::MarlinDDKalTestTrack::intersectionWithDetElement ( int  detElementID,
EVENT::TrackerHit hit,
Vector3D point,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit at the measurement site associated with the given hit, to sensitive detector element, returning intersection point in global coordinates via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1369 of file MarlinDDKalTestTrack.cc.

References getSiteFromLCIOHit(), intersectionWithDetElement(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::intersectionWithDetElement ( int  detElementID,
const TKalTrackSite &  site,
Vector3D point,
const DDVMeasLayer *&  ml,
int  mode = modeClosest 
)
private
int MarlinTrk::MarlinDDKalTestTrack::intersectionWithLayer ( int  layerID,
Vector3D point,
int &  detElementID,
int  mode = modeClosest 
)
privatevirtual

extrapolate the fit to numbered sensitive layer, returning intersection point in global coordinates and integer ID of the intersected sensitive detector element via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1426 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by extrapolateToLayer(), intersectionWithLayer(), and propagateToLayer().

int MarlinTrk::MarlinDDKalTestTrack::intersectionWithLayer ( int  layerID,
EVENT::TrackerHit hit,
Vector3D point,
int &  detElementID,
int  mode = modeClosest 
)
privatevirtual

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

Implements MarlinTrk::IMarlinTrack.

Definition at line 1435 of file MarlinDDKalTestTrack.cc.

References getSiteFromLCIOHit(), intersectionWithLayer(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::intersectionWithLayer ( int  layerID,
const TKalTrackSite &  site,
Vector3D point,
int &  detElementID,
const DDVMeasLayer *&  ml,
int  mode = modeClosest 
)
private

extrapolate the fit at the measurement site, to numbered sensitive layer, returning intersection point in global coordinates and integer ID of the intersected sensitive detector element via reference

Definition at line 1448 of file MarlinDDKalTestTrack.cc.

References _ktest, MarlinTrk::cellIDString(), std::endl(), findIntersection(), MarlinTrk::MarlinDDKalTest::getSensitiveMeasurementModulesForLayer(), MarlinTrk::IMarlinTrack::no_intersection, dd4hep::rec::Vector3D::rho(), std::vector< T >::size(), MarlinTrk::IMarlinTrack::success, dd4hep::rec::Vector3D::x(), dd4hep::rec::Vector3D::y(), and dd4hep::rec::Vector3D::z().

MarlinDDKalTestTrack& MarlinTrk::MarlinDDKalTestTrack::operator= ( const MarlinDDKalTestTrack )
private
int MarlinTrk::MarlinDDKalTestTrack::propagate ( const Vector3D point,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
privatevirtual

propagate the fit to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1172 of file MarlinDDKalTestTrack.cc.

References _kaltrack, _ktest, MarlinTrk::MarlinDDKalTest::getIPLayer(), and dd4hep::rec::Vector3D::r().

Referenced by propagate(), propagateToDetElement(), and propagateToLayer().

int MarlinTrk::MarlinDDKalTestTrack::propagate ( const Vector3D point,
EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
)
privatevirtual

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

Implements MarlinTrk::IMarlinTrack.

Definition at line 1184 of file MarlinDDKalTestTrack.cc.

References _ktest, MarlinTrk::MarlinDDKalTest::getIPLayer(), getSiteFromLCIOHit(), propagate(), dd4hep::rec::Vector3D::r(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::propagate ( const Vector3D point,
const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
const DDVMeasLayer *  ml = 0 
)
private

propagate the fit at the provided measurement site, to the point of closest approach to the given point, returning TrackState, chi2 and ndf via reference

Definition at line 1205 of file MarlinDDKalTestTrack.cc.

References MarlinTrk::MarlinDDKalTest::_det, _ktest, std::endl(), MarlinTrk::MarlinDDKalTest::getLastMeasLayer(), MarlinTrk::IMarlinTrack::success, ToLCIOTrackState(), dd4hep::rec::Vector3D::x(), dd4hep::rec::Vector3D::y(), and dd4hep::rec::Vector3D::z().

int MarlinTrk::MarlinDDKalTestTrack::propagateToDetElement ( int  detElementID,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int  mode = modeClosest 
)
privatevirtual

propagate the fit to sensitive detector element, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1322 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by propagateToDetElement().

int MarlinTrk::MarlinDDKalTestTrack::propagateToDetElement ( int  detEementID,
EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int  mode = modeClosest 
)
privatevirtual

propagate the fit at the measurement site associated with the given hit, to sensitive detector element, returning TrackState, chi2 and ndf via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1331 of file MarlinDDKalTestTrack.cc.

References getSiteFromLCIOHit(), propagateToDetElement(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::propagateToDetElement ( int  detEementID,
const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int  mode = modeClosest 
)
private

propagate the fit at the measurement site, to sensitive detector element, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Definition at line 1343 of file MarlinDDKalTestTrack.cc.

References std::endl(), intersectionWithDetElement(), and propagate().

int MarlinTrk::MarlinDDKalTestTrack::propagateToLayer ( int  layerID,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int &  detElementID,
int  mode = modeClosest 
)
privatevirtual

propagate the fit to the numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1284 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

Referenced by propagateToLayer().

int MarlinTrk::MarlinDDKalTestTrack::propagateToLayer ( int  layerID,
EVENT::TrackerHit hit,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int &  detElementID,
int  mode = modeClosest 
)
privatevirtual

propagate the fit at the measurement site associated with the given hit, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Implements MarlinTrk::IMarlinTrack.

Definition at line 1293 of file MarlinDDKalTestTrack.cc.

References getSiteFromLCIOHit(), propagateToLayer(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::propagateToLayer ( int  layerID,
const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf,
int &  detElementID,
int  mode = modeClosest 
)
private

propagate the fit at the measurement site, to numbered sensitive layer, returning TrackState, chi2, ndf and integer ID of sensitive detector element via reference

Definition at line 1305 of file MarlinDDKalTestTrack.cc.

References std::endl(), intersectionWithLayer(), propagate(), and MarlinTrk::IMarlinTrack::success.

void MarlinTrk::MarlinDDKalTestTrack::setMass ( double  mass)
privatevirtual

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.

Implements MarlinTrk::IMarlinTrack.

Definition at line 110 of file MarlinDDKalTestTrack.cc.

References _kaltrack.

int MarlinTrk::MarlinDDKalTestTrack::smooth ( )
privatevirtual

smooth all track states

Implements MarlinTrk::IMarlinTrack.

Definition at line 899 of file MarlinDDKalTestTrack.cc.

References _kaltrack, _smoothed, std::endl(), and MarlinTrk::IMarlinTrack::success.

Referenced by fit().

int MarlinTrk::MarlinDDKalTestTrack::smooth ( EVENT::TrackerHit hit)
privatevirtual

smooth track states from the last filtered hit back to the measurement site associated with the given hit

Implements MarlinTrk::IMarlinTrack.

Definition at line 923 of file MarlinDDKalTestTrack.cc.

References _kaltrack, _smoothed, MarlinTrk::IMarlinTrack::bad_intputs, std::endl(), getSiteFromLCIOHit(), and MarlinTrk::IMarlinTrack::success.

int MarlinTrk::MarlinDDKalTestTrack::testChi2Increment ( EVENT::TrackerHit hit,
double &  chi2increment 
)
privatevirtual

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

Implements MarlinTrk::IMarlinTrack.

Definition at line 763 of file MarlinDDKalTestTrack.cc.

References _ktest, addAndFit(), MarlinTrk::IMarlinTrack::bad_intputs, MarlinTrk::cellIDString(), std::endl(), MarlinTrk::MarlinDDKalTest::findMeasLayer(), EVENT::TrackerHit::getCellID0(), and EVENT::TrackerHit::getPosition().

double MarlinTrk::MarlinDDKalTestTrack::toBaseRange ( double  phi) const
inlineprivate

helper function to restrict the range of the azimuthal angle to ]-pi,pi]

Definition at line 330 of file MarlinDDKalTestTrack.h.

References M_PI.

Referenced by initialise(), and ToLCIOTrackState().

void MarlinTrk::MarlinDDKalTestTrack::ToLCIOTrackState ( const TKalTrackSite &  site,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
) const
private

fill LCIO Track State with parameters from helix and cov matrix

Definition at line 1674 of file MarlinDDKalTestTrack.cc.

Referenced by extrapolate(), getTrackState(), and propagate().

void MarlinTrk::MarlinDDKalTestTrack::ToLCIOTrackState ( const THelicalTrack &  helix,
const TMatrixD &  cov,
IMPL::TrackStateImpl ts,
double &  chi2,
int &  ndf 
) const
private
std::string MarlinTrk::MarlinDDKalTestTrack::toString ( )
privatevirtual

Dump this track to a string for debugging.

Reimplemented from MarlinTrk::IMarlinTrack.

Definition at line 1693 of file MarlinDDKalTestTrack.cc.

References _kaltrack, std::endl(), std::stringstream::str(), and MarlinTrk::IMarlinTrack::toString().

Member Data Documentation

bool MarlinTrk::MarlinDDKalTestTrack::_fitDirection =false
private

used to store the fit direction supplied to intialise

Definition at line 357 of file MarlinDDKalTestTrack.h.

Referenced by fit(), initialise(), and MarlinDDKalTestTrack().

std::vector< std::pair<EVENT::TrackerHit*, double> > MarlinTrk::MarlinDDKalTestTrack::_hit_chi2_values {}
private

vector to store the chi-sqaure increment for measurement sites

Definition at line 378 of file MarlinDDKalTestTrack.h.

Referenced by addAndFit(), fit(), and getHitsInFit().

std::vector<EVENT::TrackerHit*> MarlinTrk::MarlinDDKalTestTrack::_hit_not_used_for_sites {}
private

vector to store lcio hits rejected for measurement sites

Definition at line 374 of file MarlinDDKalTestTrack.h.

Referenced by fit(), and getSiteFromLCIOHit().

std::map<EVENT::TrackerHit*,TKalTrackSite*> MarlinTrk::MarlinDDKalTestTrack::_hit_used_for_sites {}
private

map to store relation between lcio hits and measurement sites

Definition at line 366 of file MarlinDDKalTestTrack.h.

Referenced by addAndFit(), fit(), and getSiteFromLCIOHit().

int MarlinTrk::MarlinDDKalTestTrack::_hitIndexAtPositiveNDF =-1
private

Definition at line 349 of file MarlinDDKalTestTrack.h.

Referenced by addAndFit(), fit(), and MarlinDDKalTestTrack().

bool MarlinTrk::MarlinDDKalTestTrack::_initialised =false
private

used to store whether initial track state has been supplied or created

Definition at line 353 of file MarlinDDKalTestTrack.h.

Referenced by addAndFit(), fit(), getNDF(), initialise(), and MarlinDDKalTestTrack().

TObjArray* MarlinTrk::MarlinDDKalTestTrack::_kalhits =nullptr
private
TKalTrack* MarlinTrk::MarlinDDKalTestTrack::_kaltrack =nullptr
private
MarlinDDKalTest* MarlinTrk::MarlinDDKalTestTrack::_ktest =nullptr
private
std::map<EVENT::TrackerHit*,DDVTrackHit*> MarlinTrk::MarlinDDKalTestTrack::_lcio_hits_to_kaltest_hits {}
private

map to store relation between lcio hits kaltest hits

Definition at line 370 of file MarlinDDKalTestTrack.h.

Referenced by addHit().

EVENT::TrackerHitVec MarlinTrk::MarlinDDKalTestTrack::_lcioHits {}
private

Definition at line 342 of file MarlinDDKalTestTrack.h.

std::vector< std::pair<EVENT::TrackerHit*, double> > MarlinTrk::MarlinDDKalTestTrack::_outlier_chi2_values {}
private

vector to store the chi-sqaure increment for measurement sites

Definition at line 382 of file MarlinDDKalTestTrack.h.

Referenced by addAndFit(), fit(), and getOutliers().

bool MarlinTrk::MarlinDDKalTestTrack::_smoothed =false
private

used to store whether smoothing has been performed

Definition at line 362 of file MarlinDDKalTestTrack.h.

Referenced by MarlinDDKalTestTrack(), and smooth().

EVENT::TrackerHit* MarlinTrk::MarlinDDKalTestTrack::_trackHitAtPositiveNDF =nullptr
private

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