Belle II Software development
ARICHGeoMirrors Class Reference

Geometry parameters of HAPD. More...

#include <ARICHGeoMirrors.h>

Inheritance diagram for ARICHGeoMirrors:
ARICHGeoBase

Public Member Functions

 ARICHGeoMirrors ()
 Default constructor.
 
bool isConsistent () const override
 Consistency check of geometry parameters.
 
void print (const std::string &title="Mirror configuration parameters") const override
 Print the content of the class.
 
void setMirrorPlate (double thick, double width, double length, const std::string &material, const GeoOpticalSurface &surf)
 Set parameters of mirror plate.
 
void setNMirrors (unsigned nmir)
 Set number of mirror plates (slots)
 
void setRadius (double r)
 Set nominal radius at which mirror plates are placed (center of plate)
 
void setStartAngle (double stang)
 Set phi angle of position of the first mirror plate.
 
void setZPosition (double zPos)
 Set nominal Z position of mirror plates (center point in ARICH local frame)
 
double getZPosition () const
 Get nominal Z position of mirror plates (center point in ARICH local frame)
 
double getRadius () const
 Get nominal radius at which mirror plates are placed (center of plate)
 
double getStartAngle () const
 Get phi angle of position of the first mirror plate.
 
double getPlateThickness () const
 Get thickness of mirror plate.
 
double getPlateWidth () const
 Get width of mirror plate.
 
double getPlateLength () const
 Get length of mirror plate.
 
unsigned getNMirrors () const
 Get number of mirror plates.
 
void setMirrorNormVector (unsigned mirID, double x, double y, double z)
 Set normal vector of the i-th mirror plate surface.
 
void setMirrorPoint (unsigned mirID, double x, double y, double z)
 Set vector to the center point of the mirror plate reflective surface.
 
const std::string & getMaterial () const
 Get material name of mirror plates.
 
const GeoOpticalSurfacegetMirrorSurface () const
 Returns mirror reflective optical surface.
 
const ROOT::Math::XYZVector & getNormVector (const unsigned mirID) const
 Get normal vector of the i-th mirror plate surface.
 
const ROOT::Math::XYZVector & getPoint (const unsigned mirID) const
 Get vector to the center point of the mirror plate reflective surface.
 
void initializeDefault ()
 Initializes default mirror position parameters (assuming plate position on the regular m_nMirrors-sided polygon, with radius m_radius and with the first mirror plate positioned at m_startAngle)
 
void setInstalled (unsigned mirID, bool installed)
 Set mirror plate installed/not installed (only installed plates are placed)
 
bool isInstalled (unsigned mirID) const
 Check if i-th mirror plate is installed.
 
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 (ARICHGeoMirrors, 2)
 ClassDef.
 

Private Attributes

std::vector< ROOT::Math::XYZVector > m_normVector
 vector of normal vectors of all mirror plates
 
std::vector< ROOT::Math::XYZVector > m_point
 vector of points on the reflective surface of all mirror plates
 
std::vector< bool > m_installed
 vector of installed/not installed flags of all mirror plates
 
std::string m_material
 material of mirror plates
 
double m_z = 0
 nominal Z position of mirror plates
 
double m_radius = 0
 nominal radius at which mirror plates are placed
 
double m_startAngle = 0
 phi angle of the center of the 1st mirror plate
 
double m_plateThickness = 0
 thickness of mirror plate
 
double m_plateWidth = 0
 width of mirror plate
 
double m_plateLength = 0
 length of mirror plate
 
unsigned m_nMirrors = 0
 number of mirror plates (slots)
 
GeoOpticalSurface m_surface
 optical surface of mirror plates
 

Detailed Description

Geometry parameters of HAPD.

Definition at line 30 of file ARICHGeoMirrors.h.

Constructor & Destructor Documentation

◆ ARICHGeoMirrors()

ARICHGeoMirrors ( )
inline

Default constructor.

Definition at line 37 of file ARICHGeoMirrors.h.

38 {}

Member Function Documentation

◆ getMaterial()

const std::string & getMaterial ( ) const
inline

Get material name of mirror plates.

Returns
material name

Definition at line 164 of file ARICHGeoMirrors.h.

164{return m_material;}
std::string m_material
material of mirror plates

◆ getMirrorSurface()

const GeoOpticalSurface & getMirrorSurface ( ) const
inline

Returns mirror reflective optical surface.

Returns
optical surface

Definition at line 170 of file ARICHGeoMirrors.h.

