24 #ifndef GFABSTRACKREP_H 25 #define GFABSTRACKREP_H 143 virtual void extrapolateToPoint(
const TVector3 &point, TVector3 &poca, TVector3 &normVec);
153 virtual void extrapolateToLine(
const TVector3 &point1,
const TVector3 &point2, TVector3 &poca, TVector3 &normVec, TVector3 &poca_onwire);
160 virtual double stepalong(
double h, TVector3 &point, TVector3 &dir);
166 virtual double extrapolate(
const GFDetPlane &plane, TMatrixT<double> &statePred, TMatrixT<double> &covPred) = 0;
177 virtual void Print()
const;
233 virtual void setData(
const TMatrixT<double> &st,
const GFDetPlane &pl,
const TMatrixT<double> *cov =
nullptr,
const TMatrixT<double> *aux =
nullptr)
239 if (aux !=
nullptr) {
243 inline void setCov(
const TMatrixT<double> &aCov) { fCov = aCov; }
244 inline void setFirstState(
const TMatrixT<double> &aState) { fFirstState = aState; }
245 inline void setFirstCov(
const TMatrixT<double> &aCov) { fFirstCov = aCov; }
248 fFirstPlane = aPlane;
251 inline void setLastState(
const TMatrixT<double> &aState) { fLastState = aState; }
252 inline void setLastCov(
const TMatrixT<double> &aCov) { fLastCov = aCov; }
261 inline void setChiSqu(
double aChiSqu) { fChiSqu = aChiSqu; }
262 inline void setNDF(
unsigned int n) { fNdf = n; }
263 inline void addChiSqu(
double aChiSqu) { fChiSqu += aChiSqu; }
264 inline void addNDF(
unsigned int n) { fNdf += n; }
278 virtual void reset();
302 void Abort(std::string method);
virtual void extrapolateToLine(const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &normVec, TVector3 &poca_onwire)
This method extrapolates to the point of closest approach to a line.
virtual double stepalong(double h, TVector3 &point, TVector3 &dir)
make step of h cm along the track
Base Class for genfit track representations. Defines interface for track parameterizations.
unsigned int getDim() const
returns dimension of state vector
void addNDF(unsigned int n)
void setFirstState(const TMatrixT< double > &aState)
Detector plane genfit geometry class.
virtual void Print() const
virtual void getPosMom(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom)=0
TMatrixT< double > fLastState
void setFirstPlane(const GFDetPlane &aPlane)
TMatrixT< double > getCov() const
TMatrixT< double > getState() const
bool setInverted(bool f=true)
Deprecated. Should be removed soon.
TMatrixT< double > fFirstCov
TMatrixT< double > getLastCov() const
GFDetPlane getLastPlane() const
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov)
method which gets position, momentum and 6x6 covariance matrix
virtual void setData(const TMatrixT< double > &st, const GFDetPlane &pl, const TMatrixT< double > *cov=nullptr, const TMatrixT< double > *aux=nullptr)
Puts the track representation in a given state.
double getStateElem(int i) const
unsigned int fDimension
Dimensionality of track representation.
TMatrixT< double > fFirstState
state, cov and plane for first and last point in fit
virtual GFAbsTrackRep * prototype() const =0
unsigned int getNDF() const
GFDetPlane getFirstPlane() const
void setCov(const TMatrixT< double > &aCov)
virtual const TMatrixT< double > * getAuxInfo(const GFDetPlane &)
Get auxillary information from the track representation.
void setLastPlane(const GFDetPlane &aPlane)
virtual bool hasAuxInfo()
See if the track representation has auxillary information stored.
void setLastCov(const TMatrixT< double > &aCov)
TMatrixT< double > getLastState() const
bool fInverted
specifies the direction of flight of the particle
void addChiSqu(double aChiSqu)
virtual double extrapolate(const GFDetPlane &plane, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
TMatrixT< double > getFirstCov() const
Base Class for representing a Hit in GENFIT.
double getRedChiSqu() const
returns chi2/ndf
void setNDF(unsigned int n)
void setChiSqu(double aChiSqu)
double getCovElem(int i, int j) const
int fStatusFlag
status of track representation: 0 means everything's OK
void setFirstCov(const TMatrixT< double > &aCov)
void setLastState(const TMatrixT< double > &aState)
void setStatusFlag(int _val)
const GFDetPlane & getReferencePlane() const
TMatrixT< double > fState
The vector of track parameters.
double fChiSqu
chiSqu of the track fit
virtual void extrapolateToPoint(const TVector3 &point, TVector3 &poca, TVector3 &normVec)
This method is to extrapolate the track to point of closest approach to a point in space...
virtual void switchDirection()=0
TMatrixT< double > fLastCov
virtual GFAbsTrackRep * clone() const =0
void getPosMomCov(TVector3 &pos, TVector3 &mom, TMatrixT< double > &c)
virtual double getCharge() const =0
TMatrixT< double > getFirstState() const
TMatrixT< double > fCov
The covariance matrix.