Belle II Software  release-08-01-10
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 <TVector3.h>
15 #include <TRotation.h>
16 
17 
18 namespace Belle2 {
28 
29  public:
30 
35  {};
36 
37 
42  bool isConsistent() const override;
43 
48  void print(const std::string& title = "Detector plane parameters") const override;
49 
59  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;}
60 
68  void addSupportPlate(double inR, double outR, double thick, const std::string& material)
69  {
70  m_innerR = inR;
71  m_outerR = outR;
72  m_thickness = thick;
73  m_supportMaterial = material;
74  };
75 
80  void setModuleHoleSize(double hsize) {m_moduleHoleSize = hsize;}
81 
88 
95 
100  void setSupportZPosition(double zPosition) { m_supportZPosition = zPosition; }
101 
106  void setRingPar(const std::vector<std::pair<double, double>>& ringPar);
107 
112  TVector3 getPosition() const {return TVector3(m_x / s_unit, m_y / s_unit, m_z / s_unit);}
113 
118  TRotation getRotation() const
119  {
120  TRotation rot;
121  rot.RotateX(m_rx).RotateY(m_ry).RotateZ(m_rz);
122  return rot;
123  }
124 
129  double getRotationX() const {return m_rx;}
130 
135  double getRotationY() const {return m_ry;}
136 
141  double getRotationZ() const {return m_rz;}
142 
147  double getSupportInnerR() const {return m_innerR / s_unit;};
148 
153  double getSupportOuterR() const {return m_outerR / s_unit;};
154 
159  double getSupportThickness() const {return m_thickness / s_unit;};
160 
165  double getSupportZPosition() const {return m_supportZPosition / s_unit;};
166 
171  double getModuleHoleSize() const {return m_moduleHoleSize / s_unit;};
172 
179 
186 
191  const std::string& getSupportMaterial() const {return m_supportMaterial;}
192 
198  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;}
199 
205  double getRingDPhi(unsigned iRing) const { if (iRing == 0 || iRing > m_nRings) B2ERROR("ARICHGeoDetectorPlane: invalid module ring number!"); return m_ringPar[iRing - 1].second;}
206 
212  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;};
213 
219  double getSlotPhi(unsigned modID) const { if (modID == 0 || modID > m_nSlots) B2ERROR("ARICHGeoDetectorPlane: invalid module ID number!"); return m_slotPar[modID - 1].second;};
220 
225  unsigned getNSlots() const {return m_nSlots;}
226 
231  unsigned getNRings() const {return m_nRings;}
232 
238  unsigned getSlotRing(unsigned slotID) const;
239 
240  unsigned pointSlotID(double x, double y) const;
241 
242  unsigned getSlotIDFromSRF(unsigned sector, unsigned ring, unsigned azimuth) const;
243 
244  private:
245 
246  std::vector<std::pair<double, double>> m_ringPar;
248  std::vector<std::pair<double, double>> m_slotPar;
250  // detector plane position in local ARICH volume
251  double m_x = 0;
252  double m_y = 0;
253  double m_z =
254  0;
256  // rotations in local ARICH volume
257  double m_rx = 0;
258  double m_ry = 0;
259  double m_rz = 0;
261  // support structure parameters
262  std::string m_supportMaterial;
263  double m_innerR = 0;
264  double m_outerR = 0;
265  double m_thickness = 0;
266  double m_moduleHoleSize = 0;
271  0;
273  unsigned m_nRings = 0;
274  unsigned m_nSlots = 0;
278  };
279 
281 } // 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 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
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.
TRotation getRotation() const
Get rotation matrix.
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.
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.
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...
std::vector< std::pair< double, double > > m_slotPar
parameters of all module slots (radius, phi)
const std::string & getSupportMaterial() const
Get material of support plate.
ClassDefOverride(ARICHGeoDetectorPlane, 1)
ClassDef.
void setSupportZPosition(double zPosition)
Set Z position of the aluminum support plate (start Z)
TVector3 getPosition() const
Get center point.
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...
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
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.