GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
This class define a XRay source in GGEMS useful for CT/CBCT simulation. More...
#include "GGEMSXRaySource.hh"
Public Member Functions | |
GGEMSXRaySource (std::string const &source_name) | |
GGEMSXRaySource constructor. More... | |
~GGEMSXRaySource (void) | |
GGEMSXRaySource destructor. More... | |
GGEMSXRaySource (GGEMSXRaySource const &xray_source)=delete | |
Avoid copy by reference. More... | |
GGEMSXRaySource & | operator= (GGEMSXRaySource const &xray_source)=delete |
Avoid assignement by reference. More... | |
GGEMSXRaySource (GGEMSXRaySource const &&xray_source)=delete | |
Avoid copy by rvalue reference. More... | |
GGEMSXRaySource & | operator= (GGEMSXRaySource const &&xray_source)=delete |
Avoid copy by rvalue reference. More... | |
void | SetBeamAperture (GGfloat const &beam_aperture, std::string const &unit="deg") |
Set the beam aperture of the source. More... | |
void | SetFocalSpotSize (GGfloat const &width, GGfloat const &height, GGfloat const &depth, std::string const &unit="mm") |
Set the focal spot size of the x-ray source. More... | |
void | SetMonoenergy (GGfloat const &monoenergy, std::string const &unit="keV") |
set the value of energy in monoenergy mode More... | |
void | SetPolyenergy (std::string const &energy_spectrum_filename) |
set the energy spectrum file for polyenergy mode More... | |
void | Initialize (bool const &is_tracking=false) override |
Initialize a GGEMS source. More... | |
void | PrintInfos (void) const override |
Printing infos about the source. More... | |
void | GetPrimaries (GGsize const &thread_index, GGsize const &number_of_particles) override |
Generate primary particles. More... | |
Public Member Functions inherited from GGEMSSource | |
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... | |
Private Member Functions | |
void | InitializeKernel (void) override |
Initialize kernel for specific source in OpenCL. More... | |
void | FillEnergy (void) |
fill energy for poly or mono energy mode More... | |
void | CheckParameters (void) const override |
Check mandatory parameters for a source. More... | |
Private Attributes | |
GGfloat | beam_aperture_ |
GGfloat3 | focal_spot_size_ |
GGbool | is_monoenergy_mode_ |
GGfloat | monoenergy_ |
std::string | energy_spectrum_filename_ |
GGsize | number_of_energy_bins_ |
cl::Buffer ** | energy_spectrum_ |
cl::Buffer ** | cdf_ |
Additional Inherited Members | |
Protected Attributes inherited from GGEMSSource | |
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_ |
This class define a XRay source in GGEMS useful for CT/CBCT simulation.
Definition at line 40 of file GGEMSXRaySource.hh.
|
explicit |
GGEMSXRaySource constructor.
source_name | - name of the source |
Definition at line 43 of file GGEMSXRaySource.cc.
GGEMSXRaySource::~GGEMSXRaySource | ( | void | ) |
GGEMSXRaySource destructor.
Definition at line 80 of file GGEMSXRaySource.cc.
|
delete |
Avoid copy by reference.
xray_source | - reference on the GGEMS XRay source |
|
delete |
Avoid copy by rvalue reference.
xray_source | - rvalue reference on the GGEMS XRay source |
|
overrideprivatevirtual |
Check mandatory parameters for a source.
Reimplemented from GGEMSSource.
Definition at line 271 of file GGEMSXRaySource.cc.
|
private |
fill energy for poly or mono energy mode
Definition at line 329 of file GGEMSXRaySource.cc.
|
overridevirtual |
Generate primary particles.
thread_index | - index of activated device (thread index) |
number_of_particles | - number of particles to generate |
Implements GGEMSSource.
Definition at line 139 of file GGEMSXRaySource.cc.
|
overridevirtual |
Initialize a GGEMS source.
is_tracking | - flag activating tracking |
Reimplemented from GGEMSSource.
Definition at line 425 of file GGEMSXRaySource.cc.
|
overrideprivatevirtual |
Initialize kernel for specific source in OpenCL.
Implements GGEMSSource.
Definition at line 120 of file GGEMSXRaySource.cc.
|
delete |
Avoid copy by rvalue reference.
xray_source | - rvalue reference on the GGEMS XRay source |
|
delete |
Avoid assignement by reference.
xray_source | - reference on the GGEMS XRay source |
|
overridevirtual |
Printing infos about the source.
Implements GGEMSSource.
Definition at line 192 of file GGEMSXRaySource.cc.
void GGEMSXRaySource::SetBeamAperture | ( | GGfloat const & | beam_aperture, |
std::string const & | unit = "deg" |
||
) |
Set the beam aperture of the source.
beam_aperture | - beam aperture of the x-ray source |
unit | - unit of the angle |
Definition at line 446 of file GGEMSXRaySource.cc.
void GGEMSXRaySource::SetFocalSpotSize | ( | GGfloat const & | width, |
GGfloat const & | height, | ||
GGfloat const & | depth, | ||
std::string const & | unit = "mm" |
||
) |
Set the focal spot size of the x-ray source.
width | - width of the focal spot size |
height | - height of the focal spot size |
depth | - depth of the focal spot size |
unit | - unit of the distance |
Definition at line 455 of file GGEMSXRaySource.cc.
void GGEMSXRaySource::SetMonoenergy | ( | GGfloat const & | monoenergy, |
std::string const & | unit = "keV" |
||
) |
set the value of energy in monoenergy mode
monoenergy | - Monoenergy value |
unit | - unit of the energy |
Definition at line 251 of file GGEMSXRaySource.cc.
void GGEMSXRaySource::SetPolyenergy | ( | std::string const & | energy_spectrum_filename | ) |
set the energy spectrum file for polyenergy mode
energy_spectrum_filename | - filename containing the energy spectrum |
Definition at line 261 of file GGEMSXRaySource.cc.
|
private |
Beam aperture of the x-ray source
Definition at line 156 of file GGEMSXRaySource.hh.
|
private |
Cumulative distribution function to generate a random energy
Definition at line 163 of file GGEMSXRaySource.hh.
|
private |
Energy spectrum for OpenCL device
Definition at line 162 of file GGEMSXRaySource.hh.
|
private |
The energy spectrum filename for polyenergetic mode
Definition at line 160 of file GGEMSXRaySource.hh.
|
private |
Focal spot size of the x-ray source
Definition at line 157 of file GGEMSXRaySource.hh.
|
private |
Boolean checking the mode of energy
Definition at line 158 of file GGEMSXRaySource.hh.
|
private |
Monoenergy mode
Definition at line 159 of file GGEMSXRaySource.hh.
|
private |
Number of energy bins for the polyenergetic mode
Definition at line 161 of file GGEMSXRaySource.hh.