22 #ifndef genfit_TrackCand_h 23 #define genfit_TrackCand_h 35 #include <TMatrixDSym.h> 36 #include <TDatabasePDG.h> 91 void getHit(
int i,
int &detId,
int &hitId)
const;
94 void getHit(
int i,
int &detId,
int &hitId,
double &sortingParameter)
const;
97 void getHitWithPlane(
int i,
int &detId,
int &hitId,
int &planeId)
const;
99 unsigned int getNHits()
const {
return hits_.size(); }
106 std::vector<int>
getHitIDs(
int detId = -2)
const;
121 TVector3
getPosSeed()
const {
return TVector3(state6D_(0), state6D_(1), state6D_(2)); }
124 TVector3
getMomSeed()
const {
return TVector3(state6D_(3), state6D_(4), state6D_(5)); }
142 void addHit(
int detId,
int hitId,
int planeId = -1,
double sortingParameter = 0);
158 void sortHits(
const std::vector<unsigned int> &indices);
165 void Print(
const Option_t * =
"")
const;
171 void setCovSeed(
const TMatrixDSym &cov6D) { cov6D_ = cov6D; }
176 void set6DSeed(
const TVectorD &state6D,
const double charge);
185 void setPosMomSeed(
const TVector3 &pos,
const TVector3 &mom,
const double charge);
197 void setTime6DSeed(
double time,
const TVectorD &state6D,
const double charge);
210 void setTimePosMomSeed(
double time,
const TVector3 &pos,
const TVector3 &mom,
const double charge);
220 std::vector<TrackCandHit *> hits_;
239 #endif // genfit_TrackCand_h Track candidate – seed values and indices.
const TVectorD & getStateSeed() const
Returns the 6D seed state; should be in global coordinates.
friend bool operator==(const TrackCand &lhs, const TrackCand &rhs)
== operator checks equality of TrackCandHits. Does not check for sorting parameters.
void append(const TrackCand &)
Clone the TrackCandHit objects from the other TrackCand and append them to this TrackCand.
void sortHits()
Sort the hits that were already added to the trackCand using the sorting parameters.
void addHit(int detId, int hitId, int planeId=-1, double sortingParameter=0)
void set6DSeed(const TVectorD &state6D, const double charge)
sets the state to seed the track fitting. State has to be a TVectorD(6). First 3 elements are the sta...
std::vector< double > getSortingParameters() const
Get sorting parameterts of all hits.
void setTime6DSeed(double time, const TVectorD &state6D, const double charge)
sets the state to seed the track fitting and its time. State has to be a TVectorD(6). First 3 elements are the staring postion second 3 elements the starting momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge.
double getChargeSeed() const
friend bool operator!=(const TrackCand &lhs, const TrackCand &rhs)
void Print(const Option_t *="") const
Write the content of all private attributes to the terminal.
TrackCandHit * getHit(int i) const
void setTimePosMomSeedAndPdgCode(double time, const TVector3 &pos, const TVector3 &mom, const int pdgCode)
This function works the same as setPosMomSeed but instead of a charge hypothesis you can set a pdg co...
std::set< int > getUniqueDetIDs() const
void reset()
Delete and clear the TrackCandHits.
const TMatrixDSym & getCovSeed() const
get the covariance matrix seed (6D).
bool hitInTrack(int detId, int hitId) const
Is there a hit with detId and hitId in the TrackCand?
Hit object for use in TrackCand. Provides IDs and sorting parameters.
void setTimeSeed(double time)
Set the time at which the seed is defined.
int getPdgCode() const
Get the PDG code.
TrackCand & operator=(TrackCand other)
assignment operator
void getHitWithPlane(int i, int &detId, int &hitId, int &planeId) const
Get detector Id, hit Id and plane id for hit number i.
TVector3 getMomSeed() const
get the seed value for track: mom. Identical to the last 3 components of getStateSeed ...
unsigned int getNHits() const
void setPosMomSeed(const TVector3 &pos, const TVector3 &mom, const double charge)
sets the state to seed the track fitting. State has to be a TVector3 for position and a TVector3 for ...
void swap(TrackCand &other)
void setTime6DSeedAndPdgCode(double time, const TVectorD &state6D, const int pdgCode)
This function works the same as set6DSeed but instead of a charge hypothesis you can set a pdg code w...
void set6DSeedAndPdgCode(const TVectorD &state6D, const int pdgCode)
This function works the same as set6DSeed but instead of a charge hypothesis you can set a pdg code w...
std::vector< int > getHitIDs(int detId=-2) const
Get hit ids of from a specific detector.
void addHit(TrackCandHit *hit)
void setPdgCode(int pdgCode)
Set a particle hypothesis in form of a PDG code. This will also set the charge attribute.
std::vector< int > getDetIDs() const
Get detector IDs of all hits.
void setTimePosMomSeed(double time, const TVector3 &pos, const TVector3 &mom, const double charge)
sets the state to seed the track fitting and its time. State has to be a TVector3 for position and a ...
void setPosMomSeedAndPdgCode(const TVector3 &pos, const TVector3 &mom, const int pdgCode)
This function works the same as setPosMomSeed but instead of a charge hypothesis you can set a pdg co...
static bool compareTrackCandHits(const TrackCandHit *lhs, const TrackCandHit *rhs)
TVector3 getPosSeed() const
get the seed value for track: pos. Identical to the first 3 components of getStateSeed ...
void setMcTrackId(int i)
Set the MCT track id, for MC simulations.
void setCovSeed(const TMatrixDSym &cov6D)
set the covariance matrix seed (6D).
int getMcTrackId() const
Get the MCT track id, for MC simulations - default value = -1.
double getTimeSeed() const
Get the time at which the seed state is defined.