9#include <top/reconstruction_cpp/RaytracerBase.h>
10#include <top/geometry/TOPGeometryPar.h>
11#include <framework/logging/Logger.h>
22 A(bar.getWidth()), B(bar.getThickness()), zL(zLeft), reflectivity(bar.getSurfaceReflectivity(3.0)),
23 sigmaAlpha(bar.getSigmaAlpha())
30 A(module.getBarWidth()), B(module.getBarThickness()), reflectivity(module.getSurfaceReflectivity(3.0)),
31 sigmaAlpha(module.getSigmaAlpha())
34 zL = -module.getBarLength() / 2;
35 zR = module.getBarLength() / 2;
40 xc(module.getMirrorSegment().getXc()), yc(module.getMirrorSegment().getYc()),
41 zc(module.getMirrorSegment().getZc()),
R(module.getMirrorSegment().getRadius()),
42 reflectivity(module.getMirrorSegment().getMirrorReflectivity(3.0))
44 zc += (module.getBarLength() - module.getMirrorSegment().getFullLength()) / 2;
46 double Ah = std::max(module.getMirrorSegment().getWidth(), module.getBarWidth()) / 2;
47 double Bh = std::max(module.getMirrorSegment().getThickness(), module.getBarThickness()) / 2;
48 zb = std::min(
zb,
zc +
sqrt(pow(
R, 2) - pow(
xc - Ah, 2) - pow(
yc - Bh, 2)));
49 zb = std::min(
zb,
zc +
sqrt(pow(
R, 2) - pow(
xc + Ah, 2) - pow(
yc - Bh, 2)));
50 zb = std::min(
zb,
zc +
sqrt(pow(
R, 2) - pow(
xc - Ah, 2) - pow(
yc + Bh, 2)));
51 zb = std::min(
zb,
zc +
sqrt(pow(
R, 2) - pow(
xc + Ah, 2) - pow(
yc + Bh, 2)));
59 const auto& prism = module.getPrism();
60 yDown =
yUp - prism.getExitThickness();
61 zR = -module.getBarLength() / 2;
62 zL =
zR - prism.getLength();
63 zFlat =
zL + prism.getFlatLength();
64 const auto& pmtArray = module.getPMTArray();
66 double filterThickness = pmtArray.getFilterThickness() + prism.getFilterThickness();
67 double cookieThickness = pmtArray.getCookieThickness();
68 double pmtWindow = pmtArray.getPMT().getWinThickness();
69 zD =
zL - filterThickness - cookieThickness - pmtWindow;
82 if (not geo->isModuleIDValid(moduleID)) {
83 B2FATAL(
"TOP::RaytracerBase: invalid slot number, moduleID = " << moduleID);
86 const auto& module = geo->getModule(moduleID);
108 double Ah =
m_bars.back().A / 2;
109 double Bh =
m_bars.back().B / 2;
110 zb = std::min(zb, zc +
sqrt(pow(
R, 2) - pow(xc - Ah, 2) - pow(yc - Bh, 2)));
111 zb = std::min(zb, zc +
sqrt(pow(
R, 2) - pow(xc + Ah, 2) - pow(yc - Bh, 2)));
112 zb = std::min(zb, zc +
sqrt(pow(
R, 2) - pow(xc - Ah, 2) - pow(yc + Bh, 2)));
113 zb = std::min(zb, zc +
sqrt(pow(
R, 2) - pow(xc + Ah, 2) - pow(yc + Bh, 2)));
Geometry parameters of a quartz bar segment.
double getFullLength() const
Returns bar segment length including glue.
Geometry parameters of a module (optical components + positioning)
void setMirrorCenter(double xc, double yc)
Sets the mirror center-of-curvature.
EOptics m_optics
spherical mirror optics
EGeometry
Treatement of quartz geometry.
@ c_Unified
single bar with average width and thickness
EOptics
Treatement of spherical mirror optics.
Mirror m_mirror
spherical mirror geometry data
RaytracerBase(int moduleID, EGeometry geometry=c_Unified, EOptics optics=c_SemiLinear)
Constructor.
const Prism & getPrism() const
Returns geometry data of prism.
Prism m_prism
prism geometry data
EGeometry m_geometry
quartz geometry
std::vector< BarSegment > m_bars
geometry data of bar segments
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.
bar segment data in module local frame.
BarSegment()
default constructor
spherical mirror data in module local frame.
double yc
center of curvature in y
Mirror()
default constructor
double xc
center of curvature in x
double zb
minimum of mirror surface in z
double zc
center of curvature in z
prism data in module local frame.
std::vector< TOPGeoPrism::UnfoldedWindow > unfoldedWindows
unfolded prism exit windows
double yDown
minimal y of exit window
double slope
slope of slanted surface (dy/dz)
double yUp
maximal y of exit window
double zFlat
z where flat continues to slanted surface
Prism()
default constructor
double zR
maximal z, i.e position of prism-bar joint
double B
thickness at bar (dimension in y)
double zD
detector (photo-cathode) position
int k0
index of true prism in the vector 'unfoldedWindows'