Belle II Software  release-08-01-10
TOPGeoModuleDisplacement.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 <top/dbobjects/TOPGeoBase.h>
12 #include <Math/Transform3D.h>
13 
14 namespace Belle2 {
26  public:
27 
32  {}
33 
44  TOPGeoModuleDisplacement(double x, double y, double z,
45  double alpha, double beta, double gamma,
46  const std::string& name = "TOPModuleDisplacement"):
47  TOPGeoBase(name),
48  m_x(x), m_y(y), m_z(z),
49  m_alpha(alpha), m_beta(beta), m_gamma(gamma)
50  {}
51 
56  double getX() const {return m_x / s_unit;}
57 
62  double getY() const {return m_y / s_unit;}
63 
68  double getZ() const {return m_z / s_unit;}
69 
74  double getAlpha() const {return m_alpha;}
75 
80  double getBeta() const {return m_beta;}
81 
86  double getGamma() const {return m_gamma;}
87 
93  ROOT::Math::Transform3D getTransformation() const;
94 
99  bool isConsistent() const override {return true;}
100 
105  void print(const std::string& title = "Module displacement parameters") const override;
106 
107  private:
108 
109  float m_x = 0;
110  float m_y = 0;
111  float m_z = 0;
112  float m_alpha = 0;
113  float m_beta = 0;
114  float m_gamma = 0;
118  };
119 
121 } // end namespace Belle2
Base class for geometry parameters.
Definition: TOPGeoBase.h:25
Displacement parameters of a TOP module.
float m_beta
rotation angle around y
bool isConsistent() const override
Check for consistency of data members.
double getGamma() const
Returns rotation angle around z.
double getX() const
Returns translation in x.
double getAlpha() const
Returns rotation angle around x.
TOPGeoModuleDisplacement(double x, double y, double z, double alpha, double beta, double gamma, const std::string &name="TOPModuleDisplacement")
Full constructor.
double getZ() const
Returns translation in z.
double getY() const
Returns translation in y.
float m_alpha
rotation angle around x
TOPGeoModuleDisplacement()
Default constructor.
float m_gamma
rotation angle around z
ClassDefOverride(TOPGeoModuleDisplacement, 1)
ClassDef.
double getBeta() const
Returns rotation angle around y.
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86
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.
Abstract base class for different kinds of events.