Bayeux  3.4.1
Core Foundation library for SuperNEMO
cylinder_model_vg.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-04-13
4  * Last modified: 2013-03-10
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Vertex generator from a cylinder model addressed through some
11  * collection of geometry IDs extracted from a mapping object.
12  *
13  * History:
14  *
15  */
16 
17 #ifndef GENVTX_CYLINDER_MODEL_VG_H
18 #define GENVTX_CYLINDER_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/cylinder_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_side () const;
47 
48  bool is_surface_bottom () const;
49 
50  bool is_surface_top () const;
51 
52  void set_surface_side (bool);
53 
54  void set_surface_bottom (bool);
55 
56  void set_surface_top (bool);
57 
58  void set_skin_skip (double skin_skip_);
59 
60  void set_skin_thickness (double skin_thickness_);
61 
62  int get_mode () const;
63 
64  void set_mode (int);
65 
66  virtual void tree_dump (std::ostream & out_ = std::clog,
67  const std::string & title_ = "",
68  const std::string & indent_ = "",
69  bool inherit_ = false) const;
70 
73 
75  virtual ~cylinder_model_vg();
76 
78  virtual void initialize(const ::datatools::properties &,
81 
83  virtual void reset();
84 
86  virtual bool is_initialized() const;
87 
88  protected :
89 
91  virtual void _shoot_vertex(::mygsl::rng & random_, ::geomtools::vector_3d & vertex_);
92 
93  void _shoot_vertex_cylinders (mygsl::rng & random_,
94  geomtools::vector_3d & vertex_);
95 
96  private:
97 
98  void _init_ ();
99 
100  void _reset_ ();
101 
102  void _set_defaults_ ();
103 
104  private:
105 
106  bool _initialized_;
107  int _mode_;
108  bool _surface_side_;
109  bool _surface_bottom_;
110  bool _surface_top_;
111  double _skin_skip_;
112  double _skin_thickness_;
113  genvtx::cylinder_vg _cylinder_vg_;
114  std::vector<weight_entry_type> _entries_;
115 
119 
120  };
121 
122 } // end of namespace genvtx
123 
124 /***************
125  * OCD support *
126  ***************/
127 #include <datatools/ocd_macros.h>
129 
130 #endif // GENVTX_CYLINDER_MODEL_VG_H
131 
132 /*
133 ** Local Variables: --
134 ** mode: c++ --
135 ** c-file-style: "gnu" --
136 ** tab-width: 2 --
137 ** End: --
138 */
bool is_surface_side() const
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
virtual void reset()
Reset.
A vertex generator based on a cylindric geometry model.
Definition: cylinder_model_vg.h:36
void _shoot_vertex_cylinders(mygsl::rng &random_, geomtools::vector_3d &vertex_)
An abstract vertex generator based on a geometry model.
Definition: i_from_model_vg.h:39
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
void set_skin_thickness(double skin_thickness_)
virtual void _shoot_vertex(::mygsl::rng &random_, ::geomtools::vector_3d &vertex_)
Randomize vertex.
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
cylinder_model_vg()
Constructor.
void set_skin_skip(double skin_skip_)
#define GENVTX_VG_REGISTRATION_INTERFACE(GENVTX_CLASS_NAME)
Definition: vg_macros.h:46
Macros to automatically register vertex generator class.
A vertex generator based on the geometry of a 3D cylinder.
Definition: cylinder_vg.h:41
virtual ~cylinder_model_vg()
Destructor.
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
bool is_surface_bottom() const
virtual bool is_initialized() const
Check initialization status.
bool is_mode_surface() const
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual void initialize(const ::datatools::properties &, ::datatools::service_manager &, ::genvtx::vg_dict_type &)
Initialization.
Service management class.
Definition: service_manager.h:57
Pseudo random number generator.
Definition: rng.h:53