Belle II Software light-2406-ragdoll
GeoMaterial Class Reference

Class to represent a material informaion in the Database. More...

#include <GeoMaterial.h>

Inheritance diagram for GeoMaterial:
Collaboration diagram for GeoMaterial:

Public Member Functions

 GeoMaterial ()=default
 default constructor
 
void setName (const std::string &name)
 set the name of the material
 
void setState (int state)
 set the state of the material
 
void setDensity (double density)
 set the density of the material (in default framework units
 
void setTemperature (double temperature)
 set the temperature of the material (in default framework units
 
void setPressure (double pressure)
 set the pressure of the material (in default framework units
 
void addComponent (const GeoMaterialComponent &component)
 add a component to the material.
 
void addProperty (const GeoMaterialProperty &property)
 add a property to the material
 
const std::string & getName () const
 get the name of the material
 
int getState () const
 get the state of the material
 
double getDensity () const
 get the density of the material (in default framework units
 
double getTemperature () const
 get the temperature of the material (in default framework units
 
double getPressure () const
 get the pressure of the material (in default framework units
 
std::vector< GeoMaterialComponent > & getComponents ()
 get all components
 
const std::vector< GeoMaterialComponent > & getComponents () const
 get all components
 
const std::vector< GeoMaterialProperty > & getProperties () const
 get all properties
 
bool hasProperties () const
 check if the material has at least one property
 

Private Member Functions

 ClassDef (GeoMaterial, 1)
 reflection info for ROOT
 

Private Attributes

std::string m_name {""}
 name of the material
 
int m_state {0}
 Geant4 state of the material.
 
double m_density {0}
 density of the material
 
double m_temperature {0}
 temperature of the material
 
double m_pressure {0}
 pressure of the material
 
std::vector< GeoMaterialComponentm_components
 components of this material
 
std::vector< GeoMaterialPropertym_properties
 properties of this material
 

Detailed Description

Class to represent a material informaion in the Database.

Definition at line 22 of file GeoMaterial.h.

Member Function Documentation

◆ addComponent()

void addComponent ( const GeoMaterialComponent component)
inline

add a component to the material.

Fall fractions should add up to one but this is not verified

Definition at line 37 of file GeoMaterial.h.

37{ m_components.emplace_back(component); }
std::vector< GeoMaterialComponent > m_components
components of this material
Definition: GeoMaterial.h:71

◆ addProperty()

void addProperty ( const GeoMaterialProperty property)
inline

add a property to the material

Definition at line 39 of file GeoMaterial.h.

39{ m_properties.emplace_back(property); }
std::vector< GeoMaterialProperty > m_properties
properties of this material
Definition: GeoMaterial.h:73

◆ getComponents() [1/2]

std::vector< GeoMaterialComponent > & getComponents ( )
inline

get all components

Definition at line 51 of file GeoMaterial.h.

51{ return m_components; }

◆ getComponents() [2/2]

const std::vector< GeoMaterialComponent > & getComponents ( ) const
inline

get all components

Definition at line 53 of file GeoMaterial.h.

53{ return m_components; }

◆ getDensity()

double getDensity ( ) const
inline

get the density of the material (in default framework units

Definition at line 45 of file GeoMaterial.h.

45{ return m_density; }
double m_density
density of the material
Definition: GeoMaterial.h:65

◆ getName()

const std::string & getName ( ) const
inline

get the name of the material

Definition at line 41 of file GeoMaterial.h.

41{ return m_name; }
std::string m_name
name of the material
Definition: GeoMaterial.h:61

◆ getPressure()

double getPressure ( ) const
inline

get the pressure of the material (in default framework units

Definition at line 49 of file GeoMaterial.h.

49{ return m_pressure; }
double m_pressure
pressure of the material
Definition: GeoMaterial.h:69

◆ getProperties()

const std::vector< GeoMaterialProperty > & getProperties ( ) const
inline

get all properties

Definition at line 55 of file GeoMaterial.h.

55{ return m_properties; }

◆ getState()

int getState ( ) const
inline

get the state of the material

Definition at line 43 of file GeoMaterial.h.

43{ return m_state; }
int m_state
Geant4 state of the material.
Definition: GeoMaterial.h:63

◆ getTemperature()

double getTemperature ( ) const
inline

get the temperature of the material (in default framework units

Definition at line 47 of file GeoMaterial.h.

47{ return m_temperature; }
double m_temperature
temperature of the material
Definition: GeoMaterial.h:67

◆ hasProperties()

bool hasProperties ( ) const
inline

check if the material has at least one property

Returns
true if there is at least one property

Definition at line 58 of file GeoMaterial.h.

58{ return m_properties.size() > 0; }

◆ setDensity()

void setDensity ( double  density)
inline

set the density of the material (in default framework units

Definition at line 31 of file GeoMaterial.h.

31{ m_density = density; }

◆ setName()

void setName ( const std::string &  name)
inline

set the name of the material

Definition at line 27 of file GeoMaterial.h.

27{ m_name = name; }

◆ setPressure()

void setPressure ( double  pressure)
inline

set the pressure of the material (in default framework units

Definition at line 35 of file GeoMaterial.h.

35{ m_pressure = pressure; }

◆ setState()

void setState ( int  state)
inline

set the state of the material

Definition at line 29 of file GeoMaterial.h.

29{ m_state = state; }

◆ setTemperature()

void setTemperature ( double  temperature)
inline

set the temperature of the material (in default framework units

Definition at line 33 of file GeoMaterial.h.

33{ m_temperature = temperature; }

Member Data Documentation

◆ m_components

std::vector<GeoMaterialComponent> m_components
private

components of this material

Definition at line 71 of file GeoMaterial.h.

◆ m_density

double m_density {0}
private

density of the material

Definition at line 65 of file GeoMaterial.h.

◆ m_name

std::string m_name {""}
private

name of the material

Definition at line 61 of file GeoMaterial.h.

◆ m_pressure

double m_pressure {0}
private

pressure of the material

Definition at line 69 of file GeoMaterial.h.

◆ m_properties

std::vector<GeoMaterialProperty> m_properties
private

properties of this material

Definition at line 73 of file GeoMaterial.h.

◆ m_state

int m_state {0}
private

Geant4 state of the material.

Definition at line 63 of file GeoMaterial.h.

◆ m_temperature

double m_temperature {0}
private

temperature of the material

Definition at line 67 of file GeoMaterial.h.


The documentation for this class was generated from the following file: