Belle II Software development
ARICHGeoHAPD.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 <arich/dbobjects/ARICHGeoBase.h>
12#include <geometry/dbobjects/GeoOpticalSurface.h>
13#include <string>
14
15namespace Belle2 {
20
24 class ARICHGeoHAPD: public ARICHGeoBase {
25
26 public:
27
32 {}
33
38 void setWallThickness(double thickness) {m_wallThickness = thickness;}
39
44 void setWinThickness(double thickness) {m_winThickness = thickness;}
45
50 void setPadSize(double padSize) {m_padSize = padSize;}
51
56 void setChipGap(double chipGap) {m_chipGap = chipGap;}
57
63 void setNPads(int nx, int ny) {m_nPadX = nx; m_nPadY = ny; }
64
69 void setWinRefIndex(double refInd) {m_winRefIndex = refInd;}
70
75 void setModuleSizeZ(double modZ) {m_moduleSizeZ = modZ;}
76
81 void setWallMaterial(const std::string& material) {m_wallMaterial = material;}
82
87 void setWinMaterial(const std::string& material) {m_winMaterial = material;}
88
93 void setAPDMaterial(const std::string& material) {m_apdMaterial = material;}
94
99 void setFEBMaterial(const std::string& material) {m_febMaterial = material;}
100
105 void setFillMaterial(const std::string& material) {m_fillMaterial = material;}
106
114 void setFEBVolume(double sizeX, double sizeY, double sizeZ,
115 const std::string& material)
116 {
117 m_FEBSizeX = sizeX;
118 m_FEBSizeY = sizeY;
119 m_FEBSizeZ = sizeZ;
120 m_febMaterial = material;
121 }
122
131 void setAPDVolume(double sizeX, double sizeY, double sizeZ,
132 const std::string& material, const GeoOpticalSurface& surf)
133 {
134 m_APDSizeX = sizeX;
135 m_APDSizeY = sizeY;
136 m_APDSizeZ = sizeZ;
137 m_apdMaterial = material;
138 m_apdSurface = surf;
139 }
140
148 void setHAPDVolume(double sizeX, double sizeY, double sizeZ,
149 const std::string& material)
150 {
151 m_HAPDSizeX = sizeX;
152 m_HAPDSizeY = sizeY;
153 m_HAPDSizeZ = sizeZ;
154 m_fillMaterial = material;
155 }
156
157
162 double getSizeX() const {return m_HAPDSizeX / s_unit;}
163
168 double getSizeY() const {return m_HAPDSizeY / s_unit;}
169
174 double getSizeZ() const {return m_HAPDSizeZ / s_unit;}
175
180 double getWallThickness() const {return m_wallThickness / s_unit;}
181
186 double getWinThickness() const {return m_winThickness / s_unit;}
187
192 double getAPDSizeX() const {return m_APDSizeX / s_unit;}
193
198 double getAPDSizeY() const {return m_APDSizeY / s_unit;}
199
204 double getAPDSizeZ() const {return m_APDSizeZ / s_unit;}
205
210 double getFEBSizeX() const {return m_FEBSizeX / s_unit;}
211
216 double getFEBSizeY() const {return m_FEBSizeY / s_unit;}
217
222 double getFEBSizeZ() const {return m_FEBSizeZ / s_unit;}
223
228 double getModuleSizeZ() const {return m_moduleSizeZ / s_unit;}
229
234 double getWinRefIndex() const {return m_winRefIndex;}
235
240 double getPadSize() const {return m_padSize / s_unit;}
241
246 double getChipGap() const {return m_chipGap / s_unit;}
247
252 unsigned getNumPadsX() const {return m_nPadX;}
253
258 unsigned getNumPadsY() const {return m_nPadY;}
259
260
265 const std::string& getWallMaterial() const {return m_wallMaterial;}
266
271 const std::string& getFillMaterial() const {return m_fillMaterial;}
272
277 const std::string& getWinMaterial() const {return m_winMaterial;}
278
283 const std::string& getAPDMaterial() const {return m_apdMaterial;}
284
289 const std::string& getFEBMaterial() const {return m_febMaterial;}
290
296
304 void getXYChannel(double x, double y, int& chX, int& chY) const;
305
312 unsigned getChipID(double x, double y) const;
313
321 void getXYChannelPos(int chX, int chY, double& x, double& y) const;
322
323
332
333
338 bool isConsistent() const override;
339
344 void print(const std::string& title = "HAPD module geometry parameters") const override;
345
346 private:
347
348 std::string m_wallMaterial;
349 std::string m_winMaterial;
350 std::string m_apdMaterial;
351 std::string m_febMaterial;
352 std::string m_fillMaterial;
353 double m_HAPDSizeX = 0;
354 double m_HAPDSizeY = 0;
355 double m_HAPDSizeZ = 0;
356 double m_wallThickness = 0;
357 double m_winThickness = 0;
358 double m_padSize = 0;
359 double m_chipGap = 0;
360 unsigned m_nPadX = 0;
361 unsigned m_nPadY = 0;
362 double m_winRefIndex = 0;
363 double m_APDSizeX = 0;
364 double m_APDSizeY = 0;
365 double m_APDSizeZ = 0;
366 double m_FEBSizeX = 0;
367 double m_FEBSizeY = 0;
368 double m_FEBSizeZ = 0;
369 double m_moduleSizeZ = 0;
371
373
374 };
375
377} // end namespace Belle2
ARICHGeoBase()
Default constructor.
static double s_unit
conversion unit for length
double m_moduleSizeZ
HAPD module Z size (HAPD + FEB height)
double getSizeZ() const
Returns HAPD size in z.
const std::string & getFEBMaterial() const
Returns FEB material name.
double m_APDSizeY
APD Y size.
double getChipGap() const
Returns gap between APD chips.
bool isConsistent() const override
Check consistency of geometry parameters.
void setChipGap(double chipGap)
Set gap between APD chips.
void setAPDVolume(double sizeX, double sizeY, double sizeZ, const std::string &material, const GeoOpticalSurface &surf)
Sets APD volume (single volume for all 4 chips)
std::string m_febMaterial
material of FEB
double m_padSize
pad size
void print(const std::string &title="HAPD module geometry parameters") const override
Print the content of the class.
double getPadSize() const
Returns APD pad size.
double m_chipGap
gap between APD chips
std::string m_wallMaterial
material of HAPD side walls
ClassDefOverride(ARICHGeoHAPD, 1)
ClassDef.
double m_HAPDSizeZ
HAPD Z size.
std::string m_fillMaterial
material that fills the HAPD
unsigned getNumPadsY() const
Returns number of Y pads.
double m_FEBSizeZ
FEB Z size.
unsigned m_nPadX
number of pads in X
unsigned getChipID(double x, double y) const
Returns APD chip ID from from local x,y position.
double getAPDSizeZ() const
Returns APD size in z.
std::string m_winMaterial
material of HAPD window
double getWinRefIndex() const
Returns window refractive index.
double getWinThickness() const
Returns window thickness.
const std::string & getAPDMaterial() const
Returns APD material name.
double m_winRefIndex
window refractive index
void setFEBVolume(double sizeX, double sizeY, double sizeZ, const std::string &material)
Sets FEB volume.
void getXYChannel(double x, double y, int &chX, int &chY) const
Returns X and Y channel number from local x,y position.
double m_APDSizeX
APD X size.
const GeoOpticalSurface & getAPDSurface() const
Returns APD reflective optical surface.
double m_FEBSizeX
FEB X size.
void setWinThickness(double thickness)
Set window thickness.
const std::string & getWallMaterial() const
Returns wall (casing) material name.
void setModuleSizeZ(double modZ)
Set module size in Z (height of HAPD + FEB)
const std::string & getFillMaterial() const
Returns fill (inside) material name.
void setWinRefIndex(double refInd)
Set refractive index of HAPD window.
unsigned getNumPadsX() const
Returns number of X pads.
void setWallThickness(double thickness)
Set wall thickness.
double getSizeX() const
Returns HAPD size in x.
void setAPDMaterial(const std::string &material)
Sets APD material.
double getPhotocathodeApdDistance() const
Returns distance between photocathode and APD.
void setWallMaterial(const std::string &material)
Sets casing material.
double getSizeY() const
Returns HAPD size in y.
double getFEBSizeY() const
Returns FEB size in y.
void setFillMaterial(const std::string &material)
Sets material inside of HAPD (vacuum with set ref.
ARICHGeoHAPD()
Default constructor.
double getWallThickness() const
Returns wall thickness.
void setWinMaterial(const std::string &material)
Set window material.
void setHAPDVolume(double sizeX, double sizeY, double sizeZ, const std::string &material)
Sets HAPD volume.
void setPadSize(double padSize)
Set pad size.
void setNPads(int nx, int ny)
Set number of pads in x and y direction.
void setFEBMaterial(const std::string &material)
Sets FEB material.
double getFEBSizeZ() const
Returns FEB size in z.
double m_wallThickness
HAPD side wall thickness.
GeoOpticalSurface m_apdSurface
optical surface of APD (for reflectivity)
double m_HAPDSizeX
HAPD X size.
const std::string & getWinMaterial() const
Returns window material name.
std::string m_apdMaterial
material of APD chips
double getModuleSizeZ() const
Returns module size in z (HAPD + FEB height)
double m_FEBSizeY
FEB Y size.
double getAPDSizeY() const
Returns APD size in y.
double getFEBSizeX() const
Returns FEB size in x.
void getXYChannelPos(int chX, int chY, double &x, double &y) const
Returns local x,y position from channel X,Y numbers.
double getAPDSizeX() const
Returns APD size in x.
double m_HAPDSizeY
HAPD Y size.
double m_APDSizeZ
APD Z size.
unsigned m_nPadY
number of pads in Y
double m_winThickness
HAPD window thickness.
Represent an optical finish of a surface.
Abstract base class for different kinds of events.