00001 // $Id: MagFieldToolDC06.h,v 1.2 2008/07/26 23:03:01 cattanem Exp $ 00002 #ifndef MAGFIELDTOOLDC06_H 00003 #define MAGFIELDTOOLDC06_H 1 00004 00005 // Include files 00006 // from Gaudi 00007 #include "GaudiAlg/GaudiTool.h" 00008 #include "IMagFieldTool.h" // Interface 00009 00010 00017 class MagFieldToolDC06 : public GaudiTool, virtual public IMagFieldTool { 00018 public: 00020 MagFieldToolDC06( const std::string& type, 00021 const std::string& name, 00022 const IInterface* parent); 00023 00024 virtual ~MagFieldToolDC06( ); 00025 00027 virtual void fieldVector( const Gaudi::XYZPoint& xyz, 00028 Gaudi::XYZVector& fvec ) const; 00029 00031 virtual StatusCode updateMap( const std::vector<std::string>& theFiles, 00032 const double& scaleFactor ); 00033 00034 protected: 00035 00036 private: 00038 StatusCode readFile( const std::string& theFile, const double& scaleFactor ); 00039 00041 void rescale ( const double& rescaleFactor ); 00042 00043 00044 std::string m_mapFileName; 00045 double m_scaleFactor; 00046 00047 std::vector<double> m_Q; 00048 double m_Dxyz[3]; 00049 int m_Nxyz[3]; 00050 double m_max_FL[3]; 00051 double m_min_FL[3]; 00052 double m_zOffSet; 00053 00054 00055 }; 00056 #endif // MAGFIELDTOOLDC06_H