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

GGEMS class handling material(s) for a specific navigator. More...

#include "GGEMSMaterials.hh"

Collaboration diagram for GGEMSMaterials:
Collaboration graph

Public Member Functions

 GGEMSMaterials (void)
 GGEMSMaterials constructor. More...
 
 ~GGEMSMaterials (void)
 GGEMSMaterials destructor. More...
 
 GGEMSMaterials (GGEMSMaterials const &materials)=delete
 Avoid copy by reference. More...
 
GGEMSMaterialsoperator= (GGEMSMaterials const &materials)=delete
 Avoid assignement by reference. More...
 
 GGEMSMaterials (GGEMSMaterials const &&materials)=delete
 Avoid copy by rvalue reference. More...
 
GGEMSMaterialsoperator= (GGEMSMaterials const &&materials)=delete
 Avoid copy by rvalue reference. More...
 
void AddMaterial (std::string const &material_name)
 Add a material associated to a phantom. More...
 
GGfloat GetDensity (std::string const &material_name, GGsize const &thread_index=0) const
 get the density of material More...
 
GGfloat GetAtomicNumberDensity (std::string const &material_name, GGsize const &thread_index=0) const
 get the atomic number density of material More...
 
GGfloat GetEnergyCut (std::string const &material_name, std::string const &particle_type, GGfloat const &distance, std::string const &unit, GGsize const &thread_index=0)
 Get the energy cut of material in keV. More...
 
std::string GetMaterialName (GGsize i) const
 get the name of the material at position i More...
 
ptrdiff_t GetMaterialIndex (std::string const &material_name) const
 get the index of the material More...
 
GGsize GetNumberOfMaterials (void) const
 Get the number of materials in the phantom. More...
 
cl::Buffer * GetMaterialTables (GGsize const &thread_index) const
 get the pointer on material tables on OpenCL device More...
 
GGEMSRangeCutsGetRangeCuts (void) const
 get the pointer on range cuts More...
 
void SetDistanceCut (std::string const &particle_name, GGfloat const &value, std::string const &unit)
 set the cut for a particle in distance More...
 
void PrintInfos (void) const
 printing labels and materials infos More...
 
void Initialize (void)
 Initialize the materials for a navigator/phantom. More...
 
void Clean (void)
 clean all declared materials on OpenCL device More...
 

Private Member Functions

void BuildMaterialTables (void)
 Building material tables. More...
 

Private Attributes

std::vector< std::string > materials_
 
cl::Buffer ** material_tables_
 
GGsize number_activated_devices_
 
GGEMSRangeCutsrange_cuts_
 

Detailed Description

GGEMS class handling material(s) for a specific navigator.

Definition at line 48 of file GGEMSMaterials.hh.

Constructor & Destructor Documentation

◆ GGEMSMaterials() [1/3]

GGEMSMaterials::GGEMSMaterials ( void  )

GGEMSMaterials constructor.

Definition at line 42 of file GGEMSMaterials.cc.

◆ ~GGEMSMaterials()

GGEMSMaterials::~GGEMSMaterials ( void  )

GGEMSMaterials destructor.

Definition at line 65 of file GGEMSMaterials.cc.

◆ GGEMSMaterials() [2/3]

GGEMSMaterials::GGEMSMaterials ( GGEMSMaterials const &  materials)
delete

Avoid copy by reference.

Parameters
materials- reference on the GGEMS materials

◆ GGEMSMaterials() [3/3]

GGEMSMaterials::GGEMSMaterials ( GGEMSMaterials const &&  materials)
delete

Avoid copy by rvalue reference.

Parameters
materials- rvalue reference on the GGEMS materials

Member Function Documentation

◆ AddMaterial()

void GGEMSMaterials::AddMaterial ( std::string const &  material_name)

Add a material associated to a phantom.

Parameters
material_name- name of the material

Definition at line 102 of file GGEMSMaterials.cc.

◆ BuildMaterialTables()

void GGEMSMaterials::BuildMaterialTables ( void  )
private

Building material tables.

Definition at line 210 of file GGEMSMaterials.cc.

◆ Clean()

void GGEMSMaterials::Clean ( void  )

clean all declared materials on OpenCL device

Definition at line 81 of file GGEMSMaterials.cc.

◆ GetAtomicNumberDensity()

GGfloat GGEMSMaterials::GetAtomicNumberDensity ( std::string const &  material_name,
GGsize const &  thread_index = 0 
) const

