GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSMaterialsDatabaseManager Class Reference

GGEMS class managing the material database. More...

#include "GGEMSMaterialsDatabaseManager.hh"

Collaboration diagram for GGEMSMaterialsDatabaseManager:
Collaboration graph

Public Member Functions

 GGEMSMaterialsDatabaseManager (GGEMSMaterialsDatabaseManager const &material_manager)=delete
 Avoid copy of the class by reference. More...
 
GGEMSMaterialsDatabaseManageroperator= (GGEMSMaterialsDatabaseManager const &material_manager)=delete
 Avoid assignement of the class by reference. More...
 
 GGEMSMaterialsDatabaseManager (GGEMSMaterialsDatabaseManager const &&material_manager)=delete
 Avoid copy of the class by rvalue reference. More...
 
GGEMSMaterialsDatabaseManageroperator= (GGEMSMaterialsDatabaseManager const &&material_manager)=delete
 Avoid copy of the class by rvalue reference. More...
 
void SetMaterialsDatabase (std::string const &filename)
 set the material filename More...
 
void PrintAvailableChemicalElements (void) const
 Printing all the available elements. More...
 
void PrintAvailableMaterials (void) const
 Printing all the available materials. More...
 
bool IsReady (void) const
 check if the material manager is ready More...
 
GGEMSSingleMaterial GetMaterial (std::string const &material_name) const
 get the material More...
 
GGEMSChemicalElement GetChemicalElement (std::string const &chemical_element_name) const
 get the chemical element More...
 
GGfloat GetRadiationLength (std::string const &material) const
 get the radiation length of a material More...
 
GGfloat GetAtomicNumberDensity (std::string const &material, GGsize const &index) const
 Compute the atomic number density of an element in a material. More...
 
void Clean (void)
 clean OpenCL data More...
 

Static Public Member Functions

static GGEMSMaterialsDatabaseManagerGetInstance (void)
 Create at first time the Singleton. More...
 

Private Member Functions

 GGEMSMaterialsDatabaseManager (void)
 Unable the constructor for the user. More...
 
 ~GGEMSMaterialsDatabaseManager (void)
 Unable the destructor for the user. More...
 
void LoadMaterialsDatabase (std::string const &filename)
 Load materials for GGEMS. More...
 
void LoadChemicalElements (void)
 load all the chemical elements More...
 
void AddChemicalElements (std::string const &element_name, GGuchar const &element_Z, GGfloat const &element_M, GGfloat const &element_I, GGchar const &state, GGint const &index_density_correction)
 Adding a chemical element in GGEMS. More...
 

Private Attributes

MaterialUMap materials_
 
ChemicalElementUMap chemical_elements_
 

Detailed Description

GGEMS class managing the material database.

Definition at line 78 of file GGEMSMaterialsDatabaseManager.hh.

Constructor & Destructor Documentation

◆ GGEMSMaterialsDatabaseManager() [1/3]

GGEMSMaterialsDatabaseManager::GGEMSMaterialsDatabaseManager ( void  )
private

Unable the constructor for the user.

Definition at line 40 of file GGEMSMaterialsDatabaseManager.cc.

◆ ~GGEMSMaterialsDatabaseManager()

GGEMSMaterialsDatabaseManager::~GGEMSMaterialsDatabaseManager ( void  )
private

Unable the destructor for the user.

Definition at line 54 of file GGEMSMaterialsDatabaseManager.cc.

◆ GGEMSMaterialsDatabaseManager() [2/3]

GGEMSMaterialsDatabaseManager::GGEMSMaterialsDatabaseManager ( GGEMSMaterialsDatabaseManager const &  material_manager)
delete

Avoid copy of the class by reference.

Parameters
material_manager- reference on the material manager

◆ GGEMSMaterialsDatabaseManager() [3/3]

GGEMSMaterialsDatabaseManager::GGEMSMaterialsDatabaseManager ( GGEMSMaterialsDatabaseManager const &&  material_manager)
delete

Avoid copy of the class by rvalue reference.

Parameters
material_manager- rvalue reference on the material manager

Member Function Documentation

◆ AddChemicalElements()

void GGEMSMaterialsDatabaseManager::AddChemicalElements ( std::string const &  element_name,
GGuchar const &  element_Z,
GGfloat const &  element_M,
GGfloat const &  element_I,
GGchar const &  state,
GGint const &  index_density_correction 
)
private

Adding a chemical element in GGEMS.

Parameters
element_name- Name of the element
element_Z- Atomic number of the element
element_M- Molar mass of the element
element_I- Mean excitation energy of the element
state- state of the material, gas/solid
index_density_correction- index for the density correction

