Bayeux  3.4.1
Core Foundation library for SuperNEMO
polycone_model_vg.h
Go to the documentation of this file.
1 /* Author(S) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2013-06-14
4  * Last modified: 2014-04-09
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Vertex generator from a tube model addressed through some
11  * collection of geometry IDs extracted from a mapping object.
12  *
13  * History:
14  *
15  */
16 
17 #ifndef GENVTX_POLYCONE_MODEL_VG_H
18 #define GENVTX_POLYCONE_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/polycone_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_bottom() const;
51 
52  bool is_surface_top() const;
53 
54  bool is_all_frustrum_active() const;
55 
56  void set_surface_inner_side(bool);
57 
58  void set_surface_outer_side(bool);
59 
60  void set_surface_bottom(bool);
61 
62  void set_surface_top(bool);
63 
64  void set_skin_skip(double skin_skip_);
65 
66  void set_skin_thickness(double skin_thickness_);
67 
68  void set_active_all_frustrum(bool);
69 
70  int get_mode() const;
71 
72  void set_mode(int);
73 
74  virtual void tree_dump(std::ostream & out_ = std::clog,
75  const std::string & title_ = "",
76  const std::string & indent_ = "",
77  bool inherit_ = false) const;
78 
81 
83  virtual ~polycone_model_vg();
84 
86  virtual void initialize(const ::datatools::properties &,
89 
91  virtual void reset();
92 
94  virtual bool is_initialized() const;
95 
96  protected :
97 
99  virtual void _shoot_vertex(::mygsl::rng & random_, ::geomtools::vector_3d & vertex_);
100 
101  void _shoot_vertex_polycones(mygsl::rng & random_,
102  geomtools::vector_3d & vertex_);
103 
104  private:
105 
106  void _init_();
107 
108  void _reset_();
109 
110  void _set_defaults_();
111 
112  private:
113 
114  bool _initialized_;
115  int _mode_;
116  bool _surface_inner_side_;
117  bool _surface_outer_side_;
118  bool _surface_bottom_;
119  bool _surface_top_;
120  int _bulk_mask_;
121  genvtx::polycone_vg _polycone_vg_;
122  double _skin_skip_;
123  double _skin_thickness_;
124  bool _active_all_frustrum_;
125  std::vector<weight_entry_type> _entries_;
126 
130 
131  };
132 
133 } // end of namespace genvtx
134 
135 /***************
136  * OCD support *
137  ***************/
138 #include <datatools/ocd_macros.h>
140 
141 #endif // GENVTX_POLYCONE_MODEL_VG_H
142 
143 /*
144 ** Local Variables: --
145 ** mode: c++ --
146 ** c-file-style: "gnu" --
147 ** tab-width: 2 --
148 ** End: --
149 */
virtual void _shoot_vertex(::mygsl::rng &random_, ::geomtools::vector_3d &vertex_)
Randomize vertex.
void set_surface_outer_side(bool)
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
bool is_all_frustrum_active() 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.
bool is_surface_outer_side() const
bool is_surface_inner_side() const
void set_skin_skip(double skin_skip_)
virtual ~polycone_model_vg()
Destructor.
bool is_mode_surface() const
An abstract vertex generator based on a geometry model.
Definition: i_from_model_vg.h:39
A vertex generator based on a polycone geometry model.
Definition: polycone_model_vg.h:36
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
virtual bool is_initialized() const
Check initialization status.
void set_skin_thickness(double skin_thickness_)
A vertex generator based on the geometry of a 3D polycone.
Definition: polycone_vg.h:37
void _shoot_vertex_polycones(mygsl::rng &random_, geomtools::vector_3d &vertex_)
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
void set_active_all_frustrum(bool)
virtual void reset()
Reset.
#define GENVTX_VG_REGISTRATION_INTERFACE(GENVTX_CLASS_NAME)
Definition: vg_macros.h:46
Macros to automatically register vertex generator class.
bool is_surface_bottom() const
polycone_model_vg()
Constructor.
void set_surface_inner_side(bool)
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
Service management class.
Definition: service_manager.h:57
Pseudo random number generator.
Definition: rng.h:53