Belle II Software  release-08-01-10
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...
 
B2Vector3D getTagVertex () const
 Returns BTag Vertex.
 
TMatrixDSym getTagVertexErrMatrix () const
 Returns BTag Vertex (3x3) error matrix.
 
float getTagVertexPval () const
 Returns BTag Vertex P value.
 
const ParticlegetVtxFitParticle (unsigned int trackIndex) const
 Returns a ptr to the particle constructed from the tag vtx track indexed by trackIndex.
 
const MCParticlegetVtxFitMCParticle (unsigned int trackIndex) const
 Returns a ptr to the MC particle matched to the tag vtx track indexed by trackIndex.
 
float getDeltaT () const
 Returns DeltaT.
 
float getDeltaTErr () const
 Returns DeltaTErr.
 
B2Vector3D getMCTagVertex () const
 Returns generated BTag Vertex.
 
int getMCTagBFlavor () const
 Returns generated Btag PDG code.
 
float getMCDeltaTau () const
 Returns generated DeltaTau.
 
float getMCDeltaT () const
 Returns mc DeltaT (in kin. More...
 
int getFitType () const
 Returns fit algo type.
 
std::string getConstraintType () const
 get the constraint type used in the tag fit
 
int getNTracks () const
 Returns number of tracks used in the fit.
 
int getNFitTracks () const
 Returns number of tracks used in the fit (not counting the ones removed because they come from Kshorts)
 
float getTagVl () const
 Returns the tagV component in the boost direction.
 
float getTruthTagVl () const
 Returns the MC tagV component in the boost direction.
 
float getTagVlErr () const
 Returns the error of the tagV component in the boost direction.
 
float getTagVol () const
 Returns the tagV component in the direction orthogonal to the boost.
 
float getTruthTagVol () const
 Returns the MC tagV component in the direction orthogonal to the boost.
 
float getTagVolErr () const
 Returns the error of the tagV component in the direction orthogonal to the boost.
 
float getTagVNDF () const
 Returns the number of degrees of freedom in the tag vertex fit.
 
float getTagVChi2 () const
 Returns the chi^2 value of the tag vertex fit result.
 
float getTagVChi2IP () const
 Returns the IP component of the chi^2 value of the tag vertex fit result.
 
B2Vector3D getConstraintCenter () const
 Returns the position of the constraint, ie centre of the constraint ellipse.
 
TMatrixDSym getConstraintCov () const
 Get the covariance matrix of the constraint for the tag fit.
 
ROOT::Math::XYZVector getVtxFitTrackP (unsigned int trackIndex) const
 Returns the momentum vector of the tag track indexed by trackindex.
 
double getVtxFitTrackZ0 (unsigned int trackIndex) const
 Returns the longitudinal distance from the IP to the POCA of the tag track indexed by trackIndex.
 
double getVtxFitTrackD0 (unsigned int trackIndex) const
 Returns the radial distance from the IP to the POCA of the tag track indexed by trackIndex.
 
double getRaveWeight (unsigned int trackIndex) const
 Returns the weight assigned by Rave to the track indexed by trackIndex.
 
int getFitTruthStatus () const
 Get the status of the fit performed with the truth info of the tracks.
 
int getRollBackStatus () const
 Get the status of the fit performed with the rolled back tracks.
 
void setTagVertex (const B2Vector3D &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 B2Vector3D &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 B2Vector3D &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

B2Vector3D 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.
 
B2Vector3D 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)
 
B2Vector3D 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 34 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 42 of file TagVertex.h.

43  {
44  m_tagVertex(0) = 0; m_tagVertex(1) = 0; m_tagVertex(2) = 0;
45  m_tagVertexPval = 0;
46  m_deltaT = 0;
47  m_deltaTErr = 0;
48  m_mcDeltaTau = 0;
49  m_mcDeltaT = 0;
50  m_mcTagV(0) = 0; m_mcTagV(1) = 0; m_mcTagV(2) = 0;
51  m_mcPDG = 0;
54  m_FitType = 0;
55  m_NTracks = -1;
56  m_tagVl = 0;
57  m_tagVlErr = 0;
58  m_tagVol = 0;
59  m_tagVolErr = 0;
60  m_truthTagVl = 0;
61  m_truthTagVol = 0;
62  m_tagVNDF = 0;
63  m_tagVChi2 = 0;
64  m_tagVChi2IP = 0;
65  m_NFitTracks = 0;
66  m_constraintType = "";
68  m_fitTruthStatus = 0;
69  m_rollbackStatus = 0;
70  }
int m_fitTruthStatus
status of the fit when fitted with the truth info of the tracks
Definition: TagVertex.h:415
int m_NFitTracks
Number of tracks used by Rave to fit the vertex.
Definition: TagVertex.h:410
void resetConstraintCov()
Resets 3x3 constraint error matrix All elements are set to 0.0.
Definition: TagVertex.cc:324
float m_tagVertexPval
Btag vertex P value.
Definition: TagVertex.h:390
float m_tagVlErr
Error of the tagV component in the boost direction
Definition: TagVertex.h:401
int m_NTracks
Number of tracks used in the fit.
Definition: TagVertex.h:398
float m_mcDeltaT
generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
Definition: TagVertex.h:396
float m_truthTagVl
MC tagV component in the boost direction
Definition: TagVertex.h:400
float m_tagVNDF
Number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.h:405
B2Vector3D m_constraintCenter
centre of the constraint
Definition: TagVertex.h:413
float m_tagVChi2
chi^2 value of the tag vertex fit result
Definition: TagVertex.h:406
B2Vector3D m_mcTagV
generated Btag vertex
Definition: TagVertex.h:393
float m_deltaT
Delta t.
Definition: TagVertex.h:391
float m_tagVolErr
Error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:404
B2Vector3D m_tagVertex
Btag vertex.
Definition: TagVertex.h:388
std::string m_constraintType
Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)
Definition: TagVertex.h:412
float m_tagVl
tagV component in the boost direction
Definition: TagVertex.h:399
float m_mcDeltaTau
generated Delta t: difference between signal and tag flight times
Definition: TagVertex.h:395
float m_deltaTErr
Delta t error.
Definition: TagVertex.h:392
float m_tagVChi2IP
IP component of chi^2 value of the tag vertex fit result.
Definition: TagVertex.h:407
int m_mcPDG
generated tag side B flavor (PDG code)
Definition: TagVertex.h:394
void resetTagVertexErrorMatrix()
Resets 3x3 tag vertex error matrix All elements are set to 0.0.
Definition: TagVertex.cc:317
float m_truthTagVol
MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:403
float m_tagVol
tagV component in the direction orthogonal to the boost
Definition: TagVertex.h:402
int m_rollbackStatus
status of the fit when fitted with rolled back tracks
Definition: TagVertex.h:416
int m_FitType
Fit algo used.
Definition: TagVertex.h:397

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 142 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 155 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 170 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 370 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();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:24
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 RecoTrack, TRGSummary, TrackFitResult, Track, SoftwareTriggerResult, PIDLikelihood, MCParticle, Cluster, and Particle.

Definition at line 362 of file RelationsObject.h.

◆ getMCDeltaT()

float getMCDeltaT ( ) const

Returns mc DeltaT (in kin.

approximation)

Definition at line 70 of file TagVertex.cc.

71 {
72  return m_mcDeltaT;
73 }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in SpacePoint, MCParticle, and Particle.

Definition at line 344 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 278 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 263 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 314 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 248 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 297 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 331 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 212 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 197 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 230 of file RelationsObject.h.

◆ setMCDeltaT()

void setMCDeltaT ( float  mcDeltaT)

Set generated DeltaT (in kin.

approx.)

Definition at line 225 of file TagVertex.cc.


The documentation for this class was generated from the following files: