Belle II Software development
ARICHGeoSupport Class Reference

Geometry parameters of ARICH support structures and neutron shield. More...

#include <ARICHGeoSupport.h>

Inheritance diagram for ARICHGeoSupport:
ARICHGeoBase

Classes

struct  box
 Struct to hold parameters of box volumes (examples, scintilators for cosmic test) More...
 
struct  tube
 Struct to hold tube parameters. More...
 
struct  wedge
 Struct to hold wedge parameters. More...
 

Public Member Functions

 ARICHGeoSupport ()
 Default constructor.
 
bool isConsistent () const override
 Consistency check of geometry parameters.
 
void print (const std::string &title="Parameters of ARICH support structure and neutron shield") const override
 Print the content of the class.
 
void setWedge (unsigned i, const std::vector< double > &par)
 Set parameters of support wedge volumes.
 
void addWedge (int type, double r, double phi, double z, const std::string &material)
 Add wedge (all added wedges are placed)
 
void setMaterial (const std::string &material)
 Set default material of support structures.
 
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.
 
double getTubeInnerR (unsigned i) const
 Get tube inner radius.
 
double getTubeOuterR (unsigned i) const
 Get tube outer radius.
 
double getTubeLength (unsigned i) const
 Get tube length.
 
double getTubeZPosition (unsigned i) const
 Get tube Z position.
 
unsigned getNWedges () const
 Get number of wedges to be placed.
 
int getWedgeType (unsigned i) const
 Get type of i-th wedge.
 
double getWedgeR (unsigned i) const
 Get radius at which i-th wedge is placed.
 
double getWedgePhi (unsigned i) const
 Get phi angle at which i-th wedge is placed.
 
double getWedgeZ (unsigned i) const
 Get Z position of i-th wedge.
 
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.
 
const std::string & getMaterial () const
 Get default material of support structures.
 
const std::vector< double > getWedge (unsigned i) const
 Get parameters of wedge.
 
void addBox (const std::string &name, const std::string &material, double size[3], double position[3], double rotation[3])
 Add box volume.
 
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.
 
box getBox (unsigned i) const
 Get box paramaters.
 
void clearBoxes ()
 Clear container of boxes.
 
void setName (const std::string &name)
 Sets object name.
 
const std::string & getName () const
 Returns object name.
 
virtual void printSurface (const GeoOpticalSurface &surface) const
 Print the content of optical surface.
 
virtual void printPlacement (double x, double y, double z, double rx, double ry, double rz) const
 Print volume positioning parameters.
 

Protected Member Functions

 ClassDef (ARICHGeoBase, 2)
 ClassDef.
 

Protected Attributes

std::string m_name
 geometry object name
 

Static Protected Attributes

static double s_unit = Unit::cm
 conversion unit for length
 
static std::string s_unitName
 conversion unit name
 

Private Member Functions

 ClassDefOverride (ARICHGeoSupport, 1)
 ClassDef.
 

Private Attributes

std::vector< tubem_tubes
 vector of tube volumes to be placed
 
std::string m_material
 default material of support structure
 
std::vector< double > m_wedgePar [m_nWedgeType]
 parameters of support wedges (joints)
 
std::vector< wedgem_wedges
 vector of wedge volumes to be placed
 
std::vector< boxm_boxes
 vector of box volumes to be places
 

Static Private Attributes

static const unsigned m_nWedgeType = 3
 number of wedge types
 

Detailed Description

Geometry parameters of ARICH support structures and neutron shield.

Definition at line 25 of file ARICHGeoSupport.h.

Constructor & Destructor Documentation

◆ ARICHGeoSupport()

ARICHGeoSupport ( )
inline

Default constructor.

Definition at line 31 of file ARICHGeoSupport.h.

32 {}

Member Function Documentation

◆ addBox()

void addBox ( const std::string &  name,
const std::string &  material,
double  size[3],
double  position[3],
double  rotation[3] 
)
inline

Add box volume.

Parameters
namevolume name
materialvolume material
sizearray of side sizes
positionarray of x,y,z position
rotationarray of x,y,z rotations

Definition at line 231 of file ARICHGeoSupport.h.

232 {
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});
234 }
std::vector< box > m_boxes
vector of box volumes to be places

◆ addTube()

void addTube ( double  inR,
double  outR,
double  length,
double  zPosition,
const std::string &  material,
const std::string &  name 
)
inline

Add volume of cylindrical shape (tube)

Parameters
inRinner radius
outRouter radius
lengthlength
zPositionZ position of start of tube (in ARICH frame)
materialmaterial
namename

Definition at line 116 of file ARICHGeoSupport.h.

