|
GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
Go to the documentation of this file. 1 #ifndef GUARD_GGEMS_MATERIALS_GGEMSMATERIALS_HH
2 #define GUARD_GGEMS_MATERIALS_GGEMSMATERIALS_HH
35 #pragma warning(disable: 4251) // Deleting warning exporting STL members!!!
94 void AddMaterial(std::string
const& material_name);
103 GGfloat GetDensity(std::string
const& material_name,
GGsize const& thread_index = 0)
const;
112 GGfloat GetAtomicNumberDensity(std::string
const& material_name,
GGsize const& thread_index = 0)
const;
124 GGfloat GetEnergyCut(std::string
const& material_name, std::string
const& particle_type,
GGfloat const& distance, std::string
const& unit,
GGsize const& thread_index = 0);
142 std::vector<std::string>::const_iterator iter_mat = std::find(materials_.begin(), materials_.end(), material_name);
143 if (iter_mat == materials_.end()) {
144 std::ostringstream oss(std::ostringstream::out);
145 oss <<
"Material '" << material_name <<
"' not found!!!" << std::endl;
148 return std::distance(materials_.begin(), iter_mat);
180 void SetDistanceCut(std::string
const& particle_name,
GGfloat const& value, std::string
const& unit);
186 void PrintInfos(
void)
const;
192 void Initialize(
void);
205 void BuildMaterialTables(
void);
280 #endif // End of GUARD_GGEMS_PHYSICS_GGEMSMATERIALS_HH
GGfloat get_atomic_number_density_ggems_materials(GGEMSMaterials *materials, char const *material_name)
Get the density of material in g.cm-3.
GGEMSRangeCuts * range_cuts_
ptrdiff_t GetMaterialIndex(std::string const &material_name) const
get the index of the material
void initialize_ggems_materials(GGEMSMaterials *materials)
Intialize the tables for the materials.
GGEMS class storing and converting the cut in energy cut.
GGEMSMaterials(GGEMSMaterials const &&materials)=delete
Avoid copy by rvalue reference.
cl::Buffer * GetMaterialTables(GGsize const &thread_index) const
get the pointer on material tables on OpenCL device
GGEMS class handling material(s) for a specific navigator.
GGEMSRangeCuts * GetRangeCuts(void) const
get the pointer on range cuts
GGEMSMaterials(GGEMSMaterials const &materials)=delete
Avoid copy by reference.
void add_material_ggems_materials(GGEMSMaterials *materials, char const *material_name)
Add a material.
std::string GetMaterialName(GGsize i) const
get the name of the material at position i
GGsize GetNumberOfMaterials(void) const
Get the number of materials in the phantom.
Structure storing the material tables on OpenCL device.
std::vector< std::string > materials_
Singleton class storing all informations about OpenCL and managing GPU/CPU devices,...
GGfloat get_energy_cut_ggems_materials(GGEMSMaterials *materials, char const *material_name, char const *particle_type, GGfloat const distance, char const *unit)
Get the energy cut of material in keV.
void clean_ggems_materials(GGEMSMaterials *materials)
clean all declared materials on OpenCL device
GGEMSMaterials * create_ggems_materials(void)
Get the GGEMSMaterials pointer for python user.
void print_material_properties_ggems_materials(GGEMSMaterials *materials)
Print tables.
GGfloat get_density_ggems_materials(GGEMSMaterials *materials, char const *material_name)
Get the density of material in g.cm-3.
cl::Buffer ** material_tables_
GGEMSMaterials & operator=(GGEMSMaterials const &materials)=delete
Avoid assignement by reference.
GGEMSMaterials & operator=(GGEMSMaterials const &&materials)=delete
Avoid copy by rvalue reference.
GGsize number_activated_devices_
GGEMS singleton class managing the material database.
void ThrowException(std::string const &class_name, std::string const &method_name, std::string const &message)
Throw a C++ exception.