Belle II Software  release-05-01-25
GeoMaterialProperty.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 GeoMaterialProperty: public TObject {
22  public:
24  GeoMaterialProperty() = default;
26  GeoMaterialProperty(const std::string& name, const std::vector<double>& energies, const std::vector<double>& values):
27  m_name(name), m_energies(energies), m_values(values) {}
29  void setName(const std::string& name) { m_name = name; }
31  void setEnergies(const std::vector<double>& energies) { m_energies = energies; }
33  void setValues(const std::vector<double>& values) { m_values = values; }
35  const std::string& getName() const { return m_name; }
37  const std::vector<double>& getEnergies() const { return m_energies; }
39  const std::vector<double>& getValues() const { return m_values; }
41  int getN() const { return m_energies.size(); }
42  private:
44  std::string m_name;
46  std::vector<double> m_energies;
48  std::vector<double> m_values;
51  };
53 }; // Belle2 namespace
Belle2::GeoMaterialProperty::m_name
std::string m_name
name of the property
Definition: GeoMaterialProperty.h:52
Belle2::GeoMaterialProperty::getValues
const std::vector< double > & getValues() const
get values at the given energies
Definition: GeoMaterialProperty.h:47
Belle2::GeoMaterialProperty::getEnergies
const std::vector< double > & getEnergies() const
get energies for the property
Definition: GeoMaterialProperty.h:45
Belle2::GeoMaterialProperty::setName
void setName(const std::string &name)
set name of the property
Definition: GeoMaterialProperty.h:37
Belle2::GeoMaterialProperty::setEnergies
void setEnergies(const std::vector< double > &energies)
set energies for the property
Definition: GeoMaterialProperty.h:39
Belle2::GeoMaterialProperty
Property of a material.
Definition: GeoMaterialProperty.h:29
Belle2::GeoMaterialProperty::m_values
std::vector< double > m_values
values at the given energies
Definition: GeoMaterialProperty.h:56
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GeoMaterialProperty::getName
const std::string & getName() const
get name of the property
Definition: GeoMaterialProperty.h:43
Belle2::GeoMaterialProperty::setValues
void setValues(const std::vector< double > &values)
set values at the given energies
Definition: GeoMaterialProperty.h:41
Belle2::GeoMaterialProperty::m_energies
std::vector< double > m_energies
energies for the property
Definition: GeoMaterialProperty.h:54
Belle2::GeoMaterialProperty::GeoMaterialProperty
GeoMaterialProperty()=default
default constructor
Belle2::GeoMaterialProperty::ClassDef
ClassDef(GeoMaterialProperty, 1)
Add ROOT reflection info.
Belle2::GeoMaterialProperty::getN
int getN() const
get the number of values
Definition: GeoMaterialProperty.h:49