Belle II Software  release-05-02-19
GeoConfiguration.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
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/GeoMaterial.h>
15 #include <geometry/dbobjects/GeoComponent.h>
16 #include <vector>
17 
18 
19 namespace Belle2 {
25  class GeoConfiguration: public TObject {
26  public:
28  GeoConfiguration() = default;
36  GeoConfiguration(const std::string& name, double width, double height, double length, const std::string& material): TObject(),
37  m_name(name), m_globalWidth(width), m_globalHeight(height), m_globalLength(length), m_globalMaterial(material) {}
39  void addMaterial(const GeoMaterial& material) { m_materials.emplace_back(material); }
41  void addComponent(const GeoComponent& component) { m_components.emplace_back(component); }
43  const std::string& getName() const { return m_name; }
46  double getGlobalWidth() const { return m_globalWidth; }
49  double getGlobalHeight() const { return m_globalHeight; }
52  double getGlobalLength() const { return m_globalLength; }
54  const std::string& getGlobalMaterial() const { return m_globalMaterial; }
56  const std::vector<GeoMaterial>& getMaterials() const { return m_materials; }
58  const std::vector<GeoComponent>& getComponents() const { return m_components; }
59  private:
61  std::vector<GeoMaterial> m_materials;
63  std::vector<GeoComponent> m_components;
65  std::string m_name;
67  double m_globalWidth{0};
69  double m_globalHeight{0};
71  double m_globalLength{0};
73  std::string m_globalMaterial;
76  };
78 }; // Belle2 namespace
Belle2::GeoConfiguration::m_components
std::vector< GeoComponent > m_components
list of components
Definition: GeoConfiguration.h:71
Belle2::GeoConfiguration::m_globalMaterial
std::string m_globalMaterial
material of the global volume
Definition: GeoConfiguration.h:81
Belle2::GeoConfiguration::m_globalWidth
double m_globalWidth
half width of the global volume
Definition: GeoConfiguration.h:75
Belle2::GeoConfiguration::m_globalHeight
double m_globalHeight
half height of the global volume
Definition: GeoConfiguration.h:77
Belle2::GeoConfiguration
configuration of the geometry
Definition: GeoConfiguration.h:33
Belle2::GeoConfiguration::m_name
std::string m_name
name of the detector configuration
Definition: GeoConfiguration.h:73
Belle2::GeoConfiguration::getGlobalWidth
double getGlobalWidth() const
get the half width of the global volume, that is length in + and - x direction.
Definition: GeoConfiguration.h:54
Belle2::GeoConfiguration::ClassDef
ClassDef(GeoConfiguration, 1)
Add ROOT reflection info.
Belle2::GeoConfiguration::m_materials
std::vector< GeoMaterial > m_materials
list of Materials
Definition: GeoConfiguration.h:69
Belle2::GeoConfiguration::getName
const std::string & getName() const
get the name of the detector
Definition: GeoConfiguration.h:51
Belle2::GeoConfiguration::getComponents
const std::vector< GeoComponent > & getComponents() const
get list of components
Definition: GeoConfiguration.h:66
Belle2::GeoConfiguration::addComponent
void addComponent(const GeoComponent &component)
add a component to the list of components
Definition: GeoConfiguration.h:49
Belle2::GeoConfiguration::getGlobalMaterial
const std::string & getGlobalMaterial() const
get the material of the global volume
Definition: GeoConfiguration.h:62
Belle2::GeoConfiguration::getGlobalLength
double getGlobalLength() const
get the half length of the global volume, that is length in + and - z direction.
Definition: GeoConfiguration.h:60
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GeoConfiguration::getMaterials
const std::vector< GeoMaterial > & getMaterials() const
get List of Materials
Definition: GeoConfiguration.h:64
Belle2::GeoConfiguration::m_globalLength
double m_globalLength
half length of the global volume
Definition: GeoConfiguration.h:79
Belle2::GeoConfiguration::GeoConfiguration
GeoConfiguration()=default
empty constructor for ROOT
Belle2::GeoConfiguration::addMaterial
void addMaterial(const GeoMaterial &material)
add a material to the list of materials
Definition: GeoConfiguration.h:47
Belle2::GeoConfiguration::getGlobalHeight
double getGlobalHeight() const
get the half height of the global volume, that is length in + and - y direction.
Definition: GeoConfiguration.h:57