Belle II Software development
ARICHGeoDetectorPlane.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 <framework/logging/Logger.h>
12#include <arich/dbobjects/ARICHGeoBase.h>
13#include <string>
14#include <Math/Vector3D.h>
15#include <Math/Rotation3D.h>
16#include <Math/RotationX.h>
17#include <Math/RotationY.h>
18#include <Math/RotationZ.h>
19
20
21namespace Belle2 {
31
32 public:
33
38 {};
39
40
45 bool isConsistent() const override;
46
51 void print(const std::string& title = "Detector plane parameters") const override;
52
62 void setPlacement(double x, double y, double z, double rx, double ry, double rz) {m_x = x; m_y = y; m_z = z; m_rx = rx; m_ry = ry; m_rz = rz;}
63
71 void addSupportPlate(double inR, double outR, double thick, const std::string& material)
72 {
73 m_innerR = inR;
74 m_outerR = outR;
75 m_thickness = thick;
76 m_supportMaterial = material;
77 };
78
83 void setModuleHoleSize(double hsize) {m_moduleHoleSize = hsize;}
84
91
98
103 void setSupportZPosition(double zPosition) { m_supportZPosition = zPosition; }
104
113 void setRingPar(const std::vector<std::pair<double, double>>& ringPar);
114
119 ROOT::Math::XYZVector getPosition() const {return ROOT::Math::XYZVector(m_x / s_unit, m_y / s_unit, m_z / s_unit);}
120
125 ROOT::Math::Rotation3D getRotation() const
126 {
127 ROOT::Math::Rotation3D rot;
128 ROOT::Math::RotationX rotX(m_rx);
129 ROOT::Math::RotationY rotY(m_ry);
130 ROOT::Math::RotationZ rotZ(m_rz);
131 rot *= rotZ * rotY * rotX;
132 return rot;
133 }
134
139 double getRotationX() const {return m_rx;}
140
145 double getRotationY() const {return m_ry;}
146
151 double getRotationZ() const {return m_rz;}
152
157 double getSupportInnerR() const {return m_innerR / s_unit;};
158
163 double getSupportOuterR() const {return m_outerR / s_unit;};
164
169 double getSupportThickness() const {return m_thickness / s_unit;};
170
176
181 double getModuleHoleSize() const {return m_moduleHoleSize / s_unit;};
182
189
196
201 const std::string& getSupportMaterial() const {return m_supportMaterial;}
202
208 double getRingR(unsigned iRing) const { if (iRing == 0 || iRing > m_nRings) B2ERROR("ARICHGeoDetectorPlane: invalid module ring number!"); return m_ringPar[iRing - 1].first / s_unit;}
209
215 double getRingDPhi(unsigned iRing) const { if (iRing == 0 || iRing > m_nRings) B2ERROR("ARICHGeoDetectorPlane: invalid module ring number!"); return m_ringPar[iRing - 1].second;}
216
222 double getSlotR(unsigned modID) const { if (modID == 0 || modID > m_nSlots) B2ERROR("ARICHGeoDetectorPlane: invalid module ID number!"); return m_slotPar[modID - 1].first / s_unit;};
223
229 double getSlotPhi(unsigned modID) const { if (modID == 0 || modID > m_nSlots) B2ERROR("ARICHGeoDetectorPlane: invalid module ID number!"); return m_slotPar[modID - 1].second;};
230
235 unsigned getNSlots() const {return m_nSlots;}
236
241 unsigned getNRings() const {return m_nRings;}
242
248 unsigned getSlotRing(unsigned slotID) const;
249
256 unsigned pointSlotID(double x, double y) const;
257
265 unsigned getSlotIDFromSRF(unsigned sector, unsigned ring, unsigned azimuth) const;
266
267 private:
268
269 std::vector<std::pair<double, double>> m_ringPar;
271 std::vector<std::pair<double, double>> m_slotPar;
273 // detector plane position in local ARICH volume
274 double m_x = 0;
275 double m_y = 0;
276 double m_z =
277 0;
279 // rotations in local ARICH volume
280 double m_rx = 0;
281 double m_ry = 0;
282 double m_rz = 0;
284 // support structure parameters
285 std::string m_supportMaterial;
286 double m_innerR = 0;
287 double m_outerR = 0;
288 double m_thickness = 0;
289 double m_moduleHoleSize = 0;
294 0;
296 unsigned m_nRings = 0;
297 unsigned m_nSlots = 0;
301 };
302
304} // end namespace Belle2
Base class for geometry parameters.
Definition: ARICHGeoBase.h:24
static double s_unit
conversion unit for length
Definition: ARICHGeoBase.h:83
Geometry parameters of ARICH photon detector plane.
unsigned getNSlots() const
Get total number of module slots.
void setModuleHoleSize(double hsize)
Set size of module hole in support plate.
unsigned getSlotRing(unsigned slotID) const
Get ring number of slot with slot ID.
bool isConsistent() const override
Check if parameters are consistent.
double m_supportZPosition
Z position of support plate (position of center of support tube, with Z length of: support plate thic...
double getSupportBackWallHeight() const
Get height of the aluminum walls between modules on the electronics side of aluminum support plate.
double getSlotR(unsigned modID) const
Get radial position of module with given module ID number.
double getSupportBackWallThickness() const
Get thickness of aluminum walls between modules on the electronics side of aluminum support plate.
double m_innerR
inner radius of support plate
double getSupportThickness() const
Get support plate thickness.
unsigned getNRings() const
Get number of module slot rings.
double getSupportOuterR() const
Get support plate outer radius.
void setRingPar(const std::vector< std::pair< double, double > > &ringPar)
Set parameters of module slot rings (r of center of slots in ring, phi (angle) distance between modul...
void setSupportBackWallHeight(double h)
Set height of the aluminum walls between modules on the electronics side of aluminum support plate.
double m_moduleHoleSize
size of module hole in support plate
unsigned pointSlotID(double x, double y) const
Get slot ID based on x-y coordinates.
ARICHGeoDetectorPlane()
Default constructor.
double getSupportZPosition() const
Get Z position of support plate (start point in Z).
double m_ry
rotation around y axis
std::string m_supportMaterial
support structure material
void addSupportPlate(double inR, double outR, double thick, const std::string &material)
Set parameters of the support plate.
void print(const std::string &title="Detector plane parameters") const override
Print the content of the class.
double getRingDPhi(unsigned iRing) const
Get phi (angle) distance between module slots in i-th ring.
ROOT::Math::Rotation3D getRotation() const
Get rotation matrix.
double m_x
x position in local ARICH volume
double getRotationY() const
Get angle of rotation around Y axis.
double getRotationZ() const
Get angle of rotation around Z axis.
double getSlotPhi(unsigned modID) const
Get phi (angle) position of module with given module ID number.
double m_thickness
thickness of support plate
double getModuleHoleSize() const
Get size of module hole in support plate.
std::vector< std::pair< double, double > > m_slotPar
parameters of all module slots (radius, phi)
ClassDefOverride(ARICHGeoDetectorPlane, 1)
ClassDef.
void setSupportZPosition(double zPosition)
Set Z position of the aluminum support plate (start Z).
const std::string & getSupportMaterial() const
Get material of support plate.
std::vector< std::pair< double, double > > m_ringPar
parameters of module rings (radius, dPhi)
unsigned m_nSlots
number of HAPD module slots
double m_supportBackWallThickness
< thickness of aluminum walls on the back side (electronics side) of support plate
double m_outerR
outer radius of support plate
void setSupportBackWallThickness(double d)
Set thickness of the aluminum walls between modules on the electronics side of the aluminum support p...
ROOT::Math::XYZVector getPosition() const
Get center point.
double getSupportInnerR() const
Get support plate inner radius.
unsigned m_nRings
number of HAPD module rings
double m_z
z position in local ARICH volume (position of center of detector plane tube, with Z length of: module...
void setPlacement(double x, double y, double z, double rx, double ry, double rz)
Set detector plane positioning within ARICH local volume.
double m_rz
rotation around z axis
double m_y
y position in local ARICH volume
unsigned getSlotIDFromSRF(unsigned sector, unsigned ring, unsigned azimuth) const
Get slot ID based on sector, ring, and azimuth.
double getRingR(unsigned iRing) const
Get radius of i-th module slot ring (radius of center point).
double m_rx
rotation around x axis
double m_supportBackWallHeight
height of aluminum walls on the back side (electronics side) of support plate
double getRotationX() const
Get angle of rotation around X axis.
Abstract base class for different kinds of events.