Belle II Software development
ARICHGlobalAlignment.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <arich/dbobjects/ARICHGeoBase.h>
12#include <arich/dbobjects/ARICHPositionElement.h>
13#include <string>
14#include <Math/Vector3D.h>
15#include <Math/Rotation3D.h>
16
17namespace Belle2 {
27
28 public:
29
34 {}
35
40 {
41 *this = align;
42 m_rotation = nullptr;
43 m_rotationInverse = nullptr;
44 m_translation = nullptr;
45 }
46
51 {
52 if (this != &align) {
53 ARICHGeoBase::operator=(align);
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 }
64
69 {
70 if (m_rotation) delete m_rotation;
72 if (m_translation) delete m_translation;
73 }
74
80 {
81 m_alignPars = align;
82 }
83
89 {
90 return m_alignPars;
91 }
92
93
98 void print(const std::string& title = "ARICH global alignment parameters") const;
99
100
106 const ROOT::Math::XYZVector& getTranslation() const {if (!m_translation) setTransformation(); return *m_translation;}
107
113 const ROOT::Math::Rotation3D& getRotation() const
114 {
116 return *m_rotation;
117 }
118
124 ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector& point) const;
125
131 ROOT::Math::XYZVector momentumToGlobal(const ROOT::Math::XYZVector& momentum) const;
132
138 ROOT::Math::XYZVector pointToLocal(const ROOT::Math::XYZVector& point) const;
139
145 ROOT::Math::XYZVector momentumToLocal(const ROOT::Math::XYZVector& momentum) const;
146
147 private:
148
152 void setTransformation() const;
153
156 mutable ROOT::Math::Rotation3D* m_rotation = nullptr;
157 mutable ROOT::Math::Rotation3D* m_rotationInverse = nullptr;
158 mutable ROOT::Math::XYZVector* m_translation = nullptr;
162 };
163
165} // end namespace Belle2
Base class for geometry parameters.
Definition: ARICHGeoBase.h:24
Geometry parameters of ARICH Master volume (envelope).
void print(const std::string &title="ARICH global alignment parameters") const
Print the content of the class.
ClassDef(ARICHGlobalAlignment, 2)
ClassDef.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &point) const
Transform local point into global Belle II coordinate system via rotation and translation.
void setTransformation() const
Set rotation matrix and center point of ARICH master volume based on alignment parameters.
ARICHPositionElement m_alignPars
alignment parameters
ARICHGlobalAlignment(const ARICHGlobalAlignment &align)
Copy constructor.
const ARICHPositionElement & getAlignmentElement() const
Returns alignment parameters (element).
ARICHGlobalAlignment & operator=(const ARICHGlobalAlignment &align)
Assignment operator.
ROOT::Math::XYZVector momentumToLocal(const ROOT::Math::XYZVector &momentum) const
Rotate global point into ARICH reference system via inverse rotation.
ROOT::Math::Rotation3D * m_rotationInverse
inverse rotation matrix of ARICH master volume
ROOT::Math::XYZVector pointToLocal(const ROOT::Math::XYZVector &point) const
Transform global point into ARICH reference system via inverse rotation and translation.
const ROOT::Math::Rotation3D & getRotation() const
Get rotation matrix of ARICH master volume in global Belle II coordinates.
const ROOT::Math::XYZVector & getTranslation() const
Get position of ARICH master volume center point in global Belle II coordinates.
ROOT::Math::XYZVector momentumToGlobal(const ROOT::Math::XYZVector &momentum) const
Rotate local momentum into global Belle II coordinate system.
void setAlignmentElement(const ARICHPositionElement &align)
Sets alignment parameters (element).
ROOT::Math::XYZVector * m_translation
position of ARICH master volume center point
ARICHGlobalAlignment()
Default constructor.
ROOT::Math::Rotation3D * m_rotation
rotation matrix of ARICH master volume
Position element for ARICH.
Abstract base class for different kinds of events.