Belle II Software development
FastRaytracer.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 <top/reconstruction_cpp/RaytracerBase.h>
12#include <top/reconstruction_cpp/PhotonState.h>
13#include <vector>
14
15
16namespace Belle2 {
21 namespace TOP {
22
27
28 public:
29
36 explicit FastRaytracer(int moduleID, EGeometry geometry = c_Unified, EOptics optics = c_SemiLinear):
37 RaytracerBase(moduleID, geometry, optics)
38 {};
39
43 void clear() const
44 {
45 m_photonStates.clear();
46 m_extraStates.clear();
47 m_status = false;
48 m_Nxm = 0;
49 m_Nxb = 0;
50 m_Nxe = 0;
51 m_Nym = 0;
52 m_Nyb = 0;
53 m_Nye = 0;
54 }
55
62 void propagate(const PhotonState& photon, bool averaging = false) const;
63
68 const std::vector<PhotonState>& getPhotonStates() const {return m_photonStates;}
69
74 const std::vector<PhotonState>& getExtraStates() const {return m_extraStates;}
75
80 bool getPropagationStatus() const {return m_status;}
81
88 bool getTotalReflStatus(double cosTotal) const;
89
96 double getPropagationLen() const;
97
103 double getPropagationLenDelta() const;
104
112 double getXD() const;
113
120 double getYD() const;
121
129 double getInPlaneYD() const;
130
137 double getZD() const;
138
145 double getYB() const;
146
152 int getNx() const;
153
159 int getNxm() const {return m_Nxm;}
160
166 int getNxb() const {return m_Nxb;}
167
173 int getNxe() const {return m_Nxe;}
174
180 int getNy() const;
181
187 int getNym() const {return m_Nym;}
188
194 int getNyb() const {return m_Nyb;}
195
201 int getNye() const {return m_Nye;}
202
208 int getNys() const;
209
210
211 private:
212
213 mutable std::vector<PhotonState> m_photonStates;
214 mutable std::vector<PhotonState> m_extraStates;
215 mutable bool m_status = false;
216 mutable int m_Nxm = 0;
217 mutable int m_Nxb = 0;
218 mutable int m_Nxe = 0;
219 mutable int m_Nym = 0;
220 mutable int m_Nyb = 0;
221 mutable int m_Nye = 0;
222
223 };
224
225 } // namespace TOP
227} // namespace Belle2
int m_Nym
number of reflections in y before mirror
FastRaytracer(int moduleID, EGeometry geometry=c_Unified, EOptics optics=c_SemiLinear)
Constructor.
double getZD() const
Returns unfolded position in z of virtual Detector plane.
double getPropagationLen() const
Returns total propagation length since initial position.
int getNyb() const
Returns signed number of reflections in y after mirror and before prism.
const std::vector< PhotonState > & getExtraStates() const
Returns extra states.
double getInPlaneYD() const
Returns unfolded position in y such that the prism unfolded windows are turned over into the real Det...
std::vector< PhotonState > m_photonStates
photon states at propagation steps
int getNxm() const
Returns signed number of reflections in x before mirror.
int getNxb() const
Returns signed number of reflections in x after mirror and before prism.
void propagate(const PhotonState &photon, bool averaging=false) const
Propagate photon to photo-detector plane.
int getNym() const
Returns signed number of reflections in y before mirror.
int m_Nxm
number of reflections in x before mirror
int getNx() const
Returns signed number of reflections in x.
double getYB() const
Returns unfolded position in y at Bar-prism-connection plane.
double getYD() const
Returns unfolded position in y at virtual Detector plane.
int getNxe() const
Returns signed number of reflections in x inside prism.
bool getTotalReflStatus(double cosTotal) const
Returns total internal reflection status.
bool m_status
propagation status
int m_Nxe
number of reflections in x inside prism
int getNy() const
Returns signed number of reflections in y.
bool getPropagationStatus() const
Returns propagation status.
int getNys() const
Returns number of reflections on slanted prism surface.
double getPropagationLenDelta() const
Returns total propagation length difference between true and flipped prism Reliable only if propagati...
int m_Nyb
number of reflections in y after mirror and before prism
const std::vector< PhotonState > & getPhotonStates() const
Returns photon states (results of propagation).
int getNye() const
Returns signed number of reflections in y inside prism.
int m_Nxb
number of reflections in x after mirror and before prism
int m_Nye
number of reflections in y inside prism
void clear() const
Clear mutable variables.
std::vector< PhotonState > m_extraStates
extra storage
double getXD() const
Returns unfolded position in x at virtual Detector plane.
State of the Cerenkov photon in the quartz optics.
Definition PhotonState.h:27
EGeometry
Treatment of quartz geometry.
@ c_Unified
single bar with average width and thickness
EOptics
Treatment of spherical mirror optics.
@ c_SemiLinear
semi-linear approximation
RaytracerBase(int moduleID, EGeometry geometry=c_Unified, EOptics optics=c_SemiLinear)
Constructor.
Common code concerning the geometry representation of the detector.
Definition CreatorBase.h:25
Abstract base class for different kinds of events.