CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MagneticField.h
Go to the documentation of this file.
1 #ifndef MagneticField_MagneticField_h
2 #define MagneticField_MagneticField_h
3 
15 
17 {
18  public:
19  MagneticField();
20  virtual ~MagneticField();
21 
24  virtual MagneticField* clone() const {
25  return 0;
26  }
27 
28 
30  virtual GlobalVector inTesla (const GlobalPoint& gp) const = 0;
31 
33  virtual GlobalVector inKGauss(const GlobalPoint& gp) const;
34 
36  virtual GlobalVector inInverseGeV(const GlobalPoint& gp) const;
37 
39  // engine is defined.
40  virtual bool isDefined(const GlobalPoint& gp) const {
41  return true;
42  }
43 
46  virtual GlobalVector inTeslaUnchecked (const GlobalPoint& gp) const {
47  return inTesla(gp); // default dummy implementation
48  }
49 
51  // This generic implementation can be replaced by concrete engines
52  virtual int nominalValue() const;
53 
54 };
55 
56 #endif
virtual GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const
Definition: MagneticField.h:46
virtual bool isDefined(const GlobalPoint &gp) const
True if the point is within the region where the concrete field.
Definition: MagneticField.h:40
virtual int nominalValue() const
The nominal field value for this map in kGauss.
virtual ~MagneticField()
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
virtual GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
virtual GlobalVector inKGauss(const GlobalPoint &gp) const
Field value ad specified global point, in KGauss.
virtual MagneticField * clone() const
Definition: MagneticField.h:24