Bayeux  3.4.1
Core Foundation library for SuperNEMO
polynomial_magnetic_field.h
Go to the documentation of this file.
1 /* Author(s): Xavier Garrido <garrido@lal.in2p3.fr>
3  * Creation date: 2015-02-14
4  * Last modified: 2015-02-14
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Magnetic field with polynomial variations
11  * - Bx = pxx0 + pxx1*x + pxx2*x²
12  * - By = pyx0 + pyx1*x + pyy0 + pyy1*y
13  * - Bz = 0
14  *
15  * History:
16  *
17  */
18 
19 #ifndef EMFIELD_POLYNOMIAL_MAGNETIC_FIELD_H
20 #define EMFIELD_POLYNOMIAL_MAGNETIC_FIELD_H 1
21 
22 // This project:
24 
25 namespace emfield {
26 
31  {
32  public:
33 
35  typedef std::vector<double> polynomial_parameters_type;
36 
38  typedef std::pair<double,double> coordinate_limits_type;
39 
43 
47 
51  };
52 
54  polynomial_magnetic_field(uint32_t flags_ = 0);
55 
58 
60  virtual void initialize(const datatools::properties & setup_,
61  datatools::service_manager & service_manager_,
63 
65  virtual void reset();
66 
68  virtual int compute_electric_field(const geomtools::vector_3d & position_,
69  double time_,
70  geomtools::vector_3d & electric_field_) const;
71 
73  virtual int compute_magnetic_field(const geomtools::vector_3d & position_,
74  double time_,
75  geomtools::vector_3d & magnetic_field_) const;
76 
78  virtual void tree_dump (std::ostream & out_ = std::clog,
79  const std::string & title_ = "",
80  const std::string & indent_ = "",
81  bool inherit_ = false) const;
82 
83  private:
84 
85  double _magnetic_field_unit_;
89 
90  // Macro to automate the registration of the EM field :
92 
93  };
94 
95 } // end of namespace emfield
96 
97 #endif // EMFIELD_POLYNOMIAL_MAGNETIC_FIELD_H
98 
99 // Local Variables: --
100 // mode: c++ --
101 // c-file-style: "gnu" --
102 // tab-width: 2 --
103 // End: --
virtual int compute_electric_field(const geomtools::vector_3d &position_, double time_, geomtools::vector_3d &electric_field_) const
Main function to compute electric field.
#define EMFIELD_REGISTRATION_INTERFACE(EMFIELD_CLASS_NAME)
Definition: electromagnetic_field_macros.h:157
virtual void initialize(const datatools::properties &setup_, datatools::service_manager &service_manager_, emfield::base_electromagnetic_field::field_dict_type &dict_)
Initialization.
virtual ~polynomial_magnetic_field()
Destructor.
coordinate_limits_type xlimits
Definition: polynomial_magnetic_field.h:48
std::pair< double, double > coordinate_limits_type
Typedef for space limits.
Definition: polynomial_magnetic_field.h:38
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual int compute_magnetic_field(const geomtools::vector_3d &position_, double time_, geomtools::vector_3d &magnetic_field_) const
Main function to compute magnetic field.
coordinate_limits_type zlimits
Definition: polynomial_magnetic_field.h:50
polynomial_magnetic_field(uint32_t flags_=0)
Contructor.
std::map< std::string, handle_type > field_dict_type
Definition: base_electromagnetic_field.h:49
polynomial_parameters_type py
Definition: polynomial_magnetic_field.h:45
polynomial_parameters_type pz
Definition: polynomial_magnetic_field.h:46
Abstract base class for all electromagnetic field.
Definition: base_electromagnetic_field.h:43
polynomial_parameters_type px
Definition: polynomial_magnetic_field.h:44
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
Definition: polynomial_magnetic_field.h:30
std::vector< double > polynomial_parameters_type
Typedef for polynomial parameters.
Definition: polynomial_magnetic_field.h:35
coordinate_limits_type ylimits
Definition: polynomial_magnetic_field.h:49
Internal structure to embed polynomial parameters.
Definition: polynomial_magnetic_field.h:41
Service management class.
Definition: service_manager.h:57
A dictionary of arbitrary properties.
Definition: properties.h:125