GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
GGEMS mother class for the source. More...
#include "GGEMSSource.hh"
Public Member Functions | |
GGEMSSource (std::string const &source_name) | |
GGEMSSource constructor. More... | |
virtual | ~GGEMSSource (void) |
GGEMSSource destructor. More... | |
GGEMSSource (GGEMSSource const &source)=delete | |
Avoid copy by reference. More... | |
GGEMSSource & | operator= (GGEMSSource const &source)=delete |
Avoid assignement by reference. More... | |
GGEMSSource (GGEMSSource const &&source)=delete | |
Avoid copy by rvalue reference. More... | |
GGEMSSource & | operator= (GGEMSSource const &&source)=delete |
Avoid copy by rvalue reference. More... | |
std::string | GetNameOfSource (void) const |
get the name of the source More... | |
void | SetPosition (GGfloat const &pos_x, GGfloat const &pos_y, GGfloat const &pos_z, std::string const &unit="mm") |
Set the position of the source in the global coordinates. More... | |
void | SetSourceParticleType (std::string const &particle_type) |
Set the type of the particle: electron, positron or photon. More... | |
void | SetRotation (GGfloat const &rx, GGfloat const &ry, GGfloat const &rz, std::string const &unit="deg") |
Set the rotation of the source around global axis. More... | |
void | SetNumberOfParticles (GGsize const &number_of_particles) |
Set the number of particles to simulate during the simulation. More... | |
void | EnableTracking (void) |
Enabling tracking infos during simulation. More... | |
GGsize | GetNumberOfBatchs (GGsize const &device_index) const |
method returning the number of particles by batch More... | |
GGsize | GetNumberOfParticlesInBatch (GGsize const &device_index, GGsize const &batch_index) |
method returning the number of particles in a specific batch More... | |
virtual void | CheckParameters (void) const |
Check mandatory parameters for a source. More... | |
virtual void | Initialize (bool const &is_tracking=false) |
Initialize a GGEMS source. More... | |
virtual void | GetPrimaries (GGsize const &thread_index, GGsize const &number_of_particles)=0 |
Generate primary particles. More... | |
virtual void | PrintInfos (void) const =0 |
Printing infos about the source. More... | |
Protected Member Functions | |
virtual void | InitializeKernel (void)=0 |
Initialize kernel for specific source in OpenCL. More... | |
Protected Attributes | |
std::string | source_name_ |
GGsize | number_of_particles_ |
GGsize * | number_of_particles_by_device_ |
GGsize ** | number_of_particles_in_batch_ |
GGsize * | number_of_batchs_ |
GGchar | particle_type_ |
std::string | tracking_kernel_option_ |
GGEMSGeometryTransformation * | geometry_transformation_ |
cl::Kernel ** | kernel_get_primaries_ |
GGsize | number_activated_devices_ |
Private Member Functions | |
void | OrganizeParticlesInBatch (void) |
Organize the particles in batch. More... | |
GGEMS mother class for the source.
Definition at line 44 of file GGEMSSource.hh.
|
explicit |
GGEMSSource constructor.
source_name | - name of the source |
Definition at line 41 of file GGEMSSource.cc.
|
virtual |
GGEMSSource destructor.
Definition at line 72 of file GGEMSSource.cc.
|
delete |
Avoid copy by reference.
source | - reference on the GGEMS source |
|
delete |
Avoid copy by rvalue reference.
source | - rvalue reference on the GGEMS source |
|
virtual |
Check mandatory parameters for a source.
Reimplemented in GGEMSXRaySource.
Definition at line 177 of file GGEMSSource.cc.
void GGEMSSource::EnableTracking | ( | void | ) |
Enabling tracking infos during simulation.
Definition at line 112 of file GGEMSSource.cc.
|
inline |
method returning the number of particles by batch
device_index | - index of activated device |
Definition at line 139 of file GGEMSSource.hh.
|
inline |
method returning the number of particles in a specific batch
device_index | - index of activated device |
batch_index | - index of the batch |
Definition at line 148 of file GGEMSSource.hh.
|
pure virtual |
Generate primary particles.
thread_index | - index of activated device (thread index) |
number_of_particles | - number of particles to generate |
Implemented in GGEMSXRaySource.
|
virtual |
Initialize a GGEMS source.
is_tracking | - flag activating tracking |
Reimplemented in GGEMSXRaySource.
Definition at line 287 of file GGEMSSource.cc.
|
protectedpure virtual |
Initialize kernel for specific source in OpenCL.
Implemented in GGEMSXRaySource.
|
delete |
Avoid copy by rvalue reference.
source | - rvalue reference on the GGEMS source |
|
delete |
Avoid assignement by reference.
source | - reference on the GGEMS source |
|
private |
Organize the particles in batch.
Definition at line 226 of file GGEMSSource.cc.
|
pure virtual |
Printing infos about the source.
Implemented in GGEMSXRaySource.
void GGEMSSource::SetNumberOfParticles | ( | GGsize const & | number_of_particles | ) |
Set the number of particles to simulate during the simulation.
number_of_particles | - number of particles to simulate |
Definition at line 134 of file GGEMSSource.cc.
void GGEMSSource::SetPosition | ( | GGfloat const & | pos_x, |
GGfloat const & | pos_y, | ||
GGfloat const & | pos_z, | ||
std::string const & | unit = "mm" |
||
) |
Set the position of the source in the global coordinates.
pos_x | - Position of the source in X |
pos_y | - Position of the source in Y |
pos_z | - Position of the source in Z |
unit | - unit of the distance |
Definition at line 121 of file GGEMSSource.cc.
void GGEMSSource::SetRotation | ( | GGfloat const & | rx, |
GGfloat const & | ry, | ||
GGfloat const & | rz, | ||
std::string const & | unit = "deg" |
||
) |
Set the rotation of the source around global axis.
rx | - Rotation around X along global axis |
ry | - Rotation around Y along global axis |
rz | - Rotation around Z along global axis |
unit | - unit of the angle |
Definition at line 164 of file GGEMSSource.cc.
void GGEMSSource::SetSourceParticleType | ( | std::string const & | particle_type | ) |
Set the type of the particle: electron, positron or photon.
particle_type | - Type of the particle |
Definition at line 143 of file GGEMSSource.cc.
|
protected |
Pointer storing the geometry transformation
Definition at line 201 of file GGEMSSource.hh.
|
protected |
Kernel generating primaries on OpenCL device
Definition at line 203 of file GGEMSSource.hh.
|
protected |
Number of activated device
Definition at line 204 of file GGEMSSource.hh.
|
protected |
Number of batchs for each device
Definition at line 197 of file GGEMSSource.hh.
|
protected |
Number of particles
Definition at line 193 of file GGEMSSource.hh.
|
protected |
Number of particles by device
Definition at line 194 of file GGEMSSource.hh.
|
protected |
Number of particles in batch for each device
Definition at line 196 of file GGEMSSource.hh.
|
protected |
Type of particle: photon, electron or positron
Definition at line 199 of file GGEMSSource.hh.
|
protected |
Name of the source
Definition at line 192 of file GGEMSSource.hh.
|
protected |
Preprocessor option for tracking
Definition at line 200 of file GGEMSSource.hh.