10#include <framework/logging/Logger.h>
12#include <arich/dbobjects/ARICHGeoBase.h>
79 void print(
const std::string& title =
"Parameters of ARICH support structure and neutron shield")
const override;
86 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;};
96 void addWedge(
int type,
double r,
double phi,
double z,
const std::string& material)
98 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};
Base class for geometry parameters.
static double s_unit
conversion unit for length
Geometry parameters of ARICH support structures and neutron shield.
double getWedgeR(unsigned i) const
Get radius at which i-th wedge is placed.
bool isConsistent() const override
Consistency check of geometry parameters.
double getWedgePhi(unsigned i) const
Get phi angle at which i-th wedge is placed.
ClassDefOverride(ARICHGeoSupport, 1)
ClassDef.
void clearBoxes()
Clear container of boxes.
const std::vector< double > getWedge(unsigned i) const
Get parameters of wedge.
void addTube(double inR, double outR, double length, double zPosition, const std::string &material, const std::string &name)
Add volume of cylindrical shape (tube)
void setWedge(unsigned i, const std::vector< double > &par)
Set parameters of support wedge volumes.
std::string m_material
default material of support structure
void setMaterial(const std::string &material)
Set default material of support structures.
std::vector< double > m_wedgePar[m_nWedgeType]
parameters of support wedges (joints)
double getTubeInnerR(unsigned i) const
Get tube inner radius.
double getTubeLength(unsigned i) const
Get tube length.
void addBox(const std::string &name, const std::string &material, double size[3], double position[3], double rotation[3])
Add box volume.
std::vector< tube > m_tubes
vector of tube volumes to be placed
ARICHGeoSupport()
Default constructor.
double getTubeOuterR(unsigned i) const
Get tube outer radius.
std::vector< box > m_boxes
vector of box volumes to be places
double getWedgeZ(unsigned i) const
Get Z position of i-th wedge.
unsigned getNTubes() const
Get number of tube volumes to be placed.
std::vector< wedge > m_wedges
vector of wedge volumes to be placed
const std::string & getTubeMaterial(unsigned i) const
Get material of i-th tube.
int getWedgeType(unsigned i) const
Get type of i-th wedge.
const std::string & getMaterial() const
Get default material of support structures.
unsigned getNWedges() const
Get number of wedges to be placed.
double getTubeZPosition(unsigned i) const
Get tube Z position.
const std::string & getWedgeMaterial(unsigned i) const
Get material of i-th wedge.
static const unsigned m_nWedgeType
number of wedge types
box getBox(unsigned i) const
Get box paramaters.
void addWedge(int type, double r, double phi, double z, const std::string &material)
Add wedge (all added wedges are placed)
const std::string & getTubeName(unsigned i) const
Get name of i-th tube.
void print(const std::string &title="Parameters of ARICH support structure and neutron shield") const override
Print the content of the class.
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.
unsigned getNBoxes() const
Get number of box volumes.
Abstract base class for different kinds of events.
Struct to hold parameters of box volumes (examples, scintilators for cosmic test)
std::string material
material
double rotation[3]
rotation coordinates
double position[3]
position coordinates
double size[3]
size coordinates
Struct to hold tube parameters.
std::string material
material
double outerR
outer radius
double innerR
inner radius
double zPosition
z position
Struct to hold wedge parameters.
std::string material
material