9#include <top/reconstruction_cpp/FastRaytracer.h>
10#include <framework/logging/Logger.h>
40 for (
int i = 0; i < nbars; i++) {
41 const auto& bar =
m_bars[i];
43 if (lastState.getZ() >= bar.zR)
continue;
47 newState.propagate(bar);
49 newState.propagateSemiLinear(bar,
m_mirror);
51 newState.propagateExact(bar,
m_mirror);
53 if (not newState.getPropagationStatus())
return;
55 m_Nxm += (
m_Nxm % 2 == 0) ? newState.getNx() : -newState.getNx();
56 m_Nym += (
m_Nym % 2 == 0) ? newState.getNy() : -newState.getNy();
60 for (
int i = nbars - 1; i >= 0; i--) {
61 const auto& bar =
m_bars[i];
63 if (lastState.getZ() <= bar.zL)
continue;
66 newState.propagate(bar);
67 if (not newState.getPropagationStatus())
return;
69 m_Nxb += (
m_Nxb % 2 == 0) ? newState.getNx() : -newState.getNx();
70 m_Nyb += (
m_Nyb % 2 == 0) ? newState.getNy() : -newState.getNy();
77 if (not newState.getPropagationStatus())
return;
82 flippedState.propagate(
m_prism);
83 if (not flippedState.getPropagationStatus())
return;
86 m_Nxe = newState.getNx();
87 m_Nye = newState.getNy();
95 if (not photonState.getTotalReflStatus(cosTotal))
return false;
123 x = photonState.getUnfoldedX(x);
137 y = photonState.getUnfoldedY(y);
151 y = photonState.getUnfoldedY(y);
171 for (
int i = i0; i > 0; i--) {
174 y = photonState.getUnfoldedY(y);
int m_Nym
number of reflections in y before mirror
double getZD() const
Returns unfolded position in z of virtual Detector plane.
double getPropagationLen() const
Returns total propagation length since initial position.
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
void propagate(const PhotonState &photon, bool averaging=false) const
Propagate photon to photo-detector plane.
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.
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.
int getNys() const
Returns number of reflections on slanted prism surface.
double getPropagationLenDelta() const
Returns total propagation length difference between true and flipped prism.
int m_Nyb
number of reflections in y after mirror and before 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.
double getZ() const
Returns position in z.
@ c_MirrorSegment
mirror segment
double getKz() const
Returns direction in z.
EOptics m_optics
spherical mirror optics
@ c_SemiLinear
semi-linear approximation
Mirror m_mirror
spherical mirror geometry data
Prism m_prism
prism geometry data
std::vector< BarSegment > m_bars
geometry data of bar segments
Abstract base class for different kinds of events.
double zR
maximal z, i.e position of prism-bar joint