GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSProcessesManager.hh
Go to the documentation of this file.
1 #ifndef GUARD_GGEMS_PHYSICS_GGEMSPROCESSESMANAGER_HH
2 #define GUARD_GGEMS_PHYSICS_GGEMSPROCESSESMANAGER_HH
3 
4 // ************************************************************************
5 // * This file is part of GGEMS. *
6 // * *
7 // * GGEMS is free software: you can redistribute it and/or modify *
8 // * it under the terms of the GNU General Public License as published by *
9 // * the Free Software Foundation, either version 3 of the License, or *
10 // * (at your option) any later version. *
11 // * *
12 // * GGEMS is distributed in the hope that it will be useful, *
13 // * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 // * GNU General Public License for more details. *
16 // * *
17 // * You should have received a copy of the GNU General Public License *
18 // * along with GGEMS. If not, see <https://www.gnu.org/licenses/>. *
19 // * *
20 // ************************************************************************
21 
34 #include "GGEMS/global/GGEMSExport.hh"
36 
41 class GGEMS_EXPORT GGEMSProcessesManager
42 {
43  private:
48 
52  ~GGEMSProcessesManager(void);
53 
54  public:
61  {
62  static GGEMSProcessesManager instance;
63  return instance;
64  }
65 
71  GGEMSProcessesManager(GGEMSProcessesManager const& processes_manager) = delete;
72 
78  GGEMSProcessesManager& operator=(GGEMSProcessesManager const& processes_manager) = delete;
79 
85  GGEMSProcessesManager(GGEMSProcessesManager const&& processes_manager) = delete;
86 
92  GGEMSProcessesManager& operator=(GGEMSProcessesManager const&& processes_manager) = delete;
93 
99  void SetCrossSectionTableNumberOfBins(GGsize const& number_of_bins);
100 
107  void SetCrossSectionTableMinimumEnergy(GGfloat const& energy, char const* unit = "keV");
108 
115  void SetCrossSectionTableMaximumEnergy(GGfloat const& energy, char const* unit = "keV");
116 
122  inline GGfloat GetCrossSectionTableMinEnergy(void) const {return cross_section_table_min_energy_;}
123 
129  inline GGfloat GetCrossSectionTableMaxEnergy(void) const {return cross_section_table_max_energy_;}
130 
136  inline GGsize GetCrossSectionTableNumberOfBins(void) const {return cross_section_table_number_of_bins_;}
137 
145  void AddProcess(std::string const& process_name, std::string const& particle_name, std::string const& phantom_name);
146 
151  void PrintInfos(void) const;
152 
157  void PrintAvailableProcesses(void) const;
158 
164  void PrintPhysicTables(bool const& is_processes_print_tables);
165 
171  inline bool IsPrintPhysicTables(void) const {return is_processes_print_tables_;};
172 
177  void Clean(void);
178 
179  private:
184 };
185 
191 extern "C" GGEMS_EXPORT GGEMSProcessesManager* get_instance_processes_manager(void);
192 
201 extern "C" GGEMS_EXPORT void add_process_processes_manager(GGEMSProcessesManager* processes_manager, char const* process_name, char const* particle_name, char const* phantom_name);
202 
209 extern "C" GGEMS_EXPORT void set_cross_section_table_number_of_bins_processes_manager(GGEMSProcessesManager* processes_manager, GGsize const number_of_bins);
210 
218 extern "C" GGEMS_EXPORT void set_cross_section_table_minimum_energy_processes_manager(GGEMSProcessesManager* processes_manager, GGfloat const energy, char const* unit);
219 
227 extern "C" GGEMS_EXPORT void set_cross_section_table_maximum_energy_processes_manager(GGEMSProcessesManager* processes_manager, GGfloat const energy, char const* unit);
228 
234 extern "C" GGEMS_EXPORT void print_infos_processes_manager(GGEMSProcessesManager* processes_manager);
235 
241 extern "C" GGEMS_EXPORT void print_available_processes_manager(GGEMSProcessesManager* processes_manager);
242 
249 extern "C" GGEMS_EXPORT void print_tables_processes_manager(GGEMSProcessesManager* processes_manager, bool const is_processes_print_tables);
250 
251 #endif // GUARD_GGEMS_PHYSICS_GGEMSRANGECUTSMANAGER_HH
GGEMSProcessConstants.hh
Storing some __constant variables for process.
GGEMSProcessesManager::GGEMSProcessesManager
GGEMSProcessesManager(GGEMSProcessesManager const &&processes_manager)=delete
Avoid copy of the class by rvalue reference.
set_cross_section_table_minimum_energy_processes_manager
void set_cross_section_table_minimum_energy_processes_manager(GGEMSProcessesManager *processes_manager, GGfloat const energy, char const *unit)
set the minimum energy in the cross section table
Definition: GGEMSProcessesManager.cc:227
GGEMSProcessesManager::GetCrossSectionTableNumberOfBins
GGsize GetCrossSectionTableNumberOfBins(void) const
get the number of bins in the cross section table
Definition: GGEMSProcessesManager.hh:136
GGEMSProcessesManager::cross_section_table_min_energy_
GGfloat cross_section_table_min_energy_
Definition: GGEMSProcessesManager.hh:181
GGEMSProcessesManager::GetCrossSectionTableMinEnergy
GGfloat GetCrossSectionTableMinEnergy(void) const
get the minimum energy in the cross section table
Definition: GGEMSProcessesManager.hh:122
GGsize
#define GGsize
Definition: GGEMSTypes.hh:252
GGEMSProcessesManager::GGEMSProcessesManager
GGEMSProcessesManager(GGEMSProcessesManager const &processes_manager)=delete
Avoid copy of the class by reference.
set_cross_section_table_maximum_energy_processes_manager
void set_cross_section_table_maximum_energy_processes_manager(GGEMSProcessesManager *processes_manager, GGfloat const energy, char const *unit)
set the maximum energy in the cross section table
Definition: GGEMSProcessesManager.cc:236
GGEMSProcessesManager::GetCrossSectionTableMaxEnergy
GGfloat GetCrossSectionTableMaxEnergy(void) const
get the maximum energy in the cross section table
Definition: GGEMSProcessesManager.hh:129
GGEMSProcessesManager::IsPrintPhysicTables
bool IsPrintPhysicTables(void) const
check boolean value for physic tables printing
Definition: GGEMSProcessesManager.hh:171
print_available_processes_manager
void print_available_processes_manager(GGEMSProcessesManager *processes_manager)
print infos about available processes
Definition: GGEMSProcessesManager.cc:254
GGEMSProcessesManager::operator=
GGEMSProcessesManager & operator=(GGEMSProcessesManager const &&processes_manager)=delete
Avoid copy of the class by rvalue reference.
set_cross_section_table_number_of_bins_processes_manager
void set_cross_section_table_number_of_bins_processes_manager(GGEMSProcessesManager *processes_manager, GGsize const number_of_bins)
set the number of the bins in the cross section table
Definition: GGEMSProcessesManager.cc:218
GGEMSProcessesManager
GGEMS class managing the processes in GGEMS simulation.
Definition: GGEMSProcessesManager.hh:42
GGEMSProcessesManager::cross_section_table_number_of_bins_
GGsize cross_section_table_number_of_bins_
Definition: GGEMSProcessesManager.hh:180
GGEMSProcessesManager::cross_section_table_max_energy_
GGfloat cross_section_table_max_energy_
Definition: GGEMSProcessesManager.hh:182
GGEMSProcessesManager::is_processes_print_tables_
bool is_processes_print_tables_
Definition: GGEMSProcessesManager.hh:183
print_infos_processes_manager
void print_infos_processes_manager(GGEMSProcessesManager *processes_manager)
print infos about processes
Definition: GGEMSProcessesManager.cc:245
get_instance_processes_manager
GGEMSProcessesManager * get_instance_processes_manager(void)
Get the GGEMSProcessesManager pointer for python user.
Definition: GGEMSProcessesManager.cc:200
GGEMSProcessesManager::GetInstance
static GGEMSProcessesManager & GetInstance(void)
Create at first time the Singleton.
Definition: GGEMSProcessesManager.hh:60
add_process_processes_manager
void add_process_processes_manager(GGEMSProcessesManager *processes_manager, char const *process_name, char const *particle_name, char const *phantom_name)
add a process for a specific phantom or all the phantom
Definition: GGEMSProcessesManager.cc:209
GGfloat
#define GGfloat
Definition: GGEMSTypes.hh:273
print_tables_processes_manager
void print_tables_processes_manager(GGEMSProcessesManager *processes_manager, bool const is_processes_print_tables)
print infos about physic tables
Definition: GGEMSProcessesManager.cc:263
GGEMSProcessesManager::operator=
GGEMSProcessesManager & operator=(GGEMSProcessesManager const &processes_manager)=delete
Avoid assignement of the class by reference.