CMS 3D CMS Logo

UniformMagneticField.h
Go to the documentation of this file.
1 #ifndef MagneticField_UniformMagneticField_h
2 #define MagneticField_UniformMagneticField_h
3 
13 
14 class UniformMagneticField final : public MagneticField {
15  public:
16 
18  UniformMagneticField(float value) : theField(0.f,0.f,value) {}
19 
21 
23  void set(float value) { set(GlobalVector(0.f,0.f,value)); }
24 
25 
26  ~UniformMagneticField() override {}
27 
28  GlobalVector inTesla (const GlobalPoint&) const override {return theField;}
29 
30  GlobalVector inTeslaUnchecked (const GlobalPoint& gp) const override {return theField;}
31 
32  bool isDefined(const GlobalPoint& gp) const override {return true;}
33 
34  private:
36 };
37 
38 #endif
bool isDefined(const GlobalPoint &gp) const override
True if the point is within the region where the concrete field.
UniformMagneticField(float value)
Construct passing the Z field component in Tesla.
UniformMagneticField(GlobalVector value)
double f[11][100]
Definition: value.py:1
GlobalVector inTesla(const GlobalPoint &) const override
Field value ad specified global point, in Tesla.
GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const override
Global3DVector GlobalVector
Definition: GlobalVector.h:10