get the atomic number density of material

Parameters
material_name- name of the material
thread_index- index of activated device (thread index)
Returns
atomic number density of material in atom.cm-3

Definition at line 335 of file GGEMSMaterials.cc.

◆ GetDensity()

GGfloat GGEMSMaterials::GetDensity ( std::string const &  material_name,
GGsize const &  thread_index = 0 
) const

get the density of material

Parameters
material_name- name of the material
thread_index- index of activated device (thread index)
Returns
density of material in g.cm-3

Definition at line 307 of file GGEMSMaterials.cc.

◆ GetEnergyCut()

GGfloat GGEMSMaterials::GetEnergyCut ( std::string const &  material_name,
std::string const &  particle_type,
GGfloat const &  distance,
std::string const &  unit,
GGsize const &  thread_index = 0 
)

Get the energy cut of material in keV.

Parameters
material_name- name of the material
particle_type- type of particle
thread_index- index of activated device (thread index)
distance- distance cut
unit- unit of the distance
Returns
energy cut in keV

Definition at line 357 of file GGEMSMaterials.cc.

◆ GetMaterialIndex()

ptrdiff_t GGEMSMaterials::GetMaterialIndex ( std::string const &  material_name) const
inline

get the index of the material

Parameters
material_name- name of the material
Returns
index of material

Definition at line 140 of file GGEMSMaterials.hh.

◆ GetMaterialName()

std::string GGEMSMaterials::GetMaterialName ( GGsize  i) const
inline

get the name of the material at position i

Parameters
i- index of the material
Returns
name of the material

Definition at line 132 of file GGEMSMaterials.hh.

◆ GetMaterialTables()

cl::Buffer * GGEMSMaterials::GetMaterialTables ( GGsize const &  thread_index) const
inline

get the pointer on material tables on OpenCL device

Parameters
thread_index- index of activated device (thread index)
Returns
the pointer on material tables on OpenCL device

Definition at line 164 of file GGEMSMaterials.hh.

◆ GetNumberOfMaterials()

GGsize GGEMSMaterials::GetNumberOfMaterials ( void  ) const
inline

Get the number of materials in the phantom.

Returns
the number of materials in the phantom

Definition at line 156 of file GGEMSMaterials.hh.

◆ GetRangeCuts()

GGEMSRangeCuts * GGEMSMaterials::GetRangeCuts ( void  ) const
inline

get the pointer on range cuts

Returns
the pointer on range cuts

Definition at line 171 of file GGEMSMaterials.hh.

◆ Initialize()

void GGEMSMaterials::Initialize ( void  )

Initialize the materials for a navigator/phantom.

Definition at line 394 of file GGEMSMaterials.cc.

◆ operator=() [1/2]

GGEMSMaterials & GGEMSMaterials::operator= ( GGEMSMaterials const &&  materials)
delete

Avoid copy by rvalue reference.

Parameters
materials- rvalue reference on the GGEMS materials

◆ operator=() [2/2]

GGEMSMaterials & GGEMSMaterials::operator= ( GGEMSMaterials const &  materials)
delete

Avoid assignement by reference.

Parameters
materials- reference on the GGEMS materials

◆ PrintInfos()

void GGEMSMaterials::PrintInfos ( void  ) const

printing labels and materials infos

Definition at line 143 of file GGEMSMaterials.cc.

◆ SetDistanceCut()

void GGEMSMaterials::SetDistanceCut ( std::string const &  particle_name,
GGfloat const &  value,
std::string const &  unit 
)

set the cut for a particle in distance

Parameters
particle_name- type of particle gamma, e+, e-
value- value of cut
unit- length unit

Definition at line 116 of file GGEMSMaterials.cc.

Member Data Documentation

◆ material_tables_

cl::Buffer** GGEMSMaterials::material_tables_
private

Material tables on OpenCL device

Definition at line 209 of file GGEMSMaterials.hh.

◆ materials_

std::vector<std::string> GGEMSMaterials::materials_
private

Defined material for a phantom

Definition at line 208 of file GGEMSMaterials.hh.

◆ number_activated_devices_

GGsize GGEMSMaterials::number_activated_devices_
private

Number of activated device

Definition at line 210 of file GGEMSMaterials.hh.

◆ range_cuts_

GGEMSRangeCuts* GGEMSMaterials::range_cuts_
private

Cut for particles

Definition at line 211 of file GGEMSMaterials.hh.


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