GENFIT  Rev:NoNumberAvailable
Public Member Functions | Private Member Functions | Private Attributes | List of all members
genfit::Track Class Reference

Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects. More...

#include <Track.h>

Inheritance diagram for genfit::Track:
Inheritance graph
Collaboration diagram for genfit::Track:
Collaboration graph

Public Member Functions

 Track ()
 
 Track (const TrackCand &trackCand, const MeasurementFactory< genfit::AbsMeasurement > &factory, AbsTrackRep *rep=NULL)
 
 Track (AbsTrackRep *trackRep, const TVectorD &stateSeed)
 
 Track (AbsTrackRep *trackRep, const TVector3 &posSeed, const TVector3 &momSeed)
 
 Track (AbsTrackRep *trackRep, const TVectorD &stateSeed, const TMatrixDSym &covSeed)
 
 Track (const Track &)
 
Trackoperator= (Track)
 
void swap (Track &other)
 
virtual ~Track ()
 
virtual void Clear (Option_t *="")
 
void createMeasurements (const TrackCand &trackCand, const MeasurementFactory< genfit::AbsMeasurement > &factory)
 
TrackPointgetPoint (int id) const
 
const std::vector< genfit::TrackPoint * > & getPoints () const
 
unsigned int getNumPoints () const
 
TrackPointgetPointWithMeasurement (int id) const
 
const std::vector< genfit::TrackPoint * > & getPointsWithMeasurement () const
 
unsigned int getNumPointsWithMeasurement () const
 
TrackPointgetPointWithMeasurementAndFitterInfo (int id, const AbsTrackRep *rep=NULL) const
 
TrackPointgetPointWithFitterInfo (int id, const AbsTrackRep *rep=NULL) const
 
const MeasuredStateOnPlanegetFittedState (int id=0, const AbsTrackRep *rep=NULL, bool biased=true) const
 Shortcut to get FittedStates. More...
 
AbsTrackRepgetTrackRep (int id) const
 
unsigned int getNumReps () const
 
int getIdForRep (const AbsTrackRep *rep) const
 This is used when streaming TrackPoints. More...
 
AbsTrackRepgetCardinalRep () const
 Get cardinal track representation. More...
 
unsigned int getCardinalRepId () const
 
int getMcTrackId () const
 Get the MCT track id, for MC simulations - default value = -1. More...
 
bool hasFitStatus (const AbsTrackRep *rep=NULL) const
 Check if track has a FitStatus for given AbsTrackRep. Per default, check for cardinal rep. More...
 
FitStatusgetFitStatus (const AbsTrackRep *rep=NULL) const
 Get FitStatus for a AbsTrackRep. Per default, return FitStatus for cardinalRep. More...
 
bool hasKalmanFitStatus (const AbsTrackRep *rep=NULL) const
 Check if track has a KalmanFitStatus for given AbsTrackRep. Per default, check for cardinal rep. More...
 
KalmanFitStatusgetKalmanFitStatus (const AbsTrackRep *rep=NULL) const
 If FitStatus is a KalmanFitStatus, return it. Otherwise return NULL. More...
 
void setFitStatus (FitStatus *fitStatus, const AbsTrackRep *rep)
 
double getTimeSeed () const
 
void setTimeSeed (double time)
 
const TVectorD & getStateSeed () const
 
void setStateSeed (const TVectorD &s)
 
void setStateSeed (const TVector3 &pos, const TVector3 &mom)
 
const TMatrixDSym & getCovSeed () const
 
void setCovSeed (const TMatrixDSym &c)
 
void setMcTrackId (int i)
 Set the MCT track id, for MC simulations. More...
 
void insertPoint (TrackPoint *point, int id=-1)
 Insert TrackPoint BEFORE TrackPoint with position id, if id >= 0. More...
 
void insertPoints (std::vector< genfit::TrackPoint * > points, int id=-1)
 Insert TrackPoints BEFORE TrackPoint with position id, if id >= 0. More...
 
void deletePoint (int id)
 
void insertMeasurement (AbsMeasurement *measurement, int id=-1)
 Creates a new TrackPoint containing the measurement, and adds it to the track. More...
 
