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 
17 
19 {
20  public:
21  MagneticField();
22  virtual ~MagneticField();
23 
26  virtual MagneticField* clone() const {
27  return 0;
28  }
29 
30 
32  virtual GlobalVector inTesla (const GlobalPoint& gp) const = 0;
33 
35  GlobalVector inKGauss(const GlobalPoint& gp) const {
36  return inTesla(gp) * 10.F;
37  }
38 
41  return inTesla(gp) * 2.99792458e-3F;
42  }
43 
45  // engine is defined.
46  virtual bool isDefined(const GlobalPoint& gp) const {
47  return true;
48  }
49 
52  virtual GlobalVector inTeslaUnchecked (const GlobalPoint& gp) const {
53  return inTesla(gp); // default dummy implementation
54  }
55 
57  int nominalValue() const {
61  }
62  return theNominalValue;
63  }
64 private:
65  //nominal field value
66  virtual int computeNominalValue() const;
67  mutable bool nominalValueCompiuted;
68  mutable int theNominalValue;
69 };
70 
71 #endif
virtual GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const
Definition: MagneticField.h:52
virtual bool isDefined(const GlobalPoint &gp) const
True if the point is within the region where the concrete field.
Definition: MagneticField.h:46
int nominalValue() const
The nominal field value for this map in kGauss.
Definition: MagneticField.h:57
bool nominalValueCompiuted
Definition: MagneticField.h:67
virtual ~MagneticField()
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
#define unlikely(x)
Definition: Likely.h:21
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
virtual int computeNominalValue() const
GlobalVector inKGauss(const GlobalPoint &gp) const
Field value ad specified global point, in KGauss.
Definition: MagneticField.h:35
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
virtual MagneticField * clone() const
Definition: MagneticField.h:26