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

GGEMS class handling the cross sections tables. More...

#include "GGEMSCrossSections.hh"

Collaboration diagram for GGEMSCrossSections:
Collaboration graph

Public Member Functions

 GGEMSCrossSections (void)
 GGEMSCrossSections constructor. More...
 
 ~GGEMSCrossSections (void)
 GGEMSCrossSections destructor. More...
 
 GGEMSCrossSections (GGEMSCrossSections const &cross_sections)=delete
 Avoid copy by reference. More...
 
GGEMSCrossSectionsoperator= (GGEMSCrossSections const &cross_sections)=delete
 Avoid assignement by reference. More...
 
 GGEMSCrossSections (GGEMSCrossSections const &&cross_sections)=delete
 Avoid copy by rvalue reference. More...
 
GGEMSCrossSectionsoperator= (GGEMSCrossSections const &&cross_sections)=delete
 Avoid copy by rvalue reference. More...
 
void AddProcess (std::string const &process_name, std::string const &particle_type, bool const &is_secondary=false)
 add a process to the GGEMS simulation More...
 
void Initialize (GGEMSMaterials const *materials)
 Initialize all the activated processes computing tables on OpenCL device. More...
 
GGEMSEMProcess ** GetEMProcessesList (void) const
 get the pointer on activated process More...
 
GGsize GetNumberOfActivatedEMProcesses (void) const
 get the number of activated processes More...
 
cl::Buffer * GetCrossSections (GGsize const &thread_index) const
 return the pointer to OpenCL buffer storing cross sections More...
 
GGfloat GetPhotonCrossSection (std::string const &process_name, std::string const &material_name, GGfloat const &energy, std::string const &unit) const
 Get the cross section value for a process for a specific energy. More...
 
void Clean (void)
 clean all cross sections on each OpenCL device More...
 

Private Member Functions

void LoadPhysicTablesOnHost (void)
 Load physic tables from OpenCL device to RAM. Optimization for python user. More...
 

Private Attributes

GGEMSEMProcess ** em_processes_list_
 
GGsize number_of_activated_processes_
 
std::vector< bool > is_process_activated_
 
cl::Buffer ** particle_cross_sections_
 
GGEMSParticleCrossSectionsparticle_cross_sections_host_
 
GGsize number_activated_devices_
 

Detailed Description

GGEMS class handling the cross sections tables.

Definition at line 52 of file GGEMSCrossSections.hh.

Constructor & Destructor Documentation

◆ GGEMSCrossSections() [1/3]

GGEMSCrossSections::GGEMSCrossSections ( void  )

GGEMSCrossSections constructor.

Definition at line 44 of file GGEMSCrossSections.cc.

◆ ~GGEMSCrossSections()

GGEMSCrossSections::~GGEMSCrossSections ( void  )

GGEMSCrossSections destructor.

Definition at line 74 of file GGEMSCrossSections.cc.

◆ GGEMSCrossSections() [2/3]

GGEMSCrossSections::GGEMSCrossSections ( GGEMSCrossSections const &  cross_sections)
delete

Avoid copy by reference.

Parameters
cross_sections- reference on the GGEMS cross sections

◆ GGEMSCrossSections() [3/3]

GGEMSCrossSections::GGEMSCrossSections ( GGEMSCrossSections const &&  cross_sections)
delete

Avoid copy by rvalue reference.

Parameters
cross_sections- rvalue reference on the GGEMS cross sections

Member Function Documentation

◆ AddProcess()

void GGEMSCrossSections::AddProcess ( std::string const &  process_name,
std::string const &  particle_type,
bool const &  is_secondary = false 
)

add a process to the GGEMS simulation

Parameters
process_name- name of the process
particle_type- type of the particle
is_secondary- activate secondaries or not

Definition at line 120 of file GGEMSCrossSections.cc.

◆ Clean()

void GGEMSCrossSections::Clean ( void  )

clean all cross sections on each OpenCL device

Definition at line 99 of file GGEMSCrossSections.cc.

◆ GetCrossSections()

cl::Buffer * GGEMSCrossSections::GetCrossSections ( GGsize const &  thread_index) const
inline

return the pointer to OpenCL buffer storing cross sections

Parameters
thread_index- index of activated device (thread index)
Returns
pointer to OpenCL buffer storing cross sections

Definition at line 129 of file GGEMSCrossSections.hh.

◆ GetEMProcessesList()

GGEMSEMProcess ** GGEMSCrossSections::GetEMProcessesList ( void  ) const
inline

get the pointer on activated process

Returns
pointer to process list

Definition at line 114 of file GGEMSCrossSections.hh.

◆ GetNumberOfActivatedEMProcesses()

GGsize GGEMSCrossSections::GetNumberOfActivatedEMProcesses ( void  ) const
inline

get the number of activated processes

Returns
number of activated processes

Definition at line 121 of file GGEMSCrossSections.hh.

◆ GetPhotonCrossSection()

GGfloat GGEMSCrossSections::GetPhotonCrossSection ( std::string const &  process_name,
std::string const &  material_name,
GGfloat const &  energy,
std::string const &  unit 
) const

Get the cross section value for a process for a specific energy.

Parameters
process_name- name of the process
material_name- name of the material
energy- energy of particle
unit- unit in energy
Returns
the cross section in cm-1 for a process and a material

Definition at line 274 of file GGEMSCrossSections.cc.

◆ Initialize()

void GGEMSCrossSections::Initialize ( GGEMSMaterials const *  materials)

Initialize all the activated processes computing tables on OpenCL device.

Parameters
materials- activated materials for a specific phantom

Definition at line 169 of file GGEMSCrossSections.cc.

◆ LoadPhysicTablesOnHost()

void GGEMSCrossSections::LoadPhysicTablesOnHost ( void  )
private

Load physic tables from OpenCL device to RAM. Optimization for python user.

Definition at line 224 of file GGEMSCrossSections.cc.

◆ operator=() [1/2]

GGEMSCrossSections & GGEMSCrossSections::operator= ( GGEMSCrossSections const &&  cross_sections)
delete

Avoid copy by rvalue reference.

Parameters
cross_sections- rvalue reference on the GGEMS cross sections

◆ operator=() [2/2]

GGEMSCrossSections & GGEMSCrossSections::operator= ( GGEMSCrossSections const &  cross_sections)
delete

Avoid assignement by reference.

Parameters
cross_sections- reference on the GGEMS cross sections

Member Data Documentation

◆ em_processes_list_

GGEMSEMProcess** GGEMSCrossSections::em_processes_list_
private

vector of electromagnetic processes

Definition at line 156 of file GGEMSCrossSections.hh.

◆ is_process_activated_

std::vector<bool> GGEMSCrossSections::is_process_activated_
private

Boolean checking if the process is already activated

Definition at line 158 of file GGEMSCrossSections.hh.

◆ number_activated_devices_

GGsize GGEMSCrossSections::number_activated_devices_
private

Number of activated device

Definition at line 161 of file GGEMSCrossSections.hh.

◆ number_of_activated_processes_

GGsize GGEMSCrossSections::number_of_activated_processes_
private

Number of activated processes

Definition at line 157 of file GGEMSCrossSections.hh.

◆ particle_cross_sections_

cl::Buffer** GGEMSCrossSections::particle_cross_sections_
private

Pointer storing cross sections for each particles on OpenCL device

Definition at line 159 of file GGEMSCrossSections.hh.

◆ particle_cross_sections_host_

GGEMSParticleCrossSections* GGEMSCrossSections::particle_cross_sections_host_
private

Pointer storing cross sections for each particles on host (RAM memory)

Definition at line 160 of file GGEMSCrossSections.hh.


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