23 #include "TVirtualGeoTrack.h" 26 : fTrackReps(NULL),fPDG(2112), fCardinal_rep(0), fNextHitToFit(0)
44 for(
unsigned int i=0;i<
fHits.size();i++) {
60 for(
unsigned int i=0; i<_tr.
getNumReps();i++) {
80 for(
unsigned int i=0;i<
fHits.size();i++) {
118 for(
unsigned int i=0;i<
fHits.size();i++) {
128 for(
unsigned int i=0;i<nhits;++i){
157 for(
unsigned int i=0; i<
n; ++i){
161 std::cout<<pos.X()<<
","<<pos.Y()<<
","<<pos.Z()<<
std::endl;
163 geotrk->AddPoint(pos.X(),pos.Y(),pos.Z(),0);
172 std::vector<double>&
result)
177 for(
unsigned int ih=0;
ih<nhits; ++
ih){
185 TMatrixT<Double_t> state(repDim,1);
195 result.push_back(res);
202 out <<
"GFTrack::printBookkeeping()" <<
std::endl;
204 out <<
"trackRep " << i <<
":" <<
std::endl;
221 for(
int i=0;retVal.size();++i){
227 throw GFException(
"genf::GFTrack::getResiduals(): inconsistent hits", __LINE__, __FILE__).
setFatal();
228 if (
fHits.size() < 2)
229 throw GFException(
"genf::GFTrack::getResiduals(): less than 2 hits", __LINE__, __FILE__).
setFatal();
230 unsigned int detId,hitId,planeId;
233 unsigned int lastPlane=planeId;
234 retVal.push_back(
new std::vector<int>);
235 retVal.at(0)->push_back(0);
239 if(lastPlane==planeId){
240 retVal.at(retVal.size()-1)->
push_back(i);
244 retVal.push_back(
new std::vector<int>);
245 retVal.at(retVal.size()-1)->
push_back(i);
void printBookkeeping(std::ostream &out=std::cout) const
print bookkeeping
GFTrack & operator=(const GFTrack &)
assignement operator
virtual GFAbsTrackRep * clone() const =0
TObjArray * fTrackReps
Collection of track representations.
virtual TVector3 getPos(const GFDetPlane &pl)=0
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.
GFAbsTrackRep * getTrackRep(int id) const
Accessor for track representations.
virtual const GFDetPlane & getDetPlane(GFAbsTrackRep *)=0
Get detector plane for a given track representation.
const TMatrixT< Double_t > & getState() const
unsigned int fNextHitToFit
std::vector< int > fRepAtHit
repAtHit keeps track of at which hit index which rep is currently defined, to avoid null extrapolatio...
Base Class for genfit track representations. Defines interface for track parameterizations.
void fillGeoTrack(TVirtualGeoTrack *tr) const
Fill TVirtualGeoTrack object Cardinal representation is used.
fInnerVessel push_back(Point(-578.400000, 0.000000, 0.000000))
GFTrackCand fCand
Helper to store the indices of the hits in the track. See GFTrackCand for details.
unsigned int getNumReps() const
Get number of track represenatations.
GFTrack()
Default constructor – needed for compatibility with ROOT.
GFAbsRecoHit * getHit(int id) const
unsigned int fCardinal_rep
virtual double extrapolate(const GFDetPlane &plane, TMatrixT< Double_t > &statePred)
returns the tracklength spanned in this extrapolation
void Print(std::ostream &out=std::cout) const
void getResiduals(unsigned int detId, unsigned int dim, unsigned int rep, std::vector< double > &result)
Get residuals.
void mergeHits(GFTrack *trk)
Merge two GFTracks. Only hits will be merged.
Detector simulation of raw signals on wires.
unsigned int getNumHits() const
void getHit(unsigned int i, unsigned int &detId, unsigned int &hitId) const
Get detector ID and cluster index (hitId) for hit number i.
void reset()
Resets the GFTrack – deletes RecoHits!
std::vector< GFAbsRecoHit * > fHits
Collection of RecoHits.
unsigned int getNHits() const
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
void PrintROOTobject(std::ostream &, const ROOTOBJ &)
Small utility functions which print some ROOT objects into an output stream.
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
void getHitsByPlane(std::vector< std::vector< int > * > &retVal)
cet::LibraryManager dummy("noplugin")
const GFTrackCand & getCand() const
void addHit(GFAbsRecoHit *theHit)
deprecated!
unsigned int getDim() const
returns dimension of state vector
std::vector< GFBookkeeping * > fBookkeeping
Collection of Bookeeping objects for failed hits in every trackrep.
virtual TMatrixT< Double_t > residualVector(const GFAbsTrackRep *stateVector, const TMatrixT< Double_t > &state, const GFDetPlane &d)
Calculate residual with respect to a track representation.
void addTrackRep(GFAbsTrackRep *theTrackRep)
Add track represenation.
virtual void Print(std::ostream &out=std::cout) const
void setCandidate(const GFTrackCand &cand, bool doreset=false)
set track candidate
QTextStream & endl(QTextStream &s)