MarlinTPC  1.2.0
Cylindrical2DMagneticField.h
1 #ifndef CYLINDRICAL2DMAGNETICFIELD_H
2 #define CYLINDRICAL2DMAGNETICFIELD_H 1
3 
4 // stl
5 #include <string>
6 #include <vector>
7 
8 // CLHEP
9 #include <CLHEP/Matrix/Vector.h>
10 #include <CLHEP/Vector/ThreeVector.h>
11 
12 // MarlinTPC
13 #include "MagneticField.h"
14 
15 namespace EVENT
16 {
17 
18  class LCCollection;
19 }
20 
21 namespace marlintpc
22 {
23 
29  {
30 
31  public:
35 
39 
44  void init(double, double, double, double, double);
45 
46 
49  virtual Field *new_field(void);
50 
53  virtual bool construct(EVENT::LCCollection *);
54 
56  {
57 
58  float _Br;
59  float _Bz;
60  };
61 
62  protected:
63 
66  CLHEP::Hep3Vector get_field_value_coil_coordinates(const CLHEP::Hep3Vector &);
67 
68 
69  private:
70 
73  double _r_min;
74  double _r_max;
75  double _z_min;
76  double _z_max;
77 
80  int _r_bins;
81  int _z_bins;
82 
85  double _dr;
86  double _dz;
87 
90  std::vector<std::vector<FieldMapEntry> > _field_map;
91  };
92 
93 } // namespace marlintpc
94 
95 #endif // CYLINDRICAL2DMAGNETICFIELD_H
Field : A base interface to an electric or magnetic field.
Definition: Field.h:22
virtual Field * new_field(void)
returns a new field...
Definition: Cylindrical2DMagneticField.cc:43
Definition: Cylindrical2DMagneticField.h:55
CLHEP::Hep3Vector get_field_value_coil_coordinates(const CLHEP::Hep3Vector &)
gets the field value at a point given in coil coordinates
Definition: Cylindrical2DMagneticField.cc:114
MagneticField : A base interface to a magnetic field.
Definition: MagneticField.h:20
Cylindrical2DMagneticField()
constructor
Definition: Cylindrical2DMagneticField.cc:19
virtual bool construct(EVENT::LCCollection *)
constructs the field from an LCCollection of data objects (could be anything...
Definition: Cylindrical2DMagneticField.cc:51
virtual ~Cylindrical2DMagneticField()
destructor
Definition: Cylindrical2DMagneticField.cc:29
void init(double, double, double, double, double)
initialize function – if one copies the marlin registration process it might be better to do it right...
Definition: Cylindrical2DMagneticField.cc:32
Cylindrical2DMagneticField : A magnetic field from a cylindrical 2d field map (r and z) ...
Definition: Cylindrical2DMagneticField.h:28