void mergeTrack (const Track *other, int id=-1)
 Merge two tracks. More...
 
void addTrackRep (AbsTrackRep *trackRep)
 
void deleteTrackRep (int id)
 Delete a AbsTrackRep and all corresponding AbsFitterInfo objects in every TrackPoint. More...
 
void setCardinalRep (int id)
 
void determineCardinalRep ()
 See with which AbsTrackRep the track was fitted best (converged fit w/ smallest chi2) and set the cardinal rep accordingly. More...
 
bool sort ()
 Sort TrackPoint and according to their sorting parameters. More...
 
bool udpateSeed (int id=0, AbsTrackRep *rep=NULL, bool biased=true)
 
void reverseTrackPoints ()
 Flip the ordering of the TrackPoints. More...
 
void reverseMomSeed ()
 Flip direction of momentum seed. More...
 
void switchPDGSigns (AbsTrackRep *rep=NULL)
 Switch the pdg signs of specified rep (of all reps if rep == NULL). More...
 
void reverseTrack ()
 Make track ready to be fitted in reverse direction. More...
 
void deleteForwardInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
 
void deleteBackwardInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
 
void deleteReferenceInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
 
void deleteMeasurementInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
 
void deleteFitterInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
 
double getTrackLen (AbsTrackRep *rep=NULL, int startId=0, int endId=-1) const
 get TrackLength between to trackPoints (if NULL, for cardinal rep) More...
 
double getTOF (AbsTrackRep *rep=NULL, int startId=0, int endId=-1) const
 get time of flight in ns between to trackPoints (if NULL, for cardinal rep) More...
 
TrackCandconstructTrackCand () const
 Construct a new TrackCand containing the hit IDs of the measurements. More...
 
void fixWeights (AbsTrackRep *rep=NULL, int startId=0, int endId=-1)
 
void prune (const Option_t *="CFLWRMIU")
 Delete unneeded information from the Track. More...
 
void Print (const Option_t *="") const
 
bool checkConsistency () const
 

Private Member Functions

void trackHasChanged ()
 
void fillPointsWithMeasurement ()
 

Private Attributes

std::vector< AbsTrackRep * > trackReps_
 
unsigned int cardinalRep_
 
std::vector< TrackPoint * > trackPoints_
 
std::vector< TrackPoint * > trackPointsWithMeasurement_
 
std::map< const AbsTrackRep *, FitStatus * > fitStatuses_
 helper More...
 
int mcTrackId_
 
double timeSeed_
 
TVectorD stateSeed_
 
TMatrixDSym covSeed_
 

Detailed Description

Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.

Holds a number of AbsTrackRep objects, which correspond to the different particle hypotheses or track models which should be fitted. A 6D seed stateSeed_ (x,y,z,p_x,p_y,p_z) and 6x6 covSeed_ should be provided as start values for fitting. When fitting the Track with a AbsFitter, a FitStatus object will be created, containing information about the fit. The fitted states will be stored in AbsFitterInfo objects in every TrackPoints.

The fit will be performed for every AbsTrackRep, so after the fit there will be one AbsFitterInfo for each AbsTrackRep in every TrackPoint, as well as one FitStatus for every AbsTrackRep.

Definition at line 71 of file Track.h.

Constructor & Destructor Documentation

◆ Track() [1/6]

genfit::Track::Track ( )

Definition at line 45 of file Track.cc.

◆ Track() [2/6]

genfit::Track::Track ( const TrackCand trackCand,
const MeasurementFactory< genfit::AbsMeasurement > &  factory,
AbsTrackRep rep = NULL 
)

@ brief Construct Track from TrackCand, using a MeasurementFactory

The MeasurementFactory will be used to create AbsMeasuremen objects. TrackPoints will be created. If two or more consecutive PlanarMeasurement objects with the same detector- and planeId are created by the factory, they will be put into the same TrackPoint.

Optionally, a AbsTrackRep can be provided.

The stateSeed_ of the Track will be filled with the seed of the TrackCand. A guess for covSeed_ will be made using the largest entry of the cov of the first measurement and the number of measurements (For the covSeed_, it is just important that it will be big enough not to bias the fit too much, but not too big in order to avoid numerical problems).

Definition at line 52 of file Track.cc.

References addTrackRep(), checkConsistency(), covSeed_, createMeasurements(), fillPointsWithMeasurement(), genfit::TrackCand::getCovSeed(), genfit::TrackCand::getMcTrackId(), genfit::TrackCand::getStateSeed(), genfit::TrackCand::getTimeSeed(), mcTrackId_, stateSeed_, and timeSeed_.

◆ Track() [3/6]

genfit::Track::Track ( AbsTrackRep trackRep,
const TVectorD &  stateSeed 
)

Definition at line 96 of file Track.cc.

References addTrackRep().

◆ Track() [4/6]

genfit::Track::Track ( AbsTrackRep trackRep,
const TVector3 &  posSeed,
const TVector3 &  momSeed 
)

Definition at line 104 of file Track.cc.

References addTrackRep(), and setStateSeed().

◆ Track() [5/6]

genfit::Track::Track ( AbsTrackRep trackRep,
const TVectorD &  stateSeed,
const TMatrixDSym &  covSeed 
)

Definition at line 113 of file Track.cc.

References addTrackRep().

◆ Track() [6/6]

genfit::Track::Track ( const Track rhs)

◆ ~Track()

genfit::Track::~Track ( )
virtual

Definition at line 180 of file Track.cc.

References Clear().

Member Function Documentation

◆ addTrackRep()

void genfit::Track::addTrackRep ( AbsTrackRep trackRep)

Definition at line 562 of file Track.cc.

References fitStatuses_, and trackReps_.

Referenced by Track().

◆ checkConsistency()

bool genfit::Track::checkConsistency ( ) const

◆ Clear()

void genfit::Track::Clear ( Option_t *  = "")
virtual

◆ constructTrackCand()

TrackCand * genfit::Track::constructTrackCand ( ) const

Construct a new TrackCand containing the hit IDs of the measurements.

The idea is hat you can get a TrackCand for storing the hit IDs after a track has been fitted. His could have been reordered, added or removed, so that the original TackCand no longer represents the Track correctly. You might want to call determineCardinalRep() and/or udpateSeed() before.

Definition at line 932 of file Track.cc.

References genfit::TrackCand::addHit(), covSeed_, getCardinalRep(), genfit::AbsMeasurement::getDetId(), genfit::AbsMeasurement::getHitId(), genfit::AbsMeasurement::getLeftRightResolution(), genfit::TrackCandHit::getPlaneId(), genfit::TrackPoint::getRawMeasurements(), genfit::TrackPoint::getSortingParameter(), genfit::AbsMeasurement::isLeftRightMeasurement(), mcTrackId_, genfit::TrackCand::setCovSeed(), genfit::TrackCand::setMcTrackId(), genfit::TrackCand::setTime6DSeedAndPdgCode(), stateSeed_, timeSeed_, and trackPointsWithMeasurement_.

◆ createMeasurements()

void genfit::Track::createMeasurements ( const TrackCand trackCand,
const MeasurementFactory< genfit::AbsMeasurement > &  factory 
)

◆ deleteBackwardInfo()

void genfit::Track::deleteBackwardInfo ( int  startId = 0,
int  endId = -1,
const AbsTrackRep rep = NULL 
)

◆ deleteFitterInfo()

void genfit::Track::deleteFitterInfo ( int  startId = 0,
int  endId = -1,
const AbsTrackRep rep = NULL 
)

Definition at line 858 of file Track.cc.

References genfit::debugOut, trackHasChanged(), trackPoints_, and trackReps_.

◆ deleteForwardInfo()

void genfit::Track::deleteForwardInfo ( int  startId = 0,
int  endId = -1,
const AbsTrackRep rep = NULL 
)

◆ deleteMeasurementInfo()

void genfit::Track::deleteMeasurementInfo ( int  startId = 0,
int  endId = -1,
const AbsTrackRep rep = NULL 
)

Definition at line 828 of file Track.cc.

References genfit::debugOut, trackHasChanged(), and trackPoints_.

Referenced by prune().

◆ deletePoint()

void genfit::Track::deletePoint ( int  id)

◆ deleteReferenceInfo()

