Bayeux  3.4.1
Core Foundation library for SuperNEMO
uniform_magnetic_field.h
Go to the documentation of this file.
1 /* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2012-04-24
4  * Last modified: 2013-02-24
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Uniform magnetic field
11  *
12  * History:
13  *
14  */
15 
16 #ifndef EMFIELD_UNIFORM_MAGNETIC_FIELD_H
17 #define EMFIELD_UNIFORM_MAGNETIC_FIELD_H 1
18 
19 // This project:
21 
22 namespace emfield {
23 
28  {
29  public:
30 
32  uniform_magnetic_field(uint32_t = 0);
33 
35  virtual ~uniform_magnetic_field();
36 
38  virtual void initialize(const ::datatools::properties &,
41 
43  virtual void reset();
44 
47  double time_,
48  ::geomtools::vector_3d & electric_field_) const;
49 
52  double time_,
53  geomtools::vector_3d & magnetic_field_) const;
54 
55 
57 
59 
61  virtual void tree_dump (std::ostream & out_ = std::clog,
62  const std::string & title_ = "",
63  const std::string & indent_ = "",
64  bool inherit_ = false) const;
65 
66  protected:
67 
69  void _set_defaults();
70 
71  private:
72 
73  geomtools::vector_3d _uniform_magnetic_field_;
74 
75  // Macro to automate the registration of the EM field :
77 
78  };
79 
80 } // end of namespace emfield
81 
82 #endif // EMFIELD_UNIFORM_MAGNETIC_FIELD_H
83 
84 // Local Variables: --
85 // mode: c++ --
86 // c-file-style: "gnu" --
87 // tab-width: 2 --
88 // End: --
#define EMFIELD_REGISTRATION_INTERFACE(EMFIELD_CLASS_NAME)
Definition: electromagnetic_field_macros.h:157
virtual int compute_magnetic_field(const ::geomtools::vector_3d &position_, double time_, geomtools::vector_3d &magnetic_field_) const
Compute magnetic field.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
std::map< std::string, handle_type > field_dict_type
Definition: base_electromagnetic_field.h:49
virtual void reset()
Reset.
void _set_defaults()
Set default attributes values.
uniform_magnetic_field(uint32_t=0)
Default constructor.
const geomtools::vector_3d & get_uniform_magnetic_field() const
Abstract base class for all electromagnetic field.
Definition: base_electromagnetic_field.h:43
void set_uniform_magnetic_field(const geomtools::vector_3d &b_)
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
virtual int compute_electric_field(const ::geomtools::vector_3d &position_, double time_, ::geomtools::vector_3d &electric_field_) const
Compute electric field.
virtual ~uniform_magnetic_field()
Destructor.
Definition: uniform_magnetic_field.h:27
virtual void initialize(const ::datatools::properties &, ::datatools::service_manager &, ::emfield::base_electromagnetic_field::field_dict_type &)
Initialization.
Service management class.
Definition: service_manager.h:57