Belle II Software light-2406-ragdoll
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.
 
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.
 
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.
 
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).
 
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.
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
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

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;
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;
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.

143 {
144 if (object)
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }
void addRelation(const TObject *fromObject, StoreEntry *&fromEntry, int &fromIndex, const TObject *toObject, StoreEntry *&toEntry, int &toIndex, float weight, const std::string &namedRelation)
Add a relation from an object in a store array to another object in a store array.
Definition: DataStore.cc:492
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
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.

◆ 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.

156 {
157 StoreEntry* toEntry = nullptr;
158 int toIndex = -1;
159 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex, object, toEntry, toIndex, weight, namedRelation);
160 }

◆ 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.

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }
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).

◆ getArrayIndex()

int getArrayIndex ( ) const
inlineinherited

Returns this object's array index (in StoreArray), or -1 if not found.

Definition at line 385 of file RelationsObject.h.

386 {
388 return m_cacheArrayIndex;
389 }
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
Definition: DataStore.cc:398

◆ getArrayName()

std::string getArrayName ( ) const
inlineinherited

Get name of array this object is stored in, or "" if not found.

Definition at line 377 of file RelationsObject.h.

◆ getArrayPointer()

TClonesArray * getArrayPointer ( ) const
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.

419 {
422 return nullptr;
424 }
TClonesArray * getPtrAsArray() const
Return ptr cast to TClonesArray.
Definition: StoreEntry.cc:83

◆ getConstraintCenter()

B2Vector3D getConstraintCenter ( ) const

Returns the position of the constraint, ie centre of the constraint ellipse.

Definition at line 85 of file TagVertex.cc.

86{
87 if (m_constraintType == "noConstraint") return vecNaN;
88 return m_constraintCenter;
89}

◆ getConstraintCov()

TMatrixDSym getConstraintCov ( ) const

Get the covariance matrix of the constraint for the tag fit.

Definition at line 91 of file TagVertex.cc.

92{
93 return m_constraintCov;
94}
TMatrixDSym m_constraintCov
covariance matrix associated to the constraint, ie size of the constraint
Definition: TagVertex.h:414

◆ getConstraintType()

std::string getConstraintType ( ) const

get the constraint type used in the tag fit

Definition at line 80 of file TagVertex.cc.

81{
82 return m_constraintType;
83}

◆ getDeltaT()

float getDeltaT ( ) const

Returns DeltaT.

Definition at line 45 of file TagVertex.cc.

46{
47 return m_deltaT;
48}

◆ getDeltaTErr()

float getDeltaTErr ( ) const

Returns DeltaTErr.

Definition at line 50 of file TagVertex.cc.

51{
52 return m_deltaTErr;
53}

◆ getFitTruthStatus()

int getFitTruthStatus ( ) const

Get the status of the fit performed with the truth info of the tracks.

Definition at line 175 of file TagVertex.cc.

176{
177 return m_fitTruthStatus;
178}

◆ getFitType()

int getFitType ( ) const

Returns fit algo type.

Definition at line 75 of file TagVertex.cc.

76{
77 return m_FitType;
78}

◆ 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.

371 {
373 }
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
std::string htmlToPlainText(const std::string &html)
See RelationsObject::getInfo()

◆ 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 Particle, Cluster, MCParticle, PIDLikelihood, SoftwareTriggerResult, Track, TrackFitResult, and TRGSummary.

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getMCDeltaT()

float getMCDeltaT ( ) const

Returns mc DeltaT (in kin.

approximation)

Definition at line 70 of file TagVertex.cc.

71{
72 return m_mcDeltaT;
73}

◆ getMCDeltaTau()

float getMCDeltaTau ( ) const

Returns generated DeltaTau.

Definition at line 65 of file TagVertex.cc.

66{
67 return m_mcDeltaTau;
68}

◆ getMCTagBFlavor()

int getMCTagBFlavor ( ) const

Returns generated Btag PDG code.

Definition at line 60 of file TagVertex.cc.

61{
62 return m_mcPDG;
63}

◆ getMCTagVertex()

