EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects. More...
#include <fun4all_GenFit/blob/master/core/include/Track.h>
Public Member Functions | |
Track () | |
Track (const TrackCand &trackCand, const MeasurementFactory< genfit::AbsMeasurement > &factory, AbsTrackRep *rep=nullptr) | |
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 &) | |
Track & | operator= (Track) |
void | swap (Track &other) |
virtual | ~Track () |
virtual void | Clear (Option_t *="") |
void | createMeasurements (const TrackCand &trackCand, const MeasurementFactory< genfit::AbsMeasurement > &factory) |
TrackPoint * | getPoint (int id) const |
const std::vector < genfit::TrackPoint * > & | getPoints () const |
unsigned int | getNumPoints () const |
TrackPoint * | getPointWithMeasurement (int id) const |
const std::vector < genfit::TrackPoint * > & | getPointsWithMeasurement () const |
unsigned int | getNumPointsWithMeasurement () const |
TrackPoint * | getPointWithMeasurementAndFitterInfo (int id, const AbsTrackRep *rep=nullptr) const |
TrackPoint * | getPointWithFitterInfo (int id, const AbsTrackRep *rep=nullptr) const |
const MeasuredStateOnPlane & | getFittedState (int id=0, const AbsTrackRep *rep=nullptr, bool biased=true) const |
Shortcut to get FittedStates. | |
AbsTrackRep * | getTrackRep (int id) const |
const std::vector < genfit::AbsTrackRep * > & | getTrackReps () const |
Return the track representations as a list of pointers. | |
unsigned int | getNumReps () const |
int | getIdForRep (const AbsTrackRep *rep) const |
This is used when streaming TrackPoints. | |
AbsTrackRep * | getCardinalRep () const |
Get cardinal track representation. | |
unsigned int | getCardinalRepId () const |
int | getMcTrackId () const |
Get the MCT track id, for MC simulations - default value = -1. | |
bool | hasFitStatus (const AbsTrackRep *rep=nullptr) const |
Check if track has a FitStatus for given AbsTrackRep. Per default, check for cardinal rep. | |
FitStatus * | getFitStatus (const AbsTrackRep *rep=nullptr) const |
Get FitStatus for a AbsTrackRep. Per default, return FitStatus for cardinalRep. | |
bool | hasKalmanFitStatus (const AbsTrackRep *rep=nullptr) const |
Check if track has a KalmanFitStatus for given AbsTrackRep. Per default, check for cardinal rep. | |
KalmanFitStatus * | getKalmanFitStatus (const AbsTrackRep *rep=nullptr) const |
If FitStatus is a KalmanFitStatus, return it. Otherwise return nullptr. | |
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. | |
void | insertPoint (TrackPoint *point, int id=-1) |
Insert TrackPoint BEFORE TrackPoint with position id, if id >= 0. | |
void | insertPoints (std::vector< genfit::TrackPoint * > points, int id=-1) |
Insert TrackPoints BEFORE TrackPoint with position id, if id >= 0. | |
void | deletePoint (int id) |
void | insertMeasurement (AbsMeasurement *measurement, int id=-1) |
Creates a new TrackPoint containing the measurement, and adds it to the track. | |
void | deleteTrackPointsAndFitStatus () |
Delete all measurement information and the track points of the track. Does not delete track representations. | |
void | mergeTrack (const Track *other, int id=-1) |
Merge two tracks. | |
void | addTrackRep (AbsTrackRep *trackRep) |
void | deleteTrackRep (int id) |
Delete a AbsTrackRep and all corresponding AbsFitterInfo objects in every TrackPoint. | |
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. | |
bool | sort () |
Sort TrackPoint and according to their sorting parameters. | |
bool | udpateSeed (int id=0, AbsTrackRep *rep=nullptr, bool biased=true) |
void | reverseTrackPoints () |
Flip the ordering of the TrackPoints. | |
void | reverseMomSeed () |
Flip direction of momentum seed. | |
void | switchPDGSigns (AbsTrackRep *rep=nullptr) |
Switch the pdg signs of specified rep (of all reps if rep == nullptr). | |
void | reverseTrack () |
Make track ready to be fitted in reverse direction. | |
void | deleteForwardInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=nullptr) |
void | deleteBackwardInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=nullptr) |
void | deleteReferenceInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=nullptr) |
void | deleteMeasurementInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=nullptr) |
void | deleteFitterInfo (int startId=0, int endId=-1, const AbsTrackRep *rep=nullptr) |
double | getTrackLen (AbsTrackRep *rep=nullptr, int startId=0, int endId=-1) const |
get TrackLength between to trackPoints (if nullptr, for cardinal rep) | |
double | getTOF (AbsTrackRep *rep=nullptr, int startId=0, int endId=-1) const |
get time of flight in ns between to trackPoints (if nullptr, for cardinal rep) | |
void | deleteFittedState (const genfit::AbsTrackRep *rep) |
TrackCand * | constructTrackCand () const |
Construct a new TrackCand containing the hit IDs of the measurements. | |
void | fixWeights (AbsTrackRep *rep=nullptr, int startId=0, int endId=-1) |
void | prune (const Option_t *="CFLWRMIU") |
Delete unneeded information from the Track. | |
void | Print (const Option_t *="") const |
void | 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 | |
int | mcTrackId_ |
double | timeSeed_ |
TVectorD | stateSeed_ |
TMatrixDSym | covSeed_ |
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.
View newest version in sPHENIX GitHub at line 71 of file Track.h
genfit::Track::Track | ( | ) |
genfit::Track::Track | ( | const TrackCand & | trackCand, |
const MeasurementFactory< genfit::AbsMeasurement > & | factory, | ||
AbsTrackRep * | rep = nullptr |
||
) |
@ 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.
View newest version in sPHENIX GitHub 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_.
genfit::Track::Track | ( | AbsTrackRep * | trackRep, |
const TVectorD & | stateSeed | ||
) |
Definition at line 95 of file Track.cc.
View newest version in sPHENIX GitHub at line 95 of file Track.cc
References addTrackRep().
genfit::Track::Track | ( | AbsTrackRep * | trackRep, |
const TVector3 & | posSeed, | ||
const TVector3 & | momSeed | ||
) |
Definition at line 103 of file Track.cc.
View newest version in sPHENIX GitHub at line 103 of file Track.cc
References addTrackRep(), and setStateSeed().
genfit::Track::Track | ( | AbsTrackRep * | trackRep, |
const TVectorD & | stateSeed, | ||
const TMatrixDSym & | covSeed | ||
) |
Definition at line 112 of file Track.cc.
View newest version in sPHENIX GitHub at line 112 of file Track.cc
References addTrackRep().
genfit::Track::Track | ( | const Track & | rhs | ) |
Definition at line 120 of file Track.cc.
View newest version in sPHENIX GitHub at line 120 of file Track.cc
References addTrackRep(), checkConsistency(), genfit::AbsTrackRep::clone(), fillPointsWithMeasurement(), fitStatuses_, it, setFitStatus(), trackPoints_, and trackReps_.
|
virtual |
void genfit::Track::addTrackRep | ( | AbsTrackRep * | trackRep | ) |
Definition at line 573 of file Track.cc.
View newest version in sPHENIX GitHub at line 573 of file Track.cc
References fitStatuses_, and trackReps_.
Referenced by main(), and Track().
void genfit::Track::checkConsistency | ( | ) | const |
Definition at line 1286 of file Track.cc.
View newest version in sPHENIX GitHub at line 1286 of file Track.cc
References cardinalRep_, covSeed_, fitStatuses_, genfit::ReferenceStateOnPlane::getForwardSegmentLength(), getIdForRep(), genfit::KalmanFitterInfo::getReferenceState(), genfit::KalmanFitterInfo::hasReferenceState(), it, Acts::UnitConstants::m, particle, stateSeed_, this, trackPoints_, trackPointsWithMeasurement_, and trackReps_.
Referenced by genfit::EventDisplay::drawEvent(), emptyTrackTest(), main(), operator=(), genfit::AbsFitter::processTrack(), PHGenFit::Fitter::processTrack(), PHTpcTrackFollower::propagateTrack(), and Track().
|
virtual |
Definition at line 181 of file Track.cc.
View newest version in sPHENIX GitHub at line 181 of file Track.cc
References cardinalRep_, covSeed_, fitStatuses_, it, mcTrackId_, stateSeed_, timeSeed_, trackPoints_, trackPointsWithMeasurement_, and trackReps_.
Referenced by ~Track().
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 943 of file Track.cc.
View newest version in sPHENIX GitHub at line 943 of file Track.cc
References genfit::TrackCand::addHit(), covSeed_, getCardinalRep(), genfit::AbsMeasurement::getDetId(), genfit::AbsMeasurement::getHitId(), genfit::AbsMeasurement::getLeftRightResolution(), genfit::TrackPoint::getRawMeasurements(), genfit::TrackPoint::getSortingParameter(), genfit::AbsMeasurement::isLeftRightMeasurement(), Acts::UnitConstants::m, mcTrackId_, genfit::TrackCand::setCovSeed(), genfit::TrackCand::setMcTrackId(), genfit::TrackCand::setTime6DSeedAndPdgCode(), stateSeed_, timeSeed_, and trackPointsWithMeasurement_.
void genfit::Track::createMeasurements | ( | const TrackCand & | trackCand, |
const MeasurementFactory< genfit::AbsMeasurement > & | factory | ||
) |
Definition at line 75 of file Track.cc.
View newest version in sPHENIX GitHub at line 75 of file Track.cc
References genfit::MeasurementFactory< measurement_T >::createMany(), genfit::TrackCand::getHit(), genfit::TrackCand::getNHits(), genfit::TrackCandHit::getSortingParameter(), insertPoint(), genfit::Exception::setFatal(), and genfit::TrackPoint::setSortingParameter().
Referenced by Track().
void genfit::Track::deleteBackwardInfo | ( | int | startId = 0 , |
int | endId = -1 , |
||
const AbsTrackRep * | rep = nullptr |
||
) |
Definition at line 778 of file Track.cc.
View newest version in sPHENIX GitHub at line 778 of file Track.cc
References genfit::debugOut, trackHasChanged(), and trackPoints_.
Referenced by deletePoint(), insertPoint(), insertPoints(), prune(), genfit::KalmanFitterRefTrack::removeForwardBackwardInfo(), reverseTrackPoints(), and sort().
void genfit::Track::deleteFittedState | ( | const genfit::AbsTrackRep * | rep | ) |
Delete the fit status and all the FitStates of the TrackPoints for the given hypothesis. This is equal to resetting the track for the rep, so another fit can start from scratch. Useful if you have changed some seeds.
Definition at line 509 of file Track.cc.
View newest version in sPHENIX GitHub at line 509 of file Track.cc
References fitStatuses_, hasFitStatus(), and trackPoints_.
void genfit::Track::deleteFitterInfo | ( | int | startId = 0 , |
int | endId = -1 , |
||
const AbsTrackRep * | rep = nullptr |
||
) |
Definition at line 869 of file Track.cc.
View newest version in sPHENIX GitHub at line 869 of file Track.cc
References genfit::debugOut, trackHasChanged(), trackPoints_, and trackReps_.
void genfit::Track::deleteForwardInfo | ( | int | startId = 0 , |
int | endId = -1 , |
||
const AbsTrackRep * | rep = nullptr |
||
) |
Definition at line 749 of file Track.cc.
View newest version in sPHENIX GitHub at line 749 of file Track.cc
References genfit::debugOut, trackHasChanged(), and trackPoints_.
Referenced by deletePoint(), insertPoint(), insertPoints(), prune(), genfit::KalmanFitterRefTrack::removeForwardBackwardInfo(), reverseTrackPoints(), and sort().
void genfit::Track::deleteMeasurementInfo | ( | int | startId = 0 , |
int | endId = -1 , |
||
const AbsTrackRep * | rep = nullptr |
||
) |
Definition at line 839 of file Track.cc.
View newest version in sPHENIX GitHub at line 839 of file Track.cc
References genfit::debugOut, trackHasChanged(), and trackPoints_.
Referenced by prune().
void genfit::Track::deletePoint | ( | int | id | ) |
Definition at line 470 of file Track.cc.
View newest version in sPHENIX GitHub at line 470 of file Track.cc
References genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), it, max, min, trackHasChanged(), trackPoints_, and trackPointsWithMeasurement_.
Referenced by genfit::GblFitter::cleanGblInfo(), PHGenFit::Track::deleteLastMeasurement(), and PHGenFit2::Track::deleteLastMeasurement().
void genfit::Track::deleteReferenceInfo | ( | int | startId = 0 , |
int | endId = -1 , |
||
const AbsTrackRep * | rep = nullptr |
||
) |
Definition at line 809 of file Track.cc.
View newest version in sPHENIX GitHub at line 809 of file Track.cc
References genfit::debugOut, trackHasChanged(), and trackPoints_.
Referenced by deletePoint(), insertPoint(), insertPoints(), prune(), reverseTrackPoints(), and sort().
void genfit::Track::deleteTrackPointsAndFitStatus | ( | ) |
Delete all measurement information and the track points of the track. Does not delete track representations.
Definition at line 1624 of file Track.cc.
View newest version in sPHENIX GitHub at line 1624 of file Track.cc
References fitStatuses_, it, trackPoints_, and trackPointsWithMeasurement_.
void genfit::Track::deleteTrackRep | ( | int | id | ) |
Delete a AbsTrackRep and all corresponding AbsFitterInfo objects in every TrackPoint.
Definition at line 579 of file Track.cc.
View newest version in sPHENIX GitHub at line 579 of file Track.cc
References cardinalRep_, fitStatuses_, trackPoints_, and trackReps_.
Referenced by prune().
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 620 of file Track.cc.
View newest version in sPHENIX GitHub at line 620 of file Track.cc
References fitStatuses_, getIdForRep(), it, setCardinalRep(), and trackReps_.
|
private |
Definition at line 1465 of file Track.cc.
View newest version in sPHENIX GitHub at line 1465 of file Track.cc
References it, trackPoints_, and trackPointsWithMeasurement_.
Referenced by deletePoint(), insertPoint(), insertPoints(), operator=(), prune(), reverseTrackPoints(), sort(), and Track().
void genfit::Track::fixWeights | ( | AbsTrackRep * | rep = nullptr , |
int | startId = 0 , |
||
int | endId = -1 |
||
) |
Helper function: For all KalmanFitterInfos belonging to rep (if nullptr, for all reps), call the fixWeights() function, so that e.g. the DAF will not alter weights anymore.
Definition at line 1012 of file Track.cc.
View newest version in sPHENIX GitHub at line 1012 of file Track.cc
References genfit::KalmanFitterInfo::fixWeights(), and trackPoints_.
|
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.
Definition at line 145 of file Track.h.
View newest version in sPHENIX GitHub at line 145 of file Track.h
References cardinalRep_, and trackReps_.
Referenced by constructTrackCand(), genfit::EventDisplay::drawEvent(), PHGenFit::Track::extrapolateToCylinder(), PHGenFit2::Track::extrapolateToCylinder(), PHGenFit2::Track::extrapolateToLine(), PHGenFit::Track::extrapolateToLine(), PHGenFit::Track::extrapolateToPlane(), PHGenFit2::Track::extrapolateToPlane(), PHGenFit::Track::extrapolateToPoint(), PHGenFit2::Track::extrapolateToPoint(), PHGenFit2::Track::get_charge(), PHGenFit::Track::get_charge(), PHGenFit2::Track::get_chi2(), PHGenFit::Track::get_chi2(), PHGenFit2::Track::get_mom(), PHGenFit::Track::get_mom(), PHGenFit2::Track::get_ndf(), PHGenFit::Track::get_ndf(), getFitStatus(), getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::GFRaveTrackParameters::getPdg(), getPointWithFitterInfo(), getPointWithMeasurementAndFitterInfo(), getTOF(), getTrackLen(), hasFitStatus(), hasKalmanFitStatus(), main(), PHGenFitTrkFitter::MakeSvtxTrack(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::AbsFitter::processTrack(), PHGenFit::Fitter::processTrack(), PHGenFit2::Fitter::processTrackPartially(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitter::processTrackWithRep(), and genfit::GFGbl::processTrackWithRep().
|
inline |
Definition at line 146 of file Track.h.
View newest version in sPHENIX GitHub at line 146 of file Track.h
References cardinalRep_.
|
inline |
Definition at line 170 of file Track.h.
View newest version in sPHENIX GitHub at line 170 of file Track.h
References covSeed_.
Referenced by PHGenFit::Track::extrapolateToCylinder(), PHGenFit2::Track::extrapolateToCylinder(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitterRefTrack::processTrackPoint(), genfit::KalmanFitterRefTrack::processTrackPointSqrt(), genfit::KalmanFitter::processTrackWithRep(), and genfit::GblFitterInfo::setReferenceState().
|
inline |
Get FitStatus for a AbsTrackRep. Per default, return FitStatus for cardinalRep.
Definition at line 154 of file Track.h.
View newest version in sPHENIX GitHub at line 154 of file Track.h
References fitStatuses_, and getCardinalRep().
Referenced by genfit::GblFitterInfo::constructGblPoint(), genfit::EventDisplay::drawEvent(), PHGenFit::Track::get_chi2(), PHGenFit2::Track::get_chi2(), PHGenFit::Track::get_ndf(), PHGenFit2::Track::get_ndf(), genfit::GFRaveTrackParameters::getCharge(), genfit::KalmanFitterInfo::getFittedState(), getKalmanFitStatus(), genfit::GFTrackToTrack(), genfit::AbsKalmanFitter::isTrackFitted(), main(), genfit::KalmanFitterRefTrack::prepareTrack(), PHG4TrackFastSim::process_event(), B0TrackFastSim::process_event(), PHGenFit::Fitter::processTrack(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitterRefTrack::processTrackWithRep(), genfit::KalmanFitter::processTrackWithRep(), genfit::DAF::processTrackWithRep(), and genfit::GblFitterInfo::updateFitResults().
const MeasuredStateOnPlane & genfit::Track::getFittedState | ( | int | id = 0 , |
const AbsTrackRep * | rep = nullptr , |
||
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 285 of file Track.cc.
View newest version in sPHENIX GitHub at line 285 of file Track.cc
References getCardinalRep(), genfit::AbsFitterInfo::getFittedState(), genfit::TrackPoint::getFitterInfo(), getPointWithFitterInfo(), and genfit::Exception::setFatal().
Referenced by genfit::EventDisplay::drawEvent(), genfit::GFTrackToTrack(), main(), PHG4TrackFastSim::process_event(), B0TrackFastSim::process_event(), genfit::GblFitter::processTrackWithRep(), and udpateSeed().
int genfit::Track::getIdForRep | ( | const AbsTrackRep * | rep | ) | const |
This is used when streaming TrackPoints.
Definition at line 299 of file Track.cc.
View newest version in sPHENIX GitHub at line 299 of file Track.cc
References genfit::Exception::setFatal(), and trackReps_.
Referenced by checkConsistency(), determineCardinalRep(), Print(), and genfit::KalmanFitterRefTrack::processTrackWithRep().
KalmanFitStatus * genfit::Track::getKalmanFitStatus | ( | const AbsTrackRep * | rep = nullptr | ) | const |
If FitStatus is a KalmanFitStatus, return it. Otherwise return nullptr.
Definition at line 333 of file Track.cc.
View newest version in sPHENIX GitHub at line 333 of file Track.cc
References getFitStatus().
Referenced by PHTpcTrackFollower::followTracks(), and PHTpcTrackFollower::propagateTrack().
|
inline |
Get the MCT track id, for MC simulations - default value = -1.
Definition at line 149 of file Track.h.
View newest version in sPHENIX GitHub at line 149 of file Track.h
References mcTrackId_.
|
inline |
Definition at line 110 of file Track.h.
View newest version in sPHENIX GitHub at line 110 of file Track.h
References trackPoints_.
Referenced by genfit::GblFitter::cleanGblInfo(), genfit::GblFitter::collectGblPoints(), genfit::GblFitter::constructGblInfo(), genfit::KalmanFitterRefTrack::fitTrack(), PHTpcTrackFollower::followTracks(), PHGenFit2::Track::get_track_info(), PHTpcTrackFollower::get_track_layer(), genfit::KalmanFitterInfo::getFittedState(), insertPoints(), mergeTrack(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::GFGbl::processTrackWithRep(), genfit::GblFitter::processTrackWithRep(), PHTpcTrackFollower::propagateTrack(), genfit::KalmanFitterRefTrack::removeForwardBackwardInfo(), genfit::KalmanFitterRefTrack::removeOutdated(), genfit::GblFitterInfo::updateFitResults(), and genfit::GblFitter::updateGblInfo().
|
inline |
Definition at line 114 of file Track.h.
View newest version in sPHENIX GitHub at line 114 of file Track.h
References trackPointsWithMeasurement_.
Referenced by genfit::GblFitter::constructGblInfo(), genfit::EventDisplay::drawEvent(), PHGenFit::Track::extrapolateToCylinder(), PHGenFit2::Track::extrapolateToCylinder(), genfit::KalmanFitterRefTrack::fitTrack(), genfit::KalmanFitter::fitTrack(), PHGenFit::Track::get_charge(), PHGenFit2::Track::get_charge(), PHGenFit::Track::get_mom(), PHGenFit2::Track::get_mom(), main(), PHGenFitTrkFitter::MakeSvtxTrack(), genfit::KalmanFitter::processTrackPartially(), genfit::GFGbl::processTrackWithRep(), genfit::GblFitter::processTrackWithRep(), and genfit::GblFitter::sortHits().
|
inline |
Definition at line 133 of file Track.h.
View newest version in sPHENIX GitHub at line 133 of file Track.h
References trackReps_.
Referenced by genfit::EventDisplay::drawEvent(), and genfit::AbsFitter::processTrack().
TrackPoint * genfit::Track::getPoint | ( | int | id | ) | const |
Definition at line 209 of file Track.cc.
View newest version in sPHENIX GitHub at line 209 of file Track.cc
References trackPoints_.
Referenced by genfit::GblFitter::cleanGblInfo(), genfit::GblFitter::collectGblPoints(), genfit::GblFitter::constructGblInfo(), genfit::KalmanFitter::fitTrack(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::GFGbl::processTrackWithRep(), genfit::GblFitter::processTrackWithRep(), genfit::KalmanFitterRefTrack::removeOutdated(), genfit::GblFitterInfo::updateFitResults(), and genfit::GblFitter::updateGblInfo().
|
inline |
Definition at line 109 of file Track.h.
View newest version in sPHENIX GitHub at line 109 of file Track.h
References trackPoints_.
|
inline |
Definition at line 113 of file Track.h.
View newest version in sPHENIX GitHub at line 113 of file Track.h
References trackPointsWithMeasurement_.
Referenced by genfit::DAF::calcWeights(), genfit::AbsKalmanFitter::getChiSquNdf(), genfit::AbsKalmanFitter::isTrackFitted(), and genfit::AbsKalmanFitter::isTrackPrepared().
TrackPoint * genfit::Track::getPointWithFitterInfo | ( | int | id, |
const AbsTrackRep * | rep = nullptr |
||
) | const |
Definition at line 255 of file Track.cc.
View newest version in sPHENIX GitHub at line 255 of file Track.cc
References getCardinalRep(), it, and trackPoints_.
Referenced by genfit::KalmanFitterInfo::getFittedState(), getFittedState(), and prune().
TrackPoint * genfit::Track::getPointWithMeasurement | ( | int | id | ) | const |
Definition at line 217 of file Track.cc.
View newest version in sPHENIX GitHub at line 217 of file Track.cc
References trackPointsWithMeasurement_.
Referenced by genfit::GblFitter::constructGblInfo(), genfit::EventDisplay::drawEvent(), PHGenFit::Track::extrapolateToCylinder(), PHGenFit2::Track::extrapolateToCylinder(), genfit::KalmanFitterRefTrack::fitTrack(), genfit::KalmanFitter::fitTrack(), PHGenFit::Track::get_charge(), PHGenFit2::Track::get_charge(), PHGenFit::Track::get_mom(), PHGenFit2::Track::get_mom(), main(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitterRefTrack::processTrackWithRep(), genfit::KalmanFitter::processTrackWithRep(), genfit::GFGbl::processTrackWithRep(), and genfit::GblFitter::sortHits().
TrackPoint * genfit::Track::getPointWithMeasurementAndFitterInfo | ( | int | id, |
const AbsTrackRep * | rep = nullptr |
||
) | const |
Definition at line 225 of file Track.cc.
View newest version in sPHENIX GitHub at line 225 of file Track.cc
References getCardinalRep(), it, and trackPointsWithMeasurement_.
Referenced by PHGenFit::Track::extrapolateToLine(), PHGenFit2::Track::extrapolateToLine(), PHGenFit2::Track::extrapolateToPlane(), PHGenFit::Track::extrapolateToPlane(), PHGenFit::Track::extrapolateToPoint(), PHGenFit2::Track::extrapolateToPoint(), PHTpcTrackFollower::get_projected_coordinate(), PHGenFit2::Track::get_track_info(), PHTpcTrackFollower::get_track_layer(), main(), PHGenFitTrkFitter::MakeSvtxTrack(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::KalmanFitterRefTrack::processTrackWithRep(), and genfit::KalmanFitter::processTrackWithRep().
|
inline |
Definition at line 166 of file Track.h.
View newest version in sPHENIX GitHub at line 166 of file Track.h
References stateSeed_.
Referenced by genfit::GblFitter::constructGblInfo(), PHGenFit2::Track::extrapolateToCylinder(), PHGenFit::Track::extrapolateToCylinder(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitter::processTrackWithRep(), and genfit::GblFitter::sortHits().
|
inline |
Definition at line 163 of file Track.h.
View newest version in sPHENIX GitHub at line 163 of file Track.h
References timeSeed_.
Referenced by genfit::GblFitter::constructGblInfo(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::KalmanFitter::processTrackPartially(), genfit::KalmanFitter::processTrackWithRep(), and genfit::GblFitter::sortHits().
double genfit::Track::getTOF | ( | AbsTrackRep * | rep = nullptr , |
int | startId = 0 , |
||
int | endId = -1 |
||
) | const |
get time of flight in ns between to trackPoints (if nullptr, for cardinal rep)
Definition at line 979 of file Track.cc.
View newest version in sPHENIX GitHub at line 979 of file Track.cc
References Acts::UnitConstants::e, getCardinalRep(), genfit::AbsFitterInfo::getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::AbsTrackRep::getTime(), genfit::TrackPoint::hasFitterInfo(), boost::swap(), and trackPoints_.
Referenced by main().
double genfit::Track::getTrackLen | ( | AbsTrackRep * | rep = nullptr , |
int | startId = 0 , |
||
int | endId = -1 |
||
) | const |
get TrackLength between to trackPoints (if nullptr, for cardinal rep)
Definition at line 900 of file Track.cc.
View newest version in sPHENIX GitHub at line 900 of file Track.cc
References Acts::UnitConstants::e, genfit::AbsTrackRep::extrapolateToPlane(), getCardinalRep(), genfit::StateOnPlane::getPlane(), and trackPoints_.
Referenced by PHGenFit2::Track::get_track_info(), and main().
|
inline |
Definition at line 130 of file Track.h.
View newest version in sPHENIX GitHub at line 130 of file Track.h
References trackReps_.
Referenced by genfit::EventDisplay::drawEvent(), genfit::TrackPoint::fixupRepsForReading(), and genfit::AbsFitter::processTrack().
|
inline |
Return the track representations as a list of pointers.
Definition at line 132 of file Track.h.
View newest version in sPHENIX GitHub at line 132 of file Track.h
References trackReps_.
bool genfit::Track::hasFitStatus | ( | const AbsTrackRep * | rep = nullptr | ) | const |
Check if track has a FitStatus for given AbsTrackRep. Per default, check for cardinal rep.
Definition at line 311 of file Track.cc.
View newest version in sPHENIX GitHub at line 311 of file Track.cc
References fitStatuses_, and getCardinalRep().
Referenced by deleteFittedState(), genfit::KalmanFitterRefTrack::processTrackWithRep(), genfit::KalmanFitter::processTrackWithRep(), and PHTpcTrackFollower::propagateTrack().
bool genfit::Track::hasKalmanFitStatus | ( | const AbsTrackRep * | rep = nullptr | ) | const |
Check if track has a KalmanFitStatus for given AbsTrackRep. Per default, check for cardinal rep.
Definition at line 322 of file Track.cc.
View newest version in sPHENIX GitHub at line 322 of file Track.cc
References fitStatuses_, and getCardinalRep().
Referenced by PHTpcTrackFollower::get_track_layer().
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 505 of file Track.cc.
View newest version in sPHENIX GitHub at line 505 of file Track.cc
References insertPoint().
Referenced by PHGenFit2::Track::addMeasurement().
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 360 of file Track.cc.
View newest version in sPHENIX GitHub at line 360 of file Track.cc
References genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), genfit::TrackPoint::hasRawMeasurements(), max, min, genfit::TrackPoint::setTrack(), trackHasChanged(), trackPoints_, and trackPointsWithMeasurement_.
Referenced by PHGenFit::Track::addMeasurement(), PHGenFit::Track::addMeasurements(), genfit::GblFitter::constructGblInfo(), createMeasurements(), insertMeasurement(), insertPoints(), main(), and PHRaveVertexing::TranslateSvtxToGenFitTrack().
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 420 of file Track.cc.
View newest version in sPHENIX GitHub at line 420 of file Track.cc
References deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), getNumPoints(), insertPoint(), max, min, n, p, and trackPoints_.
Referenced by 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 524 of file Track.cc.
View newest version in sPHENIX GitHub at line 524 of file Track.cc
References genfit::debugOut, getNumPoints(), insertPoints(), genfit::Exception::setFatal(), trackPoints_, and trackReps_.
Referenced by main().
Definition at line 150 of file Track.cc.
View newest version in sPHENIX GitHub at line 150 of file Track.cc
References checkConsistency(), fillPointsWithMeasurement(), it, swap(), and trackPoints_.
void genfit::Track::Print | ( | const Option_t * | option = "" | ) | const |
Definition at line 1120 of file Track.cc.
View newest version in sPHENIX GitHub at line 1120 of file Track.cc
References cardinalRep_, color, fitStatuses_, getIdForRep(), genfit::AbsFitterInfo::hasBackwardPrediction(), genfit::AbsFitterInfo::hasBackwardUpdate(), genfit::AbsFitterInfo::hasForwardPrediction(), genfit::AbsFitterInfo::hasForwardUpdate(), genfit::AbsFitterInfo::hasMeasurements(), genfit::AbsFitterInfo::hasReferenceState(), it, printf(), genfit::printOut, stateSeed_, trackPoints_, and trackReps_.
Referenced by genfit::EventDisplay::drawEvent(), main(), genfit::GFRaveTrackParameters::Print(), genfit::KalmanFitterRefTrack::processTrackWithRep(), prune(), and genfit::KalmanFitterRefTrack::removeOutdated().
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 1045 of file Track.cc.
View newest version in sPHENIX GitHub at line 1045 of file Track.cc
References cardinalRep_, genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteMeasurementInfo(), deleteReferenceInfo(), deleteTrackRep(), fillPointsWithMeasurement(), fitStatuses_, getPointWithFitterInfo(), genfit::PruneFlags::hasFlags(), it, Print(), genfit::PruneFlags::setFlags(), trackPoints_, and trackReps_.
Referenced by main().
|
inline |
Flip direction of momentum seed.
Definition at line 235 of file Track.h.
View newest version in sPHENIX GitHub at line 235 of file Track.h
References stateSeed_.
Referenced by 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 741 of file Track.cc.
View newest version in sPHENIX GitHub at line 741 of file Track.cc
References reverseMomSeed(), reverseTrackPoints(), switchPDGSigns(), and udpateSeed().
void genfit::Track::reverseTrackPoints | ( | ) |
Flip the ordering of the TrackPoints.
Definition at line 717 of file Track.cc.
View newest version in sPHENIX GitHub at line 717 of file Track.cc
References deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), and trackPoints_.
Referenced by reverseTrack().
void genfit::Track::setCardinalRep | ( | int | id | ) |
Definition at line 606 of file Track.cc.
View newest version in sPHENIX GitHub at line 606 of file Track.cc
References cardinalRep_, genfit::errorOut, and trackReps_.
Referenced by determineCardinalRep().
|
inline |
void genfit::Track::setFitStatus | ( | FitStatus * | fitStatus, |
const AbsTrackRep * | rep | ||
) |
Definition at line 338 of file Track.cc.
View newest version in sPHENIX GitHub at line 338 of file Track.cc
References fitStatuses_.
Referenced by genfit::KalmanFitterRefTrack::processTrackWithRep(), genfit::KalmanFitter::processTrackWithRep(), genfit::GblFitter::processTrackWithRep(), Track(), and PHRaveVertexing::TranslateSvtxToGenFitTrack().
|
inline |
Set the MCT track id, for MC simulations.
Definition at line 174 of file Track.h.
View newest version in sPHENIX GitHub at line 174 of file Track.h
References mcTrackId_.
|
inline |
Definition at line 167 of file Track.h.
View newest version in sPHENIX GitHub at line 167 of file Track.h
References Acts::UnitConstants::s, and stateSeed_.
Referenced by Track(), and udpateSeed().
void genfit::Track::setStateSeed | ( | const TVector3 & | pos, |
const TVector3 & | mom | ||
) |
Definition at line 346 of file Track.cc.
View newest version in sPHENIX GitHub at line 346 of file Track.cc
References stateSeed_.
|
inline |
Definition at line 164 of file Track.h.
View newest version in sPHENIX GitHub at line 164 of file Track.h
References Acts::Test::time, and timeSeed_.
Referenced by udpateSeed().
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 645 of file Track.cc.
View newest version in sPHENIX GitHub at line 645 of file Track.cc
References genfit::debugOut, deleteBackwardInfo(), deleteForwardInfo(), deleteReferenceInfo(), fillPointsWithMeasurement(), max, min, trackHasChanged(), and trackPoints_.
Referenced by genfit::KalmanFitterRefTrack::processTrackWithRep(), and genfit::GblFitter::sortHits().
void genfit::Track::swap | ( | Track & | other | ) |
Definition at line 164 of file Track.cc.
View newest version in sPHENIX GitHub at line 164 of file Track.cc
References cardinalRep_, covSeed_, fitStatuses_, mcTrackId_, stateSeed_, boost::swap(), timeSeed_, trackPoints_, trackPointsWithMeasurement_, and trackReps_.
Referenced by operator=().
void genfit::Track::switchPDGSigns | ( | AbsTrackRep * | rep = nullptr | ) |
Switch the pdg signs of specified rep (of all reps if rep == nullptr).
Definition at line 729 of file Track.cc.
View newest version in sPHENIX GitHub at line 729 of file Track.cc
References genfit::AbsTrackRep::switchPDGSign(), and trackReps_.
Referenced by reverseTrack().
|
private |
Definition at line 1450 of file Track.cc.
View newest version in sPHENIX GitHub at line 1450 of file Track.cc
References genfit::debugOut, fitStatuses_, and it.
Referenced by deleteBackwardInfo(), deleteFitterInfo(), deleteForwardInfo(), deleteMeasurementInfo(), deletePoint(), deleteReferenceInfo(), insertPoint(), and sort().
bool genfit::Track::udpateSeed | ( | int | id = 0 , |
AbsTrackRep * | rep = nullptr , |
||
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 694 of file Track.cc.
View newest version in sPHENIX GitHub at line 694 of file Track.cc
References Acts::UnitConstants::e, genfit::MeasuredStateOnPlane::get6DCov(), genfit::StateOnPlane::get6DState(), genfit::StateOnPlane::getCharge(), getFittedState(), genfit::StateOnPlane::getTime(), setCovSeed(), setStateSeed(), setTimeSeed(), and trackReps_.
Referenced by reverseTrack().
|
private |
Definition at line 311 of file Track.h.
View newest version in sPHENIX GitHub at line 311 of file Track.h
Referenced by checkConsistency(), Clear(), deleteTrackRep(), getCardinalRep(), getCardinalRepId(), Print(), prune(), setCardinalRep(), and swap().
|
private |
Definition at line 321 of file Track.h.
View newest version in sPHENIX GitHub at line 321 of file Track.h
Referenced by checkConsistency(), Clear(), constructTrackCand(), getCovSeed(), setCovSeed(), swap(), and Track().
|
private |
helper
Definition at line 316 of file Track.h.
View newest version in sPHENIX GitHub at line 316 of file Track.h
Referenced by addTrackRep(), checkConsistency(), Clear(), deleteFittedState(), deleteTrackPointsAndFitStatus(), deleteTrackRep(), determineCardinalRep(), getFitStatus(), hasFitStatus(), hasKalmanFitStatus(), Print(), prune(), setFitStatus(), swap(), Track(), and trackHasChanged().
|
private |
if MC simulation, store the mc track id here
Definition at line 318 of file Track.h.
View newest version in sPHENIX GitHub at line 318 of file Track.h
Referenced by Clear(), constructTrackCand(), getMcTrackId(), setMcTrackId(), swap(), and Track().
|
private |
Definition at line 320 of file Track.h.
View newest version in sPHENIX GitHub at line 320 of file Track.h
Referenced by checkConsistency(), Clear(), constructTrackCand(), getStateSeed(), Print(), reverseMomSeed(), setStateSeed(), swap(), and Track().
|
private |
Definition at line 319 of file Track.h.
View newest version in sPHENIX GitHub at line 319 of file Track.h
Referenced by Clear(), constructTrackCand(), getTimeSeed(), setTimeSeed(), swap(), and Track().
|
private |
Definition at line 313 of file Track.h.
View newest version in sPHENIX GitHub at line 313 of file Track.h
Referenced by checkConsistency(), Clear(), deleteBackwardInfo(), deleteFittedState(), deleteFitterInfo(), deleteForwardInfo(), deleteMeasurementInfo(), deletePoint(), deleteReferenceInfo(), deleteTrackPointsAndFitStatus(), deleteTrackRep(), fillPointsWithMeasurement(), fixWeights(), getNumPoints(), getPoint(), getPoints(), getPointWithFitterInfo(), getTOF(), getTrackLen(), insertPoint(), insertPoints(), mergeTrack(), operator=(), Print(), prune(), reverseTrackPoints(), sort(), swap(), and Track().
|
private |
Definition at line 314 of file Track.h.
View newest version in sPHENIX GitHub at line 314 of file Track.h
Referenced by checkConsistency(), Clear(), constructTrackCand(), deletePoint(), deleteTrackPointsAndFitStatus(), fillPointsWithMeasurement(), getNumPointsWithMeasurement(), getPointsWithMeasurement(), getPointWithMeasurement(), getPointWithMeasurementAndFitterInfo(), insertPoint(), and swap().
|
private |
Definition at line 310 of file Track.h.
View newest version in sPHENIX GitHub at line 310 of file Track.h
Referenced by addTrackRep(), checkConsistency(), Clear(), deleteFitterInfo(), deleteTrackRep(), determineCardinalRep(), getCardinalRep(), getIdForRep(), getNumReps(), getTrackRep(), getTrackReps(), mergeTrack(), Print(), prune(), setCardinalRep(), swap(), switchPDGSigns(), Track(), and udpateSeed().