Belle II Software  release-06-01-15
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;
60  {}
61 
67  BarSegment(const TOPGeoBarSegment& bar, double zLeft);
68 
73  explicit BarSegment(const TOPGeoModule& module);
74  };
75 
79  struct Mirror {
80  double xc = 0;
81  double yc = 0;
82  double zc = 0;
83  double R = 0;
84  double zb = 0;
85  double reflectivity = 0;
91  {}
92 
97  explicit Mirror(const TOPGeoModule& module);
98  };
99 
103  struct Prism {
104  double A = 0;
105  double B = 0;
106  double yUp = 0;
107  double yDown = 0;
108  double zL = 0;
109  double zR = 0;
110  double zFlat = 0;
111  double zD = 0;
112  double slope = 0;
113  int k0 = 0;
114  std::vector<TOPGeoPrism::UnfoldedWindow> unfoldedWindows;
120  {}
121 
126  explicit Prism(const TOPGeoModule& module);
127  };
128 
129 
136  explicit RaytracerBase(int moduleID, EGeometry geometry = c_Unified, EOptics optics = c_SemiLinear);
137 
142  int getModuleID() const {return m_moduleID;}
143 
148  EGeometry getGeometry() const {return m_geometry;}
149 
154  EOptics getOptics() const {return m_optics;}
155 
160  const std::vector<BarSegment>& getBars() const {return m_bars;}
161 
166  const Mirror& getMirror() const {return m_mirror;}
167 
172  const Prism& getPrism() const {return m_prism;}
173 
174 
175  protected:
176 
177  int m_moduleID = 0;
181  std::vector<BarSegment> m_bars;
185  };
186 
187  } // namespace TOP
189 } // namespace Belle2
190 
Geometry parameters of a quartz bar segment.
Geometry parameters of a module (optical components + positioning)
Definition: TOPGeoModule.h:30
Base class with geometry data.
Definition: RaytracerBase.h:27
const Mirror & getMirror() const
Returns geometry data of spherical mirror.
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 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:79
double yc
center of curvature in y
Definition: RaytracerBase.h:81
double reflectivity
mirror reflectivity
Definition: RaytracerBase.h:85
double xc
center of curvature in x
Definition: RaytracerBase.h:80
double zb
minimum of mirror surface in z
Definition: RaytracerBase.h:84
double zc
center of curvature in z
Definition: RaytracerBase.h:82
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'