Belle II Software  release-05-02-19
TagVertex Class Reference

TagVertex data object: contains Btag Vertex and DeltaT. More...

#include <TagVertex.h>

Inheritance diagram for TagVertex:
Collaboration diagram for TagVertex:

Public Member Functions

 TagVertex ()
 Default constructor. More...
 
TVector3 getTagVertex ()
 Returns BTag Vertex.
 
TMatrixDSym getTagVertexErrMatrix ()
 Returns BTag Vertex (3x3) error matrix.
 
float getTagVertexPval ()
 Returns BTag Vertex P value.
 
const ParticlegetVtxFitParticle (unsigned int trackIndex)
 Returns a ptr to the particle constructed from the tag vtx track indexed by trackIndex.
 
const MCParticlegetVtxFitMCParticle (unsigned int trackIndex)
 Returns a ptr to the MC particle matched to the tag vtx track indexed by trackIndex.
 
float getDeltaT ()
 Returns DeltaT.
 
float getDeltaTErr ()
 Returns DeltaTErr.
 
TVector3 getMCTagVertex ()
 Returns generated BTag Vertex.
 
int getMCTagBFlavor ()
 Returns generated Btag PDG code.
 
float getMCDeltaTau ()
 Returns generated DeltaTau.
 
float getMCDeltaT ()
 Returns mc DeltaT (in kin. More...
 
int getFitType ()
 Returns fit algo type.
 
std::string getConstraintType ()
 get the constraint type used in the tag fit
 
int getNTracks ()
 Returns number of tracks used in the fit.
 
int getNFitTracks ()
 Returns number of tracks used in the fit (not counting the ones removed because they come from Kshorts)
 
float getTagVl ()
 Returns the tagV component in the boost direction.
 
float getTruthTagVl ()
 Returns the MC tagV component in the boost direction.
 
float getTagVlErr ()
 Returns the error of the tagV component in the boost direction.
 
float getTagVol ()
 Returns the tagV component in the direction orthogonal to the boost.
 
float getTruthTagVol ()
 Returns the MC tagV component in the direction orthogonal to the boost.
 
float getTagVolErr ()
 Returns the error of the tagV component in the direction orthogonal to the boost.
 
float getTagVNDF ()
 Returns the number of degrees of freedom in the tag vertex fit.
 
float getTagVChi2 ()
 Returns the chi^2 value of the tag vertex fit result.
 
float getTagVChi2IP ()
 Returns the IP component of the chi^2 value of the tag vertex fit result.
 
TVector3 getConstraintCenter ()
 Returns the position of the constraint, ie centre of the constraint ellipse.
 
TMatrixDSym getConstraintCov ()
 Get the covariance matrix of the constraint for the tag fit.
 
TVector3 getVtxFitTrackPosition (unsigned int trackIndex)
 Returns the position vector (X, Y, Z) of the tag track indexed by trackindex.
 
TVector3 getVtxFitTrackP (unsigned int trackIndex)
 Returns the momentum vector of the tag track indexed by trackindex.
 
double getVtxFitTrackPComponent (unsigned int trackIndex, unsigned int component)
 Returns one of the 3 components of the momentum of tag track indexed by trackindex.
 
double getVtxFitTrackZ0 (unsigned int trackIndex)
 Returns the longitudinal distance from the IP to the POCA of the tag track indexed by trackIndex.
 
double getVtxFitTrackD0 (unsigned int trackIndex)
 Returns the radial distance from the IP to the POCA of the tag track indexed by trackIndex.
 
double getRaveWeight (unsigned int trackIndex)
 Returns the weight assigned by Rave to the track indexed by trackIndex.
 
int getFitTruthStatus ()
 Get the status of the fit performed with the truth info of the tracks.
 
int getRollBackStatus ()
 Get the status of the fit performed with the rolled back tracks.
 
void setTagVertex (const TVector3 &TagVertex)
 Set BTag Vertex.
 
void setTagVertexErrMatrix (const TMatrixDSym &TagVertexErrMatrix)
 Set BTag Vertex (3x3) error matrix.
 
void setTagVertexPval (float TagVertexPval)
 Set BTag Vertex P value.
 
void setDeltaT (float DeltaT)
 Set DeltaT.
 
void setDeltaTErr (float DeltaTErr)
 Set DeltaTErr.
 
void setMCTagVertex (const TVector3 &mcTagVertex)
 Set generated BTag Vertex.
 
void setMCTagBFlavor (int mcTagBFlavor)
 Set generated Btag PDG code.
 
void setMCDeltaTau (float mcDeltaTau)
 Set generated DeltaT.
 
void setMCDeltaT (float mcDeltaT)
 Set generated DeltaT (in kin. More...
 
void setFitType (float FitType)
 Set fit algo type.
 
void setNTracks (int nTracks)
 Set number of tracks used in the fit.
 
void setTagVl (float TagVl)
 Set the tagV component in the boost direction.
 
void setTruthTagVl (float TruthTagVl)
 Set the MC tagV component in the boost direction.
 
void setTagVlErr (float TagVlErr)
 Set the error of the tagV component in the boost direction.
 
void setTagVol (float TagVol)
 Set the tagV component in the direction orthogonal to the boost.
 
void setTruthTagVol (float TruthTagVol)
 Set the tagV component in the direction orthogonal to the boost.
 
void setTagVolErr (float TagVolErr)
 Set the error of the tagV component in the direction orthogonal to the boost.
 
void setTagVNDF (float TagVNDF)
 Set the number of degrees of freedom in the tag vertex fit.
 
void setTagVChi2 (float TagVChi2)
 Set the chi^2 value of the tag vertex fit result.
 
void setTagVChi2IP (float TagVChi2IP)
 Set the IP component of the chi^2 value of the tag vertex fit result.
 
void setVertexFitParticles (const std::vector< const Particle * > &vtxFitParticles)
 Set a vector of pointers to the tracks used in the tag vtx fit.
 
void setVertexFitMCParticles (const std::vector< const MCParticle * > &vtxFitMCParticles)
 Set a vector of pointers to the MC p'cles corresponding to the tracks in the tag vtx fit.
 
void setRaveWeights (const std::vector< double > &raveWeights)
 Set the weights used by Rave in the tag vtx fit.
 
void setConstraintCenter (const TVector3 &constraintCenter)
 Set the centre of the constraint for the tag fit.
 
void setConstraintCov (const TMatrixDSym &constraintCov)
 Set the covariance matrix of the constraint for the tag fit.
 
void setConstraintType (const std::string &constraintType)
 Set the type of the constraint for the tag fit.
 
void setFitTruthStatus (int truthStatus)
 Set the status of the fit performed with the truth info of the tracks.
 
void setRollBackStatus (int backStatus)
 Set the status of the fit performed with the rolled back tracks.
 
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). More...
 
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). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
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. More...
 
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. More...
 
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. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
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

