Belle II Software  release-05-01-25
FlavorTaggerInfo.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Christian Roca and Fernando Abudinen *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/datastore/RelationsObject.h>
14 #include <analysis/dataobjects/Particle.h>
15 #include <analysis/dataobjects/FlavorTaggerInfoMap.h>
16 
17 #include <vector>
18 
19 namespace Belle2 {
25  // forward declarations
26 
27  class Track;
28  class MCParticle;
29  class FlavorTaggerInfoMap;
30 
49  class FlavorTaggerInfo : public RelationsObject {
50 
51  public:
52 
58  {
61  m_badTracksROE = 0;
62  m_goodTracksROE = 0;
63  m_badTracksFT = 0;
64  m_goodTracksFT = 0;
65  };
66 
67 
83  void setUseModeFlavorTagger(const std::string& mode);
84 
89  void addMethodMap(const std::string& method);
90 
95  void setTrack(Belle2::Track* track);
96 
103 
110 
117 
123  void setCatProb(float catProb);
124 
129  void setTargProb(float);
130 
135  void setP(float momentum);
136 
146  void setIsFromB(int isFromB);
147 
152  void setCategories(const std::string& catName);
153 
158  void setD0(double D0);
159 
164  void setZ0(double Z0);
165 
171  void setProdPointResolutionZ(float deltaProdZ);
172 
173 // /**
174 // * Vector filler: Set the momentum absolute value of the corresponding category's track
175 // * @param momentum momentum
176 // */
177 // void setTracks(std::vector<Belle2::Track*>); // Save a vector of tracks
178 
179 
184  void setGoodTracksPurityFT(float goodTracksPurity);
185 
190  void setGoodTracksPurityROE(float goodTracksPurity);
191 
196  void setGoodTracksROE(int numTracks);
197 
202  void setBadTracksROE(int numTracks);
203 
208  void setGoodTracksFT(int numTracks);
209 
214  void setBadTracksFT(int numTracks);
215 
216 
217 
218 
228  std::string getUseModeFlavorTagger();
229 
234  FlavorTaggerInfoMap* getMethodMap(const std::string& method);
235 
240  bool isMethodInMap(const std::string& method);
241 
246  std::vector<Belle2::Track*> getTracks();
247 
253  Belle2::Track* getTrack(int position);
254 
259  std::vector<float> getCatProb();
260 
265  std::vector<float> getTargProb();
266 
271  std::vector<float> getP();
272 
277  std::vector<Particle*> getParticle();
278 
283  std::vector<Belle2::MCParticle*> getMCParticle();
284 
289  std::vector<Belle2::MCParticle*> getMCParticleMother();
290 
295  std::vector<float> getD0();
296 
301  std::vector<float> getZ0();
302 
307  std::vector<int> getIsFromB();
308 
313  std::vector<std::string> getCategories();
314 
320  std::vector<float> getProdPointResolutionZ();
321 
327  float getGoodTracksPurityFT();
328 
334  float getGoodTracksPurityROE();
335 
340  int getBadTracksROE();
341 
346  int getGoodTracksROE();
347 
352  int getBadTracksFT();
353 
358  int getGoodTracksFT();
359 
360 
361  private:
362 
363  // persistent data members
364 
365  // Track Level Flavor Tagger Info
366 
367  std::string m_useModeFlavorTagger;
369  std::map<std::string, FlavorTaggerInfoMap*>
370  m_methodMap;
374  std::vector<Belle2::Track*> m_tracks;
375  std::vector<Particle*> m_particle;
376  std::vector<Belle2::MCParticle*> m_MCparticle;
377  std::vector<Belle2::MCParticle*> m_MCparticle_mother;
378  std::vector<float> m_D0;
379  std::vector<float> m_Z0;
380  std::vector<std::string> m_categories;
381  std::vector<float> m_prodPointResZ;
382  std::vector<float> m_categoryProb;
383  std::vector<float> m_targetProb;
384  std::vector<float> m_P;
385  std::vector<int> m_isFromB;
396  };
397 
398 
400 } // end namespace Belle2
401 
Belle2::FlavorTaggerInfo::getTracks
std::vector< Belle2::Track * > getTracks()
Get all the tracks.
Definition: FlavorTaggerInfo.cc:213
Belle2::FlavorTaggerInfo::m_badTracksFT
int m_badTracksFT
number of tracksc not coming from Btag in this object
Definition: FlavorTaggerInfo.h:399
Belle2::FlavorTaggerInfo::getUseModeFlavorTagger
std::string getUseModeFlavorTagger()
GETTERS.
Definition: FlavorTaggerInfo.cc:158
Belle2::FlavorTaggerInfo::setCategories
void setCategories(const std::string &catName)
Vector filler: Set the name of the categories.
Definition: FlavorTaggerInfo.cc:149
Belle2::FlavorTaggerInfo::getGoodTracksROE
int getGoodTracksROE()
Get the number of tracks coming from the Btag within the correspondent RestOfEvent object.
Definition: FlavorTaggerInfo.cc:255
Belle2::FlavorTaggerInfo::setBadTracksFT
void setBadTracksFT(int numTracks)
Set the number of tracks not coming from the Btag within this class.
Definition: FlavorTaggerInfo.cc:128
Belle2::FlavorTaggerInfo::m_goodTracksROE
int m_goodTracksROE
number of tracksc coming from Btag in the correspondent RestOfEvent
Definition: FlavorTaggerInfo.h:398
Belle2::FlavorTaggerInfo::m_MCparticle
std::vector< Belle2::MCParticle * > m_MCparticle
MC particle pointer related to each track.
Definition: FlavorTaggerInfo.h:384
Belle2::FlavorTaggerInfo::m_prodPointResZ
std::vector< float > m_prodPointResZ
production point resolution Z for each track
Definition: FlavorTaggerInfo.h:389
Belle2::FlavorTaggerInfo::setUseModeFlavorTagger
void setUseModeFlavorTagger(const std::string &mode)
SETTERS Some of the setters are expected to fill a vector whose each element corresponds to a given c...
Definition: FlavorTaggerInfo.cc:26
Belle2::FlavorTaggerInfo::m_badTracksROE
int m_badTracksROE
number of tracksc not coming from Btag in the correspondent RestOfEvent object
Definition: FlavorTaggerInfo.h:397
Belle2::FlavorTaggerInfo::m_MCparticle_mother
std::vector< Belle2::MCParticle * > m_MCparticle_mother
mother MC particle pointer related to each track
Definition: FlavorTaggerInfo.h:385
Belle2::FlavorTaggerInfo::getCategories
std::vector< std::string > getCategories()
Get the list of names of the categories of this object.
Definition: FlavorTaggerInfo.cc:282
Belle2::FlavorTaggerInfo::m_tracks
std::vector< Belle2::Track * > m_tracks
highest probability track for each category
Definition: FlavorTaggerInfo.h:382
Belle2::FlavorTaggerInfo::setP
void setP(float momentum)
Vector filler: Set the momentum absolute value of the corresponding category's track.
Definition: FlavorTaggerInfo.cc:63
Belle2::FlavorTaggerInfo::getGoodTracksPurityFT
float getGoodTracksPurityFT()
Get the ratio (purity) of tracks coming from the Btag out of the total amount of tracks within this o...
Definition: FlavorTaggerInfo.cc:243
Belle2::FlavorTaggerInfo::setProdPointResolutionZ
void setProdPointResolutionZ(float deltaProdZ)
Vector filler: Set resolution of the production point of each track, i.e real production point - MC m...
Definition: FlavorTaggerInfo.cc:134
Belle2::FlavorTaggerInfo::getP
std::vector< float > getP()
Get the momentum of every category's track.
Definition: FlavorTaggerInfo.cc:193
Belle2::FlavorTaggerInfo::getParticle
std::vector< Particle * > getParticle()
Get the particle's pointer related to each track.
Definition: FlavorTaggerInfo.cc:198
Belle2::FlavorTaggerInfo::setGoodTracksPurityFT
void setGoodTracksPurityFT(float goodTracksPurity)
Set the fraction of tracks coming from the Btag respect to the total amount of tracks within this cla...
Definition: FlavorTaggerInfo.cc:103
Belle2::FlavorTaggerInfo::setGoodTracksPurityROE
void setGoodTracksPurityROE(float goodTracksPurity)
Set the fraction of tracks coming from the Btag respect to the total amount of tracks within RoE.
Definition: FlavorTaggerInfo.cc:108
Belle2::FlavorTaggerInfo::setTrack
void setTrack(Belle2::Track *track)
Vector filler: Set the pointer of the track with the highest probability for each category.
Definition: FlavorTaggerInfo.cc:46
Belle2::FlavorTaggerInfoMap
This class stores the Flavor Tagger information for a specific method and particle filled in the Flav...
Definition: FlavorTaggerInfoMap.h:48
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::FlavorTaggerInfo::m_targetProb
std::vector< float > m_targetProb
probability of each track to be primary
Definition: FlavorTaggerInfo.h:391
Belle2::FlavorTaggerInfo::m_particle
std::vector< Particle * > m_particle
particle pointer related to each track
Definition: FlavorTaggerInfo.h:383
Belle2::FlavorTaggerInfo::m_Z0
std::vector< float > m_Z0
impact parameter Z0 related to each track
Definition: FlavorTaggerInfo.h:387
Belle2::FlavorTaggerInfo::getMCParticleMother
std::vector< Belle2::MCParticle * > getMCParticleMother()
Get the mother MC particle's pointer related to each track.
Definition: FlavorTaggerInfo.cc:208
Belle2::FlavorTaggerInfo::m_goodTracksPurityFT
float m_goodTracksPurityFT
purity of tracks coming from the Btag in this objecy
Definition: FlavorTaggerInfo.h:395
Belle2::FlavorTaggerInfo::m_categories
std::vector< std::string > m_categories
categories name
Definition: FlavorTaggerInfo.h:388
Belle2::FlavorTaggerInfo::getProdPointResolutionZ
std::vector< float > getProdPointResolutionZ()
Get resolution of the production point of each track, i.e real production point - MC matched producti...
Definition: FlavorTaggerInfo.cc:276
Belle2::FlavorTaggerInfo::getBadTracksFT
int getBadTracksFT()
Get the number of tracks not coming from the Btag within this object.
Definition: FlavorTaggerInfo.cc:270
Belle2::FlavorTaggerInfo::getMCParticle
std::vector< Belle2::MCParticle * > getMCParticle()
Get the MC particle's pointer related to each track.
Definition: FlavorTaggerInfo.cc:203
Belle2::FlavorTaggerInfo::setIsFromB
void setIsFromB(int isFromB)
Vector filler: Set the MC matched code of the track depending on its mother (usually set in TagV modu...
Definition: FlavorTaggerInfo.cc:98
Belle2::FlavorTaggerInfo::getZ0
std::vector< float > getZ0()
Get the impact parameter Z0 of every category's track.
Definition: FlavorTaggerInfo.cc:227
Belle2::FlavorTaggerInfo::m_P
std::vector< float > m_P
absolute 3 momentum of each track
Definition: FlavorTaggerInfo.h:392
Belle2::FlavorTaggerInfo::m_methodMap
std::map< std::string, FlavorTaggerInfoMap * > m_methodMap
Map containing the methods used for the FlavorTagger: "TMVA" or "FANN", and the corresponding map.
Definition: FlavorTaggerInfo.h:378
Belle2::FlavorTaggerInfo::getTrack
Belle2::Track * getTrack(int position)
Get a single track.
Definition: FlavorTaggerInfo.cc:232
Belle2::FlavorTaggerInfo::getCatProb
std::vector< float > getCatProb()
Get all the event probabilities to correspond to each category.
Definition: FlavorTaggerInfo.cc:183
Belle2::FlavorTaggerInfo::setCatProb
void setCatProb(float catProb)
Vector filler: Set the probability of the event to correspond to a given category probability for eac...
Definition: FlavorTaggerInfo.cc:52
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::FlavorTaggerInfo::m_goodTracksPurityROE
float m_goodTracksPurityROE
purity of tracks coming from the Btag in the correspondent RestOfEvent object
Definition: FlavorTaggerInfo.h:396
Belle2::FlavorTaggerInfo::FlavorTaggerInfo
FlavorTaggerInfo()
Default constructor.
Definition: FlavorTaggerInfo.h:65
Belle2::FlavorTaggerInfo::setZ0
void setZ0(double Z0)
Vector filler: Set the impact parameter Z0 of each track in an accesible way.
Definition: FlavorTaggerInfo.cc:144
Belle2::FlavorTaggerInfo::setMCParticleMother
void setMCParticleMother(Belle2::MCParticle *MCParticle)
Vector filler: Set the pointer of the MCParticle's mother related to the track with the highest proba...
Definition: FlavorTaggerInfo.cc:88
Belle2::FlavorTaggerInfo::m_categoryProb
std::vector< float > m_categoryProb
probability of the event to belong to each category
Definition: FlavorTaggerInfo.h:390
Belle2::FlavorTaggerInfo::getIsFromB
std::vector< int > getIsFromB()
Get the MC matched code of every track depending on its mother.
Definition: FlavorTaggerInfo.cc:237
Belle2::FlavorTaggerInfo::setGoodTracksFT
void setGoodTracksFT(int numTracks)
Set the number of tracks coming from the Btag within this class.
Definition: FlavorTaggerInfo.cc:123
Belle2::FlavorTaggerInfo::setParticle
void setParticle(Particle *Particle)
Vector filler: Set the pointer of the Partcile related to the track with the highest probability for ...
Definition: FlavorTaggerInfo.cc:68
Belle2::FlavorTaggerInfo::m_D0
std::vector< float > m_D0
impact parameter D0 related to each track
Definition: FlavorTaggerInfo.h:386
Belle2::FlavorTaggerInfo::getMethodMap
FlavorTaggerInfoMap * getMethodMap(const std::string &method)
method used for the FlavorTagger and corresponding FlavorTaggerInfoMap
Definition: FlavorTaggerInfo.cc:163
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
Belle2::FlavorTaggerInfo::setGoodTracksROE
void setGoodTracksROE(int numTracks)
Set the number of tracks coming from the Btag in the RoE.
Definition: FlavorTaggerInfo.cc:113
Belle2::FlavorTaggerInfo::setTargProb
void setTargProb(float)
Vector filler: Set the probability of each category's track of being a direct daughter of the Btag.
Definition: FlavorTaggerInfo.cc:58
Belle2::FlavorTaggerInfo::setMCParticle
void setMCParticle(Belle2::MCParticle *MCParticle)
Vector filler: Set the pointer of the MCParticle related related to track with the highest probabilit...
Definition: FlavorTaggerInfo.cc:78
Belle2::FlavorTaggerInfo::isMethodInMap
bool isMethodInMap(const std::string &method)
checks if the given method method is used for the FlavorTagger with a corresponding FlavorTaggerInfoM...
Definition: FlavorTaggerInfo.cc:173
Belle2::FlavorTaggerInfo::getTargProb
std::vector< float > getTargProb()
Get all the track probabilities to come directly from the Btag for each category.
Definition: FlavorTaggerInfo.cc:188
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::FlavorTaggerInfo::setBadTracksROE
void setBadTracksROE(int numTracks)
Set the number of tracks coming not from the Btag in the RoE.
Definition: FlavorTaggerInfo.cc:118
Belle2::Track
Class that bundles various TrackFitResults.
Definition: Track.h:35
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::FlavorTaggerInfo::m_goodTracksFT
int m_goodTracksFT
number of tracksc coming from Btag in this object
Definition: FlavorTaggerInfo.h:400
Belle2::FlavorTaggerInfo::m_isFromB
std::vector< int > m_isFromB
MC matched code of each track depending on its mother.
Definition: FlavorTaggerInfo.h:393
Belle2::FlavorTaggerInfo::setD0
void setD0(double D0)
Vector filler: Set the impact parameter D0 of each track in an accesible way.
Definition: FlavorTaggerInfo.cc:139
Belle2::FlavorTaggerInfo::m_useModeFlavorTagger
std::string m_useModeFlavorTagger
Usemode of the FlavorTagger: "Teacher" or "Expert".
Definition: FlavorTaggerInfo.h:375
Belle2::FlavorTaggerInfo::getD0
std::vector< float > getD0()
Get the impact parameter D0 of every category's track.
Definition: FlavorTaggerInfo.cc:222
Belle2::FlavorTaggerInfo::getBadTracksROE
int getBadTracksROE()
Get the number of tracks not coming from the Btag within the correspondent RestOfEvent object.
Definition: FlavorTaggerInfo.cc:260
Belle2::FlavorTaggerInfo::getGoodTracksFT
int getGoodTracksFT()
Get the number of tracks not coming from the Btag within this object.
Definition: FlavorTaggerInfo.cc:265
Belle2::FlavorTaggerInfo
This class stores the relevant information for the TagV vertex fit, extracted mainly from the Flavor ...
Definition: FlavorTaggerInfo.h:57
Belle2::FlavorTaggerInfo::getGoodTracksPurityROE
float getGoodTracksPurityROE()
Get the ratio (purity) of tracks coming from the Btag out of the total amount of tracks within the co...
Definition: FlavorTaggerInfo.cc:249
Belle2::FlavorTaggerInfo::addMethodMap
void addMethodMap(const std::string &method)
Saves the method and the correspondig FlavorTaggerMap.
Definition: FlavorTaggerInfo.cc:31