31#include <TDatabasePDG.h>
43 cardinalRep_(0), fitStatuses_(), stateSeed_(6), covSeed_(6)
50 cardinalRep_(0), fitStatuses_(), stateSeed_(6), covSeed_(6)
57 std::vector <genfit::AbsMeasurement*> factoryHits = factory.createMany(trackCand);
62 for (
unsigned int i=0; i<factoryHits.size(); ++i){
65 if (lastPlanarMeas != NULL && planarMeas != NULL &&
92 cardinalRep_(0), fitStatuses_(), stateSeed_(stateSeed),
93 covSeed_(TMatrixDSym::kUnit, TMatrixDSym(6))
100 cardinalRep_(0), fitStatuses_(), stateSeed_(6),
101 covSeed_(TMatrixDSym::kUnit, TMatrixDSym(6))
109 cardinalRep_(0), fitStatuses_(), stateSeed_(stateSeed), covSeed_(covSeed)
117 cardinalRep_(rhs.cardinalRep_), stateSeed_(rhs.stateSeed_), covSeed_(rhs.covSeed_)
121 std::map<const AbsTrackRep*, AbsTrackRep*> oldRepNewRep;
123 for (std::vector<AbsTrackRep*>::const_iterator it=rhs.
trackReps_.begin(); it!=rhs.
trackReps_.end(); ++it) {
126 oldRepNewRep[(*it)] = newRep;
135 for (std::map< const AbsTrackRep*, FitStatus* >::const_iterator it=rhs.
fitStatuses_.begin(); it!=rhs.
fitStatuses_.end(); ++it) {
136 setFitStatus(it->second->clone(), oldRepNewRep[it->first]);
190 for (
size_t i = 0; i <
trackReps_.size(); ++i)
220 if ((*it)->hasFitterInfo(rep)) {
237 Exception exc(
"Track::getFittedState ==> no trackPoint with fitterInfo for rep",__LINE__,__FILE__);
247 for (
size_t i = 0; i <
trackReps_.size(); ++i)
312 std::cout <<
"Track::insertPoint at position " <<
id <<
"\n";
370 int n = points.size();
379 for (std::vector<genfit::TrackPoint*>::iterator p = points.begin(); p != points.end(); ++p)
380 (*p)->setTrack(
this);
420 std::cout <<
"Track::deletePoint at position " <<
id <<
"\n";
460 std::cout <<
"Track::mergeTrack\n";
466 std::map<const AbsTrackRep*, AbsTrackRep*> otherRepThisRep;
467 std::vector<const AbsTrackRep*> otherRepsToRemove;
469 for (std::vector<AbsTrackRep*>::const_iterator otherRep=other->
trackReps_.begin(); otherRep!=other->
trackReps_.end(); ++otherRep) {
471 for (std::vector<AbsTrackRep*>::const_iterator thisRep=
trackReps_.begin(); thisRep!=
trackReps_.end(); ++thisRep) {
472 if ((*thisRep)->isSame(*otherRep)) {
473 otherRepThisRep[*otherRep] = *thisRep;
475 std::cout <<
" map other rep " << *otherRep <<
" to " << (*thisRep) <<
"\n";
478 Exception exc(
"Track::mergeTrack ==> more than one matching rep.",__LINE__,__FILE__);
487 otherRepsToRemove.push_back(*otherRep);
489 std::cout <<
" remove other rep " << *otherRep <<
"\n";
495 std::vector<TrackPoint*> points;
498 for (std::vector<TrackPoint*>::const_iterator otherTp=other->
trackPoints_.begin(); otherTp!=other->
trackPoints_.end(); ++otherTp) {
499 points.push_back(
new TrackPoint(**otherTp, otherRepThisRep, &otherRepsToRemove));
525 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin(); pointIt !=
trackPoints_.end(); ++pointIt) {
526 (*pointIt)->deleteFitterInfo(rep);
544 if (
id >= 0 && (
unsigned int)
id <
trackReps_.size())
548 std::cerr <<
"Track::setCardinalRep: Attempted to set cardinalRep_ to a value out of bounds. Resetting cardinalRep_ to 0." << std::endl;
560 double minChi2(9.E99);
563 for (std::map< const AbsTrackRep*, FitStatus* >::const_iterator it =
fitStatuses_.begin(); it !=
fitStatuses_.end(); ++it) {
564 if (it->second->isFitConverged()) {
565 if (it->second->getChi2() < minChi2) {
566 minChi2 = it->second->getChi2();
572 if (bestRep != NULL) {
580 std::cout <<
"Track::sort \n";
591 int equalUntil(-1), equalFrom(nPoints);
592 for (
int i = 0; i<nPoints; ++i) {
599 if (equalUntil == nPoints-1)
605 for (
int i = nPoints-1; i>equalUntil; --i) {
613 std::cout <<
"Track::sort. Equal up to (including) hit " << equalUntil <<
" and from (including) hit " << equalFrom <<
" \n";
633 double fittedCharge = fittedState.
getCharge();
635 for (
unsigned int i = 0; i<
trackReps_.size(); ++i) {
636 if (
trackReps_[i]->getPDGCharge() * fittedCharge < 0) {
667 for (
unsigned int i = 0; i<
trackReps_.size(); ++i) {
683 std::cout <<
"Track::deleteForwardInfo from position " << startId <<
" to " << endId <<
"\n";
694 assert (endId >= startId);
696 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
698 if ((*pointIt)->hasFitterInfo(rep))
699 (*pointIt)->getFitterInfo(rep)->deleteForwardInfo();
702 const std::vector<AbsFitterInfo*> fitterInfos = (*pointIt)->getFitterInfos();
703 for (std::vector<AbsFitterInfo*>::const_iterator fitterInfoIt = fitterInfos.begin(); fitterInfoIt != fitterInfos.end(); ++fitterInfoIt) {
704 (*fitterInfoIt)->deleteForwardInfo();
713 std::cout <<
"Track::deleteBackwardInfo from position " << startId <<
" to " << endId <<
"\n";
724 assert (endId >= startId);
727 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
729 if ((*pointIt)->hasFitterInfo(rep))
730 (*pointIt)->getFitterInfo(rep)->deleteBackwardInfo();
733 const std::vector<AbsFitterInfo*> fitterInfos = (*pointIt)->getFitterInfos();
734 for (std::vector<AbsFitterInfo*>::const_iterator fitterInfoIt = fitterInfos.begin(); fitterInfoIt != fitterInfos.end(); ++fitterInfoIt) {
735 (*fitterInfoIt)->deleteBackwardInfo();
744 std::cout <<
"Track::deleteReferenceInfo from position " << startId <<
" to " << endId <<
"\n";
755 assert (endId >= startId);
757 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
759 if ((*pointIt)->hasFitterInfo(rep))
760 (*pointIt)->getFitterInfo(rep)->deleteReferenceInfo();
763 std::vector<AbsFitterInfo*> fitterInfos = (*pointIt)->getFitterInfos();
764 for (std::vector<AbsFitterInfo*>::const_iterator fitterInfoIt = fitterInfos.begin(); fitterInfoIt != fitterInfos.end(); ++fitterInfoIt) {
765 (*fitterInfoIt)->deleteReferenceInfo();
774 std::cout <<
"Track::deleteMeasurementInfo from position " << startId <<
" to " << endId <<
"\n";
785 assert (endId >= startId);
787 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
789 if ((*pointIt)->hasFitterInfo(rep))
790 (*pointIt)->getFitterInfo(rep)->deleteMeasurementInfo();
793 std::vector<AbsFitterInfo*> fitterInfos = (*pointIt)->getFitterInfos();
794 for (std::vector<AbsFitterInfo*>::const_iterator fitterInfoIt = fitterInfos.begin(); fitterInfoIt != fitterInfos.end(); ++fitterInfoIt) {
795 (*fitterInfoIt)->deleteMeasurementInfo();
804 std::cout <<
"Track::deleteFitterInfo from position " << startId <<
" to " << endId <<
"\n";
815 assert (endId >= startId);
817 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
819 if ((*pointIt)->hasFitterInfo(rep))
820 (*pointIt)->deleteFitterInfo(rep);
823 for (std::vector<AbsTrackRep*>::const_iterator repIt =
trackReps_.begin(); repIt !=
trackReps_.end(); ++repIt) {
824 if ((*pointIt)->hasFitterInfo(*repIt))
825 (*pointIt)->deleteFitterInfo(*repIt);
839 bool backwards(
false);
840 if (startId > endId) {
841 double temp = startId;
855 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
856 if (! (*pointIt)->hasFitterInfo(rep)) {
857 Exception e(
"Track::getTracklength: trackPoint has no fitterInfo", __LINE__,__FILE__);
865 state = (*pointIt)->getFitterInfo(rep)->getFittedState();
882 bool backwards(
false);
883 if (startId > endId) {
884 double temp = startId;
898 for (std::vector<TrackPoint*>::const_iterator pointIt =
trackPoints_.begin() + startId; pointIt !=
trackPoints_.begin() + endId; ++pointIt) {
899 if (! (*pointIt)->hasFitterInfo(rep)) {
900 Exception e(
"Track::getTOF: trackPoint has no fitterInfo", __LINE__,__FILE__);
909 state = (*pointIt)->getFitterInfo(rep)->getFittedState();
926 assert(startId >= 0);
927 assert(startId <= endId);
930 std::vector< genfit::AbsFitterInfo* > fis;
932 for (std::vector<TrackPoint*>::iterator tp =
trackPoints_.begin() + startId; tp !=
trackPoints_.begin() + endId; ++tp) {
935 fis = (*tp)->getFitterInfos();
937 else if ((*tp)->hasFitterInfo(rep)) {
938 fis.push_back((*tp)->getFitterInfo(rep));
941 for (std::vector< genfit::AbsFitterInfo* >::iterator fi = fis.begin(); fi != fis.end(); ++fi) {
954 TString opt = option;
957 for (std::map< const AbsTrackRep*, FitStatus* >::const_iterator it=
fitStatuses_.begin(); it!=
fitStatuses_.end(); ++it) {
958 it->second->setIsTrackPruned();
962 if (opt.Contains(
"F") || opt.Contains(
"L")) {
979 if (opt.Contains(
"C")) {
980 for (
unsigned int i = 0; i <
trackReps_.size(); ++i) {
991 if (opt.Contains(
"W"))
994 std::vector< genfit::AbsFitterInfo* > fis =
trackPoints_[i]->getFitterInfos();
995 for (
unsigned int j = 0; j<fis.size(); ++j) {
997 if (i == 0 && opt.Contains(
"I") && opt.Contains(
"F") && opt.Contains(
"L"))
998 fis[j]->deleteForwardInfo();
999 else if (i ==
trackPoints_.size()-1 && opt.Contains(
"I") && opt.Contains(
"F") && opt.Contains(
"L"))
1000 fis[j]->deleteBackwardInfo();
1001 else if (opt.Contains(
"I") && opt.Contains(
"F"))
1002 fis[j]->deleteForwardInfo();
1003 else if (opt.Contains(
"I") && opt.Contains(
"L"))
1004 fis[j]->deleteBackwardInfo();
1006 if (opt.Contains(
"U") &&
dynamic_cast<KalmanFitterInfo*
>(fis[j]) != NULL) {
1010 if (opt.Contains(
"R"))
1012 if (opt.Contains(
"M"))
1020 std::cout <<
"pruned Track: ";
Print();
1027 TString opt = option;
1029 if (opt.Contains(
"C")) {
1037 std::cout<<
"\033[1;30m";
1040 std::cout<<
"\033[0;34m";
1043 std::cout<<
"\033[1;34m";
1046 std::cout<<
"\033[0;32m";
1049 std::cout<<
"\033[1;32m";
1052 std::cout<<
"\033[0;36m";
1055 std::cout<<
"\033[1;36m";
1058 std::cout<<
"\033[0;31m";
1061 std::cout<<
"\033[1;31m";
1064 std::cout<<
"\033[0;35m";
1067 std::cout<<
"\033[1;35m";
1070 std::cout<<
"\033[0;33m";
1073 std::cout<<
"\033[1;33m";
1076 std::cout<<
"\033[0;37m";
1087 printf(
"% -9.3g ",
trackPoints_[i]->getSortingParameter());
1090 for (std::vector<AbsTrackRep*>::const_iterator rep =
trackReps_.begin(); rep !=
trackReps_.end(); ++rep) {
1112 std::cout <<
" -> ";
1133 std::cout <<
" <- ";
1163 std::cout <<
"=======================================================================================\n";
1164 std::cout <<
"genfit::Track, containing " <<
trackPoints_.size() <<
" TrackPoints and " <<
trackReps_.size() <<
" TrackReps.\n";
1167 for (
unsigned int i=0; i<
trackReps_.size(); ++i) {
1168 std::cout <<
" TrackRep Nr. " << i;
1170 std::cout <<
" (This is the cardinal rep)";
1175 std::cout <<
"---------------------------------------------------------------------------------------\n";
1178 std::cout <<
"TrackPoint Nr. " << i <<
"\n";
1180 std::cout <<
"..........................................................................\n";
1183 for (std::map< const AbsTrackRep*, FitStatus* >::const_iterator it=
fitStatuses_.begin(); it!=
fitStatuses_.end(); ++it) {
1184 it->second->Print();
1187 std::cout <<
"=======================================================================================\n";
1196 std::map<const AbsTrackRep*, const KalmanFitterInfo*> prevFis;
1200 std::cerr <<
"Track::checkConsistency(): stateSeed_ dimension != 6" << std::endl;
1205 std::cerr <<
"Track::checkConsistency(): covSeed_ dimension != 6" << std::endl;
1210 std::cerr <<
"Track::checkConsistency(): Warning: covSeed_ is zero" << std::endl;
1216 std::cerr <<
"Track::checkConsistency(): cardinalRep id " <<
cardinalRep_ <<
" out of bounds" << std::endl;
1220 for (std::vector<AbsTrackRep*>::const_iterator rep =
trackReps_.begin(); rep !=
trackReps_.end(); ++rep) {
1222 if ((*rep) == NULL) {
1223 std::cerr <<
"Track::checkConsistency(): TrackRep is NULL" << std::endl;
1228 TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle((*rep)->getPDG());
1229 if (particle == NULL) {
1230 std::cerr <<
"Track::checkConsistency(): TrackRep pdg ID " << (*rep)->getPDG() <<
" is not valid" << std::endl;
1239 if ((*tp) == NULL) {
1240 std::cerr <<
"Track::checkConsistency(): TrackPoint is NULL" << std::endl;
1244 if ((*tp)->getTrack() !=
this) {
1245 std::cerr <<
"Track::checkConsistency(): TrackPoint does not point back to this track" << std::endl;
1250 const std::vector<AbsMeasurement*>& rawMeasurements = (*tp)->getRawMeasurements();
1251 for (std::vector<AbsMeasurement*>::const_iterator
m = rawMeasurements.begin();
m != rawMeasurements.end(); ++
m) {
1254 std::cerr <<
"Track::checkConsistency(): Measurement is NULL" << std::endl;
1258 if ((*m)->getTrackPoint() != *tp) {
1259 std::cerr <<
"Track::checkConsistency(): Measurement does not point back to correct TrackPoint" << std::endl;
1265 std::vector<AbsFitterInfo*> fitterInfos = (*tp)->getFitterInfos();
1266 for (std::vector<AbsFitterInfo*>::const_iterator fi = fitterInfos.begin(); fi != fitterInfos.end(); ++fi) {
1268 if ((*fi) == NULL) {
1269 std::cerr <<
"Track::checkConsistency(): FitterInfo is NULL. TrackPoint: " << *tp << std::endl;
1273 if (!( (*fi)->checkConsistency() ) ) {
1274 std::cerr <<
"Track::checkConsistency(): FitterInfo not consistent. TrackPoint: " << *tp << std::endl;
1280 for (std::vector<AbsTrackRep*>::const_iterator rep =
trackReps_.begin(); rep !=
trackReps_.end(); ++rep) {
1281 if ( (*rep) == (*fi)->getRep() ) {
1286 std::cerr <<
"Track::checkConsistency(): fitterInfo points to TrackRep which is not in Track" << std::endl;
1291 if (prevFis[(*fi)->getRep()] != NULL &&
1293 prevFis[(*fi)->getRep()]->hasReferenceState() ) {
1295 double prevLen = prevFis[(*fi)->getRep()]->getReferenceState()->getBackwardSegmentLength();
1296 if (fabs(prevLen + len) > 1E-10 ) {
1297 std::cerr <<
"Track::checkConsistency(): segment lengths of reference states for rep " << (*fi)->getRep() <<
" (id " <<
getIdForRep((*fi)->getRep()) <<
") at TrackPoint " << (*tp) <<
" don't match" << std::endl;
1298 std::cerr << prevLen <<
" + " << len <<
" = " << prevLen + len << std::endl;
1299 std::cerr <<
"TrackPoint " << *tp <<
", FitterInfo " << *fi <<
", rep " <<
getIdForRep((*fi)->getRep()) << std::endl;
1307 prevFis[(*fi)->getRep()] = NULL;
1315 std::vector<TrackPoint*> trackPointsWithMeasurement;
1318 if ((*it)->hasRawMeasurements()) {
1319 trackPointsWithMeasurement.push_back(*it);
1324 std::cerr <<
"Track::checkConsistency(): trackPointsWithMeasurement_ has incorrect size" << std::endl;
1328 for (
unsigned int i = 0; i < trackPointsWithMeasurement.size(); ++i) {
1330 std::cerr <<
"Track::checkConsistency(): trackPointsWithMeasurement_ is not correct" << std::endl;
1332 std::cerr <<
"should have id " << i <<
", adress " << trackPointsWithMeasurement[i] << std::endl;
1344 std::cout <<
"Track::trackHasChanged \n";
1350 for (std::map< const AbsTrackRep*, FitStatus* >::const_iterator it=
fitStatuses_.begin(); it!=
fitStatuses_.end(); ++it) {
1351 it->second->setHasTrackChanged();
1361 if ((*it)->hasRawMeasurements()) {
1368void Track::Streamer(TBuffer &R__b)
1371 const bool streamTrackPoints =
true;
1375 if (R__b.IsReading()) {
1377 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
if (R__v) { }
1378 TObject::Streamer(R__b);
1380 std::vector<AbsTrackRep*> &R__stl =
trackReps_;
1384 Error(
"trackReps_ streamer",
"Missing the TClass object for genfit::AbsTrackRep!");
1389 R__stl.reserve(R__n);
1390 for (R__i = 0; R__i < R__n; R__i++) {
1393 R__stl.push_back(R__t);
1397 if (streamTrackPoints)
1403 Error(
"trackPoints_ streamer",
"Missing the TClass object for genfit::TrackPoint!");
1408 R__stl.reserve(R__n);
1409 for (R__i = 0; R__i < R__n; R__i++) {
1414 R__stl.push_back(R__t);
1418 std::map<const AbsTrackRep*,FitStatus*> &R__stl =
fitStatuses_;
1422 Error(
"fitStatuses_ streamer",
"Missing the TClass object for genfit::FitStatus!");
1427 for (R__i = 0; R__i < R__n; R__i++) {
1438 R__b.CheckByteCount(R__s, R__c, thisClass::IsA());
1442 R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE);
1443 TObject::Streamer(R__b);
1445 std::vector<AbsTrackRep*> &R__stl =
trackReps_;
1446 int R__n=
int(R__stl.size());
1451 Error(
"trackReps_ streamer",
"Missing the TClass object for genfit::AbsTrackRep!");
1454 std::vector<AbsTrackRep*>::iterator R__k;
1455 for (R__k = R__stl.begin(); R__k != R__stl.end(); ++R__k) {
1461 if (streamTrackPoints)
1464 int R__n=
int(R__stl.size());
1467 std::vector<TrackPoint*>::iterator R__k;
1468 for (R__k = R__stl.begin(); R__k != R__stl.end(); ++R__k) {
1474 std::map<const AbsTrackRep*,FitStatus*> &R__stl =
fitStatuses_;
1475 int R__n=
int(R__stl.size());
1480 Error(
"fitStatuses_ streamer",
"Missing the TClass object for genfit::AbsTrackRep!");
1483 std::map<const AbsTrackRep*,FitStatus*>::iterator R__k;
1492 for (R__k = R__stl.begin();
n < 1; ++R__k){
1494 std::cout <<
"i am here " << (*R__k).first <<
" "<<
n<<
" "<<(*R__k).second << std::endl;
1500 R__b << ((*R__k).second);
1507 R__b.SetByteCount(R__c, kTRUE);
This class collects all information needed and produced by a specific AbsFitter and is specific to on...
virtual bool hasForwardUpdate() const =0
virtual bool hasForwardPrediction() const =0
virtual bool hasBackwardUpdate() const =0
virtual const MeasuredStateOnPlane & getFittedState(bool biased=true) const =0
virtual bool hasReferenceState() const =0
virtual void Print(const Option_t *="") const
virtual bool hasBackwardPrediction() const =0
virtual bool hasMeasurements() const =0
Contains the measurement and covariance in raw detector coordinates.
Abstract base class for a track representation.
virtual double getTOF() const =0
Get the time of flight [ns] of the last extrapolation.
virtual double extrapolateToPlane(StateOnPlane &state, const genfit::SharedPlanePtr &plane, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to plane, and returns the extrapolation length and, via reference,...
bool switchPDGSign()
try to multiply pdg code with -1. (Switch from particle to anti-particle and vice versa).
virtual AbsTrackRep * clone() const =0
Clone the trackRep.
Exception class for error handling in GENFIT (provides storage for diagnostic information)
void setFatal(bool b=true)
Set fatal flag.
Class where important numbers and properties of a fit can be stored.
FitStatus for use with AbsKalmanFitter implementations.
Collects information needed and produced by a AbsKalmanFitter implementations and is specific to one ...
ReferenceStateOnPlane * getReferenceState() const
bool hasReferenceState() const
void fixWeights(bool arg=true)
StateOnPlane with additional covariance matrix.
TMatrixDSym get6DCov() const
Factory object to create AbsMeasurement objects from digitized and clustered data.
Measurement class implementing a planar hit geometry (1 or 2D).
double getForwardSegmentLength() const
A state with arbitrary dimension defined in a DetPlane.
TVectorD get6DState() const
const SharedPlanePtr & getPlane() const
Track candidate – seed values and indices.
const TVectorD & getStateSeed() const
Returns the 6D seed state; should be in global coordinates.
const TMatrixDSym & getCovSeed() const
get the covariance matrix seed (6D).
Helper class for TrackPoint sorting, used in Track::sort().
Object containing AbsMeasurement and AbsFitterInfo objects.
AbsFitterInfo * getFitterInfo(const AbsTrackRep *rep=NULL) const
Get fitterInfo for rep. Per default, use cardinal rep.
bool hasRawMeasurements() const
void setTrack(Track *track)
void fixupRepsForReading()
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
TrackPoint * getPoint(int id) const
void addTrackRep(AbsTrackRep *trackRep)
std::map< const AbsTrackRep *, FitStatus * > fitStatuses_
helper
void setCardinalRep(int id)
AbsTrackRep * getTrackRep(int id) const
void deleteFitterInfo(int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
void deleteTrackRep(int id)
Delete a AbsTrackRep and all corresponding AbsFitterInfo objects in every TrackPoint.
void reverseTrackPoints()
Flip the ordering of the TrackPoints.
bool udpateSeed(int id=0, AbsTrackRep *rep=NULL, bool biased=true)
void reverseMomSeed()
Flip direction of momentum seed.
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)
std::vector< AbsTrackRep * > trackReps_
unsigned int getNumPoints() const
int getIdForRep(const AbsTrackRep *rep) const
This is used when streaming TrackPoints.
void insertMeasurement(AbsMeasurement *measurement, int id=-1)
Creates a new TrackPoint containing the measurement, and adds it to the track.
void deleteForwardInfo(int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
TrackPoint * getPointWithMeasurement(int id) const
void prune(const Option_t *="CFLWRMIU")
Delete unneeded information from the Track.
KalmanFitStatus * getKalmanFitStatus(const AbsTrackRep *rep=NULL) const
If FitStatus is a KalmanFitStatus, return it. Otherwise return NULL.
void setCovSeed(const TMatrixDSym &c)
const MeasuredStateOnPlane & getFittedState(int id=0, const AbsTrackRep *rep=NULL, bool biased=true) const
Shortcut to get FittedStates.
virtual void Clear(Option_t *="")
void deleteBackwardInfo(int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
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 fixWeights(AbsTrackRep *rep=NULL, int startId=0, int endId=-1)
std::vector< TrackPoint * > trackPoints_
FitStatus * getFitStatus(const AbsTrackRep *rep=NULL) const
Get FitStatus for a AbsTrackRep. Per default, return FitStatus for cardinalRep.
void Print(const Option_t *="") const
AbsTrackRep * getCardinalRep() const
Get cardinal track representation.
void deleteReferenceInfo(int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
void deleteMeasurementInfo(int startId=0, int endId=-1, const AbsTrackRep *rep=NULL)
bool hasKalmanFitStatus(const AbsTrackRep *rep=NULL) const
Check if track has a KalmanFitStatus for given AbsTrackRep. Per default, check for cardinal rep.
bool checkConsistency() const
void mergeTrack(const Track *other, int id=-1)
Merge two tracks.
bool hasFitStatus(const AbsTrackRep *rep=NULL) const
Check if track has a FitStatus for given AbsTrackRep. Per default, check for cardinal rep.
TrackPoint * getPointWithMeasurementAndFitterInfo(int id, const AbsTrackRep *rep) const
void determineCardinalRep()
See with which AbsTrackRep the track was fitted best (converged fit w/ smallest chi2) and set the car...
bool sort()
Sort TrackPoint and according to their sorting parameters.
std::vector< TrackPoint * > trackPointsWithMeasurement_
void switchPDGSigns(AbsTrackRep *rep=NULL)
Switch the pdg signs of specified rep (of all reps if rep == NULL).
unsigned int cardinalRep_
void fillPointsWithMeasurement()
void reverseTrack()
Make track ready to be fitted in reverse direction.
double getTrackLen(AbsTrackRep *rep=NULL, int startId=0, int endId=-1) const
get TrackLength between to trackPoints (if NULL, for cardinal rep)
void setFitStatus(FitStatus *fitStatus, const AbsTrackRep *rep)
void setStateSeed(const TVectorD &s)