CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/TrackPropagation/NavGeometry/interface/ShiftingMagneticFieldProvider.h

Go to the documentation of this file.
00001 #ifndef ShiftingMagneticFieldProvider_H
00002 #define ShiftingMagneticFieldProvider_H
00003 
00004 #include "MagneticField/VolumeGeometry/interface/MagneticFieldProvider.h"
00005 #include "MagneticField/VolumeGeometry/interface/MagVolume.h"
00006 
00007 template <class T>
00008 class ShiftingMagneticFieldProvider : public MagneticFieldProvider<T> {
00009 public:
00010 
00011   typedef typename MagneticFieldProvider<T>::LocalPointType    LocalPointType;
00012   typedef typename MagneticFieldProvider<T>::LocalVectorType   LocalVectorType;
00013   typedef typename MagneticFieldProvider<T>::GlobalPointType   GlobalPointType;
00014   typedef typename MagneticFieldProvider<T>::GlobalVectorType  GlobalVectorType;
00015 
00016 
00017   ShiftingMagneticFieldProvider( const MagVolume& magvol, 
00018                                  const MagVolume::PositionType& pos,
00019                                  const MagVolume::RotationType& rot);
00020 
00021   virtual LocalVectorType valueInTesla( const LocalPointType& p) const;
00022 
00023 private:
00024 
00025   enum FrameRelation {sameFrame, sameOrientation, differentFrames};
00026 
00027   GloballyPositioned<T>     theFrame;
00028   FrameRelation             theFrameRelation;
00029   const MagVolume&          theMagVolume;
00030   Basic3DVector<T>          theShift;
00031 
00032 };
00033 
00034 #include "TrackPropagation/NavGeometry/src/ShiftingMagneticFieldProvider.icc"
00035 
00036 #endif