Belle II Software  release-05-02-19
ARICHLikelihood.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ARICHLIKELIHOOD_H
12 #define ARICHLIKELIHOOD_H
13 
14 #include <framework/datastore/RelationsObject.h>
15 #include <framework/gearbox/Const.h>
16 
17 namespace Belle2 {
30  class ARICHLikelihood : public RelationsObject {
31 
32  public:
33 
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_expPhot[i] = 0;
40  m_detPhot = 0;
41  }
42 
50  void setValues(int flag,
51  const double* logL,
52  int detPhot,
53  const double* expPhot
54  )
55  {
56  m_flag = flag;
57  for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++)
58  m_logL[i] = logL[i];
59  for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++)
60  m_expPhot[i] = expPhot[i];
61 
62  m_detPhot = detPhot;
63  }
64 
68  int getFlag() const {return m_flag;}
69 
75  float getLogL(const Const::ChargedStable& part) const
76  {
77  return m_logL[part.getIndex()];
78  }
79 
84  float getDetPhot() const
85  {
86  return m_detPhot;
87  }
88 
94  float getExpPhot(const Const::ChargedStable& part) const
95  {
96  return m_expPhot[part.getIndex()];
97  }
98 
99 
103  double getLogL_e() const {return m_logL[Const::electron.getIndex()];}
104 
108  double getLogL_mu() const {return m_logL[Const::muon.getIndex()];}
109 
113  double getLogL_pi() const {return m_logL[Const::pion.getIndex()];}
114 
118  double getLogL_K() const {return m_logL[Const::kaon.getIndex()];}
119 
123  double getLogL_p() const {return m_logL[Const::proton.getIndex()];}
124 
125 
129  double getNphot_e() const {return m_expPhot[Const::electron.getIndex()];}
130 
134  double getNphot_mu() const {return m_expPhot[Const::muon.getIndex()];}
135 
139  double getNphot_pi() const {return m_expPhot[Const::pion.getIndex()];}
140 
144  double getNphot_K() const {return m_expPhot[Const::kaon.getIndex()];}
145 
149  double getNphot_p() const {return m_expPhot[Const::proton.getIndex()];}
150 
151  private:
152  int m_flag;
155  int m_detPhot;
159  };
160 
162 } // end namespace Belle2
163 
164 #endif
165 
Belle2::ARICHLikelihood::ARICHLikelihood
ARICHLikelihood()
default constructor
Definition: ARICHLikelihood.h:44
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::ARICHLikelihood
This is a class to store ARICH likelihoods in the datastore.
Definition: ARICHLikelihood.h:38
Belle2::ARICHLikelihood::m_detPhot
int m_detPhot
detected number of photons
Definition: ARICHLikelihood.h:163
Belle2::ARICHLikelihood::getLogL
float getLogL(const Const::ChargedStable &part) const
Return log likelihood for a given particle.
Definition: ARICHLikelihood.h:83
Belle2::Const::electron
static const ChargedStable electron
electron particle
Definition: Const.h:533
Belle2::ARICHLikelihood::getFlag
int getFlag() const
Get reconstruction flag.
Definition: ARICHLikelihood.h:76
Belle2::ARICHLikelihood::getNphot_mu
double getNphot_mu() const
Get number of expected photons for muon.
Definition: ARICHLikelihood.h:142
Belle2::ARICHLikelihood::getLogL_e
double getLogL_e() const
Get electron log likelihood.
Definition: ARICHLikelihood.h:111
Belle2::ARICHLikelihood::getNphot_pi
double getNphot_pi() const
Get number of expected photons for pion.
Definition: ARICHLikelihood.h:147
Belle2::ARICHLikelihood::getExpPhot
float getExpPhot(const Const::ChargedStable &part) const
Return number of expected photons for a given particle.
Definition: ARICHLikelihood.h:102
Belle2::ARICHLikelihood::getLogL_p
double getLogL_p() const
Get proton log likelihood.
Definition: ARICHLikelihood.h:131
Belle2::ARICHLikelihood::getLogL_pi
double getLogL_pi() const
Get pion log likelihood.
Definition: ARICHLikelihood.h:121
Belle2::ARICHLikelihood::setValues
void setValues(int flag, const double *logL, int detPhot, const double *expPhot)
Set values.
Definition: ARICHLikelihood.h:58
Belle2::Const::kaon
static const ChargedStable kaon
charged kaon particle
Definition: Const.h:536
Belle2::ARICHLikelihood::getDetPhot
float getDetPhot() const
Return number of detected photons for a given particle.
Definition: ARICHLikelihood.h:92
Belle2::ARICHLikelihood::getNphot_p
double getNphot_p() const
Get number of expected photons for proton.
Definition: ARICHLikelihood.h:157
Belle2::ARICHLikelihood::m_flag
int m_flag
reconstruction flag
Definition: ARICHLikelihood.h:160
Belle2::ARICHLikelihood::getLogL_K
double getLogL_K() const
Get kaon log likelihood.
Definition: ARICHLikelihood.h:126
Belle2::Const::pion
static const ChargedStable pion
charged pion particle
Definition: Const.h:535
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHLikelihood::getNphot_K
double getNphot_K() const
Get number of expected photons for kaon.
Definition: ARICHLikelihood.h:152
Belle2::ARICHLikelihood::m_expPhot
float m_expPhot[Const::ChargedStable::c_SetSize]
expected number of photons
Definition: ARICHLikelihood.h:162
Belle2::ARICHLikelihood::getNphot_e
double getNphot_e() const
Get number of expected photons for electron.
Definition: ARICHLikelihood.h:137
Belle2::Const::proton
static const ChargedStable proton
proton particle
Definition: Const.h:537
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::Const::muon
static const ChargedStable muon
muon particle
Definition: Const.h:534
Belle2::ARICHLikelihood::ClassDef
ClassDef(ARICHLikelihood, 3)
the class title
Belle2::ARICHLikelihood::getLogL_mu
double getLogL_mu() const
Get muon log likelihood.
Definition: ARICHLikelihood.h:116
Belle2::Const::ParticleType::getIndex
int getIndex() const
This particle's index in the associated set.
Definition: Const.h:337
Belle2::ARICHLikelihood::m_logL
float m_logL[Const::ChargedStable::c_SetSize]
log likelihoods
Definition: ARICHLikelihood.h:161