00001 // $Header: /local/reps/Gaudi/GaudiKernel/GaudiKernel/IMagneticFieldSvc.h,v 1.8 2006/05/29 08:46:06 hmd Exp $ 00002 #ifndef GAUDIKERNEL_IMAGNETICFIELDSVC_H 00003 #define GAUDIKERNEL_IMAGNETICFIELDSVC_H 00004 00005 00006 // Include files 00007 #include "GaudiKernel/IService.h" 00008 #include "GaudiKernel/StatusCode.h" 00009 00010 00011 // Forward declarations 00012 template <class TYPE> class SvcFactory; 00013 namespace ROOT { 00014 namespace Math { 00015 class DefaultCoordinateSystemTag; 00016 00017 // from Math/Point3Dfwd.h 00018 template<class CoordSystem, class Tag> class PositionVector3D; 00019 // from Math/Vector3Dfwd.h 00020 template<class CoordSystem, class Tag> class DisplacementVector3D; 00021 // from Math/Point3Dfwd.h 00022 template<typename T> class Cartesian3D; 00023 // from Math/Point3Dfwd.h 00024 typedef PositionVector3D< Cartesian3D<double>,DefaultCoordinateSystemTag> XYZPoint; 00025 // from Math/Vector3Dfwd.h 00026 typedef DisplacementVector3D< Cartesian3D<double>,DefaultCoordinateSystemTag > XYZVector; 00027 } 00028 } 00029 00030 // Declaration of the interface ID ( interface id, major version, minor version) 00031 static const InterfaceID IID_IMagneticFieldSvc(80, 1 , 0); 00032 00033 00040 class IMagneticFieldSvc : virtual public IService { 00041 00042 public: 00044 static const InterfaceID& interfaceID() { return IID_IMagneticFieldSvc; } 00045 00046 // Get the magnetic field vector at a given point in space. 00047 // Input: XYZPoint - Point at which magnetic field vector is to be given. 00048 // Output: XYZVector - Magnectic field vector. 00049 // Return: StatusCode SUCCESS if calculation was performed. 00050 virtual StatusCode fieldVector( const ROOT::Math::XYZPoint& xyz, 00051 ROOT::Math::XYZVector& fvec ) const = 0; 00052 00053 }; 00054 00055 #endif // GAUDIKERNEL_IMAGNETICFIELDSVC_H