void genfit::Track::deleteReferenceInfo ( int  startId = 0,
int  endId = -1,
const AbsTrackRep rep = NULL 
)

◆ deleteTrackRep()

void genfit::Track::deleteTrackRep ( int  id)

Delete a AbsTrackRep and all corresponding AbsFitterInfo objects in every TrackPoint.

Definition at line 568 of file Track.cc.

References cardinalRep_, fitStatuses_, trackPoints_, and trackReps_.

Referenced by prune().

◆ determineCardinalRep()

void genfit::Track::determineCardinalRep ( )

See with which AbsTrackRep the track was fitted best (converged fit w/ smallest chi2) and set the cardinal rep accordingly.

Definition at line 609 of file Track.cc.

References fitStatuses_, getIdForRep(), setCardinalRep(), and trackReps_.

◆ fillPointsWithMeasurement()

void genfit::Track::fillPointsWithMeasurement ( )
private

◆ fixWeights()

void genfit::Track::fixWeights ( AbsTrackRep rep = NULL,
int  startId = 0,
int  endId = -1 
)

Helper function: For all KalmanFitterInfos belonging to rep (if NULL, for all reps), call the fixWeights() function, so that e.g. the DAF will not alter weights anymore.

Definition at line 1001 of file Track.cc.

References genfit::KalmanFitterInfo::fixWeights(), and trackPoints_.

◆ getCardinalRep()

AbsTrackRep* genfit::Track::getCardinalRep ( ) const
inline

Get cardinal track representation.

The user has to choose which AbsTrackRep should be considered the best one after the fit. E.g. the track representation giving the smallest chi2 could be chosen. By default the first in the list is returned.

See also
determineCardinalRep()

Definition at line 143 of file Track.h.

References cardinalRep_, and trackReps_.

