Belle II Software development
|
Values of the result of a track fit with a given particle hypothesis. More...
#include <TrackFitResult.h>
Public Member Functions | |
TrackFitResult () | |
Constructor initializing everything to zero. | |
TrackFitResult (const ROOT::Math::XYZVector &position, const ROOT::Math::XYZVector &momentum, const TMatrixDSym &covariance, const short int charge, const Const::ParticleType &particleType, const float pValue, const float bField, const uint64_t hitPatternCDCInitializer, const uint32_t hitPatternVXDInitializer, const float NDF) | |
Constructor initializing class with fit result. | |
TrackFitResult (const std::vector< float > &tau, const std::vector< float > &cov5, const Const::ParticleType &particleType, const float pValue, const uint64_t hitPatternCDCInitializer, const uint32_t hitPatternVXDInitializer, const float NDF) | |
Constructor initializing class with perigee parameters. | |
void | updateTrackFitResult (const TrackFitResult &input) |
update the TrackFitResults | |
void | mask () |
mask this TrackFitResults by setting the pValue to nan | |
ROOT::Math::XYZVector | getPosition () const |
Getter for vector of position at closest approach of track in r/phi projection. | |
ROOT::Math::XYZVector | getMomentum () const |
Getter for vector of momentum at closest approach of track in r/phi projection. | |
ROOT::Math::PxPyPzEVector | get4Momentum () const |
Getter for the 4Momentum at the closest approach of the track in the r/phi projection. | |
double | getEnergy () const |
Getter for the Energy at the closest approach of the track in the r/phi projection. | |
double | getTransverseMomentum () const |
Getter for the absolute value of the transverse momentum at the perigee. | |
TMatrixDSym | getCovariance6 () const |
Position and Momentum Covariance Matrix. | |
Const::ParticleType | getParticleType () const |
Getter for ParticleType of the mass hypothesis of the track fit. | |
short | getChargeSign () const |
Return track charge (1 or -1). | |
double | getPValue () const |
Getter for Chi2 Probability of the track fit. | |
float | getNDF () const |
Getter for number of degrees of freedom of the track fit. | |
double | getChi2 () const |
Get chi2 given NDF and p-value. | |
double | getD0 () const |
Getter for d0. | |
double | getPhi0 () const |
Getter for phi0. | |
double | getPhi () const |
Getter for phi0 with CDF naming convention. | |
double | getOmega () const |
Getter for omega. | |
double | getZ0 () const |
Getter for z0. | |
double | getTanLambda () const |
Getter for tanLambda. | |
double | getCotTheta () const |
Getter for tanLambda with CDF naming convention. | |
std::vector< float > | getTau () const |
Getter for all perigee parameters. | |
std::vector< float > | getCov () const |
Getter for all covariance matrix elements of perigee parameters. | |
TMatrixDSym | getCovariance5 () const |
Getter for covariance matrix of perigee parameters in matrix form. | |
Helix | getHelix () const |
Conversion to framework Helix (without covariance). | |
Helix | getHelix (float momentumScale) const |
Conversion to framework Helix with momentum scaling (without covariance). | |
UncertainHelix | getUncertainHelix () const |
Conversion to framework Uncertain Helix (i.e., with covariance). | |
HitPatternCDC | getHitPatternCDC () const |
Getter for the hit pattern in the CDC;. | |
HitPatternVXD | getHitPatternVXD () const |
Getter for the hit pattern in the VXD;. | |
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 | |
ClassDefOverride (TrackFitResult, 10) | |
Values of the result of a track fit with a given particle hypothesis. | |
ClassDef (RelationsInterface, 0) | |
defines interface for accessing relations of objects in StoreArray. | |
Private Attributes | |
unsigned int | m_pdg |
PDG Code for hypothesis with which the corresponding fit was performed. | |
Double32_t | m_pValue |
Chi2 Probability of the fit. | |
Double32_t | m_tau [c_NPars] |
perigee helix parameters; tau = d0, phi0, omega, z0, tanLambda. | |
Double32_t | m_cov5 [c_NCovEntries] |
The 15 = 5*(5+1)/2 covariance matrix elements. | |
uint64_t | m_hitPatternCDCInitializer |
Member for initializing the information about hits in the CDC. | |
uint32_t | m_hitPatternVXDInitializer |
Member for initializing the information about hits in the VXD. | |
uint16_t | m_NDF100 |
Member for number of degrees of freedom multiplied by 100 in order to store inside an int a float with two significant digits. | |
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. | |
Static Private Attributes | |
static const uint16_t | c_NDFFlag = 0xFFFF |
backward compatibility initialisation for NDF | |
TFRStorageSizes | |
Constants for Storage sizes | |
static const unsigned int | c_NPars = 5 |
Number of helix parameters. | |
static const unsigned int | c_NCovEntries = 5 * 6 / 2 |
Number of covariance entries. | |
TFRParName | |
Names for the parameter indices into m_tau.
| |
static const unsigned int | iD0 = 0 |
Index for d0. | |
static const unsigned int | iPhi0 = 1 |
Index for phi0. | |
static const unsigned int | iOmega = 2 |
Index for omega. | |
static const unsigned int | iZ0 = 3 |
Index for z0. | |
static const unsigned int | iTanLambda = 4 |
Index tan lambda. | |
Friends | |
class | PostMergeUpdaterModule |
Values of the result of a track fit with a given particle hypothesis.
The values are stored as perigee parameters with a corresponding covariance matrix. The used perigee parameters are: 1) d0 which is the signed distance to the perigee. Its sign is positive (negative) if the angle between the transverse momentum and d0 is +pi/2 (-pi/2) 2) phi0 which is the angle between the transverse momentum and the x axis and in [-pi, pi] 3) the signed curvature of the track where the sign is given by the charge of the particle 4) z0 which is the distance of the perigee from the origin in the r-z plane 5) tanLambda which is the inverse slope of the track in the r-z plane
These are the parameters used by BaBar, see D.N. Brown et al., The BaBar Track Fitting Algorithm, appendix A, eq. (15). Available at http://rhicii-science.bnl.gov/public/comp/reco/babar.ps
The class is able to return the track fit result as either perigee parameters or cartesian parameters (x,y,z,px,py,pz)
Definition at line 49 of file TrackFitResult.h.
TrackFitResult | ( | ) |
Constructor initializing everything to zero.
Definition at line 22 of file TrackFitResult.cc.
TrackFitResult | ( | const ROOT::Math::XYZVector & | position, |
const ROOT::Math::XYZVector & | momentum, | ||
const TMatrixDSym & | covariance, | ||
const short int | charge, | ||
const Const::ParticleType & | particleType, | ||
const float | pValue, | ||
const float | bField, | ||
const uint64_t | hitPatternCDCInitializer, | ||
const uint32_t | hitPatternVXDInitializer, | ||
const float | NDF | ||
) |
Constructor initializing class with fit result.
This is the only way to set the values of the TrackFitResult. We don't have any setters, as we assume, that once we create the MDST object, we don't want to change the values of the tracks any more. Scaling can be applied during readout, by setting the value for the magnetic field.
position | Position of the track near the perigee. |
momentum | Momentum of the track near the perigee. |
covariance | Covariance matrix for position and momentum given. |
charge | Charge of the particle. |
particleType | Particle Type used for mass hypothesis of the fit. |
pValue | p-value of the corresponding track fit. |
bField | Magnetic field to be used for the calculation of the curvature; It is assumed, that the B-field is parallel to the z-Axis. |
hitPatternCDCInitializer | bits for initializing CDC hit pattern. |
hitPatternVXDInitializer | bits for initializing VXD hit pattern. |
NDF | number of degrees of freedom for the fit (float since DAF provides decimal weights which can be less than 1) |
Definition at line 32 of file TrackFitResult.cc.
TrackFitResult | ( | const std::vector< float > & | tau, |
const std::vector< float > & | cov5, | ||
const Const::ParticleType & | particleType, | ||
const float | pValue, | ||
const uint64_t | hitPatternCDCInitializer, | ||
const uint32_t | hitPatternVXDInitializer, | ||
const float | NDF | ||
) |
Constructor initializing class with perigee parameters.
This constructor is needed for testing the class.
tau | Helix parameters of the track; |
cov5 | Covariance matrix of the helix paramters of the track; |
particleType | Particle Type used for the mass hypothesis of the fit. |
pValue | p-value of the corresponding track fit. |
hitPatternCDCInitializer | bits for initializing CDC hit pattern. |
hitPatternVXDInitializer | bits for initializing VXD hit pattern. |
NDF | number of degrees of freedom for the fit (float since DAF provides decimal weights which can be less than 1) |
Definition at line 63 of file TrackFitResult.cc.
|
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.
|
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.
|
inline |
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
P = (px, py, pz, E) where E is calculated via the momentum and the particle hypothesis of the TrackFitResult.
Definition at line 125 of file TrackFitResult.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.
|
inline |
Return track charge (1 or -1).
Definition at line 161 of file TrackFitResult.h.
double getChi2 | ( | ) | const |
Get chi2 given NDF and p-value.
Definition at line 107 of file TrackFitResult.cc.
|
inline |
Getter for tanLambda with CDF naming convention.
Definition at line 210 of file TrackFitResult.h.
|
inline |
Getter for all covariance matrix elements of perigee parameters.
Definition at line 222 of file TrackFitResult.h.
TMatrixDSym getCovariance5 | ( | ) | const |
Getter for covariance matrix of perigee parameters in matrix form.
The order is given by TFRParName: d0, phi0, omega, z0, lambda.
Definition at line 120 of file TrackFitResult.cc.
|
inline |
Position and Momentum Covariance Matrix.
Definition at line 148 of file TrackFitResult.h.
|
inline |
Getter for d0.
This is the signed distance to the IP in the r-phi plane.
Definition at line 179 of file TrackFitResult.h.
|
inline |
Getter for the Energy at the closest approach of the track in the r/phi projection.
E is calculated via the momentum and the particle hypothesis of the TrackFitResult.
Definition at line 134 of file TrackFitResult.h.
|
inline |
Conversion to framework Helix (without covariance).
Definition at line 231 of file TrackFitResult.h.
|
inline |
Conversion to framework Helix with momentum scaling (without covariance).
Definition at line 235 of file TrackFitResult.h.
HitPatternCDC getHitPatternCDC | ( | ) | const |
Getter for the hit pattern in the CDC;.
Definition at line 134 of file TrackFitResult.cc.
HitPatternVXD getHitPatternVXD | ( | ) | const |
Getter for the hit pattern in the VXD;.
Definition at line 139 of file TrackFitResult.cc.
|
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 143 of file TrackFitResult.cc.
|
inline |
Getter for vector of momentum at closest approach of track in r/phi projection.
As we calculate recalculate the momentum from a geometric helix, we need an estimate of the magnetic field along the z-axis to give back the momentum.
Definition at line 116 of file TrackFitResult.h.
|
inlinevirtualinherited |
Return a short name that describes this object, e.g.
pi+ for an MCParticle.
Reimplemented in Particle, MCParticle, and SpacePoint.
Definition at line 344 of file RelationsObject.h.
float getNDF | ( | ) | const |
Getter for number of degrees of freedom of the track fit.
Definition at line 99 of file TrackFitResult.cc.
|
inline |
Getter for omega.
This is the curvature of the track. It's sign is defined by the charge of the particle.
Definition at line 195 of file TrackFitResult.h.
|
inline |
Getter for ParticleType of the mass hypothesis of the track fit.
Definition at line 155 of file TrackFitResult.h.
|
inline |
|
inline |
Getter for phi0.
This is the angle of the transverse momentum in the r-phi plane.
Definition at line 185 of file TrackFitResult.h.
|
inline |
Getter for vector of position at closest approach of track in r/phi projection.
Definition at line 109 of file TrackFitResult.h.
|
inline |
|
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 |
Getter for tanLambda.
This is the slope of the track in the r-z plane.
Definition at line 207 of file TrackFitResult.h.
|
inline |
Getter for all perigee parameters.
Definition at line 216 of file TrackFitResult.h.
|
inline |
Getter for the absolute value of the transverse momentum at the perigee.
Definition at line 141 of file TrackFitResult.h.
|
inline |
Conversion to framework Uncertain Helix (i.e., with covariance).
Definition at line 239 of file TrackFitResult.h.
|
inline |
Getter for z0.
This is the z coordinate of the perigee.
Definition at line 201 of file TrackFitResult.h.
|
inline |
mask this TrackFitResults by setting the pValue to nan
Definition at line 106 of file TrackFitResult.h.
void updateTrackFitResult | ( | const TrackFitResult & | input | ) |
update the TrackFitResults
input | the TrackFitResult that will be copied into this TrackFitResult |
Definition at line 83 of file TrackFitResult.cc.
|
friend |
Definition at line 328 of file TrackFitResult.h.
|
staticprivate |
Number of covariance entries.
Definition at line 270 of file TrackFitResult.h.
|
staticprivate |
backward compatibility initialisation for NDF
Definition at line 304 of file TrackFitResult.h.
|
staticprivate |
Number of helix parameters.
A helix has five parameters and the covariance matrix is a symmetric five-by-five matrix.
Definition at line 269 of file TrackFitResult.h.
|
staticprivate |
Index for d0.
Definition at line 276 of file TrackFitResult.h.
|
staticprivate |
Index for omega.
Definition at line 278 of file TrackFitResult.h.
|
staticprivate |
Index for phi0.
Definition at line 277 of file TrackFitResult.h.
|
staticprivate |
Index tan lambda.
Definition at line 280 of file TrackFitResult.h.
|
staticprivate |
Index for z0.
Definition at line 279 of file TrackFitResult.h.
|
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 |
The 15 = 5*(5+1)/2 covariance matrix elements.
(0,0), (0,1) ... (1,1), (1,2) ... (2,2) ...
Definition at line 290 of file TrackFitResult.h.
|
private |
Member for initializing the information about hits in the CDC.
Definition at line 296 of file TrackFitResult.h.
|
private |
Member for initializing the information about hits in the VXD.
Definition at line 301 of file TrackFitResult.h.
|
private |
Member for number of degrees of freedom multiplied by 100 in order to store inside an int a float with two significant digits.
Definition at line 309 of file TrackFitResult.h.
|
private |
PDG Code for hypothesis with which the corresponding fit was performed.
Definition at line 259 of file TrackFitResult.h.
|
private |
Chi2 Probability of the fit.
Definition at line 262 of file TrackFitResult.h.
|
private |
perigee helix parameters; tau = d0, phi0, omega, z0, tanLambda.
Definition at line 284 of file TrackFitResult.h.