Belle II Software development
ARICHPhoton.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#ifndef ARICHPHOTON_H
11#define ARICHPHOTON_H
12
13#include <framework/datastore/RelationsObject.h>
14#include <framework/gearbox/Const.h>
15
16namespace Belle2 {
26
27 public:
28
33
41 ARICHPhoton(int hitID, float thetaCer, float phiCer, int mirror): m_hitID(hitID), m_thetaCer(thetaCer),
42 m_phiCer(phiCer),
43 m_mirror(mirror) {};
44
48 void setHitID(int id)
49 {
50 m_hitID = id;
51 }
52
56 void setPhiCerTrk(float phi)
57 {
58 m_phiCerTrk = phi;
59 }
60
64 void setXY(float x, float y)
65 {
66 m_x = x;
67 m_y = y;
68 }
69
73 void setModuleID(int modID)
74 {
75 m_module = modID;
76 }
77
81 void setChannel(int chn)
82 {
83 m_channel = chn;
84 }
85
86
91 void setSigExp(const double* sigExp)
92 {
93 m_sigExp_e = (float)sigExp[0];
94 m_sigExp_mu = (float)sigExp[1];
95 m_sigExp_pi = (float)sigExp[2];
96 m_sigExp_K = (float)sigExp[3];
97 m_sigExp_p = (float)sigExp[4];
98 }
99
104 void setBkgExp(const double* bkgExp)
105 {
106 m_bkgExp_e = (float)bkgExp[0];
107 m_bkgExp_mu = (float)bkgExp[1];
108 m_bkgExp_pi = (float)bkgExp[2];
109 m_bkgExp_K = (float)bkgExp[3];
110 m_bkgExp_p = (float)bkgExp[4];
111 }
112
117 void setNCosThetaCh(const double* n_cos_theta_ch)
118 {
119 m_nCosThetaCh_e = (float)n_cos_theta_ch[0];
120 m_nCosThetaCh_mu = (float)n_cos_theta_ch[1];
121 m_nCosThetaCh_pi = (float)n_cos_theta_ch[2];
122 m_nCosThetaCh_K = (float)n_cos_theta_ch[3];
123 m_nCosThetaCh_p = (float)n_cos_theta_ch[4];
124 }
125
130 void setPhiCh(const double* phi_ch)
131 {
132 m_phiCh_e = (float)phi_ch[0];
133 m_phiCh_mu = (float)phi_ch[1];
134 m_phiCh_pi = (float)phi_ch[2];
135 m_phiCh_K = (float)phi_ch[3];
136 m_phiCh_p = (float)phi_ch[4];
137 }
138
143 float getSigExp(const Const::ChargedStable& part) const
144 {
145 if (part == Const::electron) return m_sigExp_e;
146 if (part == Const::muon) return m_sigExp_mu;
147 if (part == Const::pion) return m_sigExp_pi;
148 if (part == Const::kaon) return m_sigExp_K;
149 if (part == Const::proton) return m_sigExp_p;
150 else return 0;
151 }
152
157 float getBkgExp(const Const::ChargedStable& part) const
158 {
159 if (part == Const::electron) return m_bkgExp_e;
160 if (part == Const::muon) return m_bkgExp_mu;
161 if (part == Const::pion) return m_bkgExp_pi;
162 if (part == Const::kaon) return m_bkgExp_K;
163 if (part == Const::proton) return m_bkgExp_p;
164 else return 0;
165 }
166
171 float getNCosThetaCh(const Const::ChargedStable& part) const
172 {
173 if (part == Const::electron) return m_nCosThetaCh_e;
174 if (part == Const::muon) return m_nCosThetaCh_mu;
175 if (part == Const::pion) return m_nCosThetaCh_pi;
176 if (part == Const::kaon) return m_nCosThetaCh_K;
177 if (part == Const::proton) return m_nCosThetaCh_p;
178 else return 0;
179 }
180
185 float getPhiCh(const Const::ChargedStable& part) const
186 {
187 if (part == Const::electron) return m_phiCh_e;
188 if (part == Const::muon) return m_phiCh_mu;
189 if (part == Const::pion) return m_phiCh_pi;
190 if (part == Const::kaon) return m_phiCh_K;
191 if (part == Const::proton) return m_phiCh_p;
192 else return 0;
193 }
194
198 double getThetaCer()
199 {
200 return (double)m_thetaCer;
201 }
202
206 double getPhiCer()
207 {
208 return (double)m_phiCer;
209 }
210
215 {
216 return (double)m_phiCerTrk;
217 }
218
223 {
224 return m_mirror;
225 }
226
231 {
232 return m_hitID;
233 }
234
238 double getX()
239 {
240 return (double)m_x;
241 }
242
246 double getY()
247 {
248 return (double)m_y;
249 }
250
255 {
256 return m_module;
257 }
258
263 {
264 return m_channel;
265 }
266
267
268 private:
269
270 int m_hitID = 0;
271 float m_thetaCer = 0.;
272 float m_phiCer = 0.;
273 int m_mirror = 0;
274 float m_sigExp_e = 0.;
275 float m_bkgExp_e = 0.;
276 float m_sigExp_mu = 0.;
277 float m_bkgExp_mu = 0.;
278 float m_sigExp_pi = 0.;
279 float m_bkgExp_pi = 0.;
280 float m_sigExp_K = 0.;
281 float m_bkgExp_K = 0.;
282 float m_sigExp_p = 0.;
283 float m_bkgExp_p = 0.;
284 float m_nCosThetaCh_e = 0.;
285 float m_nCosThetaCh_mu = 0.;
286 float m_nCosThetaCh_pi = 0.;
287 float m_nCosThetaCh_K = 0.;
288 float m_nCosThetaCh_p = 0.;
289 float m_phiCh_e = 0.;
290 float m_phiCh_mu = 0.;
291 float m_phiCh_pi = 0.;
292 float m_phiCh_K = 0.;
293 float m_phiCh_p = 0.;
294 float m_x = 0;
295 float m_y = 0;
296 int m_module = 0;
297 int m_channel = 0;
298 float m_phiCerTrk = 0.;
302 };
304} //Belle2 namespace
305
306#endif // ARICHPHOTON_H
Struct for ARICH reconstructed photon (hit related to track) information.
Definition: ARICHPhoton.h:25
int m_module
hit module
Definition: ARICHPhoton.h:296
ARICHPhoton()
default constructor
Definition: ARICHPhoton.h:32
float getSigExp(const Const::ChargedStable &part) const
Get expected signal contribution for given pid hypothesis.
Definition: ARICHPhoton.h:143
float m_phiCh_mu
n phi_ch for mu hypotheses
Definition: ARICHPhoton.h:290
float m_bkgExp_p
number of expected background photons on pad for p hypotheses
Definition: ARICHPhoton.h:283
float m_sigExp_e
number of expected signal photons on pad for e hypotheses
Definition: ARICHPhoton.h:274
float getNCosThetaCh(const Const::ChargedStable &part) const
Get n cos(theta_ch) for given pid hypothesis.
Definition: ARICHPhoton.h:171
float m_nCosThetaCh_K
n cos(theta_ch) for K hypotheses
Definition: ARICHPhoton.h:287
double getY()
Get hit Y position.
Definition: ARICHPhoton.h:246
float m_nCosThetaCh_p
n cos(theta_ch) for p hypotheses
Definition: ARICHPhoton.h:288
int getMirror()
Get used mirror hypothesis (0 for no reflection)
Definition: ARICHPhoton.h:222
float m_sigExp_K
number of expected signal photons on pad for K hypotheses
Definition: ARICHPhoton.h:280
double getX()
Get hit X position.
Definition: ARICHPhoton.h:238
float m_bkgExp_pi
number of expected background photons on pad for pi hypotheses
Definition: ARICHPhoton.h:279
void setXY(float x, float y)
Set X-Y position of hit.
Definition: ARICHPhoton.h:64
float m_sigExp_pi
number of expected signal photons on pad for pi hypotheses
Definition: ARICHPhoton.h:278
void setHitID(int id)
Set ID of corresponding ARICHHit.
Definition: ARICHPhoton.h:48
float m_phiCerTrk
reconstructed phi angle in track coordinate system
Definition: ARICHPhoton.h:298
float m_nCosThetaCh_mu
n cos(theta_ch) for mu hypotheses
Definition: ARICHPhoton.h:285
int m_hitID
id of corresponding ARICHHit
Definition: ARICHPhoton.h:270
void setBkgExp(const double *bkgExp)
Set expected background contribution.
Definition: ARICHPhoton.h:104
ARICHPhoton(int hitID, float thetaCer, float phiCer, int mirror)
Constructor to allow initialization.
Definition: ARICHPhoton.h:41
float m_phiCh_pi
n phi_ch for pi hypotheses
Definition: ARICHPhoton.h:291
float m_sigExp_p
number of expected signal photons on pad for p hypotheses
Definition: ARICHPhoton.h:282
float m_phiCh_K
n phi_ch for K hypotheses
Definition: ARICHPhoton.h:292
void setChannel(int chn)
set channel (asic) of hit
Definition: ARICHPhoton.h:81
double getPhiCerTrk()
Get reconstructed phi cherenkov angle in track coordinate system.
Definition: ARICHPhoton.h:214
float m_nCosThetaCh_pi
n cos(theta_ch) for pi hypotheses
Definition: ARICHPhoton.h:286
float getPhiCh(const Const::ChargedStable &part) const
Get phi_ch for given pid hypothesis.
Definition: ARICHPhoton.h:185
float m_bkgExp_e
number of expected background photons on pad for e hypotheses
Definition: ARICHPhoton.h:275
double getPhiCer()
Get reconstructed phi cherenkov angle.
Definition: ARICHPhoton.h:206
float m_thetaCer
reconstructed theta angle
Definition: ARICHPhoton.h:271
void setNCosThetaCh(const double *n_cos_theta_ch)
Set n cos(theta_ch)
Definition: ARICHPhoton.h:117
float m_nCosThetaCh_e
n cos(theta_ch) for e hypotheses
Definition: ARICHPhoton.h:284
float m_phiCer
reconstructed phi angle
Definition: ARICHPhoton.h:272
void setModuleID(int modID)
Set id of hit module.
Definition: ARICHPhoton.h:73
void setPhiCh(const double *phi_ch)
Set phi_ch.
Definition: ARICHPhoton.h:130
int getHitID()
Get ID of corresponding ARICHHit.
Definition: ARICHPhoton.h:230
int getModuleID()
Get hit module ID.
Definition: ARICHPhoton.h:254
float m_bkgExp_K
number of expected background photons on pad for K hypotheses
Definition: ARICHPhoton.h:281
void setPhiCerTrk(float phi)
Set hit phi angle in track coordinates.
Definition: ARICHPhoton.h:56
double getThetaCer()
Get reconstructed theta cherenkov angle.
Definition: ARICHPhoton.h:198
void setSigExp(const double *sigExp)
Set expected signal contribution.
Definition: ARICHPhoton.h:91
ClassDef(ARICHPhoton, 5)
ClassDef.
float m_y
y of the hit position
Definition: ARICHPhoton.h:295
float m_phiCh_e
n phi_ch for e hypotheses
Definition: ARICHPhoton.h:289
int m_channel
hit channel
Definition: ARICHPhoton.h:297
float m_bkgExp_mu
number of expected background photons on pad for mu hypotheses
Definition: ARICHPhoton.h:277
float getBkgExp(const Const::ChargedStable &part) const
Get expected background contribution for given pid hypothesis.
Definition: ARICHPhoton.h:157
float m_x
x of the hit position
Definition: ARICHPhoton.h:294
float m_phiCh_p
n phi_ch for p hypotheses
Definition: ARICHPhoton.h:293
int m_mirror
assumed reflection of mirror plate (0 for no reflection)
Definition: ARICHPhoton.h:273
float m_sigExp_mu
number of expected signal photons on pad for mu hypotheses
Definition: ARICHPhoton.h:276
int getChannel()
Get hit channel (asic)
Definition: ARICHPhoton.h:262
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:589
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.