CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/TrackPropagation/RungeKutta/interface/RKLocalFieldProvider.h

Go to the documentation of this file.
00001 #ifndef RKLocalFieldProvider_H
00002 #define RKLocalFieldProvider_H
00003 
00004 #include "DataFormats/GeometrySurface/interface/GloballyPositioned.h"
00005 
00006 class MagVolume;
00007 
00008 class RKLocalFieldProvider {
00009 public:
00010 
00011     typedef GloballyPositioned<float>            Frame;
00012     typedef Frame::GlobalVector                  GlobalVector;
00013     typedef Frame::GlobalPoint                   GlobalPoint;
00014     typedef Frame::LocalVector                   LocalVector;
00015     typedef Frame::LocalPoint                    LocalPoint;
00016     typedef Frame::PositionType                  Position;
00017     typedef Frame::RotationType                  Rotation;
00018     typedef GlobalVector::BasicVectorType        Vector;
00019 
00021     //RKLocalFieldProvider();
00022 
00024     //explicit RKLocalFieldProvider( const Frame& frame);
00025 
00027     RKLocalFieldProvider( const MagVolume& vol);
00028 
00030     RKLocalFieldProvider( const MagVolume& vol, const Frame& frame);
00031 
00033     Vector inTesla( const LocalPoint& lp) const;
00034 
00035     Vector inTesla( double x, double y, double z) const {
00036         return inTesla( LocalPoint(x,y,z));
00037     }
00038 
00039     Vector inTesla( const Vector& v) const {
00040         return inTesla( LocalPoint(v));
00041     }
00042 
00044     const Frame& frame() const {return theFrame;}
00045 
00046 private:
00047 
00048     const MagVolume* theVolume;
00049     const Frame&     theFrame;
00050     bool             transform_;
00051 
00052     static Frame& globalFrame() {
00053       static Frame gf( Position(0,0,0), Rotation());
00054       return gf;
00055     }
00056 
00057 };
00058 
00059 #endif