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