MarlinTPC  1.2.0
Cylindrical3DMagneticField.h
1 #ifndef CYLINDRICAL3DMAGNETICFIELD_H
2 #define CYLINDRICAL3DMAGNETICFIELD_H 1
3 
4 // stl
5 #include <vector>
6 
7 // CLHEP
8 #include <CLHEP/Matrix/Vector.h>
9 #include <CLHEP/Vector/ThreeVector.h>
10 
11 // MarlinTPC
12 #include "MagneticField.h"
13 
14 namespace EVENT {
15 
16  class LCCollection;
17 }
18 
19 namespace marlintpc {
20 
26 
27 public:
31 
35 
38  virtual Field *new_field( void );
39 
42  virtual bool construct( EVENT::LCCollection * );
43 
44  struct FieldMapEntry {
45 
46  float _Br;
47  float _Bphi;
48  float _Bz;
49  };
50 
51 protected:
52 
55  CLHEP::Hep3Vector get_field_value_coil_coordinates( const CLHEP::Hep3Vector & );
56 
57 
58 private:
59 
62  double _r_min;
63  double _r_max;
64  double _phi_min;
65  double _phi_max;
66  double _z_min;
67  double _z_max;
68 
71  int _r_bins;
72  int _phi_bins;
73  int _z_bins;
74 
77  double _dr;
78  double _dphi;
79  double _dz;
80 
83  std::vector<std::vector<std::vector<FieldMapEntry> > > _field_map;
84 };
85 
86 } // namespace marlintpc
87 
88 #endif // CYLINDRICAL3DMAGNETICFIELD_H
Field : A base interface to an electric or magnetic field.
Definition: Field.h:22
MagneticField : A base interface to a magnetic field.
Definition: MagneticField.h:20
Cylindrical3DMagneticField()
constructor
Definition: Cylindrical3DMagneticField.cc:19
virtual Field * new_field(void)
returns a new field...
Definition: Cylindrical3DMagneticField.cc:31
CLHEP::Hep3Vector get_field_value_coil_coordinates(const CLHEP::Hep3Vector &)
gets the field value at a point given in coil coordinates
Definition: Cylindrical3DMagneticField.cc:109
virtual ~Cylindrical3DMagneticField()
destructor
Definition: Cylindrical3DMagneticField.cc:26
Definition: Cylindrical3DMagneticField.h:44
virtual bool construct(EVENT::LCCollection *)
constructs the field from an LCCollection of data objects
Definition: Cylindrical3DMagneticField.cc:36
Cylindrical3DMagneticField : A magnetic field from a cylindrical 3d field map (r, phi and z) ...
Definition: Cylindrical3DMagneticField.h:25