Belle II Software development
TOPGeoPMTArrayDisplacement.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
13namespace Belle2 {
24 public:
25
30 {}
31
39 TOPGeoPMTArrayDisplacement(double x, double y, double alpha,
40 const std::string& name = "TOPPMTArrayDisplacement"):
41 TOPGeoBase(name), m_x(x), m_y(y), m_alpha(alpha)
42 {}
43
48 double getX() const {return m_x / s_unit;}
49
54 double getY() const {return m_y / s_unit;}
55
60 double getAlpha() const {return m_alpha;}
61
66 bool isConsistent() const override {return true;}
67
72 void print(const std::string& title = "PMT array displacement parameters") const override;
73
74 private:
75
76 float m_x = 0;
77 float m_y = 0;
78 float m_alpha = 0;
82 };
83
85} // end namespace Belle2
Base class for geometry parameters.
Definition: TOPGeoBase.h:25
Displacement parameters of MCP-PMT array.
bool isConsistent() const override
Check for consistency of data members.
ClassDefOverride(TOPGeoPMTArrayDisplacement, 1)
ClassDef.
TOPGeoPMTArrayDisplacement(double x, double y, double alpha, const std::string &name="TOPPMTArrayDisplacement")
Full constructor.
double getX() const
Returns translation in x.
double getAlpha() const
Returns rotation angle (around z)
double getY() const
Returns translation in y.
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86
void print(const std::string &title="PMT array displacement parameters") const override
Print the content of the class.
Abstract base class for different kinds of events.