Belle II Software  release-08-01-10
RaytracerBase.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/dbobjects/TOPGeoModule.h>
12 #include <top/dbobjects/TOPGeoBarSegment.h>
13 #include <top/dbobjects/TOPGeoPrism.h>
14 #include <vector>
15 
16 
17 namespace Belle2 {
22  namespace TOP {
23 
27  class RaytracerBase {
28 
29  public:
33  enum EGeometry {
34  c_Unified = 0,
35  c_Segmented = 1
36  };
37 
41  enum EOptics {
43  c_Exact = 1
44  };
45 
49  struct BarSegment {
50  double A = 0;
51  double B = 0;
52  double zL = 0;
53  double zR = 0;
54  double reflectivity = 0;
55  double sigmaAlpha = 0;
61  {}
62 
68  BarSegment(const TOPGeoBarSegment& bar, double zLeft);
69 
74  explicit BarSegment(const TOPGeoModule& module);
75  };
76 
80  struct Mirror {
81  double xc = 0;
82  double yc = 0;
83  double zc = 0;
84  double R = 0;
85  double zb = 0;
86  double reflectivity = 0;
92  {}
93 
98  explicit Mirror(const TOPGeoModule& module);
99  };
100 
104  struct Prism {
105  double A = 0;
106  double B = 0;
107  double yUp = 0;
108  double yDown = 0;
109  double zL = 0;
110  double zR = 0;
111  double zFlat = 0;
112  double zD = 0;
113  double slope = 0;
114  int k0 = 0;
115  std::vector<TOPGeoPrism::UnfoldedWindow> unfoldedWindows;
121  {}
122 
127  explicit Prism(const TOPGeoModule& module);
128  };
129 
130 
137  explicit RaytracerBase(int moduleID, EGeometry geometry = c_Unified, EOptics optics = c_SemiLinear);
138 
143  int getModuleID() const {return m_moduleID;}
144 
149  EGeometry getGeometry() const {return m_geometry;}
150 
155  EOptics getOptics() const {return m_optics;}
156 
161  const std::vector<BarSegment>& getBars() const {return m_bars;}
162 
167  const Mirror& getMirror() const {return m_mirror;}
168 
173  const Prism& getPrism() const {return m_prism;}
174 
180  void setMirrorCenter(double xc, double yc);
181 
182  protected:
183 
184  int m_moduleID = 0;
188  std::vector<BarSegment> m_bars;
192  };
193 
194  } // namespace TOP
196 } // namespace Belle2
197 
double R
typedef autogenerated by FFTW
Geometry parameters of a quartz bar segment.
Geometry parameters of a module (optical components + positioning)
Definition: TOPGeoModule.h:31
Base class with geometry data.
Definition: RaytracerBase.h:27
const Mirror & getMirror() const
Returns geometry data of spherical mirror.
void setMirrorCenter(double xc, double yc)
Sets the mirror center-of-curvature.
const std::vector< BarSegment > & getBars() const
Returns geometry data of bar segments.
EGeometry getGeometry() const
Returns quartz geometry treatement.
EOptics m_optics
spherical mirror optics
EGeometry
Treatement of quartz geometry.
Definition: RaytracerBase.h:33
@ c_Unified
single bar with average width and thickness
Definition: RaytracerBase.h:34
@ c_Segmented
segmented bars
Definition: RaytracerBase.h:35
int getModuleID() const
Returns slot ID.
EOptics
Treatement of spherical mirror optics.
Definition: RaytracerBase.h:41
@ c_SemiLinear
semi-linear approximation
Definition: RaytracerBase.h:42
Mirror m_mirror
spherical mirror geometry data
EOptics getOptics() const
Returns treatement of spherical mirror optics.
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
Abstract base class for different kinds of events.
bar segment data in module local frame.
Definition: RaytracerBase.h:49
double A
width (dimension in x)
Definition: RaytracerBase.h:50
double sigmaAlpha
surface roughness parameter
Definition: RaytracerBase.h:55
double reflectivity
surface reflectivity
Definition: RaytracerBase.h:54
double B
thickness (dimension in y)
Definition: RaytracerBase.h:51
spherical mirror data in module local frame.
Definition: RaytracerBase.h:80
double yc
center of curvature in y
Definition: RaytracerBase.h:82
double reflectivity
mirror reflectivity
Definition: RaytracerBase.h:86
double xc
center of curvature in x
Definition: RaytracerBase.h:81
double zb
minimum of mirror surface in z
Definition: RaytracerBase.h:85
double zc
center of curvature in z
Definition: RaytracerBase.h:83
prism data in module local frame.
double A
width (dimension in x)
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
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'