23 #include "TVirtualGeoTrack.h"
26 : fTrackReps(NULL),fCardinal_rep(0), fNextHitToFit(0), fSmooth(false)
33 : fTrackReps(NULL), fCardinal_rep(0), fNextHitToFit(0), fSmooth(false)
45 for(
unsigned int i=0;
i<
fHits.size();
i++) {
83 for(
unsigned int i=0;
i<
fHits.size();
i++) {
125 for(
unsigned int i=0;
i<
fHits.size();
i++) {
165 for(
unsigned int i=0;
i<
n; ++
i){
168 std::cout<<pos.X()<<
","<<pos.Y()<<
","<<pos.Z()<<std::endl;
169 geotrk->AddPoint(pos.X(),pos.Y(),pos.Z(),0);
178 std::vector<double>& result)
184 for(
unsigned int ih=0; ih<
nhits; ++ih){
192 TMatrixT<double> state(repDim,1);
202 result.push_back(res);
209 std::cout <<
"GFTrack::printBookkeeping()" << std::endl;
211 std::cout <<
"trackRep " <<
i <<
":" << std::endl;
222 std::cout <<
"GFTrack has " <<
getNumHits() <<
" detector hits." << std::endl;
228 for(
int i=0;retVal.size();++
i){
234 assert(
fHits.size()>1);
235 unsigned int detId,hitId,planeId;
238 unsigned int lastPlane=planeId;
239 retVal.push_back(
new std::vector<int>);
240 retVal.at(0)->push_back(0);
244 if(lastPlane==planeId){
249 retVal.push_back(
new std::vector<int>);
259 for(
int irep=0; irep<nreps; ++irep){
264 TMatrixT<double> cov = arep->
getCov();
265 for(
int i=0;
i<cov.GetNrows();++
i){
266 for(
int j=0;j<cov.GetNcols();++j){
271 cov[
i][j] = cov[
i][j] * blowUpFactor;
Base Class for genfit track representations. Defines interface for track parameterizations.
unsigned int getNumHits() const
virtual TMatrixT< double > residualVector(const GFAbsTrackRep *stateVector, const TMatrixT< double > &state, const GFDetPlane &d)
Calculate residual with respect to a track representation.
TMatrixT< double > getState() const
GFTrack()
Default constructor – needed for compatibility with ROOT.
void addHit(GFAbsRecoHit *theHit)
deprecated!
Detector plane genfit geometry class.
Track object for genfit. genfit algorithms work on these objects.
void getHitsByPlane(std::vector< std::vector< int > * > &retVal)
virtual const GFDetPlane & getDetPlane(GFAbsTrackRep *)=0
Get detector plane for a given track representation.
labels push_back("electron")
unsigned int getNHits() const
void getResiduals(unsigned int detId, unsigned int dim, unsigned int rep, std::vector< double > &result)
Get residuals.
void setCandidate(const GFTrackCand &cand, bool doreset=false)
set track candidate
unsigned int fNextHitToFit
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
TObjArray * fTrackReps
Collection of track representations.
GFTrack & operator=(const GFTrack &)
assignement operator
unsigned int getNumReps() const
Get number of track represenatations.
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.
virtual TVector3 getPos(const GFDetPlane &pl)=0
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
unsigned int getDim() const
returns dimension of state vector
void setCov(const TMatrixT< double > &aCov)
void blowUpCovs(double blowUpFactor)
this is needed to blow up the covariance matrix before a fitting pass drops off-diagonal elements and...
void getHit(unsigned int i, unsigned int &detId, unsigned int &hitId) const
Get detector ID and cluster index (hitId) for hit number i.
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
void reset()
Resets the GFTrack – deletes RecoHits!
Track candidate – a list of cluster indices.
virtual double extrapolate(const GFDetPlane &plane, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
Base Class for representing a Hit in GENFIT.
GFAbsTrackRep * getTrackRep(int id) const
Accessor for track representations.
virtual void Print() const
const GFTrackCand & getCand() const
void addTrackRep(GFAbsTrackRep *theTrackRep)
Add track represenation.
GFAbsRecoHit * getHit(int id) const
void fillGeoTrack(TVirtualGeoTrack *tr) const
Fill TVirtualGeoTrack object Cardinal representation is used.
void mergeHits(GFTrack *trk)
Merge two GFTracks. Only hits will be merged.
void printBookkeeping()
print bookkeeping
virtual GFAbsTrackRep * clone() const =0
TMatrixT< double > getCov() const
unsigned int fCardinal_rep