LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
genf::GFTrack Class Reference

#include "GFTrack.h"

Inheritance diagram for genf::GFTrack:

Public Member Functions

 GFTrack ()
 Default constructor – needed for compatibility with ROOT. More...
 
 GFTrack (const GFTrack &)
 Copy constructor. More...
 
GFTrackoperator= (const GFTrack &)
 assignement operator More...
 
 GFTrack (GFAbsTrackRep *)
 Initializing constructor. More...
 
virtual ~GFTrack ()
 
void reset ()
 Resets the GFTrack – deletes RecoHits! More...
 
int getFailedHits (int repId=-1)
 return the number of failed Hits in track fit repId == -1 will use cardinal rep More...
 
std::vector< GFAbsRecoHit * > getHits ()
 
const GFTrackCandgetCand () const
 
GFAbsRecoHitgetHit (int id) const
 
unsigned int getNumHits () const
 
void mergeHits (GFTrack *trk)
 Merge two GFTracks. Only hits will be merged. More...
 
void releaseHits ()
 Clear hit vector. Note that hits will not be deleted! More...
 
unsigned int getNextHitToFit () const
 Accessor for fNextHitToFit. More...
 
void setNextHitToFit (unsigned int i)
 Set next hit to be used in a fit. More...
 
GFAbsTrackRepgetTrackRep (int id) const
 Accessor for track representations. More...
 
unsigned int getNumReps () const
 Get number of track represenatations. More...
 
GFAbsTrackRepgetCardinalRep () const
 Get cardinal track representation. More...
 
TVector3 getMom () const
 Get momentum at the present position. More...
 
TVector3 getMom (const GFDetPlane &pl) const
 Get momentum at GFDetPlane. More...
 
TVector3 getPos () const
 Get present position. More...
 
TVector3 getPos (const GFDetPlane &pl) const
 Get position at GFDetPlane. More...
 
