Belle II Software  release-05-01-25
TOPGeoBase.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 #include <geometry/dbobjects/GeoOpticalSurface.h>
15 #include <string>
16 
17 
18 namespace Belle2 {
27  class TOPGeoBase: public TObject {
28  public:
29 
33  TOPGeoBase()
34  {}
35 
40  explicit TOPGeoBase(const std::string& name): m_name(name)
41  {}
42 
47  void setName(const std::string& name) {m_name = name;}
48 
53  const std::string& getName() const {return m_name;}
54 
59  virtual bool isConsistent() const {return false;}
60 
65  virtual void print(const std::string& title) const;
66 
71  virtual void printSurface(const GeoOpticalSurface& surface) const;
72 
78  double getReflectivity(const GeoOpticalSurface& surface, double energy) const;
79 
80  protected:
81 
86  void printUnderlined(const std::string& title) const;
87 
88  static double s_unit;
89  static std::string s_unitName;
91  std::string m_name;
93  ClassDef(TOPGeoBase, 1);
95  };
96 
98 } // end namespace Belle2
Belle2::TOPGeoBase::printSurface
virtual void printSurface(const GeoOpticalSurface &surface) const
Print the content of optical surface.
Definition: TOPGeoBase.cc:46
Belle2::TOPGeoBase::s_unitName
static std::string s_unitName
conversion unit name
Definition: TOPGeoBase.h:97
Belle2::TOPGeoBase::getName
const std::string & getName() const
Returns object name.
Definition: TOPGeoBase.h:61
Belle2::TOPGeoBase::m_name
std::string m_name
geometry object name
Definition: TOPGeoBase.h:99
Belle2::TOPGeoBase::isConsistent
virtual bool isConsistent() const
Check for consistency of data members.
Definition: TOPGeoBase.h:67
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPGeoBase::printUnderlined
void printUnderlined(const std::string &title) const
Print the content of the class.
Definition: TOPGeoBase.cc:37
Belle2::TOPGeoBase::s_unit
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:96
Belle2::TOPGeoBase::TOPGeoBase
TOPGeoBase()
Default constructor.
Definition: TOPGeoBase.h:41
Belle2::TOPGeoBase::getReflectivity
double getReflectivity(const GeoOpticalSurface &surface, double energy) const
Returns reflectivity of optical surface at given photon energy.
Definition: TOPGeoBase.cc:74
Belle2::TOPGeoBase::setName
void setName(const std::string &name)
Sets object name.
Definition: TOPGeoBase.h:55
Belle2::TOPGeoBase::print
virtual void print(const std::string &title) const
Print the content of the class.
Definition: TOPGeoBase.cc:30
Belle2::TOPGeoBase::ClassDef
ClassDef(TOPGeoBase, 1)
ClassDef.