Belle II Software  release-05-01-25
ARICHGeoDetectorPlane.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/logging/Logger.h>
14 #include <arich/dbobjects/ARICHGeoBase.h>
15 #include <string>
16 #include <TVector3.h>
17 #include <TRotation.h>
18 
19 
20 namespace Belle2 {
29  class ARICHGeoDetectorPlane: public ARICHGeoBase {
30 
31  public:
32 
37  {};
38 
39 
44  bool isConsistent() const override;
45 
50  void print(const std::string& title = "Detector plane parameters") const override;
51 
61  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;}
62 
70  void addSupportPlate(double inR, double outR, double thick, const std::string& material)
71  {
72  m_innerR = inR;
73  m_outerR = outR;
74  m_thickness = thick;
75  m_supportMaterial = material;
76  };
77 
82  void setModuleHoleSize(double hsize) {m_moduleHoleSize = hsize;}
83 
90 
97 
102  void setSupportZPosition(double zPosition) { m_supportZPosition = zPosition; }
103 
108  void setRingPar(const std::vector<std::pair<double, double>>& ringPar);
109 
114  TVector3 getPosition() const {return TVector3(m_x / s_unit, m_y / s_unit, m_z / s_unit);}
115 
120  TRotation getRotation() const
121  {
122  TRotation rot;
123  rot.RotateX(m_rx).RotateY(m_ry).RotateZ(m_rz);
124  return rot;
125  }
126 
131  double getRotationX() const {return m_rx;}
132 
137  double getRotationY() const {return m_ry;}
138 
143  double getRotationZ() const {return m_rz;}
144 
149  double getSupportInnerR() const {return m_innerR / s_unit;};
150 
155  double getSupportOuterR() const {return m_outerR / s_unit;};
156 
161  double getSupportThickness() const {return m_thickness / s_unit;};
162 
167  double getSupportZPosition() const {return m_supportZPosition / s_unit;};
168 
173  double getModuleHoleSize() const {return m_moduleHoleSize / s_unit;};
174 
180  double getSupportBackWallHeight() const {return m_supportBackWallHeight / s_unit;};
181 
188 
193  const std::string& getSupportMaterial() const {return m_supportMaterial;}
194 
200  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;}
201 
207  double getRingDPhi(unsigned iRing) const { if (iRing == 0 || iRing > m_nRings) B2ERROR("ARICHGeoDetectorPlane: invalid module ring number!"); return m_ringPar[iRing - 1].second;}
208 
214  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;};
215 
221  double getSlotPhi(unsigned modID) const { if (modID == 0 || modID > m_nSlots) B2ERROR("ARICHGeoDetectorPlane: invalid module ID number!"); return m_slotPar[modID - 1].second;};
222 
227  unsigned getNSlots() const {return m_nSlots;}
228 
233  unsigned getNRings() const {return m_nRings;}
234 
240  unsigned getSlotRing(unsigned slotID) const;
241 
242  unsigned pointSlotID(double x, double y) const;
243 
244  unsigned getSlotIDFromSRF(unsigned sector, unsigned ring, unsigned azimuth) const;
245 
246  private:
247 
248  std::vector<std::pair<double, double>> m_ringPar;
250  std::vector<std::pair<double, double>> m_slotPar;
252  // detector plane position in local ARICH volume
253  double m_x = 0;
254  double m_y = 0;
255  double m_z =
256  0;
258  // rotations in local ARICH volume
259  double m_rx = 0;
260  double m_ry = 0;
261  double m_rz = 0;
263  // support structure parameters
264  std::string m_supportMaterial;
265  double m_innerR = 0;
266  double m_outerR = 0;
267  double m_thickness = 0;
268  double m_moduleHoleSize = 0;
270  double m_supportBackWallThickness = 0;
273  0;
275  unsigned m_nRings = 0;
276  unsigned m_nSlots = 0;
280  };
281 
283 } // end namespace Belle2
Belle2::ARICHGeoDetectorPlane::getRotationY
double getRotationY() const
Get angle of rotation around Y axis.
Definition: ARICHGeoDetectorPlane.h:145
Belle2::ARICHGeoDetectorPlane::getRotationZ
double getRotationZ() const
Get angle of rotation around Z axis.
Definition: ARICHGeoDetectorPlane.h:151
Belle2::ARICHGeoDetectorPlane::getSlotR
double getSlotR(unsigned modID) const
Get radial position of module with given module ID number.
Definition: ARICHGeoDetectorPlane.h:222
Belle2::ARICHGeoDetectorPlane::m_supportBackWallThickness
double m_supportBackWallThickness
< thickness of aluminum walls on the back side (electronics side) of support plate
Definition: ARICHGeoDetectorPlane.h:278
Belle2::ARICHGeoDetectorPlane::m_rz
double m_rz
rotation around z axis
Definition: ARICHGeoDetectorPlane.h:269
Belle2::ARICHGeoDetectorPlane::ARICHGeoDetectorPlane
ARICHGeoDetectorPlane()
Default constructor.
Definition: ARICHGeoDetectorPlane.h:44
Belle2::ARICHGeoDetectorPlane::setSupportZPosition
void setSupportZPosition(double zPosition)
Set Z position of the aluminum support plate (start Z)
Definition: ARICHGeoDetectorPlane.h:110
Belle2::ARICHGeoDetectorPlane::print
void print(const std::string &title="Detector plane parameters") const override
Print the content of the class.
Definition: ARICHGeoDetectorPlane.cc:99
Belle2::ARICHGeoDetectorPlane::setModuleHoleSize
void setModuleHoleSize(double hsize)
Set size of module hole in support plate.
Definition: ARICHGeoDetectorPlane.h:90
Belle2::ARICHGeoDetectorPlane::m_slotPar
std::vector< std::pair< double, double > > m_slotPar
parameters of all module slots (radius, phi)
Definition: ARICHGeoDetectorPlane.h:258
Belle2::ARICHGeoDetectorPlane::getNRings
unsigned getNRings() const
Get number of module slot rings.
Definition: ARICHGeoDetectorPlane.h:241
Belle2::ARICHGeoDetectorPlane::getRotation
TRotation getRotation() const
Get rotation matrix.
Definition: ARICHGeoDetectorPlane.h:128
Belle2::ARICHGeoDetectorPlane::m_z
double m_z
z position in local ARICH volume (position of center of detector plane tube, with Z length of: module...
Definition: ARICHGeoDetectorPlane.h:263
Belle2::ARICHGeoDetectorPlane::getModuleHoleSize
double getModuleHoleSize() const
Get size of module hole in support plate.
Definition: ARICHGeoDetectorPlane.h:181
Belle2::ARICHGeoDetectorPlane::m_x
double m_x
x position in local ARICH volume
Definition: ARICHGeoDetectorPlane.h:261
Belle2::ARICHGeoDetectorPlane::m_ry
double m_ry
rotation around y axis
Definition: ARICHGeoDetectorPlane.h:268
Belle2::ARICHGeoDetectorPlane::getSupportInnerR
double getSupportInnerR() const
Get support plate inner radius.
Definition: ARICHGeoDetectorPlane.h:157
Belle2::ARICHGeoDetectorPlane::getSupportOuterR
double getSupportOuterR() const
Get support plate outer radius.
Definition: ARICHGeoDetectorPlane.h:163
Belle2::ARICHGeoDetectorPlane::addSupportPlate
void addSupportPlate(double inR, double outR, double thick, const std::string &material)
Set parameters of the support plate.
Definition: ARICHGeoDetectorPlane.h:78
Belle2::ARICHGeoDetectorPlane::getRingDPhi
double getRingDPhi(unsigned iRing) const
Get phi (angle) distance between module slots in i-th ring.
Definition: ARICHGeoDetectorPlane.h:215
Belle2::ARICHGeoDetectorPlane::m_supportBackWallHeight
double m_supportBackWallHeight
height of aluminum walls on the back side (electronics side) of support plate
Definition: ARICHGeoDetectorPlane.h:277
Belle2::ARICHGeoDetectorPlane::getRingR
double getRingR(unsigned iRing) const
Get radius of i-th module slot ring (radius of center point)
Definition: ARICHGeoDetectorPlane.h:208
Belle2::ARICHGeoDetectorPlane::m_y
double m_y
y position in local ARICH volume
Definition: ARICHGeoDetectorPlane.h:262
Belle2::ARICHGeoBase::s_unit
static double s_unit
conversion unit for length
Definition: ARICHGeoBase.h:93
Belle2::ARICHGeoDetectorPlane::m_thickness
double m_thickness
thickness of support plate
Definition: ARICHGeoDetectorPlane.h:275
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHGeoDetectorPlane::setRingPar
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...
Definition: ARICHGeoDetectorPlane.cc:18
Belle2::ARICHGeoDetectorPlane::m_supportZPosition
double m_supportZPosition
Z position of support plate (position of center of support tube, with Z length of: support plate thic...
Definition: ARICHGeoDetectorPlane.h:280
Belle2::ARICHGeoDetectorPlane::getSupportThickness
double getSupportThickness() const
Get support plate thickness.
Definition: ARICHGeoDetectorPlane.h:169
Belle2::ARICHGeoDetectorPlane::m_innerR
double m_innerR
inner radius of support plate
Definition: ARICHGeoDetectorPlane.h:273
Belle2::ARICHGeoDetectorPlane::isConsistent
bool isConsistent() const override
Check if parameters are consistent.
Definition: ARICHGeoDetectorPlane.cc:71
Belle2::ARICHGeoDetectorPlane::setSupportBackWallHeight
void setSupportBackWallHeight(double h)
Set height of the aluminum walls between modules on the electronics side of aluminum support plate.
Definition: ARICHGeoDetectorPlane.h:97
Belle2::ARICHGeoDetectorPlane::getRotationX
double getRotationX() const
Get angle of rotation around X axis.
Definition: ARICHGeoDetectorPlane.h:139
Belle2::ARICHGeoDetectorPlane::setPlacement
void setPlacement(double x, double y, double z, double rx, double ry, double rz)
Set detector plane positioning within ARICH local volume.
Definition: ARICHGeoDetectorPlane.h:69
Belle2::ARICHGeoDetectorPlane::m_moduleHoleSize
double m_moduleHoleSize
size of module hole in support plate
Definition: ARICHGeoDetectorPlane.h:276
Belle2::ARICHGeoDetectorPlane
Geometry parameters of ARICH photon detector plane.
Definition: ARICHGeoDetectorPlane.h:37
Belle2::ARICHGeoDetectorPlane::getSupportBackWallHeight
double getSupportBackWallHeight() const
Get height of the aluminum walls between modules on the electronics side of aluminum support plate.
Definition: ARICHGeoDetectorPlane.h:188
Belle2::ARICHGeoDetectorPlane::getSlotRing
unsigned getSlotRing(unsigned slotID) const
Get ring number of slot with slot ID.
Definition: ARICHGeoDetectorPlane.cc:35
Belle2::ARICHGeoDetectorPlane::getPosition
TVector3 getPosition() const
Get center point.
Definition: ARICHGeoDetectorPlane.h:122
Belle2::ARICHGeoDetectorPlane::m_supportMaterial
std::string m_supportMaterial
support structure material
Definition: ARICHGeoDetectorPlane.h:272
Belle2::ARICHGeoDetectorPlane::m_nSlots
unsigned m_nSlots
number of HAPD module slots
Definition: ARICHGeoDetectorPlane.h:284
Belle2::ARICHGeoDetectorPlane::getNSlots
unsigned getNSlots() const
Get total number of module slots.
Definition: ARICHGeoDetectorPlane.h:235
Belle2::ARICHGeoDetectorPlane::m_rx
double m_rx
rotation around x axis
Definition: ARICHGeoDetectorPlane.h:267
Belle2::ARICHGeoDetectorPlane::m_nRings
unsigned m_nRings
number of HAPD module rings
Definition: ARICHGeoDetectorPlane.h:283
Belle2::ARICHGeoDetectorPlane::setSupportBackWallThickness
void setSupportBackWallThickness(double d)
Set thickness of the aluminum walls between modules on the electronics side of the aluminum support p...
Definition: ARICHGeoDetectorPlane.h:104
Belle2::ARICHGeoDetectorPlane::getSupportMaterial
const std::string & getSupportMaterial() const
Get material of support plate.
Definition: ARICHGeoDetectorPlane.h:201
Belle2::ARICHGeoDetectorPlane::getSupportZPosition
double getSupportZPosition() const
Get Z position of support plate (start point in Z)
Definition: ARICHGeoDetectorPlane.h:175
Belle2::ARICHGeoDetectorPlane::getSlotPhi
double getSlotPhi(unsigned modID) const
Get phi (angle) position of module with given module ID number.
Definition: ARICHGeoDetectorPlane.h:229
Belle2::ARICHGeoDetectorPlane::m_outerR
double m_outerR
outer radius of support plate
Definition: ARICHGeoDetectorPlane.h:274
Belle2::ARICHGeoDetectorPlane::ClassDefOverride
ClassDefOverride(ARICHGeoDetectorPlane, 1)
ClassDef.
Belle2::ARICHGeoDetectorPlane::getSupportBackWallThickness
double getSupportBackWallThickness() const
Get thickness of aluminum walls between modules on the electronics side of aluminum support plate.
Definition: ARICHGeoDetectorPlane.h:195
Belle2::ARICHGeoDetectorPlane::m_ringPar
std::vector< std::pair< double, double > > m_ringPar
parameters of module rings (radius, dPhi)
Definition: ARICHGeoDetectorPlane.h:256