![]() |
Belle II Software
release-05-02-19
|
This class stores the relevant information for the TagV vertex fit, extracted mainly from the Flavor Tagging Module. More...
#include <FlavorTaggerInfo.h>
Public Member Functions | |
FlavorTaggerInfo () | |
Default constructor. More... | |
void | setUseModeFlavorTagger (const std::string &mode) |
SETTERS Some of the setters are expected to fill a vector whose each element corresponds to a given category in the following order: Electron, Muon, Kinetic Lepton, Kaon, Slow Pion, Fast Pion, Lambda, Highest Momentum The setting of all elements need to be performed in a loop. More... | |
void | addMethodMap (const std::string &method) |
Saves the method and the correspondig FlavorTaggerMap. More... | |
void | setTrack (Belle2::Track *track) |
Vector filler: Set the pointer of the track with the highest probability for each category. More... | |
void | setParticle (Particle *Particle) |
Vector filler: Set the pointer of the Partcile related to the track with the highest probability for each category. More... | |
void | setMCParticle (Belle2::MCParticle *MCParticle) |
Vector filler: Set the pointer of the MCParticle related related to track with the highest probability for each category. More... | |
void | setMCParticleMother (Belle2::MCParticle *MCParticle) |
Vector filler: Set the pointer of the MCParticle's mother related to the track with the highest probability for each category. More... | |
void | setCatProb (float catProb) |
Vector filler: Set the probability of the event to correspond to a given category probability for each category. More... | |
void | setTargProb (float) |
Vector filler: Set the probability of each category's track of being a direct daughter of the Btag. More... | |
void | setP (float momentum) |
Vector filler: Set the momentum absolute value of the corresponding category's track. More... | |
void | setIsFromB (int isFromB) |
Vector filler: Set the MC matched code of the track depending on its mother (usually set in TagV module) Quick reference: 0 - does not come from the B 1,2,3,4 - come from an immediately decaying daughter of the B (number depends on the PDG code of each meson) 5 - come directly from the B More... | |
void | setCategories (const std::string &catName) |
Vector filler: Set the name of the categories. More... | |
void | setD0 (double D0) |
Vector filler: Set the impact parameter D0 of each track in an accesible way. More... | |
void | setZ0 (double Z0) |
Vector filler: Set the impact parameter Z0 of each track in an accesible way. More... | |
void | setProdPointResolutionZ (float deltaProdZ) |
Vector filler: Set resolution of the production point of each track, i.e real production point - MC matched production point. More... | |
void | setGoodTracksPurityFT (float goodTracksPurity) |
Set the fraction of tracks coming from the Btag respect to the total amount of tracks within this class. More... | |
void | setGoodTracksPurityROE (float goodTracksPurity) |
Set the fraction of tracks coming from the Btag respect to the total amount of tracks within RoE. More... | |
void | setGoodTracksROE (int numTracks) |
Set the number of tracks coming from the Btag in the RoE. More... | |
void | setBadTracksROE (int numTracks) |
Set the number of tracks coming not from the Btag in the RoE. More... | |
void | setGoodTracksFT (int numTracks) |
Set the number of tracks coming from the Btag within this class. More... | |
void | setBadTracksFT (int numTracks) |
Set the number of tracks not coming from the Btag within this class. More... | |
std::string | getUseModeFlavorTagger () |
GETTERS. More... | |
FlavorTaggerInfoMap * | getMethodMap (const std::string &method) |
method used for the FlavorTagger and corresponding FlavorTaggerInfoMap More... | |
bool | isMethodInMap (const std::string &method) |
checks if the given method method is used for the FlavorTagger with a corresponding FlavorTaggerInfoMap More... | |
std::vector< Belle2::Track * > | getTracks () |
Get all the tracks. More... | |
Belle2::Track * | getTrack (int position) |
Get a single track. More... | |
std::vector< float > | getCatProb () |
Get all the event probabilities to correspond to each category. More... | |
std::vector< float > | getTargProb () |
Get all the track probabilities to come directly from the Btag for each category. More... | |
std::vector< float > | getP () |
Get the momentum of every category's track. More... | |
std::vector< Particle * > | getParticle () |
Get the particle's pointer related to each track. More... | |
std::vector< Belle2::MCParticle * > | getMCParticle () |
Get the MC particle's pointer related to each track. More... | |
std::vector< Belle2::MCParticle * > | getMCParticleMother () |
Get the mother MC particle's pointer related to each track. More... | |
std::vector< float > | getD0 () |
Get the impact parameter D0 of every category's track. More... | |
std::vector< float > | getZ0 () |
Get the impact parameter Z0 of every category's track. More... | |
std::vector< int > | getIsFromB () |
Get the MC matched code of every track depending on its mother. More... | |
std::vector< std::string > | getCategories () |
Get the list of names of the categories of this object. More... | |
std::vector< float > | getProdPointResolutionZ () |
Get resolution of the production point of each track, i.e real production point - MC matched production point. More... | |
float | getGoodTracksPurityFT () |
Get the ratio (purity) of tracks coming from the Btag out of the total amount of tracks within this object. More... | |
float | getGoodTracksPurityROE () |
Get the ratio (purity) of tracks coming from the Btag out of the total amount of tracks within the correspondent RestOfEvent object. More... | |
int | getBadTracksROE () |
Get the number of tracks not coming from the Btag within the correspondent RestOfEvent object. More... | |
int | getGoodTracksROE () |
Get the number of tracks coming from the Btag within the correspondent RestOfEvent object. More... | |
int | getBadTracksFT () |
Get the number of tracks not coming from the Btag within this object. More... | |
int | getGoodTracksFT () |
Get the number of tracks not coming from the Btag within this object. More... | |
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 | |
ClassDef (RelationsInterface, 0) | |
defines interface for accessing relations of objects in StoreArray. | |
Private Attributes | |
std::string | m_useModeFlavorTagger |
Usemode of the FlavorTagger: "Teacher" or "Expert". | |
std::map< std::string, FlavorTaggerInfoMap * > | m_methodMap |
Map containing the methods used for the FlavorTagger: "TMVA" or "FANN", and the corresponding map. | |
std::vector< Belle2::Track * > | m_tracks |
highest probability track for each category | |
std::vector< Particle * > | m_particle |
particle pointer related to each track | |
std::vector< Belle2::MCParticle * > | m_MCparticle |
MC particle pointer related to each track. | |
std::vector< Belle2::MCParticle * > | m_MCparticle_mother |
mother MC particle pointer related to each track | |
std::vector< float > | m_D0 |
impact parameter D0 related to each track | |
std::vector< float > | m_Z0 |
impact parameter Z0 related to each track | |
std::vector< std::string > | m_categories |
categories name | |
std::vector< float > | m_prodPointResZ |
production point resolution Z for each track | |
std::vector< float > | m_categoryProb |
probability of the event to belong to each category | |
std::vector< float > | m_targetProb |
probability of each track to be primary | |
std::vector< float > | m_P |
absolute 3 momentum of each track | |
std::vector< int > | m_isFromB |
MC matched code of each track depending on its mother. | |
float | m_goodTracksPurityFT |
purity of tracks coming from the Btag in this objecy | |
float | m_goodTracksPurityROE |
purity of tracks coming from the Btag in the correspondent RestOfEvent object | |
int | m_badTracksROE |
number of tracksc not coming from Btag in the correspondent RestOfEvent object | |
int | m_goodTracksROE |
number of tracksc coming from Btag in the correspondent RestOfEvent | |
int | m_badTracksFT |
number of tracksc not coming from Btag in this object | |
int | m_goodTracksFT |
number of tracksc coming from Btag in this object | |
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. | |
This class stores the relevant information for the TagV vertex fit, extracted mainly from the Flavor Tagging Module.
It also stores MC true information that could be used to check the goodness of the fit.
The way the information is stored is into vectors with the same length. Every position in all vectors correspond to the same event-category information, so that every category is uniquely correlated to one, e.g, track. Variables stored:
This class is still in an early phase, thus some changes may be needed.
Definition at line 57 of file FlavorTaggerInfo.h.
|
inline |
Default constructor.
All private members are set to 0 (all vectors are empty).
Definition at line 65 of file FlavorTaggerInfo.h.
void addMethodMap | ( | const std::string & | method | ) |
Saves the method and the correspondig FlavorTaggerMap.
method | "TMVA" or "FANN". |
Definition at line 31 of file FlavorTaggerInfo.cc.
|
inlineinherited |
Add a relation from this object to another object (with caching).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 144 of file RelationsObject.h.
|
inlineinherited |
Add a relation from this object to another object (no caching, can be quite slow).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 157 of file RelationsObject.h.
|
inlineinherited |
Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.
Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.
Definition at line 172 of file RelationsObject.h.
int getBadTracksFT | ( | ) |
Get the number of tracks not coming from the Btag within this object.
Definition at line 270 of file FlavorTaggerInfo.cc.
int getBadTracksROE | ( | ) |
Get the number of tracks not coming from the Btag within the correspondent RestOfEvent object.
Definition at line 260 of file FlavorTaggerInfo.cc.
std::vector< std::string > getCategories | ( | ) |
Get the list of names of the categories of this object.
Definition at line 282 of file FlavorTaggerInfo.cc.
std::vector< float > getCatProb | ( | ) |
Get all the event probabilities to correspond to each category.
Definition at line 183 of file FlavorTaggerInfo.cc.
std::vector< float > getD0 | ( | ) |
Get the impact parameter D0 of every category's track.
Definition at line 222 of file FlavorTaggerInfo.cc.
int getGoodTracksFT | ( | ) |
Get the number of tracks not coming from the Btag within this object.
Definition at line 265 of file FlavorTaggerInfo.cc.
float getGoodTracksPurityFT | ( | ) |
Get the ratio (purity) of tracks coming from the Btag out of the total amount of tracks within this object.
Definition at line 243 of file FlavorTaggerInfo.cc.
float getGoodTracksPurityROE | ( | ) |
Get the ratio (purity) of tracks coming from the Btag out of the total amount of tracks within the correspondent RestOfEvent object.
Definition at line 249 of file FlavorTaggerInfo.cc.
int getGoodTracksROE | ( | ) |
Get the number of tracks coming from the Btag within the correspondent RestOfEvent object.
Definition at line 255 of file FlavorTaggerInfo.cc.
|
inlineinherited |
Return a short summary of this object's contents in raw text format.
Returns the contents of getInfoHTML() while translating line-breaks etc.
Definition at line 372 of file RelationsObject.h.
|
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:
Reimplemented in TrackFitResult, TRGSummary, Track, SoftwareTriggerResult, Particle, RecoTrack, MCParticle, Cluster, and PIDLikelihood.
Definition at line 364 of file RelationsObject.h.
std::vector< int > getIsFromB | ( | ) |
Get the MC matched code of every track depending on its mother.
Code explained in the setter
Definition at line 237 of file FlavorTaggerInfo.cc.
std::vector< MCParticle * > getMCParticle | ( | ) |
Get the MC particle's pointer related to each track.
Definition at line 203 of file FlavorTaggerInfo.cc.
std::vector< MCParticle * > getMCParticleMother | ( | ) |
Get the mother MC particle's pointer related to each track.
Definition at line 208 of file FlavorTaggerInfo.cc.
FlavorTaggerInfoMap * getMethodMap | ( | const std::string & | method | ) |
method used for the FlavorTagger and corresponding FlavorTaggerInfoMap
method | "TMVA" or "FANN". |
Definition at line 163 of file FlavorTaggerInfo.cc.
|
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.
std::vector< float > getP | ( | ) |
Get the momentum of every category's track.
Definition at line 193 of file FlavorTaggerInfo.cc.
std::vector< Particle * > getParticle | ( | ) |
Get the particle's pointer related to each track.
Definition at line 198 of file FlavorTaggerInfo.cc.
std::vector< float > getProdPointResolutionZ | ( | ) |
Get resolution of the production point of each track, i.e real production point - MC matched production point.
Definition at line 276 of file FlavorTaggerInfo.cc.
|
inlineinherited |
Get the object to or from which this object has a relation.
T | The class of objects to or from which the relation points. |
name | The name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 280 of file RelationsObject.h.
|
inlineinherited |
Get the object from which this object has a relation.
FROM | The class of objects from which the relation points. |
name | The name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 265 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from an array.
FROM | The class of objects from which the relation points. |
name | The name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 316 of file RelationsObject.h.
|
inlineinherited |
Get the object to which this object has a relation.
TO | The class of objects to which the relation points. |
name | The name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 250 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing to an array.
TO | The class of objects to which the relation points. |
name | The name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 299 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from/to an array.
T | The class of objects to or from which the relation points. |
name | The name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 333 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from another store array to this object.
FROM | The class of objects from which the relations point. |
name | The name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 214 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from this object to another store array.
TO | The class of objects to which the relations point. |
name | The name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 199 of file RelationsObject.h.
|
inlineinherited |
Get the relations between this object and another store array.
Relations in both directions are returned.
T | The class of objects to or from which the relations point. |
name | The name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 232 of file RelationsObject.h.
std::vector< float > getTargProb | ( | ) |
Get all the track probabilities to come directly from the Btag for each category.
Definition at line 188 of file FlavorTaggerInfo.cc.
Track * getTrack | ( | int | position | ) |
Get a single track.
position | integer corresponding to the position of the desired track |
Definition at line 232 of file FlavorTaggerInfo.cc.
std::vector< Track * > getTracks | ( | ) |
std::string getUseModeFlavorTagger | ( | ) |
GETTERS.
usemode of the FlavorTagger
Definition at line 158 of file FlavorTaggerInfo.cc.
std::vector< float > getZ0 | ( | ) |
Get the impact parameter Z0 of every category's track.
Definition at line 227 of file FlavorTaggerInfo.cc.
bool isMethodInMap | ( | const std::string & | method | ) |
checks if the given method method is used for the FlavorTagger with a corresponding FlavorTaggerInfoMap
method | "TMVA" or "FANN". |
Definition at line 173 of file FlavorTaggerInfo.cc.
void setBadTracksFT | ( | int | numTracks | ) |
Set the number of tracks not coming from the Btag within this class.
numTracks |
Definition at line 128 of file FlavorTaggerInfo.cc.
void setBadTracksROE | ( | int | numTracks | ) |
Set the number of tracks coming not from the Btag in the RoE.
numTracks |
Definition at line 118 of file FlavorTaggerInfo.cc.
void setCategories | ( | const std::string & | catName | ) |
Vector filler: Set the name of the categories.
catName | name of each category |
Definition at line 149 of file FlavorTaggerInfo.cc.
void setCatProb | ( | float | catProb | ) |
Vector filler: Set the probability of the event to correspond to a given category probability for each category.
catProb | category probability |
Definition at line 52 of file FlavorTaggerInfo.cc.
void setD0 | ( | double | D0 | ) |
Vector filler: Set the impact parameter D0 of each track in an accesible way.
D0 | impact parameter |
Definition at line 139 of file FlavorTaggerInfo.cc.
void setGoodTracksFT | ( | int | numTracks | ) |
Set the number of tracks coming from the Btag within this class.
numTracks |
Definition at line 123 of file FlavorTaggerInfo.cc.
void setGoodTracksPurityFT | ( | float | goodTracksPurity | ) |
Set the fraction of tracks coming from the Btag respect to the total amount of tracks within this class.
goodTracksPurity | fraction E [0,1] |
Definition at line 103 of file FlavorTaggerInfo.cc.
void setGoodTracksPurityROE | ( | float | goodTracksPurity | ) |
Set the fraction of tracks coming from the Btag respect to the total amount of tracks within RoE.
goodTracksPurity | fraction E [0,1] |
Definition at line 108 of file FlavorTaggerInfo.cc.
void setGoodTracksROE | ( | int | numTracks | ) |
Set the number of tracks coming from the Btag in the RoE.
numTracks |
Definition at line 113 of file FlavorTaggerInfo.cc.
void setIsFromB | ( | int | isFromB | ) |
Vector filler: Set the MC matched code of the track depending on its mother (usually set in TagV module) Quick reference: 0 - does not come from the B 1,2,3,4 - come from an immediately decaying daughter of the B (number depends on the PDG code of each meson) 5 - come directly from the B
5 - come from a chain of immediately decaying daugthers of the B (11 - 14: one step, 21-24: two steps...)
isFromB | MC matched code |
Definition at line 98 of file FlavorTaggerInfo.cc.
void setMCParticle | ( | Belle2::MCParticle * | MCParticle | ) |
Vector filler: Set the pointer of the MCParticle related related to track with the highest probability for each category.
MCParticle | pointer to MCParticle object |
Definition at line 78 of file FlavorTaggerInfo.cc.
void setMCParticleMother | ( | Belle2::MCParticle * | MCParticle | ) |
Vector filler: Set the pointer of the MCParticle's mother related to the track with the highest probability for each category.
MCParticle | pointer to MCParticle object |
Definition at line 88 of file FlavorTaggerInfo.cc.
void setP | ( | float | momentum | ) |
Vector filler: Set the momentum absolute value of the corresponding category's track.
momentum | momentum |
Definition at line 63 of file FlavorTaggerInfo.cc.
void setParticle | ( | Particle * | Particle | ) |
Vector filler: Set the pointer of the Partcile related to the track with the highest probability for each category.
Definition at line 68 of file FlavorTaggerInfo.cc.
void setProdPointResolutionZ | ( | float | deltaProdZ | ) |
Vector filler: Set resolution of the production point of each track, i.e real production point - MC matched production point.
deltaProdZ | production point difference |
Definition at line 134 of file FlavorTaggerInfo.cc.
void setTargProb | ( | float | targProb | ) |
Vector filler: Set the probability of each category's track of being a direct daughter of the Btag.
targProb | target track's probability |
Definition at line 58 of file FlavorTaggerInfo.cc.
void setTrack | ( | Belle2::Track * | track | ) |
Vector filler: Set the pointer of the track with the highest probability for each category.
track | pointer to track object |
Definition at line 46 of file FlavorTaggerInfo.cc.
void setUseModeFlavorTagger | ( | const std::string & | mode | ) |
SETTERS Some of the setters are expected to fill a vector whose each element corresponds to a given category in the following order: Electron, Muon, Kinetic Lepton, Kaon, Slow Pion, Fast Pion, Lambda, Highest Momentum The setting of all elements need to be performed in a loop.
For example, setTrack() need to be called once per each category so that the vector is filled progressively. The same holds for all the other setters described as Vector Fillers. Saves the usemode of the FlavorTagger
mode | "Teacher" or "Expert" |
Definition at line 26 of file FlavorTaggerInfo.cc.
void setZ0 | ( | double | Z0 | ) |
Vector filler: Set the impact parameter Z0 of each track in an accesible way.
Z0 | impact parameter |
Definition at line 144 of file FlavorTaggerInfo.cc.