Definition at line 256 of file GGEMSMaterialsDatabaseManager.cc.

◆ Clean()

void GGEMSMaterialsDatabaseManager::Clean ( void  )

clean OpenCL data

Definition at line 65 of file GGEMSMaterialsDatabaseManager.cc.

◆ GetAtomicNumberDensity()

GGfloat GGEMSMaterialsDatabaseManager::GetAtomicNumberDensity ( std::string const &  material,
GGsize const &  index 
) const
inline

Compute the atomic number density of an element in a material.

Parameters
material- name of the material
index- index of the element in the material
Returns
get the atomic number density of an element in a material

Definition at line 216 of file GGEMSMaterialsDatabaseManager.hh.

◆ GetChemicalElement()

GGEMSChemicalElement GGEMSMaterialsDatabaseManager::GetChemicalElement ( std::string const &  chemical_element_name) const
inline

get the chemical element

Parameters
chemical_element_name- name of the chemical element
Returns
the structure to a chemical element

Definition at line 187 of file GGEMSMaterialsDatabaseManager.hh.

◆ GetInstance()

static GGEMSMaterialsDatabaseManager & GGEMSMaterialsDatabaseManager::GetInstance ( void  )
inlinestatic

Create at first time the Singleton.

Returns
Object of type GGEMSMaterialsDatabaseManager

Definition at line 97 of file GGEMSMaterialsDatabaseManager.hh.

◆ GetMaterial()

GGEMSSingleMaterial GGEMSMaterialsDatabaseManager::GetMaterial ( std::string const &  material_name) const
inline

get the material

Parameters
material_name- name of the material
Returns
the structure to a material

Definition at line 167 of file GGEMSMaterialsDatabaseManager.hh.

◆ GetRadiationLength()

GGfloat GGEMSMaterialsDatabaseManager::GetRadiationLength ( std::string const &  material) const

get the radiation length of a material

Parameters
material- name of the material
Returns
the radiation length of a material

Definition at line 202 of file GGEMSMaterialsDatabaseManager.hh.

◆ IsReady()

bool GGEMSMaterialsDatabaseManager::IsReady ( void  ) const
inline

check if the material manager is ready

Returns
true if the material manager is ready otherwize false

Definition at line 155 of file GGEMSMaterialsDatabaseManager.hh.

◆ LoadChemicalElements()

void GGEMSMaterialsDatabaseManager::LoadChemicalElements ( void  )
private

load all the chemical elements

Definition at line 145 of file GGEMSMaterialsDatabaseManager.cc.

◆ LoadMaterialsDatabase()

void GGEMSMaterialsDatabaseManager::LoadMaterialsDatabase ( std::string const &  filename)
private

Load materials for GGEMS.

Parameters
filename- filename containing materials for GGEMS

Definition at line 95 of file GGEMSMaterialsDatabaseManager.cc.

◆ operator=() [1/2]

GGEMSMaterialsDatabaseManager & GGEMSMaterialsDatabaseManager::operator= ( GGEMSMaterialsDatabaseManager const &&  material_manager)
delete

Avoid copy of the class by rvalue reference.

Parameters
material_manager- rvalue reference on the material manager

◆ operator=() [2/2]

GGEMSMaterialsDatabaseManager & GGEMSMaterialsDatabaseManager::operator= ( GGEMSMaterialsDatabaseManager const &  material_manager)
delete

Avoid assignement of the class by reference.

Parameters
material_manager- reference on the material manager

◆ PrintAvailableChemicalElements()

void GGEMSMaterialsDatabaseManager::PrintAvailableChemicalElements ( void  ) const

Printing all the available elements.

Definition at line 333 of file GGEMSMaterialsDatabaseManager.cc.

◆ PrintAvailableMaterials()

void GGEMSMaterialsDatabaseManager::PrintAvailableMaterials ( void  ) const

Printing all the available materials.

Definition at line 352 of file GGEMSMaterialsDatabaseManager.cc.

◆ SetMaterialsDatabase()

void GGEMSMaterialsDatabaseManager::SetMaterialsDatabase ( std::string const &  filename)

set the material filename

Parameters
filename- name of the file containing material database

Definition at line 76 of file GGEMSMaterialsDatabaseManager.cc.

Member Data Documentation

◆ chemical_elements_

ChemicalElementUMap GGEMSMaterialsDatabaseManager::chemical_elements_
private

Map storing GGEMS chemical elements

Definition at line 263 of file GGEMSMaterialsDatabaseManager.hh.

◆ materials_

MaterialUMap GGEMSMaterialsDatabaseManager::materials_
private

Map storing the GGEMS materials

Definition at line 262 of file GGEMSMaterialsDatabaseManager.hh.


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