Belle II Software development
VXDGeoRadiationSensorsPar.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#pragma once
9
10
11#include <TObject.h>
12#include <string>
13
14
15namespace Belle2 {
26 class VXDGeoRadiationSensorsPositionPar: public TObject {
27 public:
29 VXDGeoRadiationSensorsPositionPar(double z = 0, double radius = 0, double theta = 0) :
30 m_z(z), m_radius(radius), m_theta(theta) {}
34 double getZ() const { return m_z; }
36 void setZ(double z) { m_z = z; }
38 double getRadius() const { return m_radius; }
40 void setRadius(double radius) { m_radius = radius; }
42 double getTheta() const { return m_theta; }
44 void setTheta(double theta) { m_theta = theta; }
46 const std::map<int, double>& getSensors() const { return m_sensors; }
48 void addSensor(int id, double phi) { m_sensors[id] = phi; }
49
50 private:
52 double m_z;
54 double m_radius;
56 double m_theta;
58 std::map<int, double> m_sensors;
59
60
62 };
63
67 class VXDGeoRadiationSensorsPar: public TObject {
68 public:
70 VXDGeoRadiationSensorsPar(const std::string& subdetector = "", bool insideEnvelope = false,
71 double width = 0, double length = 0, bool height = 0, const std::string& material = ""):
72 m_subdetector(subdetector), m_insideEnvelope(insideEnvelope), m_width(width), m_length(length), m_height(height),
73 m_material(material) {}
77 const std::string& getSubDetector() const { return m_subdetector; }
79 void setSubDetector(const std::string& subdetector) { m_subdetector = subdetector; }
81 bool getInsideEnvelope() const { return m_insideEnvelope; }
83 void setInsideEnvelope(bool insideEnvelope) { m_insideEnvelope = insideEnvelope; }
85 double getWidth() const { return m_width; }
87 void setWidth(double width) {m_width = width; }
89 double getLength() const { return m_length; }
91 void setLength(double length) { m_length = length; }
93 double getHeight() const { return m_height; }
95 void setHeight(double height) { m_height = height; }
97 const std::string& getMaterial() const { return m_material; }
99 void setMaterial(const std::string& material) { m_material = material; }
101 const std::vector<VXDGeoRadiationSensorsPositionPar>& getPositions() const { return m_positions; }
103 void addPosition(const VXDGeoRadiationSensorsPositionPar& position) { m_positions.push_back(position); }
104
105 private:
107 std::string m_subdetector;
111 double m_width;
113 double m_length;
115 double m_height;
117 std::string m_material;
119 std::vector<VXDGeoRadiationSensorsPositionPar> m_positions;
120
122 };
123
125} // end of namespace Belle2
126
The Class for VXD Radiation Sensor parameters.
bool m_insideEnvelope
For PXD they need to be outside the envelope volume, for SVD they are inside the detector.
VXDGeoRadiationSensorsPar(const std::string &subdetector="", bool insideEnvelope=false, double width=0, double length=0, bool height=0, const std::string &material="")
Constructor.
double getHeight() const
get the height
ClassDef(VXDGeoRadiationSensorsPar, 5)
ClassDef, must be the last term before the closing {}.
void setMaterial(const std::string &material)
set the name of the material
void addPosition(const VXDGeoRadiationSensorsPositionPar &position)
add radiation sensor position
double m_width
Dimension of the sensor in mm.
void setLength(double length)
set the length
bool getInsideEnvelope() const
return whether radiation sensor are inside envelope volume
void setHeight(double height)
set the height
const std::vector< VXDGeoRadiationSensorsPositionPar > & getPositions() const
get the positions of radiation sensors
void setWidth(double width)
set the width
const std::string & getMaterial() const
get the name of the material
double m_length
Dimension of the sensor in mm.
void setInsideEnvelope(bool insideEnvelope)
set whether radiation sensor are inside envelope volume
double m_height
Dimension of the sensor in um.
void setSubDetector(const std::string &subdetector)
set the name of the subdetector
double getLength() const
get the length
std::vector< VXDGeoRadiationSensorsPositionPar > m_positions
Position of radiation sensors.
const std::string & getSubDetector() const
get the name of the subdetector
std::string m_subdetector
one of "PXD" or "SVD"
The Class for VXD Radiation Sensor Position parameters.
void addSensor(int id, double phi)
add sensor with individual id
double m_radius
Common radial position of the sensor centers in mm.
void setTheta(double theta)
set the common angle to the z axis, 0 is parallel to z in deg
void setRadius(double radius)
set the common radial position of the sensor centers
ClassDef(VXDGeoRadiationSensorsPositionPar, 5)
ClassDef, must be the last term before the closing {}.
void setZ(double z)
set the common z position of the sensor centers
VXDGeoRadiationSensorsPositionPar(double z=0, double radius=0, double theta=0)
Constructor.
double m_theta
Common angle to the z axis, 0 is parallel to z in deg.
double getZ() const
get the common z position of the sensor centers
double getRadius() const
get the common radial position of the sensor centers
double m_z
Common z position of the sensor centers in mm.
std::map< int, double > m_sensors
Individual radiations sensors.
const std::map< int, double > & getSensors() const
get the vector storing ids of individual sensors
double getTheta() const
get the common angle to the z axis, 0 is parallel to z in deg
Abstract base class for different kinds of events.