Bayeux  3.4.1
Core Foundation library for SuperNEMO
sphere_model_vg.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2013-10-10
4  * Last modified: 2014-04-09
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Vertex generator from a sphere model addressed through some
11  * collection of geometry IDs extracted from a mapping object.
12  *
13  * History:
14  *
15  */
16 
17 #ifndef GENVTX_SPHERE_MODEL_VG_H
18 #define GENVTX_SPHERE_MODEL_VG_H 1
19 
20 // Standard library:
21 #include <string>
22 
23 // Third party:
24 // // - Bayeux/geomtools
25 // #include <geomtools/id_selector.h>
26 
27 // This project:
28 #include <genvtx/sphere_vg.h>
29 #include <genvtx/vg_macros.h>
30 #include <genvtx/utils.h>
31 #include <genvtx/i_from_model_vg.h>
32 
33 namespace genvtx {
34 
37  {
38  public:
39 
40  bool is_mode_valid () const;
41 
42  bool is_mode_bulk () const;
43 
44  bool is_mode_surface () const;
45 
46  bool is_surface_inner_side () const;
47 
48  bool is_surface_outer_side () const;
49 
50  bool is_surface_start_phi_side () const;
51 
52  bool is_surface_stop_phi_side () const;
53 
54  bool is_surface_start_theta_side () const;
55 
56  bool is_surface_stop_theta_side () const;
57 
58  void set_surface_inner_side (bool);
59 
60  void set_surface_outer_side (bool);
61 
62  void set_surface_start_phi_side (bool);
63 
64  void set_surface_stop_phi_side (bool);
65 
66  void set_surface_start_theta_side (bool);
67 
68  void set_surface_stop_theta_side (bool);
69 
70  void set_skin_skip (double skin_skip_);
71 
72  void set_skin_thickness (double skin_thickness_);
73 
74  int get_mode () const;
75 
76  void set_mode (int);
77 
78  virtual void tree_dump (std::ostream & out_ = std::clog,
79  const std::string & title_ = "",
80  const std::string & indent_ = "",
81  bool inherit_ = false) const;
82 
85 
87  virtual ~sphere_model_vg();
88 
90  virtual void initialize(const ::datatools::properties &,
93 
95  virtual void reset();
96 
98  virtual bool is_initialized() const;
99 
100  protected :
101 
103  virtual void _shoot_vertex(::mygsl::rng & random_, ::geomtools::vector_3d & vertex_);
104 
105  private:
106 
107  void _init_ ();
108 
109  void _reset_ ();
110 
111  void _set_defaults_ ();
112 
113  protected:
114 
115  void _shoot_vertex_spheres(mygsl::rng & random_,
116  geomtools::vector_3d & vertex_);
117 
118  private:
119 
120  bool _initialized_;
121  int _mode_;
122  bool _surface_inner_side_;
123  bool _surface_outer_side_;
124  bool _surface_start_phi_side_;
125  bool _surface_stop_phi_side_;
126  bool _surface_start_theta_side_;
127  bool _surface_stop_theta_side_;
128  double _skin_skip_;
129  double _skin_thickness_;
130  genvtx::sphere_vg _sphere_vg_;
131  std::vector<weight_entry_type> _entries_;
132 
136 
137  };
138 
139 } // end of namespace genvtx
140 
141 /***************
142  * OCD support *
143  ***************/
144 #include <datatools/ocd_macros.h>
146 
147 #endif // GENVTX_SPHERE_MODEL_VG_H
148 
149 /*
150 ** Local Variables: --
151 ** mode: c++ --
152 ** c-file-style: "gnu" --
153 ** tab-width: 2 --
154 ** End: --
155 */
void set_skin_skip(double skin_skip_)
virtual void reset()
Reset.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
bool is_mode_surface() const
bool is_surface_inner_side() const
bool is_surface_stop_phi_side() const
void set_surface_start_theta_side(bool)
bool is_surface_start_theta_side() const
void set_surface_stop_phi_side(bool)
virtual bool is_initialized() const
Check initialization status.
void _shoot_vertex_spheres(mygsl::rng &random_, geomtools::vector_3d &vertex_)
A vertex generator based on a spherical geometry model.
Definition: sphere_model_vg.h:36
void set_surface_stop_theta_side(bool)
An abstract vertex generator based on a geometry model.
Definition: i_from_model_vg.h:39
virtual void initialize(const ::datatools::properties &, ::datatools::service_manager &, ::genvtx::vg_dict_type &)
Initialization.
virtual ~sphere_model_vg()
Destructor.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
void set_surface_outer_side(bool)
void set_skin_thickness(double skin_thickness_)
bool is_surface_outer_side() const
void set_surface_start_phi_side(bool)
virtual void _shoot_vertex(::mygsl::rng &random_, ::geomtools::vector_3d &vertex_)
Randomize vertex.
bool is_mode_bulk() const
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
#define GENVTX_VG_REGISTRATION_INTERFACE(GENVTX_CLASS_NAME)
Definition: vg_macros.h:46
Macros to automatically register vertex generator class.
bool is_surface_stop_theta_side() const
void set_surface_inner_side(bool)
bool is_mode_valid() const
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
Vertex generator from a sphere.
Definition: sphere_vg.h:37
bool is_surface_start_phi_side() const
sphere_model_vg()
Constructor.
Service management class.
Definition: service_manager.h:57
Pseudo random number generator.
Definition: rng.h:53