MarlinTPC  1.2.0
DIDZMapMagneticField.h
1 #ifndef DIDZMAPMAGNETICFIELD_H
2 #define DIDZMAPMAGNETICFIELD_H 1
3 
4 // stl
5 #include <string>
6 #include <vector>
7 
8 // CLHEP
9 
10 // MarlinTPC
11 #include "Field.h"
12 
13 namespace EVENT {
14 
15  class LCCollection;
16 }
17 
18 namespace marlintpc {
19 
24 class DIDZMapMagneticField: public Field {
25 
26 public:
30 
33  virtual ~DIDZMapMagneticField();
34 
37  virtual Field *new_field( void );
38 
41  virtual bool construct( EVENT::LCCollection * );
42 
45  CLHEP::Hep3Vector get_field_value( const CLHEP::Hep3Vector & );
46 
49  std::string get_typename();
50 
51  struct FieldMapEntry {
52 
53  double _z;
54  double _Bx;
55  };
56 
57 protected:
58 
59 private:
60 
63  double _r_min;
64  double _r_max;
65 
68  double _dz;
69 
72  std::vector<FieldMapEntry> _field_map;
73 };
74 
75 } // namespace marlintpc
76 
77 #endif // SOLENOIDZMAPMAGNETICFIELD_H
CLHEP::Hep3Vector get_field_value(const CLHEP::Hep3Vector &)
gets the field value at a specified point
Definition: DIDZMapMagneticField.cc:68
Field : A base interface to an electric or magnetic field.
Definition: Field.h:22
DIDZMapMagneticField : A magnetic field from a DID map (mapped in z)
Definition: DIDZMapMagneticField.h:24
virtual ~DIDZMapMagneticField()
destructor
Definition: DIDZMapMagneticField.cc:30
virtual Field * new_field(void)
returns a new field...
Definition: DIDZMapMagneticField.cc:35
std::string get_typename()
returns the typename of the field
virtual bool construct(EVENT::LCCollection *)
constructs the field from an LCCollection of data objects (could be anything...
Definition: DIDZMapMagneticField.cc:40
Definition: DIDZMapMagneticField.h:51
DIDZMapMagneticField()
constructor
Definition: DIDZMapMagneticField.cc:23