Belle II Software development
ARICHLikelihood.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#ifndef ARICHLIKELIHOOD_H
10#define ARICHLIKELIHOOD_H
11
12#include <framework/datastore/RelationsObject.h>
13#include <framework/gearbox/Const.h>
14
15namespace Belle2 {
29
30 public:
31
35 {
36 for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++) m_logL[i] = 0;
37 for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++) m_expPhot[i] = 0;
38 m_detPhot = 0;
39 }
40
48 void setValues(int flag,
49 const double* logL,
50 int detPhot,
51 const double* expPhot
52 )
53 {
54 m_flag = flag;
55 for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++)
56 m_logL[i] = logL[i];
57 for (unsigned i = 0; i < Const::ChargedStable::c_SetSize; i++)
58 m_expPhot[i] = expPhot[i];
59
60 m_detPhot = detPhot;
61 }
62
66 int getFlag() const {return m_flag;}
67
73 float getLogL(const Const::ChargedStable& part) const
74 {
75 return m_logL[part.getIndex()];
76 }
77
82 float getDetPhot() const
83 {
84 return m_detPhot;
85 }
86
92 float getExpPhot(const Const::ChargedStable& part) const
93 {
94 return m_expPhot[part.getIndex()];
95 }
96
97
101 double getLogL_e() const {return m_logL[Const::electron.getIndex()];}
102
106 double getLogL_mu() const {return m_logL[Const::muon.getIndex()];}
107
111 double getLogL_pi() const {return m_logL[Const::pion.getIndex()];}
112
116 double getLogL_K() const {return m_logL[Const::kaon.getIndex()];}
117
121 double getLogL_p() const {return m_logL[Const::proton.getIndex()];}
122
123
127 double getNphot_e() const {return m_expPhot[Const::electron.getIndex()];}
128
132 double getNphot_mu() const {return m_expPhot[Const::muon.getIndex()];}
133
137 double getNphot_pi() const {return m_expPhot[Const::pion.getIndex()];}
138
142 double getNphot_K() const {return m_expPhot[Const::kaon.getIndex()];}
143
147 double getNphot_p() const {return m_expPhot[Const::proton.getIndex()];}
148
149 private:
150 int m_flag;
157 };
158
160} // end namespace Belle2
161
162#endif
163
This is a class to store ARICH likelihoods in the datastore.
float m_logL[Const::ChargedStable::c_SetSize]
log likelihoods
ClassDef(ARICHLikelihood, 3)
the class title
double getLogL_pi() const
Get pion log likelihood.
double getNphot_mu() const
Get number of expected photons for muon.
double getNphot_e() const
Get number of expected photons for electron.
double getNphot_pi() const
Get number of expected photons for pion.
ARICHLikelihood()
default constructor
float m_expPhot[Const::ChargedStable::c_SetSize]
expected number of photons
double getNphot_p() const
Get number of expected photons for proton.
double getLogL_e() const
Get electron log likelihood.
double getNphot_K() const
Get number of expected photons for kaon.
double getLogL_p() const
Get proton log likelihood.
int getFlag() const
Get reconstruction flag.
double getLogL_mu() const
Get muon log likelihood.
void setValues(int flag, const double *logL, int detPhot, const double *expPhot)
Set values.
float getDetPhot() const
Return number of detected photons for a given particle.
int m_flag
reconstruction flag
float getLogL(const Const::ChargedStable &part) const
Return log likelihood for a given particle.
double getLogL_K() const
Get kaon log likelihood.
int m_detPhot
detected number of photons
float getExpPhot(const Const::ChargedStable &part) const
Return number of expected photons for a given particle.
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:589
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:615
int getIndex() const
This particle's index in the associated set.
Definition: Const.h:461
static const ChargedStable muon
muon particle
Definition: Const.h:660
static const ChargedStable pion
charged pion particle
Definition: Const.h:661
static const ChargedStable proton
proton particle
Definition: Const.h:663
static const ChargedStable kaon
charged kaon particle
Definition: Const.h:662
static const ChargedStable electron
electron particle
Definition: Const.h:659
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.