B2Vector3D getMCTagVertex ( ) const

Returns generated BTag Vertex.

Definition at line 55 of file TagVertex.cc.

56{
57 return m_mcTagV;
58}

◆ getName()

virtual std::string getName ( ) const
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.

344{ return ""; }

◆ getNFitTracks()

int getNFitTracks ( ) const

Returns number of tracks used in the fit (not counting the ones removed because they come from Kshorts)

Definition at line 101 of file TagVertex.cc.

102{
103 return m_NFitTracks;
104}

◆ getNTracks()

int getNTracks ( ) const

Returns number of tracks used in the fit.

Definition at line 96 of file TagVertex.cc.

97{
98 return m_NTracks;
99}

◆ getRaveWeight()

double getRaveWeight ( unsigned int  trackIndex) const

Returns the weight assigned by Rave to the track indexed by trackIndex.

Definition at line 169 of file TagVertex.cc.

170{
171 if (m_raveWeights.size() <= trackIndex) return realNaN;
172 return m_raveWeights.at(trackIndex);
173}
std::vector< double > m_raveWeights
weights of each track in the Rave tag vtx fit
Definition: TagVertex.h:411

◆ 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.

279 {
281 T::Class(), name, namedRelation).object);
282 }
@ c_BothSides
Combination of c_FromSide and c_ToSide.
Definition: DataStore.h:79
Belle2::RelationEntry getRelationWith(ESearchSide searchSide, const TObject *object, StoreEntry *&entry, int &index, const TClass *withClass, const std::string &withName, const std::string &namedRelation)
Get the first relation between an object and another object in a store array.
Definition: DataStore.cc:597
TObject * object
Pointer to the object.
Definition: RelationEntry.h:32

◆ 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.

264 {
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }
@ c_FromSide
Return relations/objects pointed from (to a given object).
Definition: DataStore.h:77

◆ 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.

316 {
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

◆ 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.

249 {
251 TO::Class(), name, namedRelation).object);
252 }
@ c_ToSide
Return relations/objects pointed to (from a given object).
Definition: DataStore.h:78

◆ 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.

