Bayeux  3.4.1
Core Foundation library for SuperNEMO
point_of_interest.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2014-11-21
4  * Last modified: 2014-11-24
5  *
6  * License:
7  *
8  * Description:
9  *
10  * A point of interest in the geometry
11  *
12  */
13 
14 #ifndef MCTOOLS_BIASING_POINT_OF_INTEREST_H
15 #define MCTOOLS_BIASING_POINT_OF_INTEREST_H 1
16 
17 // Standard library:
18 #include <string>
19 
20 // Third party:
21 // - Bayeux/datatools:
22 #include <datatools/i_tree_dump.h>
23 // - Bayeux/geomtools:
24 #include <geomtools/utils.h>
25 // #include <geomtools/placement.h>
26 // #include <geomtools/blur_spot.h>
27 
28 namespace datatools {
29  // Forward declaration:
30  class properties;
31 }
32 
33 namespace geomtools {
34  // Forward declaration:
35  class manager;
36 }
37 
38 namespace mctools {
39 
40  namespace biasing {
41 
43 
75  {
76  public:
77 
82  };
83 
86 
88  void set_name(const std::string &);
89 
91  const std::string & get_name() const;
92 
94  void set_position(const geomtools::vector_3d &);
95 
97  const geomtools::vector_3d & get_position() const;
98 
101 
104 
106  const geomtools::vector_3d & get_orientation() const;
107 
109  void set_attractivity(double);
110 
112  double get_attractivity() const;
113 
115  bool has_attractivity() const;
116 
118  bool is_attractive() const;
119 
121  bool is_repulsive() const;
122 
124  bool is_neutral() const;
125 
127  void set_radius(double);
128 
130  double get_radius() const;
131 
133  bool is_valid() const;
134 
136  void invalidate();
137 
139  void initialize(const datatools::properties & config_, const geomtools::manager * geomgr_ = 0);
140 
142  virtual void tree_dump(std::ostream & out_ = std::clog,
143  const std::string & title_ = "",
144  const std::string & indent_ = "",
145  bool inherit_ = false) const;
146 
148  bool hit(const geomtools::vector_3d & source_, const geomtools::vector_3d & direction_) const;
149 
150  protected:
151 
153  void _set_default();
154 
155  private:
156 
157  std::string _name_;
158  // geomtools::placement _placement_; //!< Placement of the spot
159  // geomtools::blur_spot _spot_; //!< Spot
160  geomtools::vector_3d _position_;
161  attractive_shape_type _attractive_shape_ = ATTRACTIVE_SHAPE_INVALID;
162  geomtools::vector_3d _orientation_;
163  double _radius_;
164  double _attractivity_;
165  bool _skip_check_inside_ = false;
166 
167  };
168 
169  } // namespace biasing
170 
171 } // namespace mctools
172 
173 #endif // MCTOOLS_BIASING_POINT_OF_INTEREST_H
174 
175 // Local Variables: --
176 // mode: c++ --
177 // c-file-style: "gnu" --
178 // tab-width: 2 --
179 // End: --
double get_radius() const
Return the radius.
bool is_repulsive() const
Check if the point of interest is repulsive.
double get_attractivity() const
Return the attractivity.
Definition: base_step_hit.h:32
bool hit(const geomtools::vector_3d &source_, const geomtools::vector_3d &direction_) const
Check if a linear trajectory coming from a given source with a given direction traverse the sphere.
const geomtools::vector_3d & get_position() const
Return the position.
An interface with utilities for printable objects.
Definition: i_tree_dump.h:36
void initialize(const datatools::properties &config_, const geomtools::manager *geomgr_=0)
Initialization.
bool is_neutral() const
Check if the point of interest has zero attractivity.
bool is_valid() const
Check validity.
void set_position(const geomtools::vector_3d &)
Set the position.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
attractive_shape_type
Definition: point_of_interest.h:78
void _set_default()
Set the default attributes.
bool has_attractivity() const
Check if the point of interest has a defined attractivity.
void set_radius(double)
Set the radius.
const std::string & get_name() const
Return the name.
point_of_interest()
Default constructor.
void set_name(const std::string &)
Set the name.
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
A point of interest (POI) in the geometry.
Definition: point_of_interest.h:73
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
Geometry manager for virtual geometry modelling. Main geometry manager for the modelisation of variou...
Definition: manager.h:70
void set_orientation(const geomtools::vector_3d &)
Set the orientation.
geomtools::vector_3d & grab_position()
Return the position.
bool is_attractive() const
Check if the point of interest is attractive.
void set_attractivity(double)
Set the attractivity.
const geomtools::vector_3d & get_orientation() const
Return the orientation.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125