void getPosMomCov (TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
 Get position, momentum, and 6x6 covariance at current position. More...
 
void getPosMomCov (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
 Get position, momentum, and 6x6 covariance at GFDetPlane. More...
 
double getChiSqu () const
 Get chi2. More...
 
unsigned int getNDF () const
 Get NDF. More...
 
double getRedChiSqu () const
 Get chi2/NDF. More...
 
double getCharge () const
 Get charge from fit. More...
 
void fillGeoTrack (TVirtualGeoTrack *tr) const
 Fill TVirtualGeoTrack object Cardinal representation is used. More...
 
void fillGeoTrack (TVirtualGeoTrack *tr, unsigned int repid) const
 Fill TVirtualGeoTrack object with data from specified track rep. More...
 
void addFailedHit (unsigned int irep, unsigned int id)
 
void addHit (GFAbsRecoHit *theHit)
 deprecated! More...
 
void addHit (GFAbsRecoHit *theHit, unsigned int detId, unsigned int hitId, double rho=0., unsigned int planeId=0)
 Add single hit. Updates the GFTrackCand. More...
 
void addHitVector (std::vector< GFAbsRecoHit * > hits)
 Add collection of hits. More...
 
void addTrackRep (GFAbsTrackRep *theTrackRep)
 Add track represenation. More...
 
GFBookkeepinggetBK (int index=-1)
 get GFBookKeeping object for particular track rep (default is cardinal rep) More...
 
void setCandidate (const GFTrackCand &cand, bool doreset=false)
 set track candidate More...
 
void setCardinalRep (unsigned int r)
 Choose cardinal track represenatation. More...
 
void setHitMeasuredCov (TMatrixT< Double_t > mat)
 
void setHitUpdate (TMatrixT< Double_t > mat)
 
void setHitChi2 (Double_t mat)
 
void setHitState (TMatrixT< Double_t > mat)
 
void setHitCov (TMatrixT< Double_t > mat)
 
void setHitCov7x7 (TMatrixT< Double_t > mat)
 
void setHitPlaneXYZ (TVector3 pl)
 
void setHitPlaneUxUyUz (TVector3 pl)
 
void setHitPlaneU (TVector3 pl)
 
void setHitPlaneV (TVector3 pl)
 
void setPDG (int pdgt)
 
std::vector< TMatrixT< Double_t > > getHitMeasuredCov ()
 
std::vector< TMatrixT< Double_t > > getHitUpdate ()
 
std::vector< Double_t > getHitChi2 ()
 
std::vector< TMatrixT< Double_t > > getHitState ()
 
std::vector< TMatrixT< Double_t > > getHitCov ()
 
std::vector< TMatrixT< Double_t > > getHitCov7x7 ()
 
std::vector< TVector3 > getHitPlaneXYZ ()
 
std::vector< TVector3 > getHitPlaneUxUyUz ()
 
std::vector< TVector3 > getHitPlaneU ()
 
std::vector< TVector3 > getHitPlaneV ()
 
int getPDG ()
 
void getResiduals (unsigned int detId, unsigned int dim, unsigned int rep, std::vector< double > &result)
 Get residuals. More...
 
void setRepAtHit (unsigned int irep, int ihit)
 set the hit index at which plane,state&cov of rep irep is defined More...
 
int getRepAtHit (unsigned int irep)
 get the hit index at which plane,state&cov of rep irep is defined More...
 
void clearRepAtHit ()
 clear the hit indices at which plane,state&cov of reps are defined More...
 
void printBookkeeping (std::ostream &out=std::cout) const
 print bookkeeping More...
 
void Print (std::ostream &out=std::cout) const
 
void clearBookkeeping ()
 
void clearFailedHits ()
 
void getHitsByPlane (std::vector< std::vector< int > * > &retVal)
 

Private Member Functions

virtual void Print (Option_t *) const
 

Private Attributes

TObjArray * fTrackReps
 Collection of track representations. More...
 
std::vector< GFAbsRecoHit * > fHits
 Collection of RecoHits. More...
 
std::vector< GFBookkeeping * > fBookkeeping
 Collection of Bookeeping objects for failed hits in every trackrep. More...
 
std::vector< int > fRepAtHit
 repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolations More...
 
GFTrackCand fCand
 Helper to store the indices of the hits in the track. See GFTrackCand for details. More...
 
std::vector< TMatrixT< Double_t > > fHitMeasCov
 
std::vector< TMatrixT< Double_t > > fHitUpdate
 
std::vector< TMatrixT< Double_t > > fHitState
 
std::vector< Double_t > fHitChi2
 
std::vector< TMatrixT< Double_t > > fHitCov7x7
 
std::vector< TMatrixT< Double_t > > fHitCov
 
std::vector< TVector3 > fHitPlaneXYZ
 
std::vector< TVector3 > fHitPlaneUxUyUz
 
std::vector< TVector3 > fHitPlaneU
 
std::vector< TVector3 > fHitPlaneV
 
int fPDG
 
unsigned int fCardinal_rep
 
unsigned int fNextHitToFit
 

Static Private Attributes

static const int fDefNumTrackReps = 10
 

Detailed Description

Definition at line 65 of file GFTrack.h.

Constructor & Destructor Documentation

genf::GFTrack::GFTrack ( )

Default constructor – needed for compatibility with ROOT.

Definition at line 31 of file GFTrack.cxx.

31  : fTrackReps(NULL), fCardinal_rep(0), fNextHitToFit(0)
32 {
33  //trackReps = new TObjArray(defNumTrackReps);
34 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
unsigned int fNextHitToFit
Definition: GFTrack.h:115
unsigned int fCardinal_rep
Definition: GFTrack.h:113
genf::GFTrack::GFTrack ( const GFTrack _tr)

Copy constructor.

Definition at line 52 of file GFTrack.cxx.

References addTrackRep(), fBookkeeping, fCand, fCardinal_rep, fHits, fNextHitToFit, fRepAtHit, fTrackReps, getHit(), getNumHits(), getNumReps(), and getTrackRep().

52  : TObject()
53 {
54  fCand = _tr.fCand;
55  fCardinal_rep = _tr.fCardinal_rep;
56  fNextHitToFit = _tr.fNextHitToFit;
57  for (unsigned int i = 0; i < _tr.getNumHits(); i++) {
58  fHits.push_back((_tr.getHit(i))->clone());
59  }
60  fTrackReps = NULL;
61  for (unsigned int i = 0; i < _tr.getNumReps(); i++) {
62  addTrackRep((_tr.getTrackRep(i))->clone());
63  }
64  for (unsigned int i = 0; i < fBookkeeping.size(); ++i)
65  delete fBookkeeping[i];
66  fBookkeeping.clear();
67 
68  for (unsigned int i = 0; i < _tr.fBookkeeping.size(); ++i) {
69  fBookkeeping.push_back(new GFBookkeeping(*(_tr.fBookkeeping.at(i))));
70  }
71  fRepAtHit = _tr.fRepAtHit;
72 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int fNextHitToFit
Definition: GFTrack.h:115
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
unsigned int fCardinal_rep
Definition: GFTrack.h:113
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void addTrackRep(GFAbsTrackRep *theTrackRep)
Add track represenation.
Definition: GFTrack.h:325
genf::GFTrack::GFTrack ( GFAbsTrackRep defaultRep)

Initializing constructor.

A track needs at least one track representation to be useable. The given track representation has to contain starting values for the fit!

Definition at line 25 of file GFTrack.cxx.

References addTrackRep().

26  : fTrackReps(NULL), fPDG(2112), fCardinal_rep(0), fNextHitToFit(0)
27 {
28  addTrackRep(defaultRep);
29 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
unsigned int fNextHitToFit
Definition: GFTrack.h:115
unsigned int fCardinal_rep
Definition: GFTrack.h:113
void addTrackRep(GFAbsTrackRep *theTrackRep)
Add track represenation.
Definition: GFTrack.h:325
genf::GFTrack::~GFTrack ( )
virtual

Definition at line 36 of file GFTrack.cxx.

References fBookkeeping, fHits, fTrackReps, and getNumReps().

37 {
38  if (fTrackReps != NULL) {
39  for (unsigned int i = 0; i < getNumReps(); i++) {
40  delete fTrackReps->At(i);
41  }
42  delete fTrackReps;
43  }
44  for (unsigned int i = 0; i < fHits.size(); i++) {
45  delete fHits[i];
46  }
47  for (unsigned int i = 0; i < fBookkeeping.size(); ++i) {
48  if (fBookkeeping.at(i) != NULL) delete fBookkeeping.at(i);
49  }
50 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80

Member Function Documentation

void genf::GFTrack::addFailedHit ( unsigned int  irep,
unsigned int  id 
)
inline

Definition at line 294 of file GFTrack.h.

Referenced by genf::GFKalman::fittingPass(), and genf::GFDaf::processTrack().

295  {
296  fBookkeeping.at(irep)->addFailedHit(id);
297  }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
void genf::GFTrack::addHit ( GFAbsRecoHit theHit)
inline

deprecated!

Definition at line 301 of file GFTrack.h.

Referenced by mergeHits(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().

301 { fHits.push_back(theHit); }
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void genf::GFTrack::addHit ( GFAbsRecoHit theHit,
unsigned int  detId,
unsigned int  hitId,
double  rho = 0.,
unsigned int  planeId = 0 
)
inline

Add single hit. Updates the GFTrackCand.

Definition at line 305 of file GFTrack.h.

References genf::GFTrackCand::addHit().

310  {
311  fHits.push_back(theHit);
312  fCand.addHit(detId, hitId, rho, planeId);
313  }
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void addHit(unsigned int detId, unsigned int hitId, double rho=0., unsigned int planeId=0)
Definition: GFTrackCand.cxx:74
void genf::GFTrack::addHitVector ( std::vector< GFAbsRecoHit * >  hits)
inline

Add collection of hits.

This is the standard way to fill the track with hit data

Definition at line 319 of file GFTrack.h.

References hits().

319 { fHits = hits; }
void hits()
Definition: readHits.C:15
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void genf::GFTrack::addTrackRep ( GFAbsTrackRep theTrackRep)
inline

Add track represenation.

The given track representation has to contain starting values for fit!

Definition at line 325 of file GFTrack.h.

Referenced by GFTrack(), and operator=().

326  {
327  if (fTrackReps == NULL) fTrackReps = new TObjArray(fDefNumTrackReps);
328  fTrackReps->Add(theTrackRep);
329  fBookkeeping.push_back(new GFBookkeeping());
330  fRepAtHit.push_back(-1);
331  }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
static const int fDefNumTrackReps
Definition: GFTrack.h:112
void genf::GFTrack::clearBookkeeping ( )
inline

Definition at line 425 of file GFTrack.h.

References getNumReps().

Referenced by genf::GFDaf::processTrack().

426  {
427  for (unsigned int i = 0; i < getNumReps(); ++i) {
428  fBookkeeping.at(i)->clearAll();
429  }
430  }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
void genf::GFTrack::clearFailedHits ( )
inline

Definition at line 432 of file GFTrack.h.

References getHitsByPlane(), getNumReps(), and lar::dump::vector().

Referenced by genf::GFDaf::processTrack().

433  {
434  for (unsigned int i = 0; i < getNumReps(); ++i) {
435  fBookkeeping.at(i)->clearFailedHits();
436  }
437  }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
void genf::GFTrack::clearRepAtHit ( )
inline

clear the hit indices at which plane,state&cov of reps are defined

Definition at line 412 of file GFTrack.h.

References getNumReps(), Print(), and printBookkeeping().

Referenced by genf::GFKalman::processTrack().

413  {
414  for (unsigned int i = 0; i < getNumReps(); ++i) {
415  fRepAtHit.at(i) = -1;
416  }
417  }
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
void genf::GFTrack::fillGeoTrack ( TVirtualGeoTrack *  tr) const
inline

Fill TVirtualGeoTrack object Cardinal representation is used.

Definition at line 284 of file GFTrack.h.

References fillGeoTrack().

Referenced by fillGeoTrack().

284 { fillGeoTrack(tr, fCardinal_rep); }
void fillGeoTrack(TVirtualGeoTrack *tr) const
Fill TVirtualGeoTrack object Cardinal representation is used.
Definition: GFTrack.h:284
unsigned int fCardinal_rep
Definition: GFTrack.h:113
void genf::GFTrack::fillGeoTrack ( TVirtualGeoTrack *  tr,
unsigned int  repid 
) const

Fill TVirtualGeoTrack object with data from specified track rep.

Definition at line 151 of file GFTrack.cxx.

References fCand, fHits, genf::GFTrackCand::getNHits(), genf::GFAbsTrackRep::getPos(), genf::GFAbsTrackRep::getState(), getTrackRep(), n, and genf::PrintROOTobject().

152 {
153  GFAbsTrackRep* rep = getTrackRep(repid);
154  unsigned int n = fCand.getNHits();
155  PrintROOTobject(std::cout, rep->getState());
156  for (unsigned int i = 0; i < n; ++i) { // loop over hits
157  GFDetPlane pl = fHits[i]->getDetPlane(rep);
158  TVector3 pos = rep->getPos(pl);
159 #ifdef NDEBUG
160  std::cout << pos.X() << "," << pos.Y() << "," << pos.Z() << std::endl;
161 #endif // NDEBUG
162  geotrk->AddPoint(pos.X(), pos.Y(), pos.Z(), 0);
163  } // end loop over hits
164 }
GFAbsTrackRep * getTrackRep(int id) const
Accessor for track representations.
Definition: GFTrack.h:193
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
unsigned int getNHits() const
Definition: GFTrackCand.h:134
void PrintROOTobject(std::ostream &, const ROOTOBJ &)
Small utility functions which print some ROOT objects into an output stream.
Definition: GFException.h:127
Char_t n[5]
GFBookkeeping* genf::GFTrack::getBK ( int  index = -1)
inline

get GFBookKeeping object for particular track rep (default is cardinal rep)

Definition at line 334 of file GFTrack.h.

References getNumReps(), setCandidate(), and GFException::setFatal().

Referenced by genf::GFKalman::fittingPass(), and genf::GFDaf::processTrack().

335  {
336  if (index == -1) return fBookkeeping.at(fCardinal_rep);
337  if ((unsigned int)index >= getNumReps())
338  throw GFException("genf::GFTrack::getBK(): index out of range", __LINE__, __FILE__)
339  .setFatal();
340  return fBookkeeping.at(index);
341  }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
unsigned int fCardinal_rep
Definition: GFTrack.h:113
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:47
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:75
const GFTrackCand& genf::GFTrack::getCand ( ) const
inline

Definition at line 159 of file GFTrack.h.

References fCand.

Referenced by mergeHits().

159 { return fCand; }
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
GFAbsTrackRep* genf::GFTrack::getCardinalRep ( ) const
inline

Get cardinal track representation.

The user has to choose which track rep should be considered the best one after the fit. Usually the track representation giving the smallest chi2 is choosen. By default the first in the list is returned.

Definition at line 208 of file GFTrack.h.

Referenced by getCharge(), getChiSqu(), getMom(), getNDF(), getPos(), getPosMomCov(), and getRedChiSqu().

209  {
210  return ((GFAbsTrackRep*)fTrackReps->At(fCardinal_rep));
211  }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
unsigned int fCardinal_rep
Definition: GFTrack.h:113
double genf::GFTrack::getCharge ( ) const
inline

Get charge from fit.

Cardinal representation is used.

Definition at line 280 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getCharge().

280 { return getCardinalRep()->getCharge(); }
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
virtual double getCharge() const =0
double genf::GFTrack::getChiSqu ( ) const
inline

Get chi2.

Cardinal representation is used.

Definition at line 262 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getChiSqu().

262 { return getCardinalRep()->getChiSqu(); }
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
double getChiSqu() const
int genf::GFTrack::getFailedHits ( int  repId = -1)
inline

return the number of failed Hits in track fit repId == -1 will use cardinal rep

Definition at line 147 of file GFTrack.h.

References fCardinal_rep.

Referenced by trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().

148  {
149  int theRep;
150  if (repId == -1)
151  theRep = fCardinal_rep;
152  else
153  theRep = repId;
154  return fBookkeeping.at(theRep)->getNumFailed();
155  }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int fCardinal_rep
Definition: GFTrack.h:113
GFAbsRecoHit* genf::GFTrack::getHit ( int  id) const
inline

Definition at line 161 of file GFTrack.h.

Referenced by getResiduals(), GFTrack(), mergeHits(), operator=(), genf::GFKalman::processHit(), and genf::GFDaf::processTrack().

161 { return fHits.at(id); }
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
std::vector<Double_t> genf::GFTrack::getHitChi2 ( )
inline

Definition at line 368 of file GFTrack.h.

References fHitChi2.

Referenced by trkf::Track3DKalmanSPS::produce().

368 { return fHitChi2; }
std::vector< Double_t > fHitChi2
Definition: GFTrack.h:102
std::vector<TMatrixT<Double_t> > genf::GFTrack::getHitCov ( )
inline

Definition at line 370 of file GFTrack.h.

References fHitCov.

Referenced by trkf::Track3DKalmanSPS::produce().

370 { return fHitCov; }
std::vector< TMatrixT< Double_t > > fHitCov
Definition: GFTrack.h:104
std::vector<TMatrixT<Double_t> > genf::GFTrack::getHitCov7x7 ( )
inline

Definition at line 371 of file GFTrack.h.

References fHitCov.

Referenced by trkf::Track3DKalmanSPS::produce().

371 { return fHitCov; }
std::vector< TMatrixT< Double_t > > fHitCov
Definition: GFTrack.h:104
std::vector<TMatrixT<Double_t> > genf::GFTrack::getHitMeasuredCov ( )
inline

Definition at line 366 of file GFTrack.h.

References fHitMeasCov.

Referenced by trkf::Track3DKalmanSPS::produce().

366 { return fHitMeasCov; }
std::vector< TMatrixT< Double_t > > fHitMeasCov
Definition: GFTrack.h:99
std::vector<TVector3> genf::GFTrack::getHitPlaneU ( )
inline

Definition at line 374 of file GFTrack.h.

References fHitPlaneU.

Referenced by trkf::Track3DKalmanSPS::produce().

374 { return fHitPlaneU; }
std::vector< TVector3 > fHitPlaneU
Definition: GFTrack.h:107
std::vector<TVector3> genf::GFTrack::getHitPlaneUxUyUz ( )
inline

Definition at line 373 of file GFTrack.h.

References fHitPlaneUxUyUz.

Referenced by trkf::Track3DKalmanSPS::produce().

373 { return fHitPlaneUxUyUz; }
std::vector< TVector3 > fHitPlaneUxUyUz
Definition: GFTrack.h:106
std::vector<TVector3> genf::GFTrack::getHitPlaneV ( )
inline

Definition at line 375 of file GFTrack.h.

References fHitPlaneV.

Referenced by trkf::Track3DKalmanSPS::produce().

375 { return fHitPlaneV; }
std::vector< TVector3 > fHitPlaneV
Definition: GFTrack.h:108
std::vector<TVector3> genf::GFTrack::getHitPlaneXYZ ( )
inline

Definition at line 372 of file GFTrack.h.

References fHitPlaneXYZ.

Referenced by trkf::Track3DKalmanSPS::produce().

372 { return fHitPlaneXYZ; }
std::vector< TVector3 > fHitPlaneXYZ
Definition: GFTrack.h:105
std::vector<GFAbsRecoHit*> genf::GFTrack::getHits ( )
inline

Definition at line 157 of file GFTrack.h.

References fHits.

157 { return fHits; }
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void genf::GFTrack::getHitsByPlane ( std::vector< std::vector< int > * > &  retVal)

use planeId information of GFTrackCand and return by ref groups of hit ids which are in the same planes.

Definition at line 215 of file GFTrack.cxx.

References fCand, fHits, genf::GFTrackCand::getHitWithPlane(), genf::GFTrackCand::getNHits(), and GFException::setFatal().

Referenced by clearFailedHits(), and genf::GFDaf::processTrack().

216 {
217  for (int i = 0; retVal.size(); ++i) {
218  delete retVal.at(i);
219  }
220  retVal.clear();
221  //this method can only be called when all hits have been loaded
222  if (fHits.size() != fCand.getNHits())
223  throw GFException("genf::GFTrack::getResiduals(): inconsistent hits", __LINE__, __FILE__)
224  .setFatal();
225  if (fHits.size() < 2)
226  throw GFException("genf::GFTrack::getResiduals(): less than 2 hits", __LINE__, __FILE__)
227  .setFatal();
228  unsigned int detId, hitId, planeId;
229  fCand.getHitWithPlane(0, detId, hitId, planeId);
230  // std::cout << "$$$ " << 0 << " " << detId << " " << hitId << " " << planeId << std::endl;
231  unsigned int lastPlane = planeId;
232  retVal.push_back(new std::vector<int>);
233  retVal.at(0)->push_back(0);
234  for (unsigned int i = 1; i < fCand.getNHits(); ++i) {
235  fCand.getHitWithPlane(i, detId, hitId, planeId);
236  //std::cout << "$$$ " << i << " " << detId << " " << hitId << " " << planeId << std::endl;
237  if (lastPlane == planeId) { retVal.at(retVal.size() - 1)->push_back(i); }
238  else {
239  lastPlane = planeId;
240  retVal.push_back(new std::vector<int>);
241  retVal.at(retVal.size() - 1)->push_back(i);
242  }
243  }
244 }
void getHitWithPlane(unsigned int i, unsigned int &detId, unsigned int &hitId, unsigned int &planeId) const
Get detector ID and cluster index (hitId) for hit number i with plane id.
Definition: GFTrackCand.h:120
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
unsigned int getNHits() const
Definition: GFTrackCand.h:134
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:47
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:75
std::vector<TMatrixT<Double_t> > genf::GFTrack::getHitState ( )
inline

Definition at line 369 of file GFTrack.h.

References fHitState.

Referenced by trkf::Track3DKalmanSPS::produce().

369 { return fHitState; }
std::vector< TMatrixT< Double_t > > fHitState
Definition: GFTrack.h:101
std::vector<TMatrixT<Double_t> > genf::GFTrack::getHitUpdate ( )
inline

Definition at line 367 of file GFTrack.h.

References fHitUpdate.

Referenced by trkf::Track3DKalmanSPS::produce().

367 { return fHitUpdate; }
std::vector< TMatrixT< Double_t > > fHitUpdate
Definition: GFTrack.h:100
TVector3 genf::GFTrack::getMom ( ) const
inline

Get momentum at the present position.

Cardinal representation is used.

Definition at line 217 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getMom().

217 { return getCardinalRep()->getMom(); }
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
virtual TVector3 getMom(const GFDetPlane &pl)=0
TVector3 genf::GFTrack::getMom ( const GFDetPlane pl) const
inline

Get momentum at GFDetPlane.

The track will be extrapolated to GFDetPlane to get the momentum there. The track will not be modified. Cardinal representation is used.

Definition at line 224 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getMom().

224 { return getCardinalRep()->getMom(pl); }
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
virtual TVector3 getMom(const GFDetPlane &pl)=0
unsigned int genf::GFTrack::getNDF ( ) const
inline

Get NDF.

Cardinal representation is used.

Definition at line 268 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getNDF().

268 { return getCardinalRep()->getNDF(); }
unsigned int getNDF() const
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
unsigned int genf::GFTrack::getNextHitToFit ( ) const
inline

Accessor for fNextHitToFit.

Definition at line 185 of file GFTrack.h.

References fNextHitToFit.

Referenced by genf::GFKalman::fittingPass().

185 { return fNextHitToFit; }
unsigned int fNextHitToFit
Definition: GFTrack.h:115
unsigned int genf::GFTrack::getNumHits ( ) const
inline

Definition at line 163 of file GFTrack.h.

References mergeHits().

Referenced by genf::GFKalman::fittingPass(), getResiduals(), GFTrack(), mergeHits(), operator=(), Print(), genf::GFKalman::processHit(), genf::GFDaf::processTrack(), and genf::GFKalman::processTrack().

163 { return fHits.size(); }
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
unsigned int genf::GFTrack::getNumReps ( ) const
inline
int genf::GFTrack::getPDG ( )
inline

Definition at line 377 of file GFTrack.h.

References fPDG, and getResiduals().

Referenced by genf::GFKalman::processHit().

377 { return fPDG; }
TVector3 genf::GFTrack::getPos ( ) const
inline

Get present position.

Cardinal representation is used.

Definition at line 230 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getPos().

230 { return getCardinalRep()->getPos(); }
virtual TVector3 getPos(const GFDetPlane &pl)=0
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
TVector3 genf::GFTrack::getPos ( const GFDetPlane pl) const
inline

Get position at GFDetPlane.

The track will be extrapolated to GFDetPlane to get the position there. The track will not be modified. Cardinal representation is used.

Definition at line 237 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getPos().

237 { return getCardinalRep()->getPos(pl); }
virtual TVector3 getPos(const GFDetPlane &pl)=0
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
void genf::GFTrack::getPosMomCov ( TVector3 &  pos,
TVector3 &  mom,
TMatrixT< Double_t > &  cov 
)
inline

Get position, momentum, and 6x6 covariance at current position.

Cardinal representation is used.

Definition at line 243 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getPosMomCov().

244  {
245  getCardinalRep()->getPosMomCov(pos, mom, cov);
246  }
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
method which gets position, momentum and 6x6 covariance matrix
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
void genf::GFTrack::getPosMomCov ( const GFDetPlane pl,
TVector3 &  pos,
TVector3 &  mom,
TMatrixT< Double_t > &  cov 
)
inline

Get position, momentum, and 6x6 covariance at GFDetPlane.

The track will be extrapolated to GFDetPlane to get everything there. The track will not be modified. Cardinal representation is used.

Definition at line 253 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getPosMomCov().

254  {
255  getCardinalRep()->getPosMomCov(pl, pos, mom, cov);
256  }
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
method which gets position, momentum and 6x6 covariance matrix
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
double genf::GFTrack::getRedChiSqu ( ) const
inline

Get chi2/NDF.

Cardinal representation is used.

Definition at line 274 of file GFTrack.h.

References getCardinalRep(), and genf::GFAbsTrackRep::getRedChiSqu().

274 { return getCardinalRep()->getRedChiSqu(); }
GFAbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition: GFTrack.h:208
double getRedChiSqu() const
returns chi2/ndf
int genf::GFTrack::getRepAtHit ( unsigned int  irep)
inline

get the hit index at which plane,state&cov of rep irep is defined

Definition at line 402 of file GFTrack.h.

References getNumReps(), and GFException::setFatal().

Referenced by genf::GFKalman::processHit().

403  {
404  if (irep >= getNumReps())
405  throw GFException("genf::GFTrack::getRepAtHit(): index out of range", __LINE__, __FILE__)
406  .setFatal();
407  return fRepAtHit.at(irep);
408  }
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:47
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:75
void genf::GFTrack::getResiduals ( unsigned int  detId,
unsigned int  dim,
unsigned int  rep,
std::vector< double > &  result 
)

Get residuals.

Parameters
detIdwhich detector?
dim= index of coordinate to choose from resiudal vector
repwhich track representation?
resultresults are written to this vector

Definition at line 166 of file GFTrack.cxx.

References genf::GFAbsTrackRep::extrapolate(), fCand, genf::GFAbsRecoHit::getDetPlane(), genf::GFAbsTrackRep::getDim(), genf::GFTrackCand::getHit(), getHit(), getNumHits(), getNumReps(), getTrackRep(), and genf::GFAbsRecoHit::residualVector().

Referenced by getPDG().

170 {
171  unsigned int nhits = getNumHits();
172  if (repid >= getNumReps()) return;
173  GFAbsTrackRep* rep = getTrackRep(repid); //->clone();
174  for (unsigned int ih = 0; ih < nhits; ++ih) { // loop over hits
175  unsigned int anid;
176  unsigned int dummy;
177  fCand.getHit(ih, anid, dummy); // check if this is a hit we want to look at
178  if (anid == detId) {
179  GFAbsRecoHit* hit = getHit(ih);
180  // extrapolate trackrep there
181  int repDim = rep->getDim();
182  TMatrixT<Double_t> state(repDim, 1);
183  GFDetPlane pl = hit->getDetPlane(rep);
184 
185  rep->extrapolate(pl, state);
186  //rep->setState(state);
187  //rep->setReferencePlane(pl);
188  double res = hit->residualVector(rep, state, pl)[dim][0];
189 
190  //std::cout<<res<<std::endl;
191 
192  result.push_back(res);
193  }
194  }
195 }
GFAbsTrackRep * getTrackRep(int id) const
Accessor for track representations.
Definition: GFTrack.h:193
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
GFAbsRecoHit * getHit(int id) const
Definition: GFTrack.h:161
Detector simulation of raw signals on wires.
unsigned int getNumHits() const
Definition: GFTrack.h:163
void getHit(unsigned int i, unsigned int &detId, unsigned int &hitId) const
Get detector ID and cluster index (hitId) for hit number i.
Definition: GFTrackCand.h:93
GFAbsTrackRep* genf::GFTrack::getTrackRep ( int  id) const
inline

Accessor for track representations.

Definition at line 193 of file GFTrack.h.

Referenced by genf::GFDaf::blowUpCovs(), genf::GFKalman::blowUpCovs(), genf::GFKalman::blowUpCovsDiag(), fillGeoTrack(), genf::GFKalman::fittingPass(), getResiduals(), GFTrack(), operator=(), Print(), genf::GFKalman::processHit(), genf::GFDaf::processTrack(), genf::GFKalman::processTrack(), and genf::GFKalman::switchDirection().

194  {
195  return reinterpret_cast<GFAbsTrackRep*>(fTrackReps->At(id));
196  }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
void genf::GFTrack::mergeHits ( GFTrack trk)

Merge two GFTracks. Only hits will be merged.

All hits from trk will be merged into this GFTrack. trk will be empty afterwards.

Kalman::continueTrack can be used to include the newly added hits in the fit.

Note that the new hits are inserted at the end of the present track!

Definition at line 127 of file GFTrack.cxx.

References addHit(), fHits, getCand(), genf::GFTrackCand::getHit(), getHit(), and getNumHits().

Referenced by getNumHits().

128 {
129  unsigned int nhits = trk->getNumHits();
130  for (unsigned int i = 0; i < nhits; ++i) {
131  unsigned int detId;
132  unsigned int hitId;
133  trk->getCand().getHit(i, detId, hitId);
134  GFAbsRecoHit* hit = trk->getHit(i);
135  addHit(hit, detId, hitId);
136  }
137  trk->fHits.clear();
138 }
Detector simulation of raw signals on wires.
void addHit(GFAbsRecoHit *theHit)
deprecated!
Definition: GFTrack.h:301
genf::GFTrack & genf::GFTrack::operator= ( const GFTrack _tr)

assignement operator

Definition at line 74 of file GFTrack.cxx.

References addTrackRep(), genf::GFAbsTrackRep::clone(), fBookkeeping, fCand, fCardinal_rep, fHits, fNextHitToFit, fRepAtHit, fTrackReps, getHit(), getNumHits(), getNumReps(), and getTrackRep().

75 {
76  if (fTrackReps != NULL) {
77  for (unsigned int i = 0; i < getNumReps(); i++) {
78  delete fTrackReps->At(i);
79  }
80  delete fTrackReps;
81  fTrackReps = NULL;
82  }
83  for (unsigned int i = 0; i < fHits.size(); i++) {
84  delete fHits[i];
85  }
86  for (unsigned int i = 0; i < fBookkeeping.size(); ++i) {
87  if (fBookkeeping.at(i) != NULL) delete fBookkeeping.at(i);
88  }
89 
90  for (unsigned int i = 0; i < _tr.getNumReps(); ++i) {
91  addTrackRep(_tr.getTrackRep(i)->clone());
92  }
93  fCand = _tr.fCand;
94  fCardinal_rep = _tr.fCardinal_rep;
95  fNextHitToFit = _tr.fNextHitToFit;
96  for (unsigned int i = 0; i < _tr.getNumHits(); i++) {
97  fHits.push_back((_tr.getHit(i))->clone());
98  }
99 
100  //clear the empty bookeeping objs made by addTrackRep and copy the others
101  for (unsigned int i = 0; i < fBookkeeping.size(); ++i)
102  delete fBookkeeping[i];
103  fBookkeeping.clear();
104  for (unsigned int i = 0; i < _tr.fBookkeeping.size(); ++i) {
105  fBookkeeping.push_back(new GFBookkeeping(*(_tr.fBookkeeping.at(i))));
106  }
107  fRepAtHit = _tr.fRepAtHit;
108 
109  return *this;
110 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int fNextHitToFit
Definition: GFTrack.h:115
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
unsigned int fCardinal_rep
Definition: GFTrack.h:113
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void addTrackRep(GFAbsTrackRep *theTrackRep)
Add track represenation.
Definition: GFTrack.h:325
void genf::GFTrack::Print ( std::ostream &  out = std::cout) const

Definition at line 206 of file GFTrack.cxx.

References fBookkeeping, getNumHits(), getNumReps(), getTrackRep(), and genf::GFAbsTrackRep::Print().

Referenced by clearRepAtHit().

207 {
208  for (unsigned int i = 0; i < getNumReps(); ++i) {
209  getTrackRep(i)->Print(out);
210  fBookkeeping.at(i)->Print(out);
211  }
212  out << "GFTrack has " << getNumHits() << " detector hits." << std::endl;
213 }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
GFAbsTrackRep * getTrackRep(int id) const
Accessor for track representations.
Definition: GFTrack.h:193
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
unsigned int getNumHits() const
Definition: GFTrack.h:163
virtual void Print(std::ostream &out=std::cout) const
virtual void genf::GFTrack::Print ( Option_t *  ) const
inlineprivatevirtual

Definition at line 444 of file GFTrack.h.

445  {
446  throw std::logic_error(std::string(__func__) + "::Print(Option_t*) not available");
447  }
void genf::GFTrack::printBookkeeping ( std::ostream &  out = std::cout) const

print bookkeeping

Definition at line 197 of file GFTrack.cxx.

References fBookkeeping, and getNumReps().

Referenced by clearRepAtHit().

198 {
199  out << "GFTrack::printBookkeeping()" << std::endl;
200  for (unsigned int i = 0; i < getNumReps(); ++i) {
201  out << "trackRep " << i << ":" << std::endl;
202  fBookkeeping.at(i)->Print(out);
203  }
204 }
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
void genf::GFTrack::releaseHits ( )
inline

Clear hit vector. Note that hits will not be deleted!

Be carefull not to create memory leaks here.

Definition at line 181 of file GFTrack.h.

181 { fHits.clear(); }
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void genf::GFTrack::reset ( )

Resets the GFTrack – deletes RecoHits!

Definition at line 112 of file GFTrack.cxx.

References fBookkeeping, fHits, fRepAtHit, fTrackReps, and getNumReps().

Referenced by setCandidate().

113 {
114  if (fTrackReps != NULL) {
115  for (unsigned int i = 0; i < getNumReps(); i++) {
116  delete fTrackReps->At(i);
117  delete fBookkeeping.at(i);
118  }
119  }
120  for (unsigned int i = 0; i < fHits.size(); i++) {
121  delete fHits[i];
122  }
123  fHits.clear();
124  fRepAtHit.clear();
125 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
Definition: GFTrack.h:86
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
Definition: GFTrack.h:80
void genf::GFTrack::setCandidate ( const GFTrackCand cand,
bool  doreset = false 
)

set track candidate

Definition at line 140 of file GFTrack.cxx.

References fCand, fTrackReps, getNumReps(), and reset().

Referenced by getBK().

141 {
142  fCand = cand;
143  // reset fits
144  if (doreset) {
145  for (unsigned int i = 0; i < getNumReps(); i++) {
146  ((GFAbsTrackRep*)fTrackReps->At(i))->reset();
147  }
148  }
149 }
TObjArray * fTrackReps
Collection of track representations.
Definition: GFTrack.h:76
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
Definition: GFTrack.h:96
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
void reset()
Resets the GFTrack – deletes RecoHits!
Definition: GFTrack.cxx:112
void genf::GFTrack::setCardinalRep ( unsigned int  r)
inline

Choose cardinal track represenatation.

See also
getCardinalRep

Definition at line 350 of file GFTrack.h.

References r.

351  {
352  if ((int)r < fTrackReps->GetEntriesFast()) fCardinal_rep = r;
353  }
TRandom r
Definition: spectrum.C:23
unsigned int fCardinal_rep
Definition: GFTrack.h:113
void genf::GFTrack::setHitChi2 ( Double_t  mat)
inline

Definition at line 357 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

357 { fHitChi2.push_back(mat); }
std::vector< Double_t > fHitChi2
Definition: GFTrack.h:102
Float_t mat
Definition: plot.C:38
void genf::GFTrack::setHitCov ( TMatrixT< Double_t >  mat)
inline

Definition at line 359 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

359 { fHitCov.push_back(mat); }
std::vector< TMatrixT< Double_t > > fHitCov
Definition: GFTrack.h:104
Float_t mat
Definition: plot.C:38
void genf::GFTrack::setHitCov7x7 ( TMatrixT< Double_t >  mat)
inline

Definition at line 360 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

360 { fHitCov7x7.push_back(mat); }
std::vector< TMatrixT< Double_t > > fHitCov7x7
Definition: GFTrack.h:103
Float_t mat
Definition: plot.C:38
void genf::GFTrack::setHitMeasuredCov ( TMatrixT< Double_t >  mat)
inline

Definition at line 355 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

355 { fHitMeasCov.push_back(mat); }
std::vector< TMatrixT< Double_t > > fHitMeasCov
Definition: GFTrack.h:99
Float_t mat
Definition: plot.C:38
void genf::GFTrack::setHitPlaneU ( TVector3  pl)
inline

Definition at line 363 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

363 { fHitPlaneU.push_back(pl); }
std::vector< TVector3 > fHitPlaneU
Definition: GFTrack.h:107
void genf::GFTrack::setHitPlaneUxUyUz ( TVector3  pl)
inline

Definition at line 362 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

362 { fHitPlaneUxUyUz.push_back(pl); }
std::vector< TVector3 > fHitPlaneUxUyUz
Definition: GFTrack.h:106
void genf::GFTrack::setHitPlaneV ( TVector3  pl)
inline

Definition at line 364 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

364 { fHitPlaneV.push_back(pl); }
std::vector< TVector3 > fHitPlaneV
Definition: GFTrack.h:108
void genf::GFTrack::setHitPlaneXYZ ( TVector3  pl)
inline

Definition at line 361 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

361 { fHitPlaneXYZ.push_back(pl); }
std::vector< TVector3 > fHitPlaneXYZ
Definition: GFTrack.h:105
void genf::GFTrack::setHitState ( TMatrixT< Double_t >  mat)
inline

Definition at line 358 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

358 { fHitState.push_back(mat); }
Float_t mat
Definition: plot.C:38
std::vector< TMatrixT< Double_t > > fHitState
Definition: GFTrack.h:101
void genf::GFTrack::setHitUpdate ( TMatrixT< Double_t >  mat)
inline

Definition at line 356 of file GFTrack.h.

Referenced by genf::GFKalman::processHit().

356 { fHitUpdate.push_back(mat); }
std::vector< TMatrixT< Double_t > > fHitUpdate
Definition: GFTrack.h:100
Float_t mat
Definition: plot.C:38
void genf::GFTrack::setNextHitToFit ( unsigned int  i)
inline

Set next hit to be used in a fit.

Definition at line 189 of file GFTrack.h.

Referenced by genf::GFKalman::fittingPass(), and genf::GFKalman::processTrack().

189 { fNextHitToFit = i; }
unsigned int fNextHitToFit
Definition: GFTrack.h:115
void genf::GFTrack::setPDG ( int  pdgt)
inline

Definition at line 365 of file GFTrack.h.

Referenced by trkf::Track3DKalmanSPS::produce().

365 { fPDG = pdgt; }
void genf::GFTrack::setRepAtHit ( unsigned int  irep,
int  ihit 
)
inline

set the hit index at which plane,state&cov of rep irep is defined

Definition at line 392 of file GFTrack.h.

References getNumReps(), and GFException::setFatal().

Referenced by genf::GFKalman::processHit().

393  {
394  if (irep >= getNumReps())
395  throw GFException("genf::GFTrack::setRepAtHit(): index out of range", __LINE__, __FILE__)
396  .setFatal();
397  fRepAtHit.at(irep) = ihit;
398  }
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Definition: GFTrack.h:91
unsigned int getNumReps() const
Get number of track represenatations.
Definition: GFTrack.h:200
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:47
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:75

Member Data Documentation

std::vector<GFBookkeeping*> genf::GFTrack::fBookkeeping
private

Collection of Bookeeping objects for failed hits in every trackrep.

Definition at line 86 of file GFTrack.h.

Referenced by GFTrack(), operator=(), Print(), printBookkeeping(), reset(), and ~GFTrack().

GFTrackCand genf::GFTrack::fCand
private

Helper to store the indices of the hits in the track. See GFTrackCand for details.

Definition at line 96 of file GFTrack.h.

Referenced by fillGeoTrack(), getCand(), getHitsByPlane(), getResiduals(), GFTrack(), operator=(), and setCandidate().

unsigned int genf::GFTrack::fCardinal_rep
private

Definition at line 113 of file GFTrack.h.

Referenced by getFailedHits(), GFTrack(), and operator=().

const int genf::GFTrack::fDefNumTrackReps = 10
staticprivate

Definition at line 112 of file GFTrack.h.

std::vector<Double_t> genf::GFTrack::fHitChi2
private

Definition at line 102 of file GFTrack.h.

Referenced by getHitChi2().

std::vector<TMatrixT<Double_t> > genf::GFTrack::fHitCov
private

Definition at line 104 of file GFTrack.h.

Referenced by getHitCov(), and getHitCov7x7().

std::vector<TMatrixT<Double_t> > genf::GFTrack::fHitCov7x7
private

Definition at line 103 of file GFTrack.h.

std::vector<TMatrixT<Double_t> > genf::GFTrack::fHitMeasCov
private

Definition at line 99 of file GFTrack.h.

Referenced by getHitMeasuredCov().

std::vector<TVector3> genf::GFTrack::fHitPlaneU
private

Definition at line 107 of file GFTrack.h.

Referenced by getHitPlaneU().

std::vector<TVector3> genf::GFTrack::fHitPlaneUxUyUz
private

Definition at line 106 of file GFTrack.h.

Referenced by getHitPlaneUxUyUz().

std::vector<TVector3> genf::GFTrack::fHitPlaneV
private

Definition at line 108 of file GFTrack.h.

Referenced by getHitPlaneV().

std::vector<TVector3> genf::GFTrack::fHitPlaneXYZ
private

Definition at line 105 of file GFTrack.h.

Referenced by getHitPlaneXYZ().

std::vector<GFAbsRecoHit*> genf::GFTrack::fHits
private

Collection of RecoHits.

Definition at line 80 of file GFTrack.h.

Referenced by fillGeoTrack(), getHits(), getHitsByPlane(), GFTrack(), mergeHits(), operator=(), reset(), and ~GFTrack().

std::vector<TMatrixT<Double_t> > genf::GFTrack::fHitState
private

Definition at line 101 of file GFTrack.h.

Referenced by getHitState().

std::vector<TMatrixT<Double_t> > genf::GFTrack::fHitUpdate
private

Definition at line 100 of file GFTrack.h.

Referenced by getHitUpdate().

unsigned int genf::GFTrack::fNextHitToFit
private

Definition at line 115 of file GFTrack.h.

Referenced by getNextHitToFit(), GFTrack(), and operator=().

int genf::GFTrack::fPDG
private

Definition at line 110 of file GFTrack.h.

Referenced by getPDG().

std::vector<int> genf::GFTrack::fRepAtHit
private

repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolations

Definition at line 91 of file GFTrack.h.

Referenced by GFTrack(), operator=(), and reset().

TObjArray* genf::GFTrack::fTrackReps
private

Collection of track representations.

this array is only to be added to in the addTrackRep method because the synchronized construction of bookkeeping objects and repAtHit array is ensured there. NEVER delete elements from this array! If this functionality will be need, it has to be done synchronized with bookkeeping!!

Definition at line 76 of file GFTrack.h.

Referenced by GFTrack(), operator=(), reset(), setCandidate(), and ~GFTrack().


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