Referenced by constructTrackCand(), getFitStatus(), getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::GFRaveTrackParameters::getPdg(), getPointWithFitterInfo(), getPointWithMeasurementAndFitterInfo(), getTOF(), getTrackLen(), hasFitStatus(), hasKalmanFitStatus(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::AbsFitter::processTrack(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitter::processTrackWithRep(), and genfit::GFGbl::processTrackWithRep().

◆ getCardinalRepId()

unsigned int genfit::Track::getCardinalRepId ( ) const
inline

Definition at line 144 of file Track.h.

References cardinalRep_.

◆ getCovSeed()

const TMatrixDSym& genfit::Track::getCovSeed ( ) const
inline

◆ getFitStatus()

FitStatus* genfit::Track::getFitStatus ( const AbsTrackRep rep = NULL) const
inline

◆ getFittedState()

const MeasuredStateOnPlane & genfit::Track::getFittedState ( int  id = 0,
const AbsTrackRep rep = NULL,
bool  biased = true 
) const

Shortcut to get FittedStates.

Uses getPointWithFitterInfo(id, rep). Gets the fitted state at trackpoint id for the track representation rep. Per default, the fitted state of the fitterInfo of the first TrackPoint with one or more AbsFitterInfo objects is returned. If no AbsTrackRep is specified, the AbsFitterInfo of the cardinal rep will be used.

Definition at line 288 of file Track.cc.

References getCardinalRep(), genfit::AbsFitterInfo::getFittedState(), genfit::TrackPoint::getFitterInfo(), getPointWithFitterInfo(), and genfit::Exception::setFatal().

Referenced by genfit::GFTrackToTrack(), genfit::GblFitter::processTrackWithRep(), and udpateSeed().

◆ getIdForRep()

int genfit::Track::getIdForRep ( const AbsTrackRep rep) const

This is used when streaming TrackPoints.

Definition at line 302 of file Track.cc.

References genfit::Exception::setFatal(), and trackReps_.

Referenced by checkConsistency(), determineCardinalRep(), Print(), and genfit::KalmanFitterRefTrack::processTrackWithRep().

◆ getKalmanFitStatus()

KalmanFitStatus * genfit::Track::getKalmanFitStatus ( const AbsTrackRep rep = NULL) const

If FitStatus is a KalmanFitStatus, return it. Otherwise return NULL.

Definition at line 336 of file Track.cc.

References getFitStatus().

◆ getMcTrackId()

int genfit::Track::getMcTrackId ( ) const
inline

Get the MCT track id, for MC simulations - default value = -1.

Definition at line 147 of file Track.h.

References mcTrackId_.

◆ getNumPoints()

unsigned int genfit::Track::getNumPoints ( ) const
inline

◆ getNumPointsWithMeasurement()

unsigned int genfit::Track::getNumPointsWithMeasurement ( ) const
inline

◆ getNumReps()

unsigned int genfit::Track::getNumReps ( ) const
inline

Definition at line 131 of file Track.h.

References trackReps_.

Referenced by genfit::AbsFitter::processTrack().

◆ getPoint()

TrackPoint * genfit::Track::getPoint ( int  id) const

◆ getPoints()

const std::vector< genfit::TrackPoint* >& genfit::Track::getPoints ( ) const
inline

Definition at line 109 of file Track.h.

References trackPoints_.

◆ getPointsWithMeasurement()

const std::vector< genfit::TrackPoint* >& genfit::Track::getPointsWithMeasurement ( ) const
inline

◆ getPointWithFitterInfo()

TrackPoint * genfit::Track::getPointWithFitterInfo ( int  id,
const AbsTrackRep rep = NULL 
) const

Definition at line 258 of file Track.cc.

References getCardinalRep(), and trackPoints_.

Referenced by genfit::KalmanFitterInfo::getFittedState(), getFittedState(), and prune().

◆ getPointWithMeasurement()

TrackPoint * genfit::Track::getPointWithMeasurement ( int  id) const

◆ getPointWithMeasurementAndFitterInfo()

TrackPoint * genfit::Track::getPointWithMeasurementAndFitterInfo ( int  id,
const AbsTrackRep rep = NULL 
) const

◆ getStateSeed()

const TVectorD& genfit::Track::getStateSeed ( ) const
inline

◆ getTimeSeed()

double genfit::Track::getTimeSeed ( ) const
inline

◆ getTOF()

double genfit::Track::getTOF ( AbsTrackRep rep = NULL,
int  startId = 0,
int  endId = -1 
) const

get time of flight in ns between to trackPoints (if NULL, for cardinal rep)

Definition at line 968 of file Track.cc.

References getCardinalRep(), genfit::AbsFitterInfo::getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::AbsTrackRep::getTime(), genfit::TrackPoint::hasFitterInfo(), and trackPoints_.

◆ getTrackLen()

double genfit::Track::getTrackLen ( AbsTrackRep rep = NULL,
int  startId = 0,
int  endId = -1 
) const

get TrackLength between to trackPoints (if NULL, for cardinal rep)

Definition at line 889 of file Track.cc.

References genfit::AbsTrackRep::extrapolateToPlane(), getCardinalRep(), genfit::StateOnPlane::getPlane(), and trackPoints_.

◆ getTrackRep()

AbsTrackRep* genfit::Track::getTrackRep ( int  id) const
inline

Definition at line 130 of file Track.h.

References trackReps_.

Referenced by genfit::TrackPoint::fixupRepsForReading(), and genfit::AbsFitter::processTrack().

◆ hasFitStatus()

bool genfit::Track::hasFitStatus ( const AbsTrackRep rep = NULL) const

Check if track has a FitStatus for given AbsTrackRep. Per default, check for cardinal rep.

Definition at line 314 of file Track.cc.

References fitStatuses_, and getCardinalRep().

◆ hasKalmanFitStatus()

bool genfit::Track::hasKalmanFitStatus ( const AbsTrackRep rep = NULL) const

Check if track has a KalmanFitStatus for given AbsTrackRep. Per default, check for cardinal rep.

Definition at line 325 of file Track.cc.

References fitStatuses_, and getCardinalRep().

◆ insertMeasurement()

void genfit::Track::insertMeasurement ( AbsMeasurement measurement,
int  id = -1 
)

Creates a new TrackPoint containing the measurement, and adds it to the track.

Definition at line 508 of file Track.cc.

References insertPoint().

◆ insertPoint()

void genfit::Track::insertPoint ( TrackPoint point,
int  id = -1 
)

Insert TrackPoint BEFORE TrackPoint with position id, if id >= 0.

Id -1 means after last TrackPoint. Id -2 means before last TrackPoint. ... Also deletes backwardInfos before new point and forwardInfos after new point. Also sets Track backpointer of point accordingly.

Definition at line 363 of file Track.cc.

References genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), genfit::TrackPoint::hasRawMeasurements(), genfit::TrackPoint::setTrack(), trackHasChanged(), trackPoints_, and trackPointsWithMeasurement_.

Referenced by genfit::GblFitter::constructGblInfo(), createMeasurements(), insertMeasurement(), and insertPoints().

◆ insertPoints()

void genfit::Track::insertPoints ( std::vector< genfit::TrackPoint * >  points,
int  id = -1 
)

Insert TrackPoints BEFORE TrackPoint with position id, if id >= 0.

Id -1 means after last TrackPoint. Id -2 means before last TrackPoint. ... Also deletes backwardInfos before and for new points and forwardInfos after and for new points. Also sets Track backpointers of points accordingly.

Definition at line 423 of file Track.cc.

References deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), getNumPoints(), insertPoint(), and trackPoints_.

Referenced by mergeTrack().

◆ mergeTrack()

void genfit::Track::mergeTrack ( const Track other,
int  id = -1 
)

Merge two tracks.

The TrackPoint objects of other will be cloned and inserted after id (per default, they will be appended at the end). The other Track will not be altered, the TrackPoint objects will be (deep) copied. Only copies the TrackPoint objects, NOT the AbsTrackRep, FitStatus, seed state and other objects of the other track.

Definition at line 513 of file Track.cc.

References genfit::debugOut, getNumPoints(), insertPoints(), genfit::Exception::setFatal(), trackPoints_, and trackReps_.

◆ operator=()

Track & genfit::Track::operator= ( Track  other)

Definition at line 152 of file Track.cc.

References checkConsistency(), fillPointsWithMeasurement(), swap(), and trackPoints_.

◆ Print()

void genfit::Track::Print ( const Option_t *  option = "") const

◆ prune()

void genfit::Track::prune ( const Option_t *  option = "CFLWRMIU")

Delete unneeded information from the Track.

Possible options: (see also PruneFlags defined in FitStatus.h) C: prune all reps except cardinalRep F: prune all points except first point (also prune referenceInfo from fitterInfos) L: prune all points except last point (also prune referenceInfo from fitterInfos) FL: prune all points except first and last point (also prune referenceInfo from fitterInfos) W: prune rawMeasurements from TrackPoints R: prune referenceInfo from fitterInfos M: prune measurementInfo from fitterInfos I: if F, L, or FL is set, prune forward (backward) info of first (last) point U: if fitterInfo is a KalmanFitterInfo, prune predictions and keep updates

Definition at line 1034 of file Track.cc.

References cardinalRep_, genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteMeasurementInfo(), deleteReferenceInfo(), deleteTrackRep(), fillPointsWithMeasurement(), fitStatuses_, getPointWithFitterInfo(), genfit::PruneFlags::hasFlags(), Print(), genfit::PruneFlags::setFlags(), trackPoints_, and trackReps_.

◆ reverseMomSeed()

void genfit::Track::reverseMomSeed ( )
inline

Flip direction of momentum seed.

Definition at line 231 of file Track.h.

References stateSeed_.

Referenced by reverseTrack().

◆ reverseTrack()

void genfit::Track::reverseTrack ( )

Make track ready to be fitted in reverse direction.

Flip the order of TrackPoints and the momentum direction of the seed state. If possible, take the smoothed state of the last hit as new seed state. Flip charge of the TrackReps.

Definition at line 730 of file Track.cc.

References reverseMomSeed(), reverseTrackPoints(), switchPDGSigns(), and udpateSeed().

◆ reverseTrackPoints()

void genfit::Track::reverseTrackPoints ( )

Flip the ordering of the TrackPoints.

Definition at line 706 of file Track.cc.

References deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), and trackPoints_.

Referenced by reverseTrack().

◆ setCardinalRep()

void genfit::Track::setCardinalRep ( int  id)

Definition at line 595 of file Track.cc.

