Belle II Software  release-08-01-10
GeoMaterialComponent.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 
13 namespace Belle2 {
19  class GeoMaterialComponent: public TObject {
20  public:
22  GeoMaterialComponent() = default;
24  GeoMaterialComponent(const std::string& name, bool isElement, double fraction):
25  m_name(name), m_isElement(isElement), m_fraction(fraction) {}
27  void setName(const std::string& name) { m_name = name; }
29  void setIselement(bool isElement) { m_isElement = isElement; }
31  void setFraction(double fraction) { m_fraction = fraction; }
33  const std::string& getName() const { return m_name; }
35  bool getIselement() const { return m_isElement; }
37  double getFraction() const { return m_fraction; }
38  private:
40  std::string m_name;
44  double m_fraction;
47  };
49 }; // Belle2 namespace
Component of a material.
void setFraction(double fraction)
set fraction of the component from the full materials
void setIselement(bool isElement)
set true if the component is a chemical element, false if it is a composite material
GeoMaterialComponent(const std::string &name, bool isElement, double fraction)
full constructor
GeoMaterialComponent()=default
default constructor
const std::string & getName() const
get name of the component
void setName(const std::string &name)
set name of the component
double getFraction() const
get fraction of the component from the full materials
bool m_isElement
true if the component is a chemical element, false if it is a composite material
double m_fraction
fraction of the component from the full materials
bool getIselement() const
get true if the component is a chemical element, false if it is a composite material
std::string m_name
name of the component
ClassDef(GeoMaterialComponent, 1)
Add ROOT reflection info.
Abstract base class for different kinds of events.