170{return m_surface;}
GeoOpticalSurface m_surface
optical surface of mirror plates

◆ 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

◆ getNMirrors()

unsigned getNMirrors ( ) const
inline

Get number of mirror plates.

Returns
number of mirror plates

Definition at line 132 of file ARICHGeoMirrors.h.

132{return m_nMirrors;}
unsigned m_nMirrors
number of mirror plates (slots)

◆ getNormVector()

const ROOT::Math::XYZVector & getNormVector ( const unsigned  mirID) const
inline

Get normal vector of the i-th mirror plate surface.

Parameters
mirIDmirror ID
Returns
nomrmal vector of the mirID mirror plate

Definition at line 177 of file ARICHGeoMirrors.h.

178 {
179 if (mirID < 1 || mirID > m_nMirrors) B2ERROR("ARICHGeoMirrors: invalid mirror plate ID number");
180 return m_normVector[mirID - 1];
181 }
std::vector< ROOT::Math::XYZVector > m_normVector
vector of normal vectors of all mirror plates

◆ getPlateLength()

double getPlateLength ( ) const
inline

Get length of mirror plate.

Returns
mirror plate length

Definition at line 126 of file ARICHGeoMirrors.h.

126{return m_plateLength / s_unit;};
static double s_unit
conversion unit for length
Definition: ARICHGeoBase.h:83
double m_plateLength
length of mirror plate

◆ getPlateThickness()

double getPlateThickness ( ) const
inline

Get thickness of mirror plate.

Returns
mirror plate thickness

Definition at line 114 of file ARICHGeoMirrors.h.

114{return m_plateThickness / s_unit;};
double m_plateThickness
thickness of mirror plate

◆ getPlateWidth()

double getPlateWidth ( ) const
inline

Get width of mirror plate.

Returns
mirror plate width

Definition at line 120 of file ARICHGeoMirrors.h.

120{return m_plateWidth / s_unit;};
double m_plateWidth
width of mirror plate

◆ getPoint()

const ROOT::Math::XYZVector & getPoint ( const unsigned  mirID) const
inline

Get vector to the center point of the mirror plate reflective surface.

Parameters
mirIDmirror ID
Returns
vector to the center point of mirID mirror plate

Definition at line 188 of file ARICHGeoMirrors.h.

189 {
190 if (mirID < 1 || mirID > m_nMirrors) B2ERROR("ARICHGeoMirrors: invalid mirror plate ID number");
191 return m_point[mirID - 1];
192 }
std::vector< ROOT::Math::XYZVector > m_point
vector of points on the reflective surface of all mirror plates

◆ getRadius()

double getRadius ( ) const
inline

Get nominal radius at which mirror plates are placed (center of plate)

Returns
radius of mirror placement

Definition at line 102 of file ARICHGeoMirrors.h.

102{return m_radius / s_unit;};
double m_radius
nominal radius at which mirror plates are placed

◆ getStartAngle()

double getStartAngle ( ) const
inline

Get phi angle of position of the first mirror plate.

Returns
phi angle of position of the first mirror plate

Definition at line 108 of file ARICHGeoMirrors.h.

108{return m_startAngle;};
double m_startAngle
phi angle of the center of the 1st mirror plate

◆ getZPosition()

double getZPosition ( ) const
inline

Get nominal Z position of mirror plates (center point in ARICH local frame)

Returns
Z position of mirror plates

Definition at line 96 of file ARICHGeoMirrors.h.

96{return m_z / s_unit;}
double m_z
nominal Z position of mirror plates

◆ initializeDefault()

void initializeDefault ( )

Initializes default mirror position parameters (assuming plate position on the regular m_nMirrors-sided polygon, with radius m_radius and with the first mirror plate positioned at m_startAngle)

Definition at line 18 of file ARICHGeoMirrors.cc.

19{
20 double rmir = m_radius - m_plateThickness / 2.;
21 for (unsigned i = 0; i < m_nMirrors; i++) {
22 ROOT::Math::XYZVector norm(cos(i * 2.*M_PI / m_nMirrors + m_startAngle),
23 sin(i * 2.*M_PI / m_nMirrors + m_startAngle), 0);
24 m_normVector.push_back(norm);
25 m_point.push_back(rmir * norm);
26 m_installed.push_back(true);
27 }
28}
std::vector< bool > m_installed
vector of installed/not installed flags of all mirror plates

◆ isConsistent()

bool isConsistent ( ) const
overridevirtual

Consistency check of geometry parameters.

Reimplemented from ARICHGeoBase.

Definition at line 30 of file ARICHGeoMirrors.cc.

31{
32 if (m_nMirrors == 0) { B2INFO("ARICHGeoMirrors: no mirrors will be placed"); return true;}
33
34 if (m_radius <= 0) return false;
35 if (m_plateThickness <= 0 || m_plateWidth <= 0 || m_plateLength <= 0) return false;
36 if (m_plateWidth == 0) return false;
37 if (m_radius == 0) return false;
38 if (m_point.size() != m_nMirrors) return false;
39 if (m_normVector.size() != m_nMirrors) return false;
40 if (m_installed.size() != m_nMirrors) return false;
41 if (m_material.empty()) return false;
43 B2INFO("ARICHGeoMirrors: no optical properties are specified for mirrors! (no photons will be reflected)");
44 return true;
45}
bool hasProperties() const
check if the material has at least one property

◆ isInstalled()

bool isInstalled ( unsigned  mirID) const
inline

Check if i-th mirror plate is installed.

Parameters
mirIDmirror plate ID
Returns
true if installed

Definition at line 216 of file ARICHGeoMirrors.h.

217 {
218 if (mirID < 1 || mirID > m_nMirrors) B2ERROR("ARICHGeoMirrors: invalid mirror plate ID number");
219 return m_installed[mirID - 1];
220 }

◆ print()

void print ( const std::string &  title = "Mirror configuration parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from ARICHGeoBase.

Definition at line 48 of file ARICHGeoMirrors.cc.

49{
51 cout << " mirror plate:" << endl;
52 cout << " thickness: " << getPlateThickness() << " " << s_unitName << ", width: " << getPlateWidth() << " " << s_unitName <<
53 ", length: "
54 << getPlateLength() << " " << s_unitName << endl;
55 cout << " material: " << getMaterial() << endl;
56 cout << " number of plates: " << getNMirrors() << endl;
57 cout << " nominal phi angle of 1st plate: " << getStartAngle() << endl;
58 cout << " nominal radius at which plates are placed: " << getRadius() << " " << s_unitName << endl;
59 cout << " nominal Z position of plates: " << getZPosition() << " " << s_unitName << endl;
60
61 cout << " installed plates " << endl;
62
63 cout << " ID: ";
64 for (unsigned imir = 1; imir < getNMirrors() + 1; imir++) {
65 cout << setw(3) << imir << " ";
66 }
67 cout << endl;
68 cout << " flag: ";
69 for (unsigned imir = 1; imir < getNMirrors() + 1; imir++) {
70 cout << setw(3) << isInstalled(imir) << " ";
71 }
72 cout << endl;
73
75}
virtual void printSurface(const GeoOpticalSurface &surface) const
Print the content of optical surface.
Definition: ARICHGeoBase.cc:32
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 getZPosition() const
Get nominal Z position of mirror plates (center point in ARICH local frame)
unsigned getNMirrors() const
Get number of mirror plates.
double getPlateWidth() const
Get width of mirror plate.
const std::string & getMaterial() const
Get material name of mirror plates.
double getPlateLength() const
Get length of mirror plate.
double getRadius() const
Get nominal radius at which mirror plates are placed (center of plate)
double getStartAngle() const
Get phi angle of position of the first mirror plate.
bool isInstalled(unsigned mirID) const
Check if i-th mirror plate is installed.
double getPlateThickness() const
Get thickness of mirror plate.

◆ 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
int getModel() const
get model for the surface
static const double eV
[electronvolt]
Definition: Unit.h:112

◆ setInstalled()

void setInstalled ( unsigned  mirID,
bool  installed 
)
inline

Set mirror plate installed/not installed (only installed plates are placed)

Parameters
mirIDmirror plate ID
installedtrue if installed

Definition at line 205 of file ARICHGeoMirrors.h.

206 {
207 if (mirID < 1 || mirID > m_nMirrors) B2ERROR("ARICHGeoMirrors: invalid mirror plate ID number");
208 m_installed[mirID - 1] = installed;
209 }

◆ setMirrorNormVector()

void setMirrorNormVector ( unsigned  mirID,
double  x,
double  y,
double  z 
)
inline

Set normal vector of the i-th mirror plate surface.

Parameters
mirIDmirror ID
xx component
yy component
zz component

Definition at line 141 of file ARICHGeoMirrors.h.

142 {
143 if (mirID < 1 || mirID > m_normVector.size()) B2ERROR("ARICHGeoMirrors: invalid mirror plate ID number");
144 m_normVector[mirID - 1] = ROOT::Math::XYZVector(x, y, z).Unit();
145 }

◆ setMirrorPlate()

void setMirrorPlate ( double  thick,
double  width,
double  length,
const std::string &  material,
const GeoOpticalSurface surf 
)
inline

Set parameters of mirror plate.

Parameters
thickthickness
widthwidth
lengthlength
materialmaterial name
surfoptical surface

Definition at line 59 of file ARICHGeoMirrors.h.

60 {
61 m_plateThickness = thick;
62 m_plateWidth = width;
63 m_plateLength = length;
64 m_material = material;
65 m_surface = surf;
66 };

◆ setMirrorPoint()

void setMirrorPoint ( unsigned  mirID,
double  x,
double  y,
double  z 
)
inline

Set vector to the center point of the mirror plate reflective surface.

Parameters
mirIDmirror ID
xx component
yy component
zz component

Definition at line 154 of file ARICHGeoMirrors.h.

155 {
156 if (mirID < 1 || mirID > m_nMirrors) B2ERROR("ARICHGeoMirrors: invalid mirror plate ID number");
157 m_point[mirID - 1] = ROOT::Math::XYZVector(x, y, z);
158 }

◆ 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;}

◆ setNMirrors()

void setNMirrors ( unsigned  nmir)
inline

Set number of mirror plates (slots)

Parameters
nmirnumber of mirror plates (slots)

Definition at line 72 of file ARICHGeoMirrors.h.

72{m_nMirrors = nmir;}

◆ setRadius()

void setRadius ( double  r)
inline

Set nominal radius at which mirror plates are placed (center of plate)

Parameters
rradius of mirror placement

Definition at line 78 of file ARICHGeoMirrors.h.

78{m_radius = r;}

◆ setStartAngle()

void setStartAngle ( double  stang)
inline

Set phi angle of position of the first mirror plate.

Parameters
stangphi angle of position of the first mirror plate

Definition at line 84 of file ARICHGeoMirrors.h.

84{m_startAngle = stang;}

◆ setZPosition()

void setZPosition ( double  zPos)
inline

Set nominal Z position of mirror plates (center point in ARICH local frame)

Parameters
zPosZ position of mirror plates

Definition at line 90 of file ARICHGeoMirrors.h.

90{m_z = zPos;}

Member Data Documentation

◆ m_installed

std::vector<bool> m_installed
private

vector of installed/not installed flags of all mirror plates

Definition at line 227 of file ARICHGeoMirrors.h.

◆ m_material

std::string m_material
private

material of mirror plates

Definition at line 229 of file ARICHGeoMirrors.h.

◆ m_name

std::string m_name
protectedinherited

geometry object name

Definition at line 82 of file ARICHGeoBase.h.

◆ m_nMirrors

unsigned m_nMirrors = 0
private

number of mirror plates (slots)

Definition at line 236 of file ARICHGeoMirrors.h.

◆ m_normVector

std::vector<ROOT::Math::XYZVector> m_normVector
private

vector of normal vectors of all mirror plates

Definition at line 225 of file ARICHGeoMirrors.h.

◆ m_plateLength

double m_plateLength = 0
private

length of mirror plate

Definition at line 235 of file ARICHGeoMirrors.h.

◆ m_plateThickness

double m_plateThickness = 0
private

thickness of mirror plate

Definition at line 233 of file ARICHGeoMirrors.h.

◆ m_plateWidth

double m_plateWidth = 0
private

width of mirror plate

Definition at line 234 of file ARICHGeoMirrors.h.

◆ m_point

std::vector<ROOT::Math::XYZVector> m_point
private

vector of points on the reflective surface of all mirror plates

Definition at line 226 of file ARICHGeoMirrors.h.

◆ m_radius

double m_radius = 0
private

nominal radius at which mirror plates are placed

Definition at line 231 of file ARICHGeoMirrors.h.

◆ m_startAngle

double m_startAngle = 0
private

phi angle of the center of the 1st mirror plate

Definition at line 232 of file ARICHGeoMirrors.h.

◆ m_surface

GeoOpticalSurface m_surface
private

optical surface of mirror plates

Definition at line 238 of file ARICHGeoMirrors.h.

◆ m_z

double m_z = 0
private

nominal Z position of mirror plates

Definition at line 230 of file ARICHGeoMirrors.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: