Belle II Software  release-05-01-25
TOPGeoPMT.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <top/dbobjects/TOPGeoBase.h>
14 #include <geometry/dbobjects/GeoOpticalSurface.h>
15 #include <string>
16 
17 namespace Belle2 {
26  class TOPGeoPMT: public TOPGeoBase {
27  public:
28 
32  TOPGeoPMT()
33  {}
34 
42  TOPGeoPMT(double sizeX, double sizeY, double sizeZ,
43  const std::string& name = "TOPPMT"):
44  TOPGeoBase(name), m_sizeX(sizeX), m_sizeY(sizeY), m_sizeZ(sizeZ)
45  {}
46 
51  void setWallThickness(double thickness) {m_wallThickness = thickness;}
52 
57  void setWallMaterial(const std::string& material) {m_wallMaterial = material;}
58 
63  void setFillMaterial(const std::string& material) {m_fillMaterial = material;}
64 
72  void setSensVolume(double sizeX, double sizeY, double thickness,
73  const std::string& material)
74  {
75  m_sensSizeX = sizeX;
76  m_sensSizeY = sizeY;
77  m_sensThickness = thickness;
78  m_sensMaterial = material;
79  }
80 
86  void setNumPixels(unsigned numColumns, unsigned numRows)
87  {
88  m_numColumns = numColumns;
89  m_numRows = numRows;
90  }
91 
97  void setWindow(double thickness, const std::string& material)
98  {
99  m_winThickness = thickness;
100  m_winMaterial = material;
101  }
102 
108  void setBottom(double thickness, const std::string& material)
109  {
110  m_botThickness = thickness;
111  m_botMaterial = material;
112  }
113 
120  void setReflEdge(double width, double thickness, const GeoOpticalSurface& surf)
121  {
122  m_reflEdgeWidth = width;
123  m_reflEdgeThickness = thickness;
124  m_reflEdgeSurface = surf;
125  }
126 
131  double getSizeX() const {return m_sizeX / s_unit;}
132 
137  double getSizeY() const {return m_sizeY / s_unit;}
138 
143  double getSizeZ() const {return m_sizeZ / s_unit;}
144 
149  double getWallThickness() const {return m_wallThickness / s_unit;}
150 
155  const std::string& getWallMaterial() const {return m_wallMaterial;}
156 
161  const std::string& getFillMaterial() const {return m_fillMaterial;}
162 
167  double getSensSizeX() const {return m_sensSizeX / s_unit;}
168 
173  double getSensSizeY() const {return m_sensSizeY / s_unit;}
174 
179  double getSensThickness() const {return m_sensThickness / s_unit;}
180 
185  unsigned getNumColumns() const {return m_numColumns;}
186 
191  unsigned getNumRows() const {return m_numRows;}
192 
197  unsigned getNumPixels() const {return m_numColumns * m_numRows;}
198 
203  const std::string& getSensMaterial() const {return m_sensMaterial;}
204 
209  double getWinThickness() const {return m_winThickness / s_unit;}
210 
215  const std::string& getWinMaterial() const {return m_winMaterial;}
216 
221  double getBotThickness() const {return m_botThickness / s_unit;}
222 
227  const std::string& getBotMaterial() const {return m_botMaterial;}
228 
233  double getReflEdgeWidth() const {return m_reflEdgeWidth / s_unit;}
234 
239  double getReflEdgeThickness() const {return m_reflEdgeThickness / s_unit;}
240 
245  const GeoOpticalSurface& getReflEdgeSurface() const {return m_reflEdgeSurface;}
246 
252  unsigned getPixelColumn(double x) const;
253 
259  unsigned getPixelRow(double y) const;
260 
267  unsigned getPixelID(double x, double y) const;
268 
273  bool isConsistent() const override;
274 
279  void print(const std::string& title = "MCP-PMT geometry parameters") const override;
280 
281  private:
282 
283  float m_sizeX = 0;
284  float m_sizeY = 0;
285  float m_sizeZ = 0;
286  float m_wallThickness = 0;
287  std::string m_wallMaterial;
288  std::string m_fillMaterial;
290  float m_sensSizeX = 0;
291  float m_sensSizeY = 0;
292  float m_sensThickness = 0;
293  unsigned m_numColumns = 0;
294  unsigned m_numRows = 0;
295  std::string m_sensMaterial;
297  float m_winThickness = 0;
298  std::string m_winMaterial;
300  float m_botThickness = 0;
301  std::string m_botMaterial;
303  float m_reflEdgeWidth = 0;
304  float m_reflEdgeThickness = 0;
309  };
310 
312 } // end namespace Belle2
Belle2::TOPGeoPMT::getNumColumns
unsigned getNumColumns() const
Returns number of pixel columns.
Definition: TOPGeoPMT.h:193
Belle2::TOPGeoPMT::getSensSizeX
double getSensSizeX() const
Returns sensitive volume (photo-cathode) size in x.
Definition: TOPGeoPMT.h:175
Belle2::TOPGeoPMT
Geometry parameters of MCP-PMT.
Definition: TOPGeoPMT.h:34
Belle2::TOPGeoPMT::getFillMaterial
const std::string & getFillMaterial() const
Returns fill (inside) material name.
Definition: TOPGeoPMT.h:169
Belle2::TOPGeoPMT::getSensThickness
double getSensThickness() const
Returns sensitive volume (photo-cathode) thickness.
Definition: TOPGeoPMT.h:187
Belle2::TOPGeoPMT::m_sensMaterial
std::string m_sensMaterial
sensitive material
Definition: TOPGeoPMT.h:303
Belle2::TOPGeoPMT::getBotMaterial
const std::string & getBotMaterial() const
Returns bottom material name.
Definition: TOPGeoPMT.h:235
Belle2::TOPGeoPMT::TOPGeoPMT
TOPGeoPMT()
Default constructor.
Definition: TOPGeoPMT.h:40
Belle2::TOPGeoPMT::ClassDefOverride
ClassDefOverride(TOPGeoPMT, 1)
ClassDef.
Belle2::TOPGeoPMT::setWindow
void setWindow(double thickness, const std::string &material)
Sets entrance window.
Definition: TOPGeoPMT.h:105
Belle2::TOPGeoPMT::getWallThickness
double getWallThickness() const
Returns wall thickness.
Definition: TOPGeoPMT.h:157
Belle2::TOPGeoPMT::getPixelRow
unsigned getPixelRow(double y) const
Converts y-coordinate to pixel row (1-based)
Definition: TOPGeoPMT.cc:30
Belle2::TOPGeoPMT::m_winMaterial
std::string m_winMaterial
window material
Definition: TOPGeoPMT.h:306
Belle2::TOPGeoBase
Base class for geometry parameters.
Definition: TOPGeoBase.h:35
Belle2::TOPGeoPMT::m_botThickness
float m_botThickness
bottom thickness
Definition: TOPGeoPMT.h:308
Belle2::TOPGeoPMT::getWinMaterial
const std::string & getWinMaterial() const
Returns entrance window material name.
Definition: TOPGeoPMT.h:223
Belle2::TOPGeoPMT::m_wallMaterial
std::string m_wallMaterial
casing material
Definition: TOPGeoPMT.h:295
Belle2::TOPGeoPMT::m_winThickness
float m_winThickness
window thickness
Definition: TOPGeoPMT.h:305
Belle2::TOPGeoPMT::getNumPixels
unsigned getNumPixels() const
Returns number of pixels.
Definition: TOPGeoPMT.h:205
Belle2::TOPGeoPMT::getSizeY
double getSizeY() const
Returns full size in y.
Definition: TOPGeoPMT.h:145
Belle2::TOPGeoPMT::getSizeX
double getSizeX() const
Returns full size in x.
Definition: TOPGeoPMT.h:139
Belle2::TOPGeoPMT::m_sensSizeY
float m_sensSizeY
sensitive volume (photo-cathode) size in y
Definition: TOPGeoPMT.h:299
Belle2::TOPGeoPMT::getPixelID
unsigned getPixelID(double x, double y) const
Converts x and y coordinates to PMT pixel ID (1-based)
Definition: TOPGeoPMT.cc:36
Belle2::TOPGeoPMT::m_wallThickness
float m_wallThickness
side wall thickness
Definition: TOPGeoPMT.h:294
Belle2::TOPGeoPMT::setWallThickness
void setWallThickness(double thickness)
Sets wall thickness.
Definition: TOPGeoPMT.h:59
Belle2::TOPGeoPMT::m_sensThickness
float m_sensThickness
sensitive volume (photo-cathode) thickness
Definition: TOPGeoPMT.h:300
Belle2::TOPGeoPMT::m_reflEdgeSurface
GeoOpticalSurface m_reflEdgeSurface
reflective edge optical surface
Definition: TOPGeoPMT.h:313
Belle2::TOPGeoPMT::setBottom
void setBottom(double thickness, const std::string &material)
Sets bottom.
Definition: TOPGeoPMT.h:116
Belle2::TOPGeoPMT::getPixelColumn
unsigned getPixelColumn(double x) const
Converts x-coordinate to pixel column (1-based)
Definition: TOPGeoPMT.cc:23
Belle2::TOPGeoPMT::getBotThickness
double getBotThickness() const
Returns bottom thickness.
Definition: TOPGeoPMT.h:229
Belle2::TOPGeoPMT::getWinThickness
double getWinThickness() const
Returns entrance window thickness.
Definition: TOPGeoPMT.h:217
Belle2::TOPGeoPMT::m_sensSizeX
float m_sensSizeX
sensitive volume (photo-cathode) size in x
Definition: TOPGeoPMT.h:298
Belle2::TOPGeoPMT::getReflEdgeSurface
const GeoOpticalSurface & getReflEdgeSurface() const
Returns reflective edge optical surface.
Definition: TOPGeoPMT.h:253
Belle2::GeoOpticalSurface
Represent an optical finish of a surface.
Definition: GeoOpticalSurface.h:31
Belle2::TOPGeoPMT::setWallMaterial
void setWallMaterial(const std::string &material)
Sets casing material.
Definition: TOPGeoPMT.h:65
Belle2::TOPGeoPMT::m_fillMaterial
std::string m_fillMaterial
inside material
Definition: TOPGeoPMT.h:296
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPGeoPMT::setNumPixels
void setNumPixels(unsigned numColumns, unsigned numRows)
Sets number of pixel rows and columns.
Definition: TOPGeoPMT.h:94
Belle2::TOPGeoPMT::getReflEdgeWidth
double getReflEdgeWidth() const
Returns reflective edge width.
Definition: TOPGeoPMT.h:241
Belle2::TOPGeoBase::s_unit
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:96
Belle2::TOPGeoPMT::m_reflEdgeWidth
float m_reflEdgeWidth
reflective edge width
Definition: TOPGeoPMT.h:311
Belle2::TOPGeoPMT::setReflEdge
void setReflEdge(double width, double thickness, const GeoOpticalSurface &surf)
Sets reflective edge.
Definition: TOPGeoPMT.h:128
Belle2::TOPGeoPMT::getWallMaterial
const std::string & getWallMaterial() const
Returns wall (casing) material name.
Definition: TOPGeoPMT.h:163
Belle2::TOPGeoPMT::getReflEdgeThickness
double getReflEdgeThickness() const
Returns reflective edge thickness.
Definition: TOPGeoPMT.h:247
Belle2::TOPGeoPMT::m_numRows
unsigned m_numRows
number of pixel rows
Definition: TOPGeoPMT.h:302
Belle2::TOPGeoPMT::isConsistent
bool isConsistent() const override
Check for consistency of data members.
Definition: TOPGeoPMT.cc:46
Belle2::TOPGeoPMT::m_sizeY
float m_sizeY
full size in y
Definition: TOPGeoPMT.h:292
Belle2::TOPGeoPMT::m_botMaterial
std::string m_botMaterial
bottom material
Definition: TOPGeoPMT.h:309
Belle2::TOPGeoPMT::print
void print(const std::string &title="MCP-PMT geometry parameters") const override
Print the content of the class.
Definition: TOPGeoPMT.cc:73
Belle2::TOPGeoPMT::getSizeZ
double getSizeZ() const
Returns full size in z.
Definition: TOPGeoPMT.h:151
Belle2::TOPGeoPMT::getSensSizeY
double getSensSizeY() const
Returns sensitive volume (photo-cathode) size in y.
Definition: TOPGeoPMT.h:181
Belle2::TOPGeoPMT::setSensVolume
void setSensVolume(double sizeX, double sizeY, double thickness, const std::string &material)
Sets sensitive volume (photo-cathode)
Definition: TOPGeoPMT.h:80
Belle2::TOPGeoPMT::m_numColumns
unsigned m_numColumns
number of pixel columns
Definition: TOPGeoPMT.h:301
Belle2::TOPGeoPMT::getSensMaterial
const std::string & getSensMaterial() const
Returns sensitive material name.
Definition: TOPGeoPMT.h:211
Belle2::TOPGeoPMT::setFillMaterial
void setFillMaterial(const std::string &material)
Sets inside material.
Definition: TOPGeoPMT.h:71
Belle2::TOPGeoPMT::m_sizeZ
float m_sizeZ
full size in z
Definition: TOPGeoPMT.h:293
Belle2::TOPGeoPMT::getNumRows
unsigned getNumRows() const
Returns number of pixel rows.
Definition: TOPGeoPMT.h:199
Belle2::TOPGeoPMT::m_sizeX
float m_sizeX
full size in x
Definition: TOPGeoPMT.h:291
Belle2::TOPGeoPMT::m_reflEdgeThickness
float m_reflEdgeThickness
reflective edge thickness
Definition: TOPGeoPMT.h:312