Bayeux  3.4.1
Core Foundation library for SuperNEMO
placement_field.h
Go to the documentation of this file.
1 /* Author (s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2012-04-27
4  * Last modified: 2013-02-24
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Placement field
11  *
12  * History:
13  *
14  */
15 
16 #ifndef EMFIELD_PLACEMENT_FIELD_H
17 #define EMFIELD_PLACEMENT_FIELD_H 1
18 
19 // Third party:
20 // - Bayeux/geomtools:
21 #include <geomtools/placement.h>
22 
23 // This project:
25 
26 namespace emfield {
27 
33  {
34  public:
35 
37  placement_field(uint32_t = 0);
38 
40  virtual ~placement_field();
41 
43  virtual void initialize(const ::datatools::properties &,
46 
48  virtual void reset();
49 
52  double time_,
53  ::geomtools::vector_3d & electric_field_) const;
54 
57  double time_,
58  geomtools::vector_3d & magnetic_field_) const;
59 
61  const geomtools::placement & get_placement() const;
62 
64  void set_placement(const geomtools::placement & p_);
65 
68 
70  virtual void tree_dump (std::ostream & out_ = std::clog,
71  const std::string & title_ = "",
72  const std::string & indent_ = "",
73  bool inherit_ = false) const;
74 
75  protected:
76 
77  void _set_defaults();
78 
79  private:
80 
82  geomtools::placement _placement_;
83 
84  // Macro to automate the registration of the EM field :
86 
87  };
88 
89 } // end of namespace emfield
90 
91 #endif // EMFIELD_PLACEMENT_FIELD_H
92 
93 // Local Variables: --
94 // mode: c++ --
95 // c-file-style: "gnu" --
96 // tab-width: 2 --
97 // End: --
#define EMFIELD_REGISTRATION_INTERFACE(EMFIELD_CLASS_NAME)
Definition: electromagnetic_field_macros.h:157
const geomtools::placement & get_placement() const
Return the placement.
virtual int compute_magnetic_field(const ::geomtools::vector_3d &position_, double time_, geomtools::vector_3d &magnetic_field_) const
Compute magnetic field.
std::map< std::string, handle_type > field_dict_type
Definition: base_electromagnetic_field.h:49
void set_placement(const geomtools::placement &p_)
Set the placement.
placement_field(uint32_t=0)
Default constructor.
virtual void reset()
Reset.
void set_field(base_electromagnetic_field::handle_type &)
Set the referenced field.
Abstract base class for all electromagnetic field.
Definition: base_electromagnetic_field.h:43
virtual ~placement_field()
Destructor.
virtual void initialize(const ::datatools::properties &, ::datatools::service_manager &, ::emfield::base_electromagnetic_field::field_dict_type &)
Initialization.
Top-level namespace of the Bayeux/emfield module library.
Definition: base_electromagnetic_field.h:40
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
The placement for a geometry volume with its translation and rotation with respect to some mother ref...
Definition: placement.h:34
virtual int compute_electric_field(const ::geomtools::vector_3d &position_, double time_, ::geomtools::vector_3d &electric_field_) const
Compute electric field.
Class that recomputes a given field in some arbitrary coordinate system using a placement object to o...
Definition: placement_field.h:32
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Service management class.
Definition: service_manager.h:57