299 {
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

◆ 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.

333 {
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

◆ 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.

214 {
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.

◆ 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.

198 {
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

◆ 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.

231 {
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ getRollBackStatus()

int getRollBackStatus ( ) const

Get the status of the fit performed with the rolled back tracks.

Definition at line 180 of file TagVertex.cc.

181{
182 return m_rollbackStatus;
183}

◆ getTagVChi2()

float getTagVChi2 ( ) const

Returns the chi^2 value of the tag vertex fit result.

Definition at line 141 of file TagVertex.cc.

142{
143 return m_tagVChi2;
144}

◆ getTagVChi2IP()

float getTagVChi2IP ( ) const

Returns the IP component of the chi^2 value of the tag vertex fit result.

Definition at line 146 of file TagVertex.cc.

147{
148 return m_tagVChi2IP;
149}

◆ getTagVertex()

B2Vector3D getTagVertex ( ) const

Returns BTag Vertex.

Definition at line 16 of file TagVertex.cc.

17{
18 return m_tagVertex;
19}

◆ getTagVertexErrMatrix()

TMatrixDSym getTagVertexErrMatrix ( ) const

Returns BTag Vertex (3x3) error matrix.

Definition at line 21 of file TagVertex.cc.

22{
24}
TMatrixDSym m_tagVertexErrMatrix
Btag vertex (3x3) error matrix.
Definition: TagVertex.h:389

◆ getTagVertexPval()

float getTagVertexPval ( ) const

Returns BTag Vertex P value.

Definition at line 26 of file TagVertex.cc.

27{
28 return m_tagVertexPval;
29}

◆ getTagVl()

float getTagVl ( ) const

Returns the tagV component in the boost direction.

Definition at line 106 of file TagVertex.cc.

107{
108 return m_tagVl;
109}

◆ getTagVlErr()

float getTagVlErr ( ) const

Returns the error of the tagV component in the boost direction.

Definition at line 116 of file TagVertex.cc.

117{
118 return m_tagVlErr;
119}

◆ getTagVNDF()

float getTagVNDF ( ) const

Returns the number of degrees of freedom in the tag vertex fit.

Definition at line 136 of file TagVertex.cc.

137{
138 return m_tagVNDF;
139}

◆ getTagVol()

float getTagVol ( ) const

Returns the tagV component in the direction orthogonal to the boost.

Definition at line 121 of file TagVertex.cc.

122{
123 return m_tagVol;
124}

◆ getTagVolErr()

float getTagVolErr ( ) const

Returns the error of the tagV component in the direction orthogonal to the boost.

Definition at line 131 of file TagVertex.cc.

132{
133 return m_tagVolErr;
134}

◆ getTruthTagVl()

float getTruthTagVl ( ) const

Returns the MC tagV component in the boost direction.

Definition at line 111 of file TagVertex.cc.

112{
113 return m_truthTagVl;
114}

◆ getTruthTagVol()

float getTruthTagVol ( ) const

Returns the MC tagV component in the direction orthogonal to the boost.

Definition at line 126 of file TagVertex.cc.

127{
128 return m_truthTagVol;
129}

◆ getVtxFitMCParticle()

const MCParticle * getVtxFitMCParticle ( unsigned int  trackIndex) const

Returns a ptr to the MC particle matched to the tag vtx track indexed by trackIndex.

Definition at line 38 of file TagVertex.cc.

39{
40 if (trackIndex >= m_vtxFitMCParticles.size())
41 return 0;
42 return m_vtxFitMCParticles.at(trackIndex);
43}
std::vector< const MCParticle * > m_vtxFitMCParticles
pointers to the MC p'cles corresponding to the tracks in the tag vtx fit
Definition: TagVertex.h:409

◆ getVtxFitParticle()

const Particle * getVtxFitParticle ( unsigned int  trackIndex) const

Returns a ptr to the particle constructed from the tag vtx track indexed by trackIndex.

Definition at line 31 of file TagVertex.cc.

32{
33 if (trackIndex >= m_vtxFitParticles.size())
34 return 0;
35 return m_vtxFitParticles.at(trackIndex);
36}
std::vector< const Particle * > m_vtxFitParticles
pointers to the tracks used by rave to fit the vertex
Definition: TagVertex.h:408

◆ getVtxFitTrackD0()

double getVtxFitTrackD0 ( unsigned int  trackIndex) const

Returns the radial distance from the IP to the POCA of the tag track indexed by trackIndex.

Definition at line 163 of file TagVertex.cc.

164{
165 if (m_vtxFitParticles.size() <= trackIndex) return realNaN;
166 return m_vtxFitParticles.at(trackIndex)->getTrackFitResult()->getD0();
167}

◆ getVtxFitTrackP()

ROOT::Math::XYZVector getVtxFitTrackP ( unsigned int  trackIndex) const

Returns the momentum vector of the tag track indexed by trackindex.

Definition at line 151 of file TagVertex.cc.

152{
153 if (m_vtxFitParticles.size() <= trackIndex) return ROOT::Math::XYZVector(realNaN, realNaN, realNaN);
154 return m_vtxFitParticles.at(trackIndex)->getMomentum();
155}

◆ getVtxFitTrackZ0()

double getVtxFitTrackZ0 ( unsigned int  trackIndex) const

Returns the longitudinal distance from the IP to the POCA of the tag track indexed by trackIndex.

Definition at line 157 of file TagVertex.cc.

158{
159 if (m_vtxFitParticles.size() <= trackIndex) return realNaN;
160 return m_vtxFitParticles.at(trackIndex)->getTrackFitResult()->getZ0();
161}

◆ resetConstraintCov()

void resetConstraintCov ( )
private

Resets 3x3 constraint error matrix All elements are set to 0.0.

Definition at line 324 of file TagVertex.cc.

325{
326 TMatrixDSym temp(3);
327 m_constraintCov.ResizeTo(temp);
328 m_constraintCov = temp;
329}

◆ resetTagVertexErrorMatrix()

void resetTagVertexErrorMatrix ( )
private

Resets 3x3 tag vertex error matrix All elements are set to 0.0.

Definition at line 317 of file TagVertex.cc.

318{
319 TMatrixDSym temp(3);
320 m_tagVertexErrMatrix.ResizeTo(temp);
322}

◆ setConstraintCenter()

void setConstraintCenter ( const B2Vector3D constraintCenter)

Set the centre of the constraint for the tag fit.

Definition at line 301 of file TagVertex.cc.

302{
303 m_constraintCenter = constraintCenter;
304}

◆ setConstraintCov()

void setConstraintCov ( const TMatrixDSym &  constraintCov)

Set the covariance matrix of the constraint for the tag fit.

Definition at line 306 of file TagVertex.cc.

307{
308 m_constraintCov.ResizeTo(constraintCov);
309 m_constraintCov = constraintCov;
310}

◆ setConstraintType()

void setConstraintType ( const std::string &  constraintType)

Set the type of the constraint for the tag fit.

Definition at line 312 of file TagVertex.cc.

313{
314 m_constraintType = constraintType;
315}

◆ setDeltaT()

void setDeltaT ( float  DeltaT)

Set DeltaT.

Definition at line 200 of file TagVertex.cc.

201{
202 m_deltaT = DeltaT;
203}

◆ setDeltaTErr()

void setDeltaTErr ( float  DeltaTErr)

Set DeltaTErr.

Definition at line 205 of file TagVertex.cc.

206{
207 m_deltaTErr = DeltaTErr;
208}

◆ setFitTruthStatus()

void setFitTruthStatus ( int  truthStatus)

Set the status of the fit performed with the truth info of the tracks.

Definition at line 331 of file TagVertex.cc.

332{
333 m_fitTruthStatus = truthStatus;
334}

◆ setFitType()

void setFitType ( float  FitType)

Set fit algo type.

Definition at line 230 of file TagVertex.cc.

231{
232 m_FitType = FitType;
233}

◆ setMCDeltaT()

void setMCDeltaT ( float  mcDeltaT)

Set generated DeltaT (in kin.

approx.)

Definition at line 225 of file TagVertex.cc.

226{
227 m_mcDeltaT = mcDeltaT;
228}

◆ setMCDeltaTau()

void setMCDeltaTau ( float  mcDeltaTau)

Set generated DeltaT.

Definition at line 220 of file TagVertex.cc.

221{
222 m_mcDeltaTau = mcDeltaTau;
223}

◆ setMCTagBFlavor()

void setMCTagBFlavor ( int  mcTagBFlavor)

Set generated Btag PDG code.

Definition at line 215 of file TagVertex.cc.

216{
217 m_mcPDG = mcTagBFlavor;
218}

◆ setMCTagVertex()

void setMCTagVertex ( const B2Vector3D mcTagVertex)

Set generated BTag Vertex.

Definition at line 210 of file TagVertex.cc.

211{
212 m_mcTagV = mcTagVertex;
213}

◆ setNTracks()

void setNTracks ( int  nTracks)

Set number of tracks used in the fit.

Definition at line 235 of file TagVertex.cc.

236{
237 m_NTracks = NTracks;
238}

◆ setRaveWeights()

void setRaveWeights ( const std::vector< double > &  raveWeights)

Set the weights used by Rave in the tag vtx fit.

Definition at line 296 of file TagVertex.cc.

297{
298 m_raveWeights = raveWeights;
299}

◆ setRollBackStatus()

void setRollBackStatus ( int  backStatus)

Set the status of the fit performed with the rolled back tracks.

Definition at line 336 of file TagVertex.cc.

337{
338 m_rollbackStatus = backStatus;
339}

◆ setTagVChi2()

void setTagVChi2 ( float  TagVChi2)

Set the chi^2 value of the tag vertex fit result.

Definition at line 275 of file TagVertex.cc.

276{
277 m_tagVChi2 = TagVChi2;
278}

◆ setTagVChi2IP()

void setTagVChi2IP ( float  TagVChi2IP)

Set the IP component of the chi^2 value of the tag vertex fit result.

Definition at line 280 of file TagVertex.cc.

281{
282 m_tagVChi2IP = TagVChi2IP;
283}

◆ setTagVertex()

void setTagVertex ( const B2Vector3D TagVertex)

Set BTag Vertex.

Definition at line 185 of file TagVertex.cc.

186{
187 m_tagVertex = tagVertex;
188}

◆ setTagVertexErrMatrix()

void setTagVertexErrMatrix ( const TMatrixDSym &  TagVertexErrMatrix)

Set BTag Vertex (3x3) error matrix.

Definition at line 190 of file TagVertex.cc.

191{
192 m_tagVertexErrMatrix = TagVertexErrMatrix;
193}

◆ setTagVertexPval()

void setTagVertexPval ( float  TagVertexPval)

Set BTag Vertex P value.

Definition at line 195 of file TagVertex.cc.

196{
197 m_tagVertexPval = TagVertexPval;
198}

◆ setTagVl()

void setTagVl ( float  TagVl)

Set the tagV component in the boost direction.

Definition at line 240 of file TagVertex.cc.

241{
242 m_tagVl = TagVl;
243}

◆ setTagVlErr()

void setTagVlErr ( float  TagVlErr)

Set the error of the tagV component in the boost direction.

Definition at line 250 of file TagVertex.cc.

251{
252 m_tagVlErr = TagVlErr;
253}

◆ setTagVNDF()

void setTagVNDF ( float  TagVNDF)

Set the number of degrees of freedom in the tag vertex fit.

Definition at line 270 of file TagVertex.cc.

271{
272 m_tagVNDF = TagVNDF;
273}

◆ setTagVol()

void setTagVol ( float  TagVol)

Set the tagV component in the direction orthogonal to the boost.

Definition at line 255 of file TagVertex.cc.

256{
257 m_tagVol = TagVol;
258}

◆ setTagVolErr()

void setTagVolErr ( float  TagVolErr)

Set the error of the tagV component in the direction orthogonal to the boost.

Definition at line 265 of file TagVertex.cc.

266{
267 m_tagVolErr = TagVolErr;
268}

◆ setTruthTagVl()

void setTruthTagVl ( float  TruthTagVl)

Set the MC tagV component in the boost direction.

Definition at line 245 of file TagVertex.cc.

246{
247 m_truthTagVl = TruthTagVl;
248}

◆ setTruthTagVol()

void setTruthTagVol ( float  TruthTagVol)

Set the tagV component in the direction orthogonal to the boost.

Definition at line 260 of file TagVertex.cc.

261{
262 m_truthTagVol = TruthTagVol;
263}

◆ setVertexFitMCParticles()

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.

Definition at line 291 of file TagVertex.cc.

292{
293 m_vtxFitMCParticles = vtxFitMCParticles;
294}

◆ setVertexFitParticles()

void setVertexFitParticles ( const std::vector< const Particle * > &  vtxFitParticles)

Set a vector of pointers to the tracks used in the tag vtx fit.

Definition at line 285 of file TagVertex.cc.

286{
287 m_vtxFitParticles = vtxFitParticles;
288 m_NFitTracks = vtxFitParticles.size();
289}

Member Data Documentation

◆ m_cacheArrayIndex

int m_cacheArrayIndex
mutableprivateinherited

Cache of the index in the TClonesArray to which this object belongs.

Definition at line 432 of file RelationsObject.h.

◆ m_cacheDataStoreEntry

DataStore::StoreEntry* m_cacheDataStoreEntry
mutableprivateinherited

Cache of the data store entry to which this object belongs.

Definition at line 429 of file RelationsObject.h.

◆ m_constraintCenter

B2Vector3D m_constraintCenter
private

centre of the constraint

Definition at line 413 of file TagVertex.h.

◆ m_constraintCov

TMatrixDSym m_constraintCov
private

covariance matrix associated to the constraint, ie size of the constraint

Definition at line 414 of file TagVertex.h.

◆ m_constraintType

std::string m_constraintType
private

Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)

Definition at line 412 of file TagVertex.h.

◆ m_deltaT

float m_deltaT
private

Delta t.

Definition at line 391 of file TagVertex.h.

◆ m_deltaTErr

float m_deltaTErr
private

Delta t error.

Definition at line 392 of file TagVertex.h.

◆ m_fitTruthStatus

int m_fitTruthStatus
private

status of the fit when fitted with the truth info of the tracks

Definition at line 415 of file TagVertex.h.

◆ m_FitType

int m_FitType
private

Fit algo used.

Definition at line 397 of file TagVertex.h.

◆ m_mcDeltaT

float m_mcDeltaT
private

generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost

Definition at line 396 of file TagVertex.h.

◆ m_mcDeltaTau

float m_mcDeltaTau
private

generated Delta t: difference between signal and tag flight times

Definition at line 395 of file TagVertex.h.

◆ m_mcPDG

int m_mcPDG
private

generated tag side B flavor (PDG code)

Definition at line 394 of file TagVertex.h.

◆ m_mcTagV

B2Vector3D m_mcTagV
private

generated Btag vertex

Definition at line 393 of file TagVertex.h.

◆ m_NFitTracks

int m_NFitTracks
private

Number of tracks used by Rave to fit the vertex.

Definition at line 410 of file TagVertex.h.

◆ m_NTracks

int m_NTracks
private

Number of tracks used in the fit.

Definition at line 398 of file TagVertex.h.

◆ m_raveWeights

std::vector<double> m_raveWeights
private

weights of each track in the Rave tag vtx fit

Definition at line 411 of file TagVertex.h.

◆ m_rollbackStatus

int m_rollbackStatus
private

status of the fit when fitted with rolled back tracks

Definition at line 416 of file TagVertex.h.

◆ m_tagVChi2

float m_tagVChi2
private

chi^2 value of the tag vertex fit result

Definition at line 406 of file TagVertex.h.

◆ m_tagVChi2IP

float m_tagVChi2IP
private

IP component of chi^2 value of the tag vertex fit result.

Definition at line 407 of file TagVertex.h.

◆ m_tagVertex

B2Vector3D m_tagVertex
private

Btag vertex.

Definition at line 388 of file TagVertex.h.

◆ m_tagVertexErrMatrix

TMatrixDSym m_tagVertexErrMatrix
private

Btag vertex (3x3) error matrix.

Definition at line 389 of file TagVertex.h.

◆ m_tagVertexPval

float m_tagVertexPval
private

Btag vertex P value.

Definition at line 390 of file TagVertex.h.

◆ m_tagVl

float m_tagVl
private

tagV component in the boost direction

Definition at line 399 of file TagVertex.h.

◆ m_tagVlErr

float m_tagVlErr
private

Error of the tagV component in the boost direction

Definition at line 401 of file TagVertex.h.

◆ m_tagVNDF

float m_tagVNDF
private

Number of degrees of freedom in the tag vertex fit.

Definition at line 405 of file TagVertex.h.

◆ m_tagVol

float m_tagVol
private

tagV component in the direction orthogonal to the boost

Definition at line 402 of file TagVertex.h.

◆ m_tagVolErr

float m_tagVolErr
private

Error of the tagV component in the direction orthogonal to the boost.

Definition at line 404 of file TagVertex.h.

◆ m_truthTagVl

float m_truthTagVl
private

MC tagV component in the boost direction

Definition at line 400 of file TagVertex.h.

◆ m_truthTagVol

float m_truthTagVol
private

MC tagV component in the direction orthogonal to the boost.

Definition at line 403 of file TagVertex.h.

◆ m_vtxFitMCParticles

std::vector<const MCParticle*> m_vtxFitMCParticles
private

pointers to the MC p'cles corresponding to the tracks in the tag vtx fit

Definition at line 409 of file TagVertex.h.

◆ m_vtxFitParticles

std::vector<const Particle*> m_vtxFitParticles
private

pointers to the tracks used by rave to fit the vertex

Definition at line 408 of file TagVertex.h.


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