Belle II Software  release-05-02-19
GeoVXDComponents.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Christian Oswald, Zbynek Drasal, *
7  * Martin Ritter, Peter Kvasnicka, Jozef Koval *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef GEOVXDCOMPONENTS_H
13 #define GEOVXDCOMPONENTS_H
14 
15 #include <vxd/geometry/SensorInfoBase.h>
16 
17 #include <string>
18 #include <vector>
19 
20 class G4LogicalVolume;
21 
22 namespace Belle2 {
29  public:
31  enum EPosW {
37  };
39  VXDGeoPlacement(const std::string& name = "", double u = 0, double v = 0,
40  std::string w = "bottom", double woffset = 0);
42  const std::string& getName() const { return m_name; }
44  double getU() const { return m_u; }
46  double getV() const { return m_v; }
48  EPosW getW() const { return m_w; }
50  double getWOffset() const { return m_woffset; }
51  private:
53  std::string m_name;
55  double m_u;
57  double m_v;
61  double m_woffset;
62  };
63 
66  public:
68  VXDGeoComponent(const std::string& material = "", const std::string& color = "",
69  double width = 0, double width2 = 0, double length = 0, double height = 0):
70  m_volume(0), m_material(material), m_color(color), m_width(width), m_width2(width2), m_length(length),
71  m_height(height) {}
73  G4LogicalVolume* getVolume() const { return m_volume; }
75  void setVolume(G4LogicalVolume* volume) { m_volume = volume; }
77  const std::string& getMaterial() const { return m_material; }
79  const std::string& getColor() const { return m_color; }
81  double getWidth() const { return m_width; }
83  void setWidth(double width) { m_width = width; m_width2 = 0; }
85  double getWidth2() const { return m_width2; }
87  double getLength() const { return m_length; }
89  void setLength(double length) { m_length = length; }
91  double& getHeight() { return m_height; }
93  double getHeight() const { return m_height; }
94  private:
96  G4LogicalVolume* m_volume;
97 
98  std::string m_material;
100  std::string m_color;
102  double m_width;
104  double m_width2;
106  double m_length;
108  double m_height;
109  };
110 
113  public:
115  VXDGeoSensor(const std::string& material = "", const std::string& color = "",
116  double width = 0, double width2 = 0, double length = 0, double height = 0, bool slanted = false):
117  VXDGeoComponent(material, color, width, width2, length, height), m_info(0), m_slanted(slanted) {}
122  void setActive(const VXDGeoComponent& area, const VXDGeoPlacement& placement)
123  {
124  m_activeArea = area; m_activePlacement = placement;
125  }
131  void setComponents(const std::vector<VXDGeoPlacement>& component) { m_components = component; }
133  const std::vector<VXDGeoPlacement>& getComponents() const { return m_components; }
135  void setSensorInfo(VXD::SensorInfoBase* info) { m_info = info; }
137  const VXD::SensorInfoBase* getSensorInfo() const { return m_info; }
139  bool getSlanted() const { return m_slanted; }
140  private:
148  bool m_slanted;
150  std::vector<VXDGeoPlacement> m_components;
151  };
152 
155  public:
157  VXDGeoSensorPlacement(int sensorID = 0, const std::string& sensorTypeID = "", double z = 0,
158  bool flipU = false, bool flipV = false, bool flipW = false):
159  m_sensorID(sensorID), m_sensorTypeID(sensorTypeID), m_z(z), m_flipU(flipU), m_flipV(flipV), m_flipW(flipW) {}
161  int getSensorID() const { return m_sensorID; }
163  const std::string& getSensorTypeID() const { return m_sensorTypeID; }
165  double getZ() const { return m_z; }
167  bool getFlipU() const { return m_flipU; }
169  bool getFlipV() const { return m_flipV; }
171  bool getFlipW() const { return m_flipW; }
172  private:
176  std::string m_sensorTypeID;
178  double m_z;
180  bool m_flipU;
182  bool m_flipV;
184  bool m_flipW;
185  };
186 
188  class VXDGeoLadder {
189  public:
191  VXDGeoLadder(int layerID = 0, double shift = 0, double radius = 0,
192  double slantedAngle = 0, double slantedRadius = 0,
193  double glueSize = -1, const std::string& glueMaterial = ""):
194  m_layerID(layerID), m_shift(shift), m_radius(radius),
195  m_slantedAngle(slantedAngle), m_slantedRadius(slantedRadius),
196  m_glueSize(glueSize), m_glueMaterial(glueMaterial) {}
198  int getLayerID() const { return m_layerID; }
200  double getShift() const { return m_shift; }
202  double getRadius() const { return m_radius; }
204  double getSlantedAngle() const { return m_slantedAngle; }
206  double getSlantedRadius() const { return m_slantedRadius; }
208  double getGlueSize() const { return m_glueSize; }
210  const std::string& getGlueMaterial() const { return m_glueMaterial; }
212  const std::vector<VXDGeoSensorPlacement>& getSensors() const { return m_sensors; }
214  void addSensor(const VXDGeoSensorPlacement& sensor) { m_sensors.push_back(sensor); }
215  private:
219  double m_shift;
221  double m_radius;
227  double m_glueSize;
229  std::string m_glueMaterial;
231  std::vector<VXDGeoSensorPlacement> m_sensors;
232  };
233 
235 } // namespace Belle2
236 
237 #endif /* GEOVXDCOMPONENTS_H */
Belle2::VXDGeoSensor::m_activeArea
VXDGeoComponent m_activeArea
Paramerers of the active area.
Definition: GeoVXDComponents.h:142
Belle2::VXDGeoSensorPlacement::m_sensorID
int m_sensorID
ID of the sensor inside the ladder.
Definition: GeoVXDComponents.h:174
Belle2::VXDGeoComponent::getLength
double getLength() const
get the length of the component
Definition: GeoVXDComponents.h:87
Belle2::VXDGeoLadder::getSlantedAngle
double getSlantedAngle() const
get the slant angle for slanted sensors
Definition: GeoVXDComponents.h:204
Belle2::VXDGeoSensorPlacement
Struct holding the information where a sensor should be placed inside the ladder.
Definition: GeoVXDComponents.h:154
Belle2::VXDGeoLadder::m_glueMaterial
std::string m_glueMaterial
name of the Material used as glue
Definition: GeoVXDComponents.h:229
Belle2::VXDGeoPlacement::getU
double getU() const
get local u coordinate where to place the component
Definition: GeoVXDComponents.h:44
Belle2::VXDGeoSensorPlacement::m_flipV
bool m_flipV
flip sensor along v?
Definition: GeoVXDComponents.h:182
Belle2::VXDGeoSensor::setComponents
void setComponents(const std::vector< VXDGeoPlacement > &component)
set the list of sub components to be placed
Definition: GeoVXDComponents.h:131
Belle2::VXDGeoSensorPlacement::getFlipU
bool getFlipU() const
check whether or not the sensor should be flipped around the U coordinate
Definition: GeoVXDComponents.h:167
Belle2::VXDGeoComponent::m_width
double m_width
width of the component
Definition: GeoVXDComponents.h:102
Belle2::VXDGeoPlacement::c_center
@ c_center
Place the component at the center of the mother.
Definition: GeoVXDComponents.h:34
Belle2::VXDGeoPlacement
Class holding all parameters to place a VXD geometry subcomponent.
Definition: GeoVXDComponents.h:28
Belle2::VXDGeoLadder::m_radius
double m_radius
Radius where to place the ladder.
Definition: GeoVXDComponents.h:221
Belle2::VXDGeoLadder::getSensors
const std::vector< VXDGeoSensorPlacement > & getSensors() const
get list of sensors
Definition: GeoVXDComponents.h:212
Belle2::VXDGeoSensorPlacement::getZ
double getZ() const
get the z position of the sensor
Definition: GeoVXDComponents.h:165
Belle2::VXDGeoPlacement::getName
const std::string & getName() const
get Name of the component
Definition: GeoVXDComponents.h:42
Belle2::VXDGeoPlacement::c_below
@ c_below
Place the component below the mother.
Definition: GeoVXDComponents.h:32
Belle2::VXDGeoLadder::m_shift
double m_shift
Shift of the ladder along local u.
Definition: GeoVXDComponents.h:219
Belle2::VXD::SensorInfoBase
Base class to provide Sensor Information for PXD and SVD.
Definition: SensorInfoBase.h:40
Belle2::VXDGeoComponent::getMaterial
const std::string & getMaterial() const
get the name of the Material for the component
Definition: GeoVXDComponents.h:77
Belle2::VXDGeoSensorPlacement::m_z
double m_z
global z position of the center of the sensor
Definition: GeoVXDComponents.h:178
Belle2::VXDGeoPlacement::getWOffset
double getWOffset() const
get offset to local w position where to place the component
Definition: GeoVXDComponents.h:50
Belle2::VXDGeoPlacement::EPosW
EPosW
Enum describing where to place the component vertically.
Definition: GeoVXDComponents.h:31
Belle2::VXDGeoLadder::getGlueMaterial
const std::string & getGlueMaterial() const
get the glue material
Definition: GeoVXDComponents.h:210
Belle2::VXDGeoSensorPlacement::m_sensorTypeID
std::string m_sensorTypeID
Type of the sensor to be used.
Definition: GeoVXDComponents.h:176
Belle2::VXDGeoSensor::VXDGeoSensor
VXDGeoSensor(const std::string &material="", const std::string &color="", double width=0, double width2=0, double length=0, double height=0, bool slanted=false)
Constructor.
Definition: GeoVXDComponents.h:115
Belle2::VXDGeoLadder::getGlueSize
double getGlueSize() const
get the additional glue size, e.g.
Definition: GeoVXDComponents.h:208
Belle2::VXDGeoPlacement::c_bottom
@ c_bottom
Place the component at the bottom of the mother.
Definition: GeoVXDComponents.h:33
Belle2::VXDGeoComponent::getVolume
G4LogicalVolume * getVolume() const
get the pointer to the logical volume, NULL if not yet created
Definition: GeoVXDComponents.h:73
Belle2::VXDGeoPlacement::c_top
@ c_top
Place the component at the top of the mother.
Definition: GeoVXDComponents.h:35
Belle2::VXDGeoSensor::getSensorInfo
const VXD::SensorInfoBase * getSensorInfo() const
get the pointer to the SensorInfo class
Definition: GeoVXDComponents.h:137
Belle2::VXDGeoComponent::setWidth
void setWidth(double width)
set the width of the component.
Definition: GeoVXDComponents.h:83
Belle2::VXDGeoLadder::getRadius
double getRadius() const
get the radius of all sensors except slanted ones
Definition: GeoVXDComponents.h:202
Belle2::VXDGeoComponent::m_color
std::string m_color
Name of the color of the component.
Definition: GeoVXDComponents.h:100
Belle2::VXDGeoComponent::m_width2
double m_width2
forward width of the component, 0 for recangular
Definition: GeoVXDComponents.h:104
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDGeoPlacement::m_u
double m_u
u coordinate where to place the component
Definition: GeoVXDComponents.h:55
Belle2::VXDGeoPlacement::m_v
double m_v
v coordinate where to place the component
Definition: GeoVXDComponents.h:57
Belle2::VXDGeoLadder::m_layerID
int m_layerID
ID of the ladder inside the layer.
Definition: GeoVXDComponents.h:217
Belle2::VXDGeoLadder::m_slantedAngle
double m_slantedAngle
Angle of the module with respect to the global z-axis for slanted sensors.
Definition: GeoVXDComponents.h:223
Belle2::VXDGeoSensor::getActiveArea
VXDGeoComponent & getActiveArea()
get the component description for the active area
Definition: GeoVXDComponents.h:127
Belle2::VXDGeoSensor::m_slanted
bool m_slanted
Indication wether this is a slanted sensor.
Definition: GeoVXDComponents.h:148
Belle2::VXDGeoSensorPlacement::getSensorID
int getSensorID() const
get the sensor id inside the ladder
Definition: GeoVXDComponents.h:161
Belle2::VXDGeoPlacement::m_w
EPosW m_w
w coordinate where to place the component
Definition: GeoVXDComponents.h:59
Belle2::VXDGeoLadder
Struct containing all parameters of one ladder.
Definition: GeoVXDComponents.h:188
Belle2::VXDGeoComponent::getWidth
double getWidth() const
get the width of the component
Definition: GeoVXDComponents.h:81
Belle2::VXDGeoComponent::VXDGeoComponent
VXDGeoComponent(const std::string &material="", const std::string &color="", double width=0, double width2=0, double length=0, double height=0)
Constructor.
Definition: GeoVXDComponents.h:68
Belle2::VXDGeoPlacement::m_name
std::string m_name
Name of the component.
Definition: GeoVXDComponents.h:53
Belle2::VXDGeoSensorPlacement::m_flipW
bool m_flipW
flip sensor along w?
Definition: GeoVXDComponents.h:184
Belle2::VXDGeoLadder::VXDGeoLadder
VXDGeoLadder(int layerID=0, double shift=0, double radius=0, double slantedAngle=0, double slantedRadius=0, double glueSize=-1, const std::string &glueMaterial="")
Constructor.
Definition: GeoVXDComponents.h:191
Belle2::VXDGeoComponent::m_volume
G4LogicalVolume * m_volume
Pointer to the Logical volume if already created
Definition: GeoVXDComponents.h:96
Belle2::VXDGeoSensor::getComponents
const std::vector< VXDGeoPlacement > & getComponents() const
get the list of sub components
Definition: GeoVXDComponents.h:133
Belle2::VXDGeoPlacement::m_woffset
double m_woffset
Offset to the w placement of the component.
Definition: GeoVXDComponents.h:61
Belle2::VXDGeoSensorPlacement::getFlipV
bool getFlipV() const
check whether or not the sensor should be flipped around the V coordinate
Definition: GeoVXDComponents.h:169
Belle2::VXDGeoSensor::m_info
VXD::SensorInfoBase * m_info
Sensor Information instance.
Definition: GeoVXDComponents.h:146
Belle2::VXDGeoSensor::setSensorInfo
void setSensorInfo(VXD::SensorInfoBase *info)
set the pointer to the SensorInfo class
Definition: GeoVXDComponents.h:135
Belle2::VXDGeoComponent::getColor
const std::string & getColor() const
get the name of the color for the component
Definition: GeoVXDComponents.h:79
Belle2::VXDGeoPlacement::c_above
@ c_above
Place the component above the mother.
Definition: GeoVXDComponents.h:36
Belle2::VXDGeoLadder::m_slantedRadius
double m_slantedRadius
Radius of the center of the active area for slanted sensors.
Definition: GeoVXDComponents.h:225
Belle2::VXDGeoSensor
Struct holding all parameters for a completeVXD Sensor.
Definition: GeoVXDComponents.h:112
Belle2::VXDGeoComponent::setVolume
void setVolume(G4LogicalVolume *volume)
set the pointer to the logical volume
Definition: GeoVXDComponents.h:75
Belle2::VXDGeoComponent::m_material
std::string m_material
transient member, owned by Geant4
Definition: GeoVXDComponents.h:98
Belle2::VXDGeoSensor::getSlanted
bool getSlanted() const
return wether or not the sensor is slanted (usually only the first sensor in layers 4-6)
Definition: GeoVXDComponents.h:139
Belle2::VXDGeoPlacement::getW
EPosW getW() const
get local w position where to place the component
Definition: GeoVXDComponents.h:48
Belle2::VXDGeoLadder::getShift
double getShift() const
get the shift along the u coordinate for all sensors in the ladder
Definition: GeoVXDComponents.h:200
Belle2::VXDGeoLadder::m_sensors
std::vector< VXDGeoSensorPlacement > m_sensors
list of all sensors to be placed in the ladder
Definition: GeoVXDComponents.h:231
Belle2::VXDGeoSensorPlacement::getSensorTypeID
const std::string & getSensorTypeID() const
get the sensor type id, internal id only needed for construction
Definition: GeoVXDComponents.h:163
Belle2::VXDGeoPlacement::VXDGeoPlacement
VXDGeoPlacement(const std::string &name="", double u=0, double v=0, std::string w="bottom", double woffset=0)
Constructor.
Definition: GeoVXDComponents.cc:30
Belle2::VXDGeoSensor::setActive
void setActive(const VXDGeoComponent &area, const VXDGeoPlacement &placement)
set the active area
Definition: GeoVXDComponents.h:122
Belle2::VXDGeoLadder::getLayerID
int getLayerID() const
get the layer id
Definition: GeoVXDComponents.h:198
Belle2::VXDGeoComponent::m_height
double m_height
height of the component
Definition: GeoVXDComponents.h:108
Belle2::VXDGeoLadder::addSensor
void addSensor(const VXDGeoSensorPlacement &sensor)
add a sensor to the list of sensors in the ladder
Definition: GeoVXDComponents.h:214
Belle2::VXDGeoComponent::getHeight
double getHeight() const
get the height of the component
Definition: GeoVXDComponents.h:93
Belle2::VXDGeoComponent::getHeight
double & getHeight()
get the height of the component
Definition: GeoVXDComponents.h:91
Belle2::VXDGeoComponent::m_length
double m_length
length of the component
Definition: GeoVXDComponents.h:106
Belle2::VXDGeoComponent
Class holding all parameters for an VXD geometry component.
Definition: GeoVXDComponents.h:65
Belle2::VXDGeoSensorPlacement::m_flipU
bool m_flipU
flip sensor along u?
Definition: GeoVXDComponents.h:180
Belle2::VXDGeoComponent::getWidth2
double getWidth2() const
get the forward width of the component, 0 for rectangular
Definition: GeoVXDComponents.h:85
Belle2::VXDGeoSensor::m_components
std::vector< VXDGeoPlacement > m_components
List of all components to be placed.
Definition: GeoVXDComponents.h:150
Belle2::VXDGeoSensor::m_activePlacement
VXDGeoPlacement m_activePlacement
Position of the active area.
Definition: GeoVXDComponents.h:144
Belle2::VXDGeoPlacement::getV
double getV() const
get local v coordinate where to place the component
Definition: GeoVXDComponents.h:46
Belle2::VXDGeoSensor::getActivePlacement
const VXDGeoPlacement & getActivePlacement()
get the placement description for the active area
Definition: GeoVXDComponents.h:129
Belle2::VXDGeoLadder::getSlantedRadius
double getSlantedRadius() const
get the radius for slanted sensors
Definition: GeoVXDComponents.h:206
Belle2::VXDGeoSensorPlacement::getFlipW
bool getFlipW() const
check whether or not the sensor should be flipped around the W coordinate
Definition: GeoVXDComponents.h:171
Belle2::VXDGeoComponent::setLength
void setLength(double length)
set the length of the component
Definition: GeoVXDComponents.h:89
Belle2::VXDGeoSensorPlacement::VXDGeoSensorPlacement
VXDGeoSensorPlacement(int sensorID=0, const std::string &sensorTypeID="", double z=0, bool flipU=false, bool flipV=false, bool flipW=false)
Constructor.
Definition: GeoVXDComponents.h:157
Belle2::VXDGeoLadder::m_glueSize
double m_glueSize
Oversize of the glue between the ladders, <0 means no glue.
Definition: GeoVXDComponents.h:227