Belle II Software development
TOPGeoPMT.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 <top/dbobjects/TOPGeoBase.h>
12#include <geometry/dbobjects/GeoOpticalSurface.h>
13#include <string>
14
15namespace Belle2 {
24 class TOPGeoPMT: public TOPGeoBase {
25 public:
26
31 {}
32
40 TOPGeoPMT(double sizeX, double sizeY, double sizeZ,
41 const std::string& name = "TOPPMT"):
42 TOPGeoBase(name), m_sizeX(sizeX), m_sizeY(sizeY), m_sizeZ(sizeZ)
43 {}
44
49 void setWallThickness(double thickness) {m_wallThickness = thickness;}
50
55 void setWallMaterial(const std::string& material) {m_wallMaterial = material;}
56
61 void setFillMaterial(const std::string& material) {m_fillMaterial = material;}
62
70 void setSensVolume(double sizeX, double sizeY, double thickness,
71 const std::string& material)
72 {
73 m_sensSizeX = sizeX;
74 m_sensSizeY = sizeY;
75 m_sensThickness = thickness;
76 m_sensMaterial = material;
77 }
78
84 void setNumPixels(unsigned numColumns, unsigned numRows)
85 {
86 m_numColumns = numColumns;
87 m_numRows = numRows;
88 }
89
95 void setWindow(double thickness, const std::string& material)
96 {
97 m_winThickness = thickness;
98 m_winMaterial = material;
99 }
100
106 void setBottom(double thickness, const std::string& material)
107 {
108 m_botThickness = thickness;
109 m_botMaterial = material;
110 }
111
118 void setReflEdge(double width, double thickness, const GeoOpticalSurface& surf)
119 {
120 m_reflEdgeWidth = width;
121 m_reflEdgeThickness = thickness;
122 m_reflEdgeSurface = surf;
123 }
124
129 double getSizeX() const {return m_sizeX / s_unit;}
130
135 double getSizeY() const {return m_sizeY / s_unit;}
136
141 double getSizeZ() const {return m_sizeZ / s_unit;}
142
147 double getWallThickness() const {return m_wallThickness / s_unit;}
148
153 const std::string& getWallMaterial() const {return m_wallMaterial;}
154
159 const std::string& getFillMaterial() const {return m_fillMaterial;}
160
165 double getSensSizeX() const {return m_sensSizeX / s_unit;}
166
171 double getSensSizeY() const {return m_sensSizeY / s_unit;}
172
177 double getSensThickness() const {return m_sensThickness / s_unit;}
178
183 unsigned getNumColumns() const {return m_numColumns;}
184
189 unsigned getNumRows() const {return m_numRows;}
190
195 unsigned getNumPixels() const {return m_numColumns * m_numRows;}
196
201 const std::string& getSensMaterial() const {return m_sensMaterial;}
202
207 double getWinThickness() const {return m_winThickness / s_unit;}
208
213 const std::string& getWinMaterial() const {return m_winMaterial;}
214
219 double getBotThickness() const {return m_botThickness / s_unit;}
220
225 const std::string& getBotMaterial() const {return m_botMaterial;}
226
231 double getReflEdgeWidth() const {return m_reflEdgeWidth / s_unit;}
232
238
244
250 unsigned getPixelColumn(double x) const;
251
257 unsigned getPixelRow(double y) const;
258
265 unsigned getPixelID(double x, double y) const;
266
272 double getX(unsigned col) const;
273
279 double getY(unsigned row) const;
280
285 double getDx() const {return getSensSizeX() / m_numColumns;}
286
291 double getDy() const {return getSensSizeY() / m_numRows;}
292
297 bool isConsistent() const override;
298
303 void print(const std::string& title = "MCP-PMT geometry parameters") const override;
304
305 private:
306
307 float m_sizeX = 0;
308 float m_sizeY = 0;
309 float m_sizeZ = 0;
310 float m_wallThickness = 0;
311 std::string m_wallMaterial;
312 std::string m_fillMaterial;
314 float m_sensSizeX = 0;
315 float m_sensSizeY = 0;
316 float m_sensThickness = 0;
317 unsigned m_numColumns = 0;
318 unsigned m_numRows = 0;
319 std::string m_sensMaterial;
321 float m_winThickness = 0;
322 std::string m_winMaterial;
324 float m_botThickness = 0;
325 std::string m_botMaterial;
327 float m_reflEdgeWidth = 0;
333 };
334
336} // end namespace Belle2
Represent an optical finish of a surface.
Base class for geometry parameters.
Definition: TOPGeoBase.h:25
Geometry parameters of MCP-PMT.
Definition: TOPGeoPMT.h:24
double getSizeZ() const
Returns full size in z.
Definition: TOPGeoPMT.h:141
unsigned getNumColumns() const
Returns number of pixel columns.
Definition: TOPGeoPMT.h:183
unsigned m_numColumns
number of pixel columns
Definition: TOPGeoPMT.h:317
float m_wallThickness
side wall thickness
Definition: TOPGeoPMT.h:310
float m_sensSizeX
sensitive volume (photo-cathode) size in x
Definition: TOPGeoPMT.h:314
std::string m_wallMaterial
casing material
Definition: TOPGeoPMT.h:311
float m_sizeX
full size in x
Definition: TOPGeoPMT.h:307
double getReflEdgeThickness() const
Returns reflective edge thickness.
Definition: TOPGeoPMT.h:237
double getDx() const
Returns pixel size in x.
Definition: TOPGeoPMT.h:285
const std::string & getSensMaterial() const
Returns sensitive material name.
Definition: TOPGeoPMT.h:201
std::string m_fillMaterial
inside material
Definition: TOPGeoPMT.h:312
const GeoOpticalSurface & getReflEdgeSurface() const
Returns reflective edge optical surface.
Definition: TOPGeoPMT.h:243
float m_botThickness
bottom thickness
Definition: TOPGeoPMT.h:324
std::string m_winMaterial
window material
Definition: TOPGeoPMT.h:322
double getWinThickness() const
Returns entrance window thickness.
Definition: TOPGeoPMT.h:207
double getBotThickness() const
Returns bottom thickness.
Definition: TOPGeoPMT.h:219
unsigned m_numRows
number of pixel rows
Definition: TOPGeoPMT.h:318
void setBottom(double thickness, const std::string &material)
Sets bottom.
Definition: TOPGeoPMT.h:106
double getDy() const
Returns pixel size in y.
Definition: TOPGeoPMT.h:291
GeoOpticalSurface m_reflEdgeSurface
reflective edge optical surface
Definition: TOPGeoPMT.h:329
const std::string & getWallMaterial() const
Returns wall (casing) material name.
Definition: TOPGeoPMT.h:153
double getReflEdgeWidth() const
Returns reflective edge width.
Definition: TOPGeoPMT.h:231
ClassDefOverride(TOPGeoPMT, 1)
ClassDef.
const std::string & getFillMaterial() const
Returns fill (inside) material name.
Definition: TOPGeoPMT.h:159
void setWindow(double thickness, const std::string &material)
Sets entrance window.
Definition: TOPGeoPMT.h:95
void setSensVolume(double sizeX, double sizeY, double thickness, const std::string &material)
Sets sensitive volume (photo-cathode)
Definition: TOPGeoPMT.h:70
double getSensSizeX() const
Returns sensitive volume (photo-cathode) size in x.
Definition: TOPGeoPMT.h:165
TOPGeoPMT(double sizeX, double sizeY, double sizeZ, const std::string &name="TOPPMT")
Useful constructor.
Definition: TOPGeoPMT.h:40
float m_sizeZ
full size in z
Definition: TOPGeoPMT.h:309
unsigned getNumPixels() const
Returns number of pixels.
Definition: TOPGeoPMT.h:195
float m_sensSizeY
sensitive volume (photo-cathode) size in y
Definition: TOPGeoPMT.h:315
void setWallThickness(double thickness)
Sets wall thickness.
Definition: TOPGeoPMT.h:49
double getSizeX() const
Returns full size in x.
Definition: TOPGeoPMT.h:129
float m_sizeY
full size in y
Definition: TOPGeoPMT.h:308
float m_sensThickness
sensitive volume (photo-cathode) thickness
Definition: TOPGeoPMT.h:316
void setWallMaterial(const std::string &material)
Sets casing material.
Definition: TOPGeoPMT.h:55
double getSizeY() const
Returns full size in y.
Definition: TOPGeoPMT.h:135
std::string m_botMaterial
bottom material
Definition: TOPGeoPMT.h:325
TOPGeoPMT()
Default constructor.
Definition: TOPGeoPMT.h:30
void setNumPixels(unsigned numColumns, unsigned numRows)
Sets number of pixel rows and columns.
Definition: TOPGeoPMT.h:84
void setFillMaterial(const std::string &material)
Sets inside material.
Definition: TOPGeoPMT.h:61
double getWallThickness() const
Returns wall thickness.
Definition: TOPGeoPMT.h:147
double getSensThickness() const
Returns sensitive volume (photo-cathode) thickness.
Definition: TOPGeoPMT.h:177
std::string m_sensMaterial
sensitive material
Definition: TOPGeoPMT.h:319
const std::string & getWinMaterial() const
Returns entrance window material name.
Definition: TOPGeoPMT.h:213
unsigned getNumRows() const
Returns number of pixel rows.
Definition: TOPGeoPMT.h:189
float m_reflEdgeWidth
reflective edge width
Definition: TOPGeoPMT.h:327
void setReflEdge(double width, double thickness, const GeoOpticalSurface &surf)
Sets reflective edge.
Definition: TOPGeoPMT.h:118
const std::string & getBotMaterial() const
Returns bottom material name.
Definition: TOPGeoPMT.h:225
double getSensSizeY() const
Returns sensitive volume (photo-cathode) size in y.
Definition: TOPGeoPMT.h:171
float m_reflEdgeThickness
reflective edge thickness
Definition: TOPGeoPMT.h:328
float m_winThickness
window thickness
Definition: TOPGeoPMT.h:321
bool isConsistent() const override
Check for consistency of data members.
Definition: TOPGeoPMT.cc:58
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86
double getX(unsigned col) const
Returns x coordinate of pixel center.
Definition: TOPGeoPMT.cc:47
double getY(unsigned row) const
Returns y coordinate of pixel center.
Definition: TOPGeoPMT.cc:52
void print(const std::string &title="MCP-PMT geometry parameters") const override
Print the content of the class.
Definition: TOPGeoPMT.cc:85
unsigned getPixelColumn(double x) const
Converts x-coordinate to pixel column (1-based)
Definition: TOPGeoPMT.cc:21
unsigned getPixelRow(double y) const
Converts y-coordinate to pixel row (1-based)
Definition: TOPGeoPMT.cc:29
unsigned getPixelID(double x, double y) const
Converts x and y coordinates to PMT pixel ID (1-based)
Definition: TOPGeoPMT.cc:36
Abstract base class for different kinds of events.