Bayeux  3.4.1
Core Foundation library for SuperNEMO
placement_vg.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-02-13
4  * Last modified: 2014-04-09
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Vertex generator with placement.
11  *
12  * History:
13  *
14  */
15 
16 #ifndef GENVTX_PLACEMENT_VG_H
17 #define GENVTX_PLACEMENT_VG_H 1
18 
19 // Third party:
20 // - Bayeux/geomtools:
21 #include <geomtools/placement.h>
22 
23 // This project:
25 
26 namespace genvtx {
27 
30  {
31  public:
32 
33  const geomtools::placement & get_placement () const;
34 
36 
37  void set_placement (const geomtools::placement &);
38 
39  bool has_vg () const;
40 
41  bool is_owned () const;
42 
43  const i_vertex_generator & get_vg () const;
44 
46 
47  void set_vg (i_vertex_generator &);
48 
49  void set_vg (i_vertex_generator *);
50 
51  void set_vg (vg_handle_type &);
52 
54  placement_vg();
55 
58  const geomtools::placement &);
59 
61  virtual ~placement_vg();
62 
64  virtual void initialize(const ::datatools::properties &,
67 
69  virtual void reset();
70 
72  virtual bool is_initialized() const;
73 
75  virtual bool has_next_vertex() const;
76 
77  protected :
78 
80  virtual void _shoot_vertex(::mygsl::rng & random_, ::geomtools::vector_3d & vertex_);
81 
82  void _clear_vg_ ();
83 
84  private:
85 
86  geomtools::placement _placement_;
87  bool _owned_;
88  i_vertex_generator * _vg_;
89  vg_handle_type _hvg_;
90 
91  private:
92 
96 
97  };
98 
99 } // end of namespace genvtx
100 
101 #endif //GENVTX_PLACEMENT_VG_H
102 
103 /*
104 ** Local Variables: --
105 ** mode: c++ --
106 ** c-file-style: "gnu" --
107 ** tab-width: 2 --
108 ** End: --
109 */
placement_vg()
Constructor.
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
virtual void reset()
Reset.
virtual void initialize(const ::datatools::properties &, ::datatools::service_manager &, ::genvtx::vg_dict_type &)
Initialization.
virtual bool is_initialized() const
Check initialization status.
void set_placement(const geomtools::placement &)
bool has_vg() const
virtual void _shoot_vertex(::mygsl::rng &random_, ::geomtools::vector_3d &vertex_)
Randomize vertex.
const geomtools::placement & get_placement() const
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
bool is_owned() const
The base interface class for all vertex generator classes.
Definition: i_vertex_generator.h:59
The placement for a geometry volume with its translation and rotation with respect to some mother ref...
Definition: placement.h:34
const i_vertex_generator & get_vg() const
#define GENVTX_VG_REGISTRATION_INTERFACE(GENVTX_CLASS_NAME)
Definition: vg_macros.h:46
virtual ~placement_vg()
Destructor.
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
virtual bool has_next_vertex() const
Check if at least one more vertex is available.
void set_vg(i_vertex_generator &)
Service management class.
Definition: service_manager.h:57
i_vertex_generator & grab_vg()
Pseudo random number generator.
Definition: rng.h:53
A vertex generator that changes the placement (translation/rotation) of another vertex generator.
Definition: placement_vg.h:29