Belle II Software development
TOPGeoBase.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 <TObject.h>
12#include <geometry/dbobjects/GeoOpticalSurface.h>
13#include <string>
14
15
16namespace Belle2 {
25 class TOPGeoBase: public TObject {
26 public:
27
32 {}
33
38 explicit TOPGeoBase(const std::string& name): m_name(name)
39 {}
40
45 void setName(const std::string& name) {m_name = name;}
46
51 const std::string& getName() const {return m_name;}
52
57 virtual bool isConsistent() const {return false;}
58
63 virtual void print(const std::string& title) const;
64
69 virtual void printSurface(const GeoOpticalSurface& surface) const;
70
76 double getReflectivity(const GeoOpticalSurface& surface, double energy) const;
77
78 protected:
79
84 void printUnderlined(const std::string& title) const;
85
86 static double s_unit;
87 static std::string s_unitName;
89 std::string m_name;
93 };
94
96} // end namespace Belle2
Represent an optical finish of a surface.
Base class for geometry parameters.
Definition: TOPGeoBase.h:25
const std::string & getName() const
Returns object name.
Definition: TOPGeoBase.h:51
TOPGeoBase(const std::string &name)
Constructor with name.
Definition: TOPGeoBase.h:38
ClassDef(TOPGeoBase, 1)
ClassDef.
virtual bool isConsistent() const
Check for consistency of data members.
Definition: TOPGeoBase.h:57
void setName(const std::string &name)
Sets object name.
Definition: TOPGeoBase.h:45
std::string m_name
geometry object name
Definition: TOPGeoBase.h:89
TOPGeoBase()
Default constructor.
Definition: TOPGeoBase.h:31
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86
void printUnderlined(const std::string &title) const
Print the content of the class.
Definition: TOPGeoBase.cc:35
double getReflectivity(const GeoOpticalSurface &surface, double energy) const
Returns reflectivity of optical surface at given photon energy.
Definition: TOPGeoBase.cc:72
virtual void printSurface(const GeoOpticalSurface &surface) const
Print the content of optical surface.
Definition: TOPGeoBase.cc:44
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.