CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/MagneticField/VolumeGeometry/interface/MagneticFieldProvider.h

Go to the documentation of this file.
00001 #ifndef MagneticFieldProvider_h
00002 #define MagneticFieldProvider_h
00003 
00013 #include "DataFormats/GeometryVector/interface/Point3DBase.h"
00014 #include "DataFormats/GeometryVector/interface/Vector3DBase.h"
00015 #include "DataFormats/GeometryVector/interface/LocalTag.h"
00016 #include "DataFormats/GeometryVector/interface/GlobalTag.h"
00017 
00018 template <class T>
00019 class MagneticFieldProvider {
00020 public:
00021 
00022   typedef Point3DBase<T,GlobalTag>      GlobalPointType;
00023   typedef Point3DBase<T,LocalTag>       LocalPointType;
00024   typedef Vector3DBase<T,GlobalTag>     GlobalVectorType;
00025   typedef Vector3DBase<T,LocalTag>      LocalVectorType;
00026 
00027 
00028   virtual ~MagneticFieldProvider(){}
00029 
00032   virtual LocalVectorType valueInTesla( const LocalPointType& p) const = 0;
00033 
00037   // virtual GlobalVectorType valueInTesla( const GlobalPointType& p) const = 0;
00038 
00042   virtual int hasDerivatives() const {return false;}
00043 
00046   virtual LocalVectorType derivativeInTeslaPerMeter( const LocalPointType& p, 
00047                                                      int N) const {
00048     return LocalVectorType();
00049   }
00050 
00051 };
00052 
00053 #endif