Belle II Software  release-08-01-10
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 
16 using namespace std;
17 using namespace ROOT::Math;
18 
19 namespace 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 
37  Transform3D TOPGeoModuleDisplacement::getTransformation() const
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
Abstract base class for different kinds of events.