Belle II Software light-2406-ragdoll
GeoConfiguration.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/GeoMaterial.h>
13#include <geometry/dbobjects/GeoComponent.h>
14#include <vector>
15
16
17namespace Belle2 {
23 class GeoConfiguration: public TObject {
24 public:
26 GeoConfiguration() = default;
34 GeoConfiguration(const std::string& name, double width, double height, double length, const std::string& material): TObject(),
35 m_name(name), m_globalWidth(width), m_globalHeight(height), m_globalLength(length), m_globalMaterial(material) {}
37 void addMaterial(const GeoMaterial& material) { m_materials.emplace_back(material); }
39 void addComponent(const GeoComponent& component) { m_components.emplace_back(component); }
41 const std::string& getName() const { return m_name; }
44 double getGlobalWidth() const { return m_globalWidth; }
47 double getGlobalHeight() const { return m_globalHeight; }
50 double getGlobalLength() const { return m_globalLength; }
52 const std::string& getGlobalMaterial() const { return m_globalMaterial; }
54 const std::vector<GeoMaterial>& getMaterials() const { return m_materials; }
56 const std::vector<GeoComponent>& getComponents() const { return m_components; }
57 private:
59 std::vector<GeoMaterial> m_materials;
61 std::vector<GeoComponent> m_components;
63 std::string m_name;
65 double m_globalWidth{0};
67 double m_globalHeight{0};
69 double m_globalLength{0};
71 std::string m_globalMaterial;
74 };
76}; // Belle2 namespace
Describe one component of the Geometry.
Definition: GeoComponent.h:19
configuration of the geometry
const std::vector< GeoMaterial > & getMaterials() const
get List of Materials
ClassDef(GeoConfiguration, 1)
Add ROOT reflection info.
double m_globalLength
half length of the global volume
void addMaterial(const GeoMaterial &material)
add a material to the list of materials
const std::string & getName() const
get the name of the detector
void addComponent(const GeoComponent &component)
add a component to the list of components
double m_globalWidth
half width of the global volume
double getGlobalWidth() const
get the half width of the global volume, that is length in + and - x direction.
const std::string & getGlobalMaterial() const
get the material of the global volume
std::vector< GeoMaterial > m_materials
list of Materials
GeoConfiguration()=default
empty constructor for ROOT
double getGlobalHeight() const
get the half height of the global volume, that is length in + and - y direction.
const std::vector< GeoComponent > & getComponents() const
get list of components
double m_globalHeight
half height of the global volume
std::string m_globalMaterial
material of the global volume
double getGlobalLength() const
get the half length of the global volume, that is length in + and - z direction.
std::string m_name
name of the detector configuration
std::vector< GeoComponent > m_components
list of components
GeoConfiguration(const std::string &name, double width, double height, double length, const std::string &material)
Construct new geometry configuration.
Class to represent a material informaion in the Database.
Definition: GeoMaterial.h:22
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24