void resetTagVertexErrorMatrix ()
 Resets 3x3 tag vertex error matrix All elements are set to 0.0.
 
void resetConstraintCov ()
 Resets 3x3 constraint error matrix All elements are set to 0.0.
 
 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

Private Attributes

TVector3 m_tagVertex
 Btag vertex.
 
TMatrixDSym m_tagVertexErrMatrix
 Btag vertex (3x3) error matrix.
 
float m_tagVertexPval
 Btag vertex P value.
 
float m_deltaT
 Delta t.
 
float m_deltaTErr
 Delta t error.
 
TVector3 m_mcTagV
 generated Btag vertex
 
int m_mcPDG
 generated tag side B flavor (PDG code)
 
float m_mcDeltaTau
 generated Delta t: difference between signal and tag flight times
 
float m_mcDeltaT
 generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
 
int m_FitType
 Fit algo used.
 
int m_NTracks
 Number of tracks used in the fit.
 
float m_tagVl
 tagV component in the boost direction

 
float m_truthTagVl
 MC tagV component in the boost direction

 
float m_tagVlErr
 Error of the tagV component in the boost direction

 
float m_tagVol
 tagV component in the direction orthogonal to the boost
 
float m_truthTagVol
 MC tagV component in the direction orthogonal to the boost.
 
float m_tagVolErr
 Error of the tagV component in the direction orthogonal to the boost.
 
float m_tagVNDF
 Number of degrees of freedom in the tag vertex fit.
 
float m_tagVChi2
 chi^2 value of the tag vertex fit result
 
float m_tagVChi2IP
 IP component of chi^2 value of the tag vertex fit result.
 
std::vector< const Particle * > m_vtxFitParticles
 pointers to the tracks used by rave to fit the vertex
 
std::vector< const MCParticle * > m_vtxFitMCParticles
 pointers to the MC p'cles corresponding to the tracks in the tag vtx fit
 
int m_NFitTracks
 Number of tracks used by Rave to fit the vertex.
 
std::vector< double > m_raveWeights
 weights of each track in the Rave tag vtx fit
 
std::string m_constraintType
 Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)
 
TVector3 m_constraintCenter
 centre of the constraint
 
TMatrixDSym m_constraintCov
 covariance matrix associated to the constraint, ie size of the constraint
 
int m_fitTruthStatus
 status of the fit when fitted with the truth info of the tracks
 
int m_rollbackStatus
 status of the fit when fitted with rolled back tracks
 
DataStore::StoreEntrym_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.
 

Detailed Description

TagVertex data object: contains Btag Vertex and DeltaT.

Definition at line 44 of file TagVertex.h.

Constructor & Destructor Documentation

◆ TagVertex()

TagVertex ( )
inline

Default constructor.

All private members are set to 0 (all vectors are empty).

Definition at line 52 of file TagVertex.h.

Member Function Documentation

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 144 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 157 of file RelationsObject.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
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 172 of file RelationsObject.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 372 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in TrackFitResult, TRGSummary, Track, SoftwareTriggerResult, Particle, RecoTrack, MCParticle, Cluster, and PIDLikelihood.

Definition at line 364 of file RelationsObject.h.

◆ getMCDeltaT()

float getMCDeltaT ( )

Returns mc DeltaT (in kin.

approximation)

Definition at line 72 of file TagVertex.cc.

73 {
74  return m_mcDeltaT;
75 }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, Particle, and MCParticle.

Definition at line 346 of file RelationsObject.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 280 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 265 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 316 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 250 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 299 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 333 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 214 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 199 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 232 of file RelationsObject.h.

◆ setMCDeltaT()

void setMCDeltaT ( float  mcDeltaT)

Set generated DeltaT (in kin.

approx.)

Definition at line 240 of file TagVertex.cc.


The documentation for this class was generated from the following files:
Belle2::TagVertex::m_mcDeltaT
float m_mcDeltaT
generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
Definition: TagVertex.h:416
Belle2::HTML::getString
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:18