 |
Belle II Software
release-05-01-25
|
12 #include <framework/logging/Logger.h>
14 #include <arich/dbobjects/ARICHGeoBase.h>
27 class ARICHGeoSupport:
public ARICHGeoBase {
81 void print(
const std::string& title =
"Parameters of ARICH support structure and neutron shield")
const override;
88 void setWedge(
unsigned i,
const std::vector<double>& par) {
if (i >
m_nWedgeType || i == 0) { B2ERROR(
"invalid wedge number");
return;};
m_wedgePar[i - 1] = par;};
98 void addWedge(
int type,
double r,
double phi,
double z,
const std::string& material)
100 m_wedges.push_back({type, r, phi, z, material});
116 void addTube(
double inR,
double outR,
double length,
double zPosition,
const std::string& material,
const std::string& name)
118 m_tubes.push_back({inR, outR, length, zPosition, material, name});
221 const std::vector<double>
getWedge(
unsigned i)
const {std::vector<double> pars;
if (i >
m_nWedgeType || i == 0) { B2ERROR(
"invalid wedge number");
return pars;};
for (
auto par :
m_wedgePar[i - 1]) pars.push_back(par /
s_unit);
return pars;}
231 void addBox(
const std::string& name,
const std::string& material,
double size[3],
double position[3],
double rotation[3])
233 m_boxes.push_back({{size[0], size[1], size[2]}, {position[0], position[1], position[2]}, {rotation[0], rotation[1], rotation[2]}, name, material});
245 void setBox(
int i,
const std::string& name,
const std::string& material,
double size[3],
double position[3],
double rotation[3])
247 m_boxes[i] = {{size[0], size[1], size[2]}, {position[0], position[1], position[2]}, {rotation[0], rotation[1], rotation[2]}, name, material};
264 box
getBox(
unsigned i)
const
std::string m_material
default material of support structure
ClassDefOverride(ARICHGeoSupport, 1)
ClassDef.
Struct to hold wedge parameters.
double getWedgeZ(unsigned i) const
Get Z position of i-th wedge.
double getTubeOuterR(unsigned i) const
Get tube outer radius.
static const unsigned m_nWedgeType
number of wedge types
void clearBoxes()
Clear container of boxes.
unsigned getNBoxes() const
Get number of box volumes.
std::vector< box > m_boxes
vector of box volumes to be places
std::vector< tube > m_tubes
vector of tube volumes to be placed
const std::string & getTubeMaterial(unsigned i) const
Get material of i-th tube.
const std::string & getWedgeMaterial(unsigned i) const
Get material of i-th wedge.
const std::string & getTubeName(unsigned i) const
Get name of i-th tube.
std::vector< double > m_wedgePar[m_nWedgeType]
parameters of support wedges (joints)
void addWedge(int type, double r, double phi, double z, const std::string &material)
Add wedge (all added wedges are placed)
double getWedgePhi(unsigned i) const
Get phi angle at which i-th wedge is placed.
static double s_unit
conversion unit for length
void addBox(const std::string &name, const std::string &material, double size[3], double position[3], double rotation[3])
Add box volume.
Struct to hold tube parameters.
void setBox(int i, const std::string &name, const std::string &material, double size[3], double position[3], double rotation[3])
Re-set parameters of existing box.
Abstract base class for different kinds of events.
double getTubeZPosition(unsigned i) const
Get tube Z position.
void print(const std::string &title="Parameters of ARICH support structure and neutron shield") const override
Print the content of the class.
int getWedgeType(unsigned i) const
Get type of i-th wedge.
const std::vector< double > getWedge(unsigned i) const
Get parameters of wedge.
double getTubeLength(unsigned i) const
Get tube length.
void setWedge(unsigned i, const std::vector< double > &par)
Set parameters of support wedge volumes.
double getWedgeR(unsigned i) const
Get radius at which i-th wedge is placed.
box getBox(unsigned i) const
Get box paramaters.
double getTubeInnerR(unsigned i) const
Get tube inner radius.
bool isConsistent() const override
Consistency check of geometry parameters.
void addTube(double inR, double outR, double length, double zPosition, const std::string &material, const std::string &name)
Add volume of cylindrical shape (tube)
unsigned getNTubes() const
Get number of tube volumes to be placed.
Struct to hold parameters of box volumes (examples, scintilators for cosmic test)
unsigned getNWedges() const
Get number of wedges to be placed.
void setMaterial(const std::string &material)
Set default material of support structures.
std::vector< wedge > m_wedges
vector of wedge volumes to be placed
ARICHGeoSupport()
Default constructor.
Geometry parameters of ARICH support structures and neutron shield.
const std::string & getMaterial() const
Get default material of support structures.