|
GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
Go to the documentation of this file.
41 primary_particle_(
""),
42 secondary_particle_(
""),
43 is_secondaries_(false)
45 GGcout(
"GGEMSEMProcess",
"GGEMSEMProcess", 3) <<
"GGEMSEMProcess creating..." <<
GGendl;
47 GGcout(
"GGEMSEMProcess",
"GGEMSEMProcess", 3) <<
"GGEMSEMProcess created!!!" <<
GGendl;
56 GGcout(
"GGEMSEMProcess",
"~GGEMSEMProcess", 3) <<
"GGEMSEMProcess erasing..." <<
GGendl;
58 GGcout(
"GGEMSEMProcess",
"~GGEMSEMProcess", 3) <<
"GGEMSEMProcess erased!!!" <<
GGendl;
71 GGcout(
"GGEMSEMProcess",
"BuildCrossSectionTables", 3) <<
"Building cross section table for process " <<
process_name_ <<
" on device: " << opencl_manager.
GetDeviceName(device_index) <<
GGendl;
90 for (
GGsize i = 0; i < number_of_bins; ++i) {
103 GGcout(
"GGEMSEMProcess",
"BuildCrossSectionTables", 0) <<
" - Material: " << cross_section_device->
material_names_[j]
106 for (
GGsize i = 0; i < number_of_bins; ++i) {
107 GGcout(
"GGEMSEMProcess",
"BuildCrossSectionTables", 0) <<
" + Energy: " << cross_section_device->
energy_bins_[i]/
keV <<
" keV, cross section: "
112 GGcout(
"GGEMSEMProcess",
"BuildCrossSectionTables", 0) <<
" # Element (Z): " << atomic_number
113 <<
", atomic number density: " << materials_device->
atomic_number_density_[k+id_elt]/(1/
cm3) <<
" atom/cm3, cross section per atom: "
122 opencl_manager.
ReleaseDeviceBuffer(particle_cross_sections, cross_section_device, thread_index);
132 GGfloat cross_section_material = 0.0f;
140 cross_section_material += material_tables->
atomic_number_density_[i+index_of_offset] * cross_section_per_atom;
142 return cross_section_material;
GGsize number_of_activated_photon_processes_
GGfloat density_of_material_[255]
struct GGEMSParticleCrossSections_t GGEMSParticleCrossSections
virtual ~GGEMSEMProcess(void)
GGEMSEMProcess destructor.
GGfloat energy_bins_[MAX_CROSS_SECTION_TABLE_NUMBER_BINS]
GGfloat atomic_number_density_[255 *32]
virtual void BuildCrossSectionTables(cl::Buffer *particle_cross_sections, cl::Buffer *material_tables, GGsize const &thread_index)
build cross section tables and storing them in particle_cross_sections
Structure storing the photon cross sections for OpenCL device.
GGEMS class managing the processes in GGEMS simulation.
std::string process_name_
GGuchar atomic_number_Z_[255 *32]
GGfloat photon_cross_sections_[NUMBER_PHOTON_PROCESSES][256 *MAX_CROSS_SECTION_TABLE_NUMBER_BINS]
void ReleaseDeviceBuffer(cl::Buffer *const device_ptr, T *host_ptr, GGsize const &thread_index)
Get the device pointer on host to write on it. Mandatory after a GetDeviceBufferWrite ou GetDeviceBuf...
GGsize number_of_materials_
GGEMS mother class for electromagnectic process.
GGchar photon_cs_id_[NUMBER_PHOTON_PROCESSES]
bool IsPrintPhysicTables(void) const
check boolean value for physic tables printing
GGsize number_of_chemical_elements_[255]
GGsize index_of_chemical_elements_[255]
GGEMSEMProcess(void)
GGEMSEMProcess constructor.
Structure storing the material tables on OpenCL device.
virtual GGfloat ComputeCrossSectionPerAtom(GGfloat const &energy, GGuchar const &atomic_number) const =0
compute a cross section for an atom
GGEMS class managing the processes in GGEMS simulation.
T * GetDeviceBuffer(cl::Buffer *device_ptr, GGsize const &size, GGsize const &thread_index)
Get the device pointer on host to write on it. ReleaseDeviceBuffer must be used after this method!...
struct GGEMSMaterialTables_t GGEMSMaterialTables
#define GGendl
overload C++ std::endl
GGfloat ComputeCrossSectionPerMaterial(GGEMSParticleCrossSections *cross_section, GGEMSMaterialTables const *material_tables, GGsize const &material_index, GGsize const &energy_index)
compute cross section for a process for a material
GGfloat photon_cross_sections_per_atom_[NUMBER_PHOTON_PROCESSES][101 *MAX_CROSS_SECTION_TABLE_NUMBER_BINS]
GGchar material_names_[256][64]
Singleton class storing all informations about OpenCL and managing GPU/CPU devices,...
std::string GetDeviceName(GGsize const &device_index) const
Get the name of the activated device.
GGsize GetIndexOfActivatedDevice(GGsize const &thread_index) const
get the index of activated device
static GGEMSProcessesManager & GetInstance(void)
Create at first time the Singleton.
static GGEMSOpenCLManager & GetInstance(void)
Create at first time the Singleton.