117 {
118 m_tubes.push_back({inR, outR, length, zPosition, material, name});
119 }
std::vector< tube > m_tubes
vector of tube volumes to be placed

◆ addWedge()

void addWedge ( int  type,
double  r,
double  phi,
double  z,
const std::string &  material 
)
inline

Add wedge (all added wedges are placed)

Parameters
typewedge type ID (1-3)
rradius at which wedge is placed
phiphi angle at which wedge is placed
zz position of wedge (in ARICH frame)
materialwedge material

Definition at line 96 of file ARICHGeoSupport.h.

97 {
98 m_wedges.push_back({type, r, phi, z, material});
99 }
std::vector< wedge > m_wedges
vector of wedge volumes to be placed

◆ clearBoxes()

void clearBoxes ( )
inline

Clear container of boxes.

Definition at line 272 of file ARICHGeoSupport.h.

273 {
274 m_boxes.clear();
275 }

◆ getBox()

box getBox ( unsigned  i) const
inline

Get box paramaters.

Parameters
ibox index
Returns
box parameters

Definition at line 264 of file ARICHGeoSupport.h.

265 {
266 return m_boxes[i];
267 }

◆ getMaterial()

const std::string & getMaterial ( ) const
inline

Get default material of support structures.

Returns
default material name

Definition at line 214 of file ARICHGeoSupport.h.

214{return m_material;}
std::string m_material
default material of support structure

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns object name.

Returns
object name

Definition at line 49 of file ARICHGeoBase.h.

49{return m_name;}
std::string m_name
geometry object name
Definition: ARICHGeoBase.h:82

◆ getNBoxes()

unsigned getNBoxes ( ) const
inline

Get number of box volumes.

Returns
number of box volumes

Definition at line 254 of file ARICHGeoSupport.h.

255 {
256 return m_boxes.size();
257 }

◆ getNTubes()

unsigned getNTubes ( ) const
inline

Get number of tube volumes to be placed.

Returns
number of tube volumes

Definition at line 125 of file ARICHGeoSupport.h.

125{return m_tubes.size();};

◆ getNWedges()

unsigned getNWedges ( ) const
inline

Get number of wedges to be placed.

Returns
number of wedges

Definition at line 159 of file ARICHGeoSupport.h.

159{return m_wedges.size();};

◆ getTubeInnerR()

double getTubeInnerR ( unsigned  i) const
inline

Get tube inner radius.

Parameters
itube index
Returns
tube inner radius

Definition at line 132 of file ARICHGeoSupport.h.

132{return m_tubes.at(i).innerR / s_unit;}
static double s_unit
conversion unit for length
Definition: ARICHGeoBase.h:83

◆ getTubeLength()

double getTubeLength ( unsigned  i) const
inline

Get tube length.

Parameters
itube index
Returns
tube length

Definition at line 146 of file ARICHGeoSupport.h.

146{return m_tubes.at(i).length / s_unit;}

◆ getTubeMaterial()

const std::string & getTubeMaterial ( unsigned  i) const
inline

Get material of i-th tube.

Parameters
itube index
Returns
material name

Definition at line 194 of file ARICHGeoSupport.h.

194{return m_tubes.at(i).material;}

◆ getTubeName()

const std::string & getTubeName ( unsigned  i) const
inline

Get name of i-th tube.

Parameters
itube index
Returns
volume name

Definition at line 208 of file ARICHGeoSupport.h.

208{return m_tubes.at(i).name;}

◆ getTubeOuterR()

double getTubeOuterR ( unsigned  i) const
inline

Get tube outer radius.

Parameters
itube index
Returns
tube outer radius

Definition at line 139 of file ARICHGeoSupport.h.

139{return m_tubes.at(i).outerR / s_unit;}

◆ getTubeZPosition()

double getTubeZPosition ( unsigned  i) const
inline

Get tube Z position.

Parameters
itube index
Returns
tube Z position (start point in ARICH frame)

Definition at line 153 of file ARICHGeoSupport.h.

153{return m_tubes.at(i).zPosition / s_unit;}

◆ getWedge()

const std::vector< double > getWedge ( unsigned  i) const
inline

Get parameters of wedge.

Parameters
iwedge type
Returns
vector of wedge parameters

Definition at line 221 of file ARICHGeoSupport.h.

221{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;}
std::vector< double > m_wedgePar[m_nWedgeType]
parameters of support wedges (joints)
static const unsigned m_nWedgeType
number of wedge types

◆ getWedgeMaterial()

const std::string & getWedgeMaterial ( unsigned  i) const
inline

Get material of i-th wedge.

