Belle II Software development
ARICHGlobalAlignment Class Reference

Geometry parameters of ARICH Master volume (envelope). More...

#include <ARICHGlobalAlignment.h>

Inheritance diagram for ARICHGlobalAlignment:
ARICHGeoBase

Public Member Functions

 ARICHGlobalAlignment ()
 Default constructor.
 
 ARICHGlobalAlignment (const ARICHGlobalAlignment &align)
 Copy constructor.
 
ARICHGlobalAlignmentoperator= (const ARICHGlobalAlignment &align)
 Assignment operator.
 
 ~ARICHGlobalAlignment ()
 Destructor.
 
void setAlignmentElement (const ARICHPositionElement &align)
 Sets alignment parameters (element).
 
const ARICHPositionElementgetAlignmentElement () const
 Returns alignment parameters (element).
 
void print (const std::string &title="ARICH global alignment parameters") const
 Print the content of the class.
 
const ROOT::Math::XYZVector & getTranslation () const
 Get position of ARICH master volume center point in global Belle II coordinates.
 
const ROOT::Math::Rotation3D & getRotation () const
 Get rotation matrix of ARICH master volume in global Belle II coordinates.
 
ROOT::Math::XYZVector pointToGlobal (const ROOT::Math::XYZVector &point) const
 Transform local point into global Belle II coordinate system via rotation and translation.
 
ROOT::Math::XYZVector momentumToGlobal (const ROOT::Math::XYZVector &momentum) const
 Rotate local momentum into global Belle II coordinate system.
 
ROOT::Math::XYZVector pointToLocal (const ROOT::Math::XYZVector &point) const
 Transform global point into ARICH reference system via inverse rotation and translation.
 
ROOT::Math::XYZVector momentumToLocal (const ROOT::Math::XYZVector &momentum) const
 Rotate global point into ARICH reference system via inverse rotation.
 
void setName (const std::string &name)
 Sets object name.
 
const std::string & getName () const
 Returns object name.
 
virtual bool isConsistent () const
 Check for consistency of data members.
 
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

void setTransformation () const
 Set rotation matrix and center point of ARICH master volume based on alignment parameters.
 
 ClassDef (ARICHGlobalAlignment, 2)
 ClassDef.
 

Private Attributes

ARICHPositionElement m_alignPars
 alignment parameters
 
ROOT::Math::Rotation3D * m_rotation = nullptr
 rotation matrix of ARICH master volume
 
ROOT::Math::Rotation3D * m_rotationInverse = nullptr
 inverse rotation matrix of ARICH master volume
 
ROOT::Math::XYZVector * m_translation = nullptr
 position of ARICH master volume center point
 

Detailed Description

Geometry parameters of ARICH Master volume (envelope).

Definition at line 26 of file ARICHGlobalAlignment.h.

Constructor & Destructor Documentation

◆ ARICHGlobalAlignment() [1/2]

Default constructor.

Definition at line 33 of file ARICHGlobalAlignment.h.

34 {}

◆ ARICHGlobalAlignment() [2/2]

ARICHGlobalAlignment ( const ARICHGlobalAlignment align)
inline

Copy constructor.

Definition at line 39 of file ARICHGlobalAlignment.h.

39 : ARICHGeoBase()
40 {
41 *this = align;
42 m_rotation = nullptr;
43 m_rotationInverse = nullptr;
44 m_translation = nullptr;
45 }
ARICHGeoBase()
Default constructor.
Definition: ARICHGeoBase.h:30
ROOT::Math::Rotation3D * m_rotationInverse
inverse rotation matrix of ARICH master volume
ROOT::Math::XYZVector * m_translation
position of ARICH master volume center point
ROOT::Math::Rotation3D * m_rotation
rotation matrix of ARICH master volume

◆ ~ARICHGlobalAlignment()

~ARICHGlobalAlignment ( )
inline

Destructor.

Definition at line 68 of file ARICHGlobalAlignment.h.

69 {
70 if (m_rotation) delete m_rotation;
72 if (m_translation) delete m_translation;
73 }

Member Function Documentation

◆ getAlignmentElement()

const ARICHPositionElement & getAlignmentElement ( ) const
inline

Returns alignment parameters (element).

Returns
Alignment element

Definition at line 88 of file ARICHGlobalAlignment.h.

89 {
90 return m_alignPars;
91 }
ARICHPositionElement m_alignPars
alignment parameters

◆ 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

◆ getRotation()

const ROOT::Math::Rotation3D & getRotation ( ) const
inline

Get rotation matrix of ARICH master volume in global Belle II coordinates.

Returns
Rotation matrix of ARICH master volume.

Definition at line 113 of file ARICHGlobalAlignment.h.

114 {
116 return *m_rotation;
117 }
void setTransformation() const
Set rotation matrix and center point of ARICH master volume based on alignment parameters.

◆ getTranslation()

const ROOT::Math::XYZVector & getTranslation ( ) const
inline

Get position of ARICH master volume center point in global Belle II coordinates.

Returns
Center point of ARICH volume.

Definition at line 106 of file ARICHGlobalAlignment.h.

◆ isConsistent()

virtual bool isConsistent ( ) const
inlinevirtualinherited

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented in ARICHGeoAerogelPlane, ARICHGeoDetectorPlane, ARICHGeoHAPD, ARICHGeoMasterVolume, ARICHGeoMirrors, ARICHGeoSupport, and ARICHPositionElement.

Definition at line 55 of file ARICHGeoBase.h.

55{return false;}

◆ momentumToGlobal()

ROOT::Math::XYZVector momentumToGlobal ( const ROOT::Math::XYZVector &  momentum) const

Rotate local momentum into global Belle II coordinate system.

Parameters
momentummomentum vector to be rotated
Returns
rotated momentum vector

Definition at line 23 of file ARICHGlobalAlignment.cc.

24{
26 return (*m_rotation) * momentum;
27}

◆ momentumToLocal()

ROOT::Math::XYZVector momentumToLocal ( const ROOT::Math::XYZVector &  momentum) const

Rotate global point into ARICH reference system via inverse rotation.

Parameters
momentummomentum vector to be rotated
Returns
rotated momentum vector

Definition at line 35 of file ARICHGlobalAlignment.cc.

36{
38 return (*m_rotationInverse) * momentum;
39}

◆ operator=()

ARICHGlobalAlignment & operator= ( const ARICHGlobalAlignment align)
inline

Assignment operator.

Definition at line 50 of file ARICHGlobalAlignment.h.

51 {
52 if (this != &align) {
53 ARICHGeoBase::operator=(align);
54 m_alignPars = align.getAlignmentElement();
55 if (m_rotation) delete m_rotation;
57 if (m_translation) delete m_translation;
58 m_rotation = nullptr;
59 m_rotationInverse = nullptr;
60 m_translation = nullptr;
61 }
62 return *this;
63 }

◆ pointToGlobal()

ROOT::Math::XYZVector pointToGlobal ( const ROOT::Math::XYZVector &  point) const

Transform local point into global Belle II coordinate system via rotation and translation.

Parameters
pointpoint to be transformed
Returns
transformed point

Definition at line 17 of file ARICHGlobalAlignment.cc.

18{
20 return (*m_rotation) * point + (*m_translation);
21}

◆ pointToLocal()

ROOT::Math::XYZVector pointToLocal ( const ROOT::Math::XYZVector &  point) const

Transform global point into ARICH reference system via inverse rotation and translation.

Parameters
pointpoint to be transformed
Returns
transformed point

Definition at line 29 of file ARICHGlobalAlignment.cc.

30{
32 return (*m_rotationInverse) * (point - (*m_translation));
33}

◆ print()

void print ( const std::string &  title = "ARICH global alignment parameters") const
virtual

Print the content of the class.

Parameters
[in]titleTitle to be printed.

Reimplemented from ARICHGeoBase.

Definition at line 49 of file ARICHGlobalAlignment.cc.

50{
53}
virtual void print(const std::string &title) const
Print the content of the class.
Definition: ARICHGeoBase.cc:20
void print(const std::string &title="Parmeters of position element") const override
Print the content of the class.

◆ 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}
static std::string s_unitName
conversion unit name
Definition: ARICHGeoBase.h:84

◆ 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

◆ setAlignmentElement()

void setAlignmentElement ( const ARICHPositionElement align)
inline

Sets alignment parameters (element).

Parameters
[in]alignAlignment element.

Definition at line 79 of file ARICHGlobalAlignment.h.

80 {
81 m_alignPars = align;
82 }

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

◆ setTransformation()

void setTransformation ( ) const
private

Set rotation matrix and center point of ARICH master volume based on alignment parameters.

Definition at line 41 of file ARICHGlobalAlignment.cc.

42{
43 ROOT::Math::Rotation3D Rot = m_alignPars.getRotation();
44 m_rotation = new ROOT::Math::Rotation3D(Rot);
45 m_rotationInverse = new ROOT::Math::Rotation3D(Rot.Inverse());
46 m_translation = new ROOT::Math::XYZVector(m_alignPars.getTranslation());
47}
ROOT::Math::Rotation3D getRotation() const
Returns rotation matrix.
ROOT::Math::XYZVector getTranslation() const
Returns translation vector (always in basf2 units!)

Member Data Documentation

◆ m_alignPars

ARICHPositionElement m_alignPars
private

alignment parameters

Definition at line 154 of file ARICHGlobalAlignment.h.

◆ m_name

std::string m_name
protectedinherited

geometry object name

Definition at line 82 of file ARICHGeoBase.h.

◆ m_rotation

ROOT::Math::Rotation3D* m_rotation = nullptr
mutableprivate

rotation matrix of ARICH master volume

Definition at line 156 of file ARICHGlobalAlignment.h.

◆ m_rotationInverse

ROOT::Math::Rotation3D* m_rotationInverse = nullptr
mutableprivate

inverse rotation matrix of ARICH master volume

Definition at line 157 of file ARICHGlobalAlignment.h.

◆ m_translation

ROOT::Math::XYZVector* m_translation = nullptr
mutableprivate

position of ARICH master volume center point

Definition at line 158 of file ARICHGlobalAlignment.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: