Belle II Software  release-05-02-19
GeoMaterialComponent.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 
15 namespace Belle2 {
21  class GeoMaterialComponent: public TObject {
22  public:
24  GeoMaterialComponent() = default;
26  GeoMaterialComponent(const std::string& name, bool isElement, double fraction):
27  m_name(name), m_isElement(isElement), m_fraction(fraction) {}
29  void setName(const std::string& name) { m_name = name; }
31  void setIselement(bool isElement) { m_isElement = isElement; }
33  void setFraction(double fraction) { m_fraction = fraction; }
35  const std::string& getName() const { return m_name; }
37  bool getIselement() const { return m_isElement; }
39  double getFraction() const { return m_fraction; }
40  private:
42  std::string m_name;
44  bool m_isElement;
46  double m_fraction;
49  };
51 }; // Belle2 namespace
Belle2::GeoMaterialComponent::getIselement
bool getIselement() const
get true if the component is a chemical element, false if it is a composite material
Definition: GeoMaterialComponent.h:45
Belle2::GeoMaterialComponent::m_fraction
double m_fraction
fraction of the component from the full materials
Definition: GeoMaterialComponent.h:54
Belle2::GeoMaterialComponent::m_name
std::string m_name
name of the component
Definition: GeoMaterialComponent.h:50
Belle2::GeoMaterialComponent
Component of a material.
Definition: GeoMaterialComponent.h:29
Belle2::GeoMaterialComponent::setFraction
void setFraction(double fraction)
set fraction of the component from the full materials
Definition: GeoMaterialComponent.h:41
Belle2::GeoMaterialComponent::getFraction
double getFraction() const
get fraction of the component from the full materials
Definition: GeoMaterialComponent.h:47
Belle2::GeoMaterialComponent::getName
const std::string & getName() const
get name of the component
Definition: GeoMaterialComponent.h:43
Belle2::GeoMaterialComponent::GeoMaterialComponent
GeoMaterialComponent()=default
default constructor
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GeoMaterialComponent::m_isElement
bool m_isElement
true if the component is a chemical element, false if it is a composite material
Definition: GeoMaterialComponent.h:52
Belle2::GeoMaterialComponent::setIselement
void setIselement(bool isElement)
set true if the component is a chemical element, false if it is a composite material
Definition: GeoMaterialComponent.h:39
Belle2::GeoMaterialComponent::setName
void setName(const std::string &name)
set name of the component
Definition: GeoMaterialComponent.h:37
Belle2::GeoMaterialComponent::ClassDef
ClassDef(GeoMaterialComponent, 1)
Add ROOT reflection info.