MarlinTPC  1.2.0
Field.h
1 #ifndef FIELD_H
2 #define FIELD_H 1
3 
4 // stl
5 #include <string>
6 
7 // CLHEP
8 #include "CLHEP/Matrix/Vector.h"
9 #include "CLHEP/Vector/ThreeVector.h"
10 
11 namespace EVENT {
12 
13  class LCCollection;
14 }
15 
16 namespace marlintpc {
17 
22 class Field {
23 
24 public:
27  Field( std::string field_typename );
28 
31  virtual ~Field();
32 
35  virtual Field *new_field( void ) = 0;
36 
39  virtual bool construct( EVENT::LCCollection * ) = 0;
40 
44  CLHEP::HepVector get_field_value( const CLHEP::HepVector & );
45 
48  virtual CLHEP::Hep3Vector get_field_value( const CLHEP::Hep3Vector & ) = 0;
49 
52  virtual CLHEP::Hep3Vector get_field_error( );
53 
56  std::string get_typename();
57 
58 protected:
59 
60  CLHEP::Hep3Vector _field_error;
61 
62 private:
63 
64  std::string _field_typename;
65 };
66 
67 } // namespace marlintpc
68 
69 #endif // FIELD_H
Field : A base interface to an electric or magnetic field.
Definition: Field.h:22
CLHEP::HepVector get_field_value(const CLHEP::HepVector &)
gets the field value at a specified point (in carthesian coordinates)
Definition: Field.cc:28
virtual bool construct(EVENT::LCCollection *)=0
constructs the field from an LCCollection of data objects (could be anything...
Field(std::string field_typename)
constructor
Definition: Field.cc:13
std::string get_typename()
returns the typename of the field
Definition: Field.cc:49
virtual CLHEP::Hep3Vector get_field_error()
gets the field error.
Definition: Field.cc:43
virtual Field * new_field(void)=0
returns a new field...
virtual ~Field()
destructor
Definition: Field.cc:23