File indexing completed on 2024-04-06 12:22:35
0001 #ifndef MagneticFieldProvider_h
0002 #define MagneticFieldProvider_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "DataFormats/GeometryVector/interface/Point3DBase.h"
0012 #include "DataFormats/GeometryVector/interface/Vector3DBase.h"
0013 #include "DataFormats/GeometryVector/interface/LocalTag.h"
0014 #include "DataFormats/GeometryVector/interface/GlobalTag.h"
0015
0016 template <class T>
0017 class MagneticFieldProvider {
0018 public:
0019 typedef Point3DBase<T, GlobalTag> GlobalPointType;
0020 typedef Point3DBase<T, LocalTag> LocalPointType;
0021 typedef Vector3DBase<T, GlobalTag> GlobalVectorType;
0022 typedef Vector3DBase<T, LocalTag> LocalVectorType;
0023
0024 virtual ~MagneticFieldProvider() {}
0025
0026
0027
0028 virtual LocalVectorType valueInTesla(const LocalPointType& p) const = 0;
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 virtual int hasDerivatives() const { return false; }
0039
0040
0041
0042 virtual LocalVectorType derivativeInTeslaPerMeter(const LocalPointType& p, int N) const { return LocalVectorType(); }
0043 };
0044
0045 #endif