Belle II Software  release-05-02-19
TOPLikelihood.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef TOPLIKELIHOOD_H
12 #define TOPLIKELIHOOD_H
13 
14 #include <framework/datastore/RelationsObject.h>
15 #include <framework/gearbox/Const.h>
16 
17 namespace Belle2 {
29  class TOPLikelihood : public RelationsObject {
30 
31  public:
32 
37  {
38  for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++) m_logL[i] = 0;
39  for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++) m_estPhot[i] = 0;
40  }
41 
50  TOPLikelihood(int flag,
51  int numPhot,
52  const double* logL,
53  const double* estPhot,
54  double estBkg)
55  {
56  m_flag = flag;
57  m_numPhot = numPhot;
58  m_estBkg = estBkg;
59  for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++)
60  m_logL[i] = logL[i];
61  for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++)
62  m_estPhot[i] = estPhot[i];
63  }
64 
69  int getFlag() const {return m_flag;}
70 
75  int getNphot() const {return m_numPhot;}
76 
82  float getLogL(const Const::ChargedStable& part) const
83  {
84  return m_logL[part.getIndex()];
85  }
86 
92  float getEstPhot(const Const::ChargedStable& part) const
93  {
94  return m_estPhot[part.getIndex()];
95  }
96 
101  float getEstBkg() const {return m_estBkg;}
102 
107  double getLogL_e() const {return m_logL[Const::electron.getIndex()];}
108 
113  double getLogL_mu() const {return m_logL[Const::muon.getIndex()];}
114 
119  double getLogL_pi() const {return m_logL[Const::pion.getIndex()];}
120 
125  double getLogL_K() const {return m_logL[Const::kaon.getIndex()];}
126 
131  double getLogL_p() const {return m_logL[Const::proton.getIndex()];}
132 
137  double getNphot_e() const {return m_estPhot[Const::electron.getIndex()];}
138 
143  double getNphot_mu() const {return m_estPhot[Const::muon.getIndex()];}
144 
149  double getNphot_pi() const {return m_estPhot[Const::pion.getIndex()];}
150 
155  double getNphot_K() const {return m_estPhot[Const::kaon.getIndex()];}
156 
161  double getNphot_p() const {return m_estPhot[Const::proton.getIndex()];}
162 
163  private:
164  int m_flag;
165  int m_numPhot;
168  float m_estBkg;
170  ClassDef(TOPLikelihood, 2);
172  };
173 
174 
176 } // end namespace Belle2
177 
178 #endif
179 
Belle2::TOPLikelihood::getFlag
int getFlag() const
Return reconstruction flag.
Definition: TOPLikelihood.h:77
Belle2::Const::ChargedStable::c_SetSize
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:491
Belle2::TOPLikelihood::m_flag
int m_flag
reconstruction flag
Definition: TOPLikelihood.h:172
Belle2::TOPLikelihood::getLogL_pi
double getLogL_pi() const
Return pion log likelihood.
Definition: TOPLikelihood.h:127
Belle2::TOPLikelihood::getLogL_p
double getLogL_p() const
Return proton log likelihood.
Definition: TOPLikelihood.h:139
Belle2::TOPLikelihood::getEstPhot
float getEstPhot(const Const::ChargedStable &part) const
Return estimated number of photons for a given particle.
Definition: TOPLikelihood.h:100
Belle2::Const::electron
static const ChargedStable electron
electron particle
Definition: Const.h:533
Belle2::TOPLikelihood::getNphot
int getNphot() const
Return number of detected photons.
Definition: TOPLikelihood.h:83
Belle2::TOPLikelihood::TOPLikelihood
TOPLikelihood()
default constructor
Definition: TOPLikelihood.h:44
Belle2::TOPLikelihood::m_logL
float m_logL[Const::ChargedStable::c_SetSize]
log likelihoods
Definition: TOPLikelihood.h:174
Belle2::Const::kaon
static const ChargedStable kaon
charged kaon particle
Definition: Const.h:536
Belle2::TOPLikelihood::getNphot_e
double getNphot_e() const
Return number of expected photons for electron.
Definition: TOPLikelihood.h:145
Belle2::Const::pion
static const ChargedStable pion
charged pion particle
Definition: Const.h:535
Belle2::TOPLikelihood::getLogL_e
double getLogL_e() const
Return electron log likelihood.
Definition: TOPLikelihood.h:115
Belle2::TOPLikelihood::getLogL
float getLogL(const Const::ChargedStable &part) const
Return log likelihood for a given particle.
Definition: TOPLikelihood.h:90
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPLikelihood::getNphot_mu
double getNphot_mu() const
Return number of expected photons for muon.
Definition: TOPLikelihood.h:151
Belle2::TOPLikelihood::m_estBkg
float m_estBkg
estimated background
Definition: TOPLikelihood.h:176
Belle2::TOPLikelihood::m_numPhot
int m_numPhot
number of photons
Definition: TOPLikelihood.h:173
Belle2::TOPLikelihood::getLogL_mu
double getLogL_mu() const
Return muon log likelihood.
Definition: TOPLikelihood.h:121
Belle2::TOPLikelihood::m_estPhot
float m_estPhot[Const::ChargedStable::c_SetSize]
estimated number of photons
Definition: TOPLikelihood.h:175
Belle2::TOPLikelihood::ClassDef
ClassDef(TOPLikelihood, 2)
ClassDef.
Belle2::Const::proton
static const ChargedStable proton
proton particle
Definition: Const.h:537
Belle2::TOPLikelihood::getNphot_K
double getNphot_K() const
Return number of expected photons for kaon.
Definition: TOPLikelihood.h:163
Belle2::TOPLikelihood::getNphot_p
double getNphot_p() const
Return number of expected photons for proton.
Definition: TOPLikelihood.h:169
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::TOPLikelihood
Class to store TOP log likelihoods (output of TOPReconstructor).
Definition: TOPLikelihood.h:37
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
Belle2::Const::muon
static const ChargedStable muon
muon particle
Definition: Const.h:534
Belle2::Const::ParticleType::getIndex
int getIndex() const
This particle's index in the associated set.
Definition: Const.h:337
Belle2::TOPLikelihood::getLogL_K
double getLogL_K() const
Return kaon log likelihood.
Definition: TOPLikelihood.h:133
Belle2::TOPLikelihood::getNphot_pi
double getNphot_pi() const
Return number of expected photons for pion.
Definition: TOPLikelihood.h:157
Belle2::TOPLikelihood::getEstBkg
float getEstBkg() const
Return estimated number of background photons.
Definition: TOPLikelihood.h:109