CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/TrackPropagation/RungeKutta/src/RKLocalFieldProvider.h

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