Parameters
iwedge index
Returns
material name

Definition at line 201 of file ARICHGeoSupport.h.

201{return m_wedges.at(i).material;}

◆ getWedgePhi()

double getWedgePhi ( unsigned  i) const
inline

Get phi angle at which i-th wedge is placed.

Parameters
iwedge index
Returns
wedge phi position

Definition at line 180 of file ARICHGeoSupport.h.

180{return m_wedges.at(i).phi;}

◆ getWedgeR()

double getWedgeR ( unsigned  i) const
inline

Get radius at which i-th wedge is placed.

Parameters
iwedge index
Returns
wedge radius

Definition at line 173 of file ARICHGeoSupport.h.

173{return m_wedges.at(i).r / s_unit;}

◆ getWedgeType()

int getWedgeType ( unsigned  i) const
inline

Get type of i-th wedge.

Parameters
iwedge index
Returns
wedge type

Definition at line 166 of file ARICHGeoSupport.h.

166{return m_wedges.at(i).type;}

◆ getWedgeZ()

double getWedgeZ ( unsigned  i) const
inline

Get Z position of i-th wedge.

Parameters
iwedge index
Returns
wedge Z position

Definition at line 187 of file ARICHGeoSupport.h.

187{return m_wedges.at(i).z / s_unit;}

◆ isConsistent()

bool isConsistent ( ) const
overridevirtual

Consistency check of geometry parameters.

Returns
true if consistent

Reimplemented from ARICHGeoBase.

Definition at line 17 of file ARICHGeoSupport.cc.

18{
19 return true;
20}

◆ print()

void print ( const std::string &  title = "Parameters of ARICH support structure and neutron shield") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from ARICHGeoBase.

Definition at line 23 of file ARICHGeoSupport.cc.

24{
26
27 cout << " Default material: " << getMaterial() << endl;
28 cout << " Placed tubes" << endl;
29
30 unsigned nTube = getNTubes();
31 for (unsigned i = 0; i < nTube; i++) {
32 cout << " " << getTubeName(i) << ", inner R: " << getTubeInnerR(i) << " " << s_unitName << ", outer R: " << getTubeOuterR(
33 i) << " " << s_unitName << ", length: " << getTubeLength(i) << " " << s_unitName << ", Z position: " << getTubeZPosition(
34 i) << " " << s_unitName << ", material: " << getTubeMaterial(i) << endl; ;
35 }
36
37 cout << " Parameters of wedges" << endl;
38
39 for (unsigned i = 1; i < m_nWedgeType + 1; i++) {
40 cout << " type: " << i << " par. vector: ";
41 for (auto par : getWedge(i)) cout << par << " " << s_unitName << " ";
42 cout << endl;
43 }
44
45 cout << " Placed wedges" << endl;
46 unsigned nWedge = getNWedges();
47 for (unsigned i = 0; i < nWedge; i++) {
48 cout << " ID: " << setprecision(4) << setw(2) << i << ", type: " << getWedgeType(i) << ", radius: " << getWedgeR(
49 i) << " " << s_unitName << ", phi: " << setw(6) << getWedgePhi(i) << ", Z position: " << getWedgeZ(
50 i) << " " << s_unitName << ", material: " << getWedgeMaterial(i) << endl;
51 }
52}
virtual void print(const std::string &title) const
Print the content of the class.
Definition: ARICHGeoBase.cc:20
static std::string s_unitName
conversion unit name
Definition: ARICHGeoBase.h:84
double getWedgeR(unsigned i) const
Get radius at which i-th wedge is placed.
double getWedgePhi(unsigned i) const
Get phi angle at which i-th wedge is placed.
const std::vector< double > getWedge(unsigned i) const
Get parameters of wedge.
double getTubeInnerR(unsigned i) const
Get tube inner radius.
double getTubeLength(unsigned i) const
Get tube length.
double getTubeOuterR(unsigned i) const
Get tube outer radius.
double getWedgeZ(unsigned i) const
Get Z position of i-th wedge.
unsigned getNTubes() const
Get number of tube 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.
const std::string & getTubeName(unsigned i) const
Get name of i-th tube.

◆ printPlacement()

void printPlacement ( double  x,
double  y,
double  z,
double  rx,
double  ry,
double  rz 
) const
virtualinherited

Print volume positioning parameters.

Parameters
xx position
yy position
zz position
rxrotation around x-axis
ryrotation around y-axis
rzrotation around z-axis

Definition at line 25 of file ARICHGeoBase.cc.