References cardinalRep_, genfit::errorOut, and trackReps_.

Referenced by determineCardinalRep().

◆ setCovSeed()

void genfit::Track::setCovSeed ( const TMatrixDSym &  c)
inline

Definition at line 169 of file Track.h.

References covSeed_.

Referenced by udpateSeed().

◆ setFitStatus()

void genfit::Track::setFitStatus ( FitStatus fitStatus,
const AbsTrackRep rep 
)

◆ setMcTrackId()

void genfit::Track::setMcTrackId ( int  i)
inline

Set the MCT track id, for MC simulations.

Definition at line 172 of file Track.h.

References mcTrackId_.

◆ setStateSeed() [1/2]

void genfit::Track::setStateSeed ( const TVector3 &  pos,
const TVector3 &  mom 
)

Definition at line 349 of file Track.cc.

References stateSeed_.

◆ setStateSeed() [2/2]

void genfit::Track::setStateSeed ( const TVectorD &  s)
inline

Definition at line 165 of file Track.h.

References stateSeed_.

Referenced by Track(), and udpateSeed().

◆ setTimeSeed()

void genfit::Track::setTimeSeed ( double  time)
inline

Definition at line 162 of file Track.h.

References timeSeed_.

Referenced by udpateSeed().

◆ sort()

bool genfit::Track::sort ( )

Sort TrackPoint and according to their sorting parameters.

Returns if the order of the TrackPoint has actually changed.

Definition at line 634 of file Track.cc.

References genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), trackHasChanged(), and trackPoints_.

Referenced by genfit::KalmanFitterRefTrack::processTrackWithRep(), and genfit::GblFitter::sortHits().

◆ swap()

void genfit::Track::swap ( Track other)

◆ switchPDGSigns()

void genfit::Track::switchPDGSigns ( AbsTrackRep rep = NULL)

Switch the pdg signs of specified rep (of all reps if rep == NULL).

Definition at line 718 of file Track.cc.

References genfit::AbsTrackRep::switchPDGSign(), and trackReps_.

Referenced by reverseTrack().

◆ trackHasChanged()

void genfit::Track::trackHasChanged ( )
private

◆ udpateSeed()

bool genfit::Track::udpateSeed ( int  id = 0,
AbsTrackRep rep = NULL,
bool  biased = true 
)

Try to set the fitted state as seed. Return if it was successfull. Adapt the sign of all TrackReps' pdg to the actual fitted charge.

Definition at line 683 of file Track.cc.

References genfit::MeasuredStateOnPlane::get6DCov(), genfit::StateOnPlane::get6DState(), genfit::StateOnPlane::getCharge(), getFittedState(), genfit::StateOnPlane::getTime(), setCovSeed(), setStateSeed(), setTimeSeed(), and trackReps_.

Referenced by reverseTrack().

Member Data Documentation

◆ cardinalRep_

unsigned int genfit::Track::cardinalRep_
private

◆ covSeed_

TMatrixDSym genfit::Track::covSeed_
private

Definition at line 308 of file Track.h.

Referenced by checkConsistency(), Clear(), constructTrackCand(), getCovSeed(), setCovSeed(), swap(), and Track().

◆ fitStatuses_

std::map< const AbsTrackRep*, FitStatus* > genfit::Track::fitStatuses_
private

◆ mcTrackId_

int genfit::Track::mcTrackId_
private

if MC simulation, store the mc track id here

Definition at line 305 of file Track.h.

Referenced by Clear(), constructTrackCand(), getMcTrackId(), setMcTrackId(), swap(), and Track().

◆ stateSeed_

TVectorD genfit::Track::stateSeed_
private

◆ timeSeed_

double genfit::Track::timeSeed_
private

Definition at line 306 of file Track.h.

Referenced by Clear(), constructTrackCand(), getTimeSeed(), setTimeSeed(), swap(), and Track().

◆ trackPoints_

std::vector<TrackPoint*> genfit::Track::trackPoints_
private

◆ trackPointsWithMeasurement_

std::vector<TrackPoint*> genfit::Track::trackPointsWithMeasurement_
private

◆ trackReps_

std::vector<AbsTrackRep*> genfit::Track::trackReps_
private

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