Belle II Software light-2406-ragdoll
|
Class that bundles various TrackFitResults. More...
#include <Track.h>
Public Types | |
enum | StatusBit { c_isFlippedAndRefitted = 1 << 0 } |
status enumerator More... | |
typedef std::pair< Const::ChargedStable, TrackFitResult * > | ChargedStableTrackFitResultPair |
Pair to hold the particle hypothesis used for the fit as first entry and the result of the track fit as second. | |
Public Member Functions | |
Track (float qualityIndicator=0.) | |
Constructor of Track without any attached TrackFitResults. | |
const TrackFitResult * | getTrackFitResultByName (const Const::ChargedStable &chargedStable, const std::string trackFitResultsName) const |
Access to TrackFitResults with a specified Name. | |
const TrackFitResult * | getTrackFitResult (const Const::ChargedStable &chargedStable) const |
Default Access to TrackFitResults. | |
const TrackFitResult * | getTrackFitResultWithClosestMassByName (const Const::ChargedStable &requestedType, const std::string trackFitResultsName) const |
Return the track fit (from TrackFitResult with specified name) for a fit hypothesis with the closest mass. | |
const TrackFitResult * | getTrackFitResultWithClosestMass (const Const::ChargedStable &requestedType) const |
Return the track fit for a fit hypothesis with the closest mass. | |
std::vector< ChargedStableTrackFitResultPair > | getTrackFitResultsByName (const std::string trackFitResultsName) const |
Access to all track fit results at the same time (from TrackFitResult with specified name) | |
std::vector< ChargedStableTrackFitResultPair > | getTrackFitResults () const |
Deafult Access to all track fit results at the same time. | |
void | addStatusBits (unsigned short int bitmask) |
Add Track Refining Status Bit. | |
void | setFlippedAndRefitted () |
Set the Track status bit when the track has been flipped and refitted in the refining step. | |
bool | getStatusBit (unsigned short int bitmask) const |
Get Track Status after Refining. | |
bool | isFlippedAndRefitted () const |
Check the Track status after the Refining step. | |
bool | wasRefined () |
Check whether Track was modified in the Refining step. | |
void | setTrackFitResultIndex (const Const::ChargedStable &chargedStable, short index) |
Set an index (for positive values) or unavailability-code (index = -1) for a specific mass hypothesis. | |
unsigned int | getNumberOfFittedHypotheses () const |
Returns the number of fitted hypothesis which are stored in this track. | |
float | getQualityIndicator () const |
Getter for quality indicator for classification of fake vs. | |
void | setTrackTime (float track_time) |
Set track time computed as the difference between the outgoing/ingoing arm time (computed with SVD hits) and the SVD EventT0. | |
float | getTrackTime () const |
Returns track time computed as the difference between the average of SVD clusters time and the SVD EventT0. | |
virtual std::string | getInfoHTML () const override |
Return a short summary of this object's contents in HTML format. | |
void | addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const |
Add a relation from this object to another object (with caching). | |
void | addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const |
Add a relation from this object to another object (no caching, can be quite slow). | |
void | copyRelations (const RelationsInterface< BASE > *sourceObj) |
Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). | |
template<class TO > | |
RelationVector< TO > | getRelationsTo (const std::string &name="", const std::string &namedRelation="") const |
Get the relations that point from this object to another store array. | |
template<class FROM > | |
RelationVector< FROM > | getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const |
Get the relations that point from another store array to this object. | |
template<class T > | |
RelationVector< T > | getRelationsWith (const std::string &name="", const std::string &namedRelation="") const |
Get the relations between this object and another store array. | |
template<class TO > | |
TO * | getRelatedTo (const std::string &name="", const std::string &namedRelation="") const |
Get the object to which this object has a relation. | |
template<class FROM > | |
FROM * | getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const |
Get the object from which this object has a relation. | |
template<class T > | |
T * | getRelated (const std::string &name="", const std::string &namedRelation="") const |
Get the object to or from which this object has a relation. | |
template<class TO > | |
std::pair< TO *, float > | getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const |
Get first related object & weight of relation pointing to an array. | |
template<class FROM > | |
std::pair< FROM *, float > | getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const |
Get first related object & weight of relation pointing from an array. | |
template<class T > | |
std::pair< T *, float > | getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const |
Get first related object & weight of relation pointing from/to an array. | |
virtual std::string | getName () const |
Return a short name that describes this object, e.g. | |
std::string | getInfo () const |
Return a short summary of this object's contents in raw text format. | |
std::string | getArrayName () const |
Get name of array this object is stored in, or "" if not found. | |
int | getArrayIndex () const |
Returns this object's array index (in StoreArray), or -1 if not found. | |
Protected Member Functions | |
TClonesArray * | getArrayPointer () const |
Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse). | |
Private Member Functions | |
std::vector< short int > | getValidIndices () const |
Returns a vector of all fit hypothesis indices in m_trackFitIndices which have been set (meaning are not -1) | |
ClassDefOverride (Track, 6) | |
Class that bundles various TrackFitResults. | |
ClassDef (RelationsInterface, 0) | |
defines interface for accessing relations of objects in StoreArray. | |
Private Attributes | |
unsigned short int | m_statusBitmap = 0 |
Bitmap of the track status, contains informations on the refining stage. | |
short int | m_trackFitIndices [Const::ChargedStable::c_SetSize] |
Index list of the TrackFitResults associated with this Track. | |
float const | m_qualityIndicator |
Quality indicator for classification of fake vs. | |
float | m_trackTime = std::numeric_limits<float>::quiet_NaN() |
Track time, computed as the difference between outgoing/ingoing arm time and the SVDEvent T0. | |
DataStore::StoreEntry * | m_cacheDataStoreEntry |
Cache of the data store entry to which this object belongs. | |
int | m_cacheArrayIndex |
Cache of the index in the TClonesArray to which this object belongs. | |
Friends | |
class | FixMergedObjectsModule |
class | PostMergeUpdaterModule |
Class that bundles various TrackFitResults.
As the RecoTrack has a lot of information that is only necessary during the fit, this is a much stripped down version containing only indices of TrackFitResults (which is what remains of the various TrackReps, that Genfit might use during the fit).
typedef std::pair< Const::ChargedStable, TrackFitResult*> ChargedStableTrackFitResultPair |
enum StatusBit |
|
inlineexplicit |
Constructor of Track without any attached TrackFitResults.
Corresponding TrackFitResults should be added using the corresponding setter function. The array with the indices for the TrackFitResults is initialized with -1, which is an invalid index.
qualityIndicator | Initialises m_qualityIndicator with 0, a value associated typically with fake tracks. |
Definition at line 48 of file Track.h.
|
inlineinherited |
Add a relation from this object to another object (with caching).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 142 of file RelationsObject.h.
|
inlineinherited |
Add a relation from this object to another object (no caching, can be quite slow).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 155 of file RelationsObject.h.
|
inline |
Add Track Refining Status Bit.
bitmask | to be added to the m_statusBitmap |
Definition at line 144 of file Track.h.
|
inlineinherited |
Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.
Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.
Definition at line 170 of file RelationsObject.h.
|
inlineinherited |
Returns this object's array index (in StoreArray), or -1 if not found.
Definition at line 385 of file RelationsObject.h.
|
inlineinherited |
Get name of array this object is stored in, or "" if not found.
Definition at line 377 of file RelationsObject.h.
|
inlineprotectedinherited |
Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
Definition at line 418 of file RelationsObject.h.
|
inlineinherited |
Return a short summary of this object's contents in raw text format.
Returns the contents of getInfoHTML() while translating line-breaks etc.
Definition at line 370 of file RelationsObject.h.
|
overridevirtual |
Return a short summary of this object's contents in HTML format.
Reimplemented from RelationsInterface< BASE >.
Definition at line 109 of file Track.cc.
|
inlinevirtualinherited |
Return a short name that describes this object, e.g.
pi+ for an MCParticle.
Reimplemented in Particle, and MCParticle.
Definition at line 344 of file RelationsObject.h.
unsigned int getNumberOfFittedHypotheses | ( | ) | const |
Returns the number of fitted hypothesis which are stored in this track.
Definition at line 36 of file Track.cc.
|
inline |
Getter for quality indicator for classification of fake vs.
MC-matched Tracks.
During reconstruction, the probability (given a certain sample composition) of a track to originate from a charged particle rather than e.g. a random combination of hits from different charged particles and background contributions is estimated. This estimate includes information, that isn't used for the calculation of the p-value of the fit, e.g. energy-deposition, timing, and cluster-shape information. We consider it unlikely, that we will make such an estimate for each hypothesis. Therfore, the Track rather than the TrackFitResult is the place to store this information. We don't want to provide a default cut, because charged-particle-vetos and recombination of different kind of resonances potentially can profit from different working points on the efficiency-purity curve, and we expect some MC-data discrepancy due to imperfect calibration of the local reconstruction inputs. The meaning of the value may strongly depend on the presence of VXD or CDC measurements, but this information is available at mdst level as well.
|
inlineinherited |
Get the object to or from which this object has a relation.
T | The class of objects to or from which the relation points. |
name | The name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 278 of file RelationsObject.h.
|
inlineinherited |
Get the object from which this object has a relation.
FROM | The class of objects from which the relation points. |
name | The name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 263 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from an array.
FROM | The class of objects from which the relation points. |
name | The name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 314 of file RelationsObject.h.
|
inlineinherited |
Get the object to which this object has a relation.
TO | The class of objects to which the relation points. |
name | The name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 248 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing to an array.
TO | The class of objects to which the relation points. |
name | The name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 297 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from/to an array.
T | The class of objects to or from which the relation points. |
name | The name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 331 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from another store array to this object.
FROM | The class of objects from which the relations point. |
name | The name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 212 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from this object to another store array.
TO | The class of objects to which the relations point. |
name | The name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 197 of file RelationsObject.h.
|
inlineinherited |
Get the relations between this object and another store array.
Relations in both directions are returned.
T | The class of objects to or from which the relations point. |
name | The name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 230 of file RelationsObject.h.
|
inline |
const TrackFitResult * getTrackFitResult | ( | const Const::ChargedStable & | chargedStable | ) | const |
Default Access to TrackFitResults.
This tries to return the TrackFitResult for the requested track hypothesis. If the requested track hypothesis is not available, we return a nullptr.
TODO: Do something special if we did not even try to fit!
chargedStable | Determines the particle for which you want to get the best available fit hypothesis. |
Definition at line 30 of file Track.cc.
const TrackFitResult * getTrackFitResultByName | ( | const Const::ChargedStable & | chargedStable, |
const std::string | trackFitResultsName | ||
) | const |
Access to TrackFitResults with a specified Name.
This tries to return the TrackFitResult for the requested track hypothesis. If the requested track hypothesis is not available, we return a nullptr.
TODO: Do something special if we did not even try to fit!
chargedStable | Determines the particle for which you want to get the best available fit hypothesis. |
trackFitResultsName | The name of the storeArray to get the TrackFitResults from |
Definition at line 17 of file Track.cc.
std::vector< Track::ChargedStableTrackFitResultPair > getTrackFitResults | ( | ) | const |
Deafult Access to all track fit results at the same time.
Returns a vector of pair of all track fit results which have been set and the respective particle hypothesis they have been fitted with.
Definition at line 60 of file Track.cc.
std::vector< Track::ChargedStableTrackFitResultPair > getTrackFitResultsByName | ( | const std::string | trackFitResultsName | ) | const |
Access to all track fit results at the same time (from TrackFitResult with specified name)
trackFitResultsName | The name of the storeArray to get the TrackFitResults from Returns a vector of pair of all track fit results which have been set and the respective particle hypothesis they have been fitted with. |
Definition at line 42 of file Track.cc.
const TrackFitResult * getTrackFitResultWithClosestMass | ( | const Const::ChargedStable & | requestedType | ) | const |
Return the track fit for a fit hypothesis with the closest mass.
Multiple particle hypothesis are used for fitting during the reconstruction and stored with this Track class. Not all hypothesis are available for all tracks because either a specific hypothesis was not fitted or because the fit failed. This method returns the track fit result of a successful fit with the hypothesis of a mass closest to the requested particle type. If the requested type's hypothesis is available it will be returned otherwise the next closest hypothesis in terms of the absolute mass difference will be returned.
For example, if a pion is requested (mass 140 MeV) and only a muon fit (mass 106 MeV) and an electron fit (mass 511 kEV) is available, the muon fit result will be returned. So this method is guaranteed to always return a TrackFitResult (opposite to getTrackFitResult() which can return nullptr if the requested Particle type was not fitted).
requestedType | The particle type for which the fit result should be returned. |
Definition at line 104 of file Track.cc.
const TrackFitResult * getTrackFitResultWithClosestMassByName | ( | const Const::ChargedStable & | requestedType, |
const std::string | trackFitResultsName | ||
) | const |
Return the track fit (from TrackFitResult with specified name) for a fit hypothesis with the closest mass.
Multiple particle hypothesis are used for fitting during the reconstruction and stored with this Track class. Not all hypothesis are available for all tracks because either a specific hypothesis was not fitted or because the fit failed. This method returns the track fit result of a successful fit with the hypothesis of a mass closest to the requested particle type. If the requested type's hypothesis is available it will be returned otherwise the next closest hypothesis in terms of the absolute mass difference will be returned.
For example, if a pion is requested (mass 140 MeV) and only a muon fit (mass 106 MeV) and an electron fit (mass 511 kEV) is available, the muon fit result will be returned. So this method is guaranteed to always return a TrackFitResult (opposite to getTrackFitResult() which can return nullptr if the requested Particle type was not fitted).
requestedType | The particle type for which the fit result should be returned. |
trackFitResultsName | The name of the storeArray to get the TrackFitResults from |
Definition at line 80 of file Track.cc.
|
inline |
Returns track time computed as the difference between the average of SVD clusters time and the SVD EventT0.
Definition at line 215 of file Track.h.
|
private |
Returns a vector of all fit hypothesis indices in m_trackFitIndices which have been set (meaning are not -1)
Definition at line 65 of file Track.cc.
|
inline |
Check the Track status after the Refining step.
Definition at line 160 of file Track.h.
|
inline |
Set the Track status bit when the track has been flipped and refitted in the refining step.
Definition at line 149 of file Track.h.
|
inline |
Set an index (for positive values) or unavailability-code (index = -1) for a specific mass hypothesis.
The TrackFitResult itself should be saved separately in the DataStore.
chargedStable | Determines the hypothesis for which you want to store the index or unavailability-code. |
index | index of track fit result (for positive values) or unavailability-code (index = -1) |
|
inline |
Set track time computed as the difference between the outgoing/ingoing arm time (computed with SVD hits) and the SVD EventT0.
If both outgoing and ingoing arms exist: 1) if the outgoing arm time is smaller than the ingoing arm time, the track time is computed as the difference of the outgoing arm time and the SVD EventT0; 2) otherwise the track time is computed as the difference of the ingoing arm time and the SVD EventT0. If only the outgoing arm exists, the track time is computed as the difference of the outgoing arm time and the SVD EventT0. If only the ingoing arm exists, the track time is computed as the difference of the ingoing arm time and the SVD EventT0.
|
inline |
|
friend |
|
friend |
|
mutableprivateinherited |
Cache of the index in the TClonesArray to which this object belongs.
Definition at line 432 of file RelationsObject.h.
|
mutableprivateinherited |
Cache of the data store entry to which this object belongs.
Definition at line 429 of file RelationsObject.h.
|
private |
|
private |
|
private |
|
private |