GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSNavigator.hh
Go to the documentation of this file.
1 #ifndef GUARD_GGEMS_NAVIGATORS_GGEMSNAVIGATOR_HH
2 #define GUARD_GGEMS_NAVIGATORS_GGEMSNAVIGATOR_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 
33 #ifdef _MSC_VER
34 #pragma warning(disable: 4251) // Deleting warning exporting STL members!!!
35 #endif
36 
37 #define NAVIGATOR_NOT_INITIALIZED 0x100000000
39 #include "GGEMS/physics/GGEMSRangeCuts.hh"
40 
42 
44 
45 class GGEMSSolid;
46 class GGEMSMaterials;
47 class GGEMSCrossSections;
49 
54 class GGEMS_EXPORT GGEMSNavigator
55 {
56  public:
61  explicit GGEMSNavigator(std::string const& navigator_name);
62 
66  virtual ~GGEMSNavigator(void);
67 
73  GGEMSNavigator(GGEMSNavigator const& navigator) = delete;
74 
80  GGEMSNavigator& operator=(GGEMSNavigator const& navigator) = delete;
81 
87  GGEMSNavigator(GGEMSNavigator const&& navigator) = delete;
88 
94  GGEMSNavigator& operator=(GGEMSNavigator const&& navigator) = delete;
95 
104  void SetPosition(GGfloat const& position_x, GGfloat const& position_y, GGfloat const& position_z, std::string const& unit = "mm");
105 
114  void SetRotation(GGfloat const& rx, GGfloat const& ry, GGfloat const& rz, std::string const& unit = "deg");
115 
122  void SetThreshold(GGfloat const& threshold, std::string const& unit = "keV");
123 
129  void SetNavigatorID(GGsize const& navigator_id);
130 
136  inline std::string GetNavigatorName(void) const {return navigator_name_;}
137 
143  inline GGsize GetNumberOfSolids(void) const {return number_of_solids_;}
144 
151  inline GGEMSSolid* GetSolids(GGsize const& solid_index) const {return solids_[solid_index];}
152 
158  inline GGEMSMaterials* GetMaterials(void) const {return materials_;}
159 
165  inline GGEMSCrossSections* GetCrossSections(void) const {return cross_sections_;}
166 
172  void ParticleSolidDistance(GGsize const& thread_index);
173 
179  void ProjectToSolid(GGsize const& thread_index);
180 
186  void TrackThroughSolid(GGsize const& thread_index);
187 
192  void PrintInfos(void) const;
193 
198  virtual void Initialize(void);
199 
204  virtual void SaveResults(void) = 0;
205 
211  void ComputeDose(GGsize const& thread_index);
212 
218  void StoreOutput(std::string basename);
219 
225  void SetDosimetryCalculator(GGEMSDosimetryCalculator* dosimetry_calculator);
226 
231  void EnableTracking(void);
232 
233  protected:
238  virtual void CheckParameters(void) const;
239 
240  protected:
241  std::string navigator_name_;
243  // Global navigation members
252  // Output
253  std::string output_basename_;
260  // Dosimetry
265 };
266 
267 #endif // End of GUARD_GGEMS_NAVIGATORS_GGEMSNAVIGATOR_HH
GGEMSCrossSections
GGEMS class handling the cross sections tables.
Definition: GGEMSCrossSections.hh:53
GGEMSNavigator::solids_
GGEMSSolid ** solids_
Definition: GGEMSNavigator.hh:255
GGEMSNavigator::GetMaterials
GGEMSMaterials * GetMaterials(void) const
get the pointer on materials
Definition: GGEMSNavigator.hh:158
GGEMSNavigator::is_update_pos_
bool is_update_pos_
Definition: GGEMSNavigator.hh:247
GGEMSMaterials
GGEMS class handling material(s) for a specific navigator.
Definition: GGEMSMaterials.hh:49
GGEMSSolid
GGEMS class for solid informations.
Definition: GGEMSSolid.hh:48
GGEMSDosimetryCalculator
Class providing tools storing and computing dose in phantom.
Definition: GGEMSDosimetryCalculator.hh:48
GGEMSMatrixTypes.hh
Class managing the matrix types.
GGEMSNavigator::output_basename_
std::string output_basename_
Definition: GGEMSNavigator.hh:253
GGEMSNavigator::navigator_id_
GGsize navigator_id_
Definition: GGEMSNavigator.hh:246
GGEMSNavigator::GetCrossSections
GGEMSCrossSections * GetCrossSections(void) const
get the pointer on cross sections
Definition: GGEMSNavigator.hh:165
GGEMSNavigator::is_dosimetry_mode_
bool is_dosimetry_mode_
Definition: GGEMSNavigator.hh:262
GGsize
#define GGsize
Definition: GGEMSTypes.hh:252
GGEMSNavigator::SaveResults
virtual void SaveResults(void)=0
save all results from solid
GGEMSNavigator::threshold_
GGfloat threshold_
Definition: GGEMSNavigator.hh:249
GGEMSNavigator::dose_calculator_
GGEMSDosimetryCalculator * dose_calculator_
Definition: GGEMSNavigator.hh:261
GGEMSGeometryConstants.hh
Geometry tolerances for navigation.
GGEMSNavigator::GetNumberOfSolids
GGsize GetNumberOfSolids(void) const
get the number of solids inside the navigator
Definition: GGEMSNavigator.hh:143
GGEMSNavigator::number_activated_devices_
GGsize number_activated_devices_
Definition: GGEMSNavigator.hh:264
GGEMSNavigator::GetNavigatorName
std::string GetNavigatorName(void) const
Get the name of the navigator.
Definition: GGEMSNavigator.hh:136
GGfloat3
#define GGfloat3
Definition: GGEMSTypes.hh:275
GGEMSNavigator::navigator_name_
std::string navigator_name_
Definition: GGEMSNavigator.hh:241
GGEMSNavigator::number_of_solids_
GGsize number_of_solids_
Definition: GGEMSNavigator.hh:256
GGEMSNavigator
Parent GGEMS class for navigator.
Definition: GGEMSNavigator.hh:55
GGEMSNavigator::materials_
GGEMSMaterials * materials_
Definition: GGEMSNavigator.hh:257
GGEMSNavigator::is_tracking_
bool is_tracking_
Definition: GGEMSNavigator.hh:250
GGEMSNavigator::operator=
GGEMSNavigator & operator=(GGEMSNavigator const &&navigator)=delete
Avoid copy by rvalue reference.
GGEMSNavigator::operator=
GGEMSNavigator & operator=(GGEMSNavigator const &navigator)=delete
Avoid assignement by reference.
GGEMSNavigator::is_update_rot_
bool is_update_rot_
Definition: GGEMSNavigator.hh:248
GGEMSNavigator::GetSolids
GGEMSSolid * GetSolids(GGsize const &solid_index) const
get the list of solids
Definition: GGEMSNavigator.hh:151
GGEMSNavigator::position_xyz_
GGfloat3 position_xyz_
Definition: GGEMSNavigator.hh:244
GGEMSNavigator::rotation_xyz_
GGfloat3 rotation_xyz_
Definition: GGEMSNavigator.hh:245
GGEMSNavigator::cross_sections_
GGEMSCrossSections * cross_sections_
Definition: GGEMSNavigator.hh:258
GGEMSNavigator::GGEMSNavigator
GGEMSNavigator(GGEMSNavigator const &navigator)=delete
Avoid copy by reference.
GGEMSNavigator::GGEMSNavigator
GGEMSNavigator(GGEMSNavigator const &&navigator)=delete
Avoid copy by rvalue reference.
GGfloat
#define GGfloat
Definition: GGEMSTypes.hh:273