Belle II Software development
TOPGeoModuleDisplacement.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 <top/dbobjects/TOPGeoModuleDisplacement.h>
10#include <iostream>
11#include <Math/RotationX.h>
12#include <Math/RotationY.h>
13#include <Math/RotationZ.h>
14#include <Math/Translation3D.h>
15
16using namespace std;
17using namespace ROOT::Math;
18
19namespace Belle2 {
25 void TOPGeoModuleDisplacement::print(const std::string& title) const
26 {
27 TOPGeoBase::print(title);
28 cout << " translation vector: (" << getX() << ", "
29 << getY() << ", " << getZ() << ")" << " " << s_unitName << endl;
30 cout << " rotation angles: ";
31 cout << getAlpha() << " ";
32 cout << getBeta() << " ";
33 cout << getGamma() << " ";
34 cout << endl;
35 }
36
38 {
39 RotationX Rx(m_alpha);
40 RotationY Ry(m_beta);
41 RotationZ Rz(m_gamma);
42 Translation3D t(m_x, m_y, m_z);
43 return Transform3D(Rz * Ry * Rx, t);
44 }
45
47} // end Belle2 namespace
float m_beta
rotation angle around y
double getGamma() const
Returns rotation angle around z.
double getX() const
Returns translation in x.
double getAlpha() const
Returns rotation angle around x.
double getZ() const
Returns translation in z.
double getY() const
Returns translation in y.
float m_alpha
rotation angle around x
float m_gamma
rotation angle around z
double getBeta() const
Returns rotation angle around y.
ROOT::Math::Transform3D getTransformation() const
Returns transformation from local to nominal frame.
void print(const std::string &title="Module displacement parameters") const override
Print the content of the class.
virtual void print(const std::string &title) const
Print the content of the class.
Definition: TOPGeoBase.cc:28
static std::string s_unitName
conversion unit name
Definition: TOPGeoBase.h:87
Abstract base class for different kinds of events.
STL namespace.