EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
Track candidate – seed values and indices. More...
#include <fun4all_GenFit/blob/master/core/include/TrackCand.h>
Public Member Functions | |
TrackCand () | |
~TrackCand () | |
TrackCand (const TrackCand &other) | |
copy constructor | |
TrackCand & | operator= (TrackCand other) |
assignment operator | |
void | swap (TrackCand &other) |
TrackCandHit * | getHit (int i) const |
void | getHit (int i, int &detId, int &hitId) const |
Get detector Id and hit Id for hit number i. | |
void | getHit (int i, int &detId, int &hitId, double &sortingParameter) const |
Get detector Id, hit Id and sorting parameter for hit number i. | |
void | getHitWithPlane (int i, int &detId, int &hitId, int &planeId) const |
Get detector Id, hit Id and plane id for hit number i. | |
unsigned int | getNHits () const |
std::vector< int > | getHitIDs (int detId=-2) const |
Get hit ids of from a specific detector. | |
std::vector< int > | getDetIDs () const |
Get detector IDs of all hits. | |
std::vector< double > | getSortingParameters () const |
Get sorting parameterts of all hits. | |
std::set< int > | getUniqueDetIDs () const |
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. | |
TVector3 | getPosSeed () const |
get the seed value for track: pos. Identical to the first 3 components of getStateSeed | |
TVector3 | getMomSeed () const |
get the seed value for track: mom. Identical to the last 3 components of getStateSeed | |
const TMatrixDSym & | getCovSeed () const |
get the covariance matrix seed (6D). | |
const TVectorD & | getStateSeed () const |
Returns the 6D seed state; should be in global coordinates. | |
double | getChargeSeed () const |
int | getPdgCode () const |
Get the PDG code. | |
bool | hitInTrack (int detId, int hitId) const |
Is there a hit with detId and hitId in the TrackCand? | |
void | addHit (int detId, int hitId, int planeId=-1, double sortingParameter=0) |
void | addHit (TrackCandHit *hit) |
void | setMcTrackId (int i) |
Set the MCT track id, for MC simulations. | |
void | setPdgCode (int pdgCode) |
Set a particle hypothesis in form of a PDG code. This will also set the charge attribute. | |
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 | sortHits (const std::vector< unsigned int > &indices) |
void | reset () |
Delete and clear the TrackCandHits. | |
void | Print (const Option_t *="") const |
Write the content of all private attributes to the terminal. | |
void | setTimeSeed (double time) |
Set the time at which the seed is defined. | |
void | setCovSeed (const TMatrixDSym &cov6D) |
set the covariance matrix seed (6D). | |
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 staring postion second 3 elements the starting momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge | |
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 which will set the charge automatically. | |
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 momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge | |
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 code which will set the charge automatically. | |
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. | |
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 which will set the charge automatically. | |
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 TVector3 for momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge. | |
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 code which will set the charge automatically. | |
Static Public Member Functions | |
static bool | compareTrackCandHits (const TrackCandHit *lhs, const TrackCandHit *rhs) |
Private Attributes | |
std::vector< TrackCandHit * > | hits_ |
int | mcTrackId_ |
int | pdg_ |
double | time_ |
TVectorD | state6D_ |
TMatrixDSym | cov6D_ |
double | q_ |
Friends | |
bool | operator== (const TrackCand &lhs, const TrackCand &rhs) |
== operator checks equality of TrackCandHits. Does not check for sorting parameters. | |
bool | operator!= (const TrackCand &lhs, const TrackCand &rhs) |
Track candidate – seed values and indices.
The main task of the TrackCand object is to store a list of indices to cluster objects. Each cluster in the Track is identified by it's detector ID and it's index in the corresponding TClonesArray. Also there is a ordering parameter to order hits. Optionally, plane indices for the hits can be stored (most importantly for fitting with the Daf). This information is used by the RecoHitFactory to automatically load RecoHits into a Track. Through this it is possible to define Tracks over an arbitrary number of different detectors.
In addition TrackCand offers members to store starting values for the fit. The starting values (seeds) for the fit are stored as a 6D state (x,y,z,px,py,pz) and its corresponding 6x6 covariance matrix. All seed getter and setter manipulate these two members but the user can chose using TVector3 or TMatrixD to get/set the seed state. However this information is not automatically used in genfit. But a pointer to a TrackCand can be passed to the a RKTrackRep constructor to make use of this information without manually extracting it from the TrackCand object.
Definition at line 69 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 69 of file TrackCand.h
genfit::TrackCand::TrackCand | ( | ) |
Definition at line 31 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 31 of file TrackCand.cc
genfit::TrackCand::~TrackCand | ( | ) |
Definition at line 42 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 42 of file TrackCand.cc
References hits_.
genfit::TrackCand::TrackCand | ( | const TrackCand & | other | ) |
copy constructor
Definition at line 50 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 50 of file TrackCand.cc
References hits_, pdg_, and setPdgCode().
void genfit::TrackCand::addHit | ( | int | detId, |
int | hitId, | ||
int | planeId = -1 , |
||
double | sortingParameter = 0 |
||
) |
Definition at line 125 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 125 of file TrackCand.cc
References hits_.
Referenced by append(), genfit::Track::constructTrackCand(), and main().
|
inline |
Definition at line 148 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 148 of file TrackCand.h
References hits_.
void genfit::TrackCand::append | ( | const TrackCand & | rhs | ) |
Clone the TrackCandHit objects from the other TrackCand and append them to this TrackCand.
Definition at line 215 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 215 of file TrackCand.cc
References addHit(), genfit::TrackCandHit::clone(), getHit(), and getNHits().
|
inlinestatic |
Definition at line 89 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 89 of file TrackCand.h
Referenced by sortHits().
|
inline |
Definition at line 136 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 136 of file TrackCand.h
References q_.
|
inline |
get the covariance matrix seed (6D).
Definition at line 131 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 131 of file TrackCand.h
References cov6D_.
Referenced by genfit::Track::Track().
std::vector< int > genfit::TrackCand::getDetIDs | ( | ) | const |
Get detector IDs of all hits.
Definition at line 140 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 140 of file TrackCand.cc
References hits_.
TrackCandHit * genfit::TrackCand::getHit | ( | int | i | ) | const |
Definition at line 88 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 88 of file TrackCand.cc
References hits_.
Referenced by append(), genfit::MeasurementFactory< measurement_T >::createMany(), genfit::Track::createMeasurements(), and genfit::operator==().
void genfit::TrackCand::getHit | ( | int | i, |
int & | detId, | ||
int & | hitId | ||
) | const |
Get detector Id and hit Id for hit number i.
Definition at line 96 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 96 of file TrackCand.cc
References hits_.
void genfit::TrackCand::getHit | ( | int | i, |
int & | detId, | ||
int & | hitId, | ||
double & | sortingParameter | ||
) | const |
Get detector Id, hit Id and sorting parameter for hit number i.
Definition at line 105 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 105 of file TrackCand.cc
References hits_.
std::vector< int > genfit::TrackCand::getHitIDs | ( | int | detId = -2 | ) | const |
Get hit ids of from a specific detector.
DetId -1 gives hitIds of hits with default detId -1. The default argument -2 gives hit Ids of all hits.
Definition at line 130 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 130 of file TrackCand.cc
References hits_.
void genfit::TrackCand::getHitWithPlane | ( | int | i, |
int & | detId, | ||
int & | hitId, | ||
int & | planeId | ||
) | const |
Get detector Id, hit Id and plane id for hit number i.
Definition at line 115 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 115 of file TrackCand.cc
References hits_.
|
inline |
Get the MCT track id, for MC simulations - default value = -1.
Definition at line 119 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 119 of file TrackCand.h
References mcTrackId_.
Referenced by genfit::Track::Track().
|
inline |
get the seed value for track: mom. Identical to the last 3 components of getStateSeed
Definition at line 128 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 128 of file TrackCand.h
References state6D_.
|
inline |
Definition at line 103 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 103 of file TrackCand.h
References hits_.
Referenced by append(), genfit::MeasurementFactory< measurement_T >::createMany(), genfit::Track::createMeasurements(), genfit::operator==(), and sortHits().
|
inline |
Get the PDG code.
Definition at line 139 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 139 of file TrackCand.h
References pdg_.
|
inline |
get the seed value for track: pos. Identical to the first 3 components of getStateSeed
Definition at line 125 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 125 of file TrackCand.h
References state6D_.
std::vector< double > genfit::TrackCand::getSortingParameters | ( | ) | const |
Get sorting parameterts of all hits.
Definition at line 148 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 148 of file TrackCand.cc
References hits_.
|
inline |
Returns the 6D seed state; should be in global coordinates.
Definition at line 134 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 134 of file TrackCand.h
References state6D_.
Referenced by genfit::Track::Track().
|
inline |
Get the time at which the seed state is defined.
Definition at line 122 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 122 of file TrackCand.h
References time_.
Referenced by genfit::Track::Track().
std::set< int > genfit::TrackCand::getUniqueDetIDs | ( | ) | const |
Definition at line 156 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 156 of file TrackCand.cc
References hits_.
bool genfit::TrackCand::hitInTrack | ( | int | detId, |
int | hitId | ||
) | const |
Is there a hit with detId and hitId in the TrackCand?
Definition at line 181 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 181 of file TrackCand.cc
References hits_.
assignment operator
Definition at line 69 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 69 of file TrackCand.cc
References swap().
void genfit::TrackCand::Print | ( | const Option_t * | option = "" | ) | const |
Write the content of all private attributes to the terminal.
Definition at line 202 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 202 of file TrackCand.cc
References hits_, mcTrackId_, pdg_, genfit::printOut, q_, and state6D_.
void genfit::TrackCand::reset | ( | ) |
Delete and clear the TrackCandHits.
Definition at line 172 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 172 of file TrackCand.cc
References hits_.
void genfit::TrackCand::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 staring postion second 3 elements the starting momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge
Definition at line 246 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 246 of file TrackCand.cc
References charge, pdg_, q_, and state6D_.
Referenced by setTime6DSeed().
void genfit::TrackCand::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 which will set the charge automatically.
Definition at line 253 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 253 of file TrackCand.cc
References setPdgCode(), and state6D_.
Referenced by setTime6DSeedAndPdgCode().
|
inline |
set the covariance matrix seed (6D).
Definition at line 175 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 175 of file TrackCand.h
References cov6D_.
Referenced by genfit::Track::constructTrackCand(), and main().
|
inline |
Set the MCT track id, for MC simulations.
Definition at line 151 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 151 of file TrackCand.h
References mcTrackId_.
Referenced by genfit::Track::constructTrackCand().
void genfit::TrackCand::setPdgCode | ( | int | pdgCode | ) |
Set a particle hypothesis in form of a PDG code. This will also set the charge attribute.
Definition at line 165 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 165 of file TrackCand.cc
References part, pdg_, and q_.
Referenced by set6DSeedAndPdgCode(), setPosMomSeedAndPdgCode(), and TrackCand().
void genfit::TrackCand::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 momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge
Definition at line 258 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 258 of file TrackCand.cc
References charge, pdg_, q_, and state6D_.
Referenced by setTimePosMomSeed().
void genfit::TrackCand::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 code which will set the charge automatically.
Definition at line 266 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 266 of file TrackCand.cc
References setPdgCode(), and state6D_.
Referenced by main(), and setTimePosMomSeedAndPdgCode().
void genfit::TrackCand::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.
Definition at line 273 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 273 of file TrackCand.cc
References set6DSeed(), Acts::Test::time, and time_.
void genfit::TrackCand::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 which will set the charge automatically.
Definition at line 279 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 279 of file TrackCand.cc
References set6DSeedAndPdgCode(), Acts::Test::time, and time_.
Referenced by genfit::Track::constructTrackCand().
void genfit::TrackCand::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 TVector3 for momentum. Everything in global coordinates charge is the charge hypotheses of the particle charge.
Definition at line 285 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 285 of file TrackCand.cc
References setPosMomSeed(), Acts::Test::time, and time_.
void genfit::TrackCand::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 code which will set the charge automatically.
Definition at line 292 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 292 of file TrackCand.cc
References setPosMomSeedAndPdgCode(), Acts::Test::time, and time_.
|
inline |
Set the time at which the seed is defined.
Definition at line 172 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 172 of file TrackCand.h
References Acts::Test::time, and time_.
void genfit::TrackCand::sortHits | ( | ) |
Sort the hits that were already added to the trackCand using the sorting parameters.
Definition at line 222 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 222 of file TrackCand.cc
References compareTrackCandHits(), and hits_.
void genfit::TrackCand::sortHits | ( | const std::vector< unsigned int > & | indices | ) |
Definition at line 227 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 227 of file TrackCand.cc
References getNHits(), and hits_.
void genfit::TrackCand::swap | ( | TrackCand & | other | ) |
Definition at line 75 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 75 of file TrackCand.cc
References cov6D_, hits_, mcTrackId_, pdg_, q_, state6D_, boost::swap(), and time_.
Referenced by operator=().
Definition at line 87 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 87 of file TrackCand.h
== operator checks equality of TrackCandHits. Does not check for sorting parameters.
Definition at line 191 of file TrackCand.cc.
View newest version in sPHENIX GitHub at line 191 of file TrackCand.cc
|
private |
global 6D position plus momentum state
Definition at line 235 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 235 of file TrackCand.h
Referenced by getCovSeed(), setCovSeed(), and swap().
|
private |
Definition at line 228 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 228 of file TrackCand.h
Referenced by addHit(), getDetIDs(), getHit(), getHitIDs(), getHitWithPlane(), getNHits(), getSortingParameters(), getUniqueDetIDs(), hitInTrack(), Print(), reset(), sortHits(), swap(), TrackCand(), and ~TrackCand().
|
private |
if MC simulation, store the mc track id here
Definition at line 230 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 230 of file TrackCand.h
Referenced by getMcTrackId(), Print(), setMcTrackId(), and swap().
|
private |
particle data groupe's id for a particle
Definition at line 231 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 231 of file TrackCand.h
Referenced by getPdgCode(), Print(), set6DSeed(), setPdgCode(), setPosMomSeed(), swap(), and TrackCand().
|
private |
the charge of the particle in units of elementary charge
Definition at line 236 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 236 of file TrackCand.h
Referenced by getChargeSeed(), Print(), set6DSeed(), setPdgCode(), setPosMomSeed(), and swap().
|
private |
global 6D position plus momentum state
Definition at line 234 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 234 of file TrackCand.h
Referenced by getMomSeed(), getPosSeed(), getStateSeed(), Print(), set6DSeed(), set6DSeedAndPdgCode(), setPosMomSeed(), setPosMomSeedAndPdgCode(), and swap().
|
private |
Time at which the seed is given
Definition at line 233 of file TrackCand.h.
View newest version in sPHENIX GitHub at line 233 of file TrackCand.h
Referenced by getTimeSeed(), setTime6DSeed(), setTime6DSeedAndPdgCode(), setTimePosMomSeed(), setTimePosMomSeedAndPdgCode(), setTimeSeed(), and swap().