Belle II Software development
TOPLikelihood.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#pragma once
10
11#include <framework/datastore/RelationsObject.h>
12#include <framework/gearbox/Const.h>
13
14namespace Belle2 {
27
28 public:
29
34 {}
35
40 void setFlag(int flag) {m_flag = flag;}
41
46 void setModuleID(int moduleID) {m_moduleID = moduleID;}
47
53 void setXZ(double x, double z)
54 {
55 m_x = x;
56 m_z = z;
57 }
58
68 void set(const Const::ChargedStable& part, int numPhot, double logL, double estPhot, double estBkg, double effYield)
69 {
70 auto i = part.getIndex();
71 m_numPhot = numPhot;
72 m_logL[i] = logL;
73 m_estPhot[i] = estPhot;
74 m_estBkg = estBkg;
75 m_effYields[i] = effYield;
76 }
77
82 int getFlag() const {return m_flag;}
83
88 int getModuleID() const {return m_moduleID;}
89
94 double getX() const {return m_x;}
95
100 double getZ() const {return m_z;}
101
106 int getNphot() const {return m_numPhot;}
107
113 float getLogL(const Const::ChargedStable& part) const
114 {
115 return m_logL[part.getIndex()];
116 }
117
123 float getEstPhot(const Const::ChargedStable& part) const
124 {
125 return m_estPhot[part.getIndex()];
126 }
127
132 float getEstBkg() const {return m_estBkg;}
133
140 {
141 return m_effYields[part.getIndex()];
142 }
143
148 double getLogL_e() const {return m_logL[Const::electron.getIndex()];}
149
154 double getLogL_mu() const {return m_logL[Const::muon.getIndex()];}
155
160 double getLogL_pi() const {return m_logL[Const::pion.getIndex()];}
161
166 double getLogL_K() const {return m_logL[Const::kaon.getIndex()];}
167
172 double getLogL_p() const {return m_logL[Const::proton.getIndex()];}
173
178 double getNphot_e() const {return m_estPhot[Const::electron.getIndex()];}
179
184 double getNphot_mu() const {return m_estPhot[Const::muon.getIndex()];}
185
190 double getNphot_pi() const {return m_estPhot[Const::pion.getIndex()];}
191
196 double getNphot_K() const {return m_estPhot[Const::kaon.getIndex()];}
197
202 double getNphot_p() const {return m_estPhot[Const::proton.getIndex()];}
203
204 private:
205 int m_flag = 0;
206 int m_numPhot = 0;
209 float m_estBkg = 0;
211 int m_moduleID = 0;
212 float m_x = 0;
213 float m_z = 0;
217 };
218
219
221} // end namespace Belle2
222
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.
Class to store TOP log likelihoods (output of TOPReconstructor).
Definition: TOPLikelihood.h:26
float m_logL[Const::ChargedStable::c_SetSize]
log likelihoods
double getLogL_pi() const
Return pion log likelihood.
double getNphot_mu() const
Return number of expected photons for muon.
float getEstPhot(const Const::ChargedStable &part) const
Return estimated number of photons for a given particle.
double getNphot_e() const
Return number of expected photons for electron.
double getNphot_pi() const
Return number of expected photons for pion.
void setFlag(int flag)
Sets reconstruction flag.
Definition: TOPLikelihood.h:40
void setModuleID(int moduleID)
Sets module ID.
Definition: TOPLikelihood.h:46
double getX() const
Return assumed emision position within the quartz.
Definition: TOPLikelihood.h:94
void set(const Const::ChargedStable &part, int numPhot, double logL, double estPhot, double estBkg, double effYield)
Sets other data members for a given particle hypothesis.
Definition: TOPLikelihood.h:68
double getNphot_p() const
Return number of expected photons for proton.
double getLogL_e() const
Return electron log likelihood.
double getNphot_K() const
Return number of expected photons for kaon.
float getEffectiveSignalYield(const Const::ChargedStable &part) const
Return effective signal yield in data (number of signal photons)
int m_moduleID
module ID
void setXZ(double x, double z)
Sets assumed photon emission point within the quartz.
Definition: TOPLikelihood.h:53
double getLogL_p() const
Return proton log likelihood.
float m_effYields[Const::ChargedStable::c_SetSize]
effective number of signal photons in data
int getModuleID() const
Return module ID.
Definition: TOPLikelihood.h:88
float getEstBkg() const
Return estimated number of background photons.
double getZ() const
Return assumed emision position within the quartz.
int getFlag() const
Return reconstruction flag.
Definition: TOPLikelihood.h:82
float m_estBkg
estimated background
int m_numPhot
number of photons
double getLogL_mu() const
Return muon log likelihood.
ClassDef(TOPLikelihood, 3)
ClassDef.
int m_flag
reconstruction flag
float getLogL(const Const::ChargedStable &part) const
Return log likelihood for a given particle.
float m_z
assumed photon emission position z in local (module) frame
TOPLikelihood()
default constructor
Definition: TOPLikelihood.h:33
float m_x
assumed photon emission position x in local (module) frame
double getLogL_K() const
Return kaon log likelihood.
int getNphot() const
Return number of detected photons.
float m_estPhot[Const::ChargedStable::c_SetSize]
estimated number of photons
Abstract base class for different kinds of events.