26{
27// cout << "Volume positioning information (inside local ARICH frame)" << endl;
28 cout << " Center position; x: " << x << " " << s_unitName << ", y: " << y << " " << s_unitName << ", z: " << z << " " << s_unitName
29 << endl;
30 cout << " Rotations; x-axis: " << rx << " y-axis: " << ry << " z-axis: " << rz << " (in rad)" << endl;
31}

◆ printSurface()

void printSurface ( const GeoOpticalSurface surface) const
virtualinherited

Print the content of optical surface.

Parameters
surfaceoptical surface parameters

Definition at line 32 of file ARICHGeoBase.cc.

33{
34 cout << " Optical surface: ";
35 if (surface.getName().empty() and !surface.hasProperties()) {
36 cout << "not defined" << endl;
37 return;
38 }
39 cout << surface.getName();
40 cout << ", model: " << surface.getModel();
41 cout << ", finish: " << surface.getFinish();
42 cout << ", type: " << surface.getType();
43 cout << ", value: " << surface.getValue();
44 cout << endl;
45 if (surface.hasProperties()) {
46 for (const auto& property : surface.getProperties()) {
47 cout << " - property: ";
48 cout << property.getName() << " [";
49 for (const auto& value : property.getValues()) cout << value << ", ";
50 cout << "], @[";
51 for (const auto& value : property.getEnergies()) cout << value / Unit::eV << ", ";
52 cout << "] eV" << endl;
53 }
54 } else {
55 cout << " - properties: None" << endl;
56 }
57
58}
const std::string & getName() const
get name of the optical surface
int getFinish() const
get finish of the surface
const std::vector< GeoMaterialProperty > & getProperties() const
get all properties
double getValue() const
get value for the surface condition
int getType() const
get type of the surface
bool hasProperties() const
check if the material has at least one property
int getModel() const
get model for the surface
static const double eV
[electronvolt]
Definition: Unit.h:112

◆ setBox()

void setBox ( int  i,
const std::string &  name,
const std::string &  material,
double  size[3],
double  position[3],
double  rotation[3] 
)
inline

Re-set parameters of existing box.

Parameters
ibox index
namevolume name
materialvolume material
sizearray of side sizes
positionarray of x,y,z position
rotationarray of x,y,z rotations

Definition at line 245 of file ARICHGeoSupport.h.

246 {
247 m_boxes[i] = {{size[0], size[1], size[2]}, {position[0], position[1], position[2]}, {rotation[0], rotation[1], rotation[2]}, name, material};
248 }

◆ setMaterial()

void setMaterial ( const std::string &  material)
inline

Set default material of support structures.

Parameters
materialname of default material

Definition at line 105 of file ARICHGeoSupport.h.

105{ m_material = material;};

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Sets object name.

Parameters
nameobject name

Definition at line 43 of file ARICHGeoBase.h.

43{m_name = name;}

◆ setWedge()

void setWedge ( unsigned  i,
const std::vector< double > &  par 
)
inline

Set parameters of support wedge volumes.

Parameters
iwedge type ID (1-3)
parvector of wedge parameters

Definition at line 86 of file ARICHGeoSupport.h.

86{if (i > m_nWedgeType || i == 0) { B2ERROR("invalid wedge number"); return;}; m_wedgePar[i - 1] = par;};

Member Data Documentation

◆ m_boxes

std::vector<box> m_boxes
private

vector of box volumes to be places

Definition at line 286 of file ARICHGeoSupport.h.

◆ m_material

std::string m_material
private

default material of support structure

Definition at line 282 of file ARICHGeoSupport.h.

◆ m_name

std::string m_name
protectedinherited

geometry object name

Definition at line 82 of file ARICHGeoBase.h.

◆ m_nWedgeType

const unsigned m_nWedgeType = 3
staticprivate

number of wedge types

Definition at line 283 of file ARICHGeoSupport.h.

◆ m_tubes

std::vector<tube> m_tubes
private

vector of tube volumes to be placed

Definition at line 281 of file ARICHGeoSupport.h.

◆ m_wedgePar

std::vector<double> m_wedgePar[m_nWedgeType]
private

parameters of support wedges (joints)

Definition at line 284 of file ARICHGeoSupport.h.

◆ m_wedges

std::vector<wedge> m_wedges
private

vector of wedge volumes to be placed

Definition at line 285 of file ARICHGeoSupport.h.

◆ s_unit

double s_unit = Unit::cm
staticprotectedinherited

conversion unit for length

Definition at line 83 of file ARICHGeoBase.h.

◆ s_unitName

std::string s_unitName
staticprotectedinherited

conversion unit name

Definition at line 84 of file ARICHGeoBase.h.


The documentation for this class was generated from the following files: