Belle II Software development
ARICHGlobalAlignment.cc
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#include <arich/dbobjects/ARICHGlobalAlignment.h>
10#include <iostream>
11
12using namespace std;
13using namespace Belle2;
14
15
16
17ROOT::Math::XYZVector ARICHGlobalAlignment::pointToGlobal(const ROOT::Math::XYZVector& point) const
18{
20 return (*m_rotation) * point + (*m_translation);
21}
22
23ROOT::Math::XYZVector ARICHGlobalAlignment::momentumToGlobal(const ROOT::Math::XYZVector& momentum) const
24{
26 return (*m_rotation) * momentum;
27}
28
29ROOT::Math::XYZVector ARICHGlobalAlignment::pointToLocal(const ROOT::Math::XYZVector& point) const
30{
32 return (*m_rotationInverse) * (point - (*m_translation));
33}
34
35ROOT::Math::XYZVector ARICHGlobalAlignment::momentumToLocal(const ROOT::Math::XYZVector& momentum) const
36{
38 return (*m_rotationInverse) * momentum;
39}
40
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}
48
49void ARICHGlobalAlignment::print(const std::string& title) const
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="ARICH global alignment parameters") const
Print the content of the class.
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
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.
ROOT::Math::XYZVector momentumToGlobal(const ROOT::Math::XYZVector &momentum) const
Rotate local momentum into global Belle II coordinate system.
ROOT::Math::XYZVector * m_translation
position of ARICH master volume center point
ROOT::Math::Rotation3D * m_rotation
rotation matrix of ARICH master volume
ROOT::Math::Rotation3D getRotation() const
Returns rotation matrix.
ROOT::Math::XYZVector getTranslation() const
Returns translation vector (always in basf2 units!)
void print(const std::string &title="Parmeters of position element") const override
Print the content of the class.
Abstract base class for different kinds of events.
STL namespace.