1#ifndef MAGNETICFIELDSVC_H
2#define MAGNETICFIELDSVC_H
7#include "CLHEP/Geometry/Vector3D.h"
8#include "CLHEP/Geometry/Point3D.h"
9#ifndef ENABLE_BACKWARDS_COMPATIBILITY
14#include "MagneticField/ConnectionDB.h"
17#include "GaudiKernel/Service.h"
19#include "MagneticField/IMagneticFieldSvc.h"
20#include "GaudiKernel/IIncidentListener.h"
28class IDataProviderSvc;
31typedef bool StatusCode;
43 virtual public IIncidentListener {
71 void** ppvInterface );
78 void handle(
const Incident&);
94 void SetPath(std::string new_path) {path = new_path;}
95 std::string GetPath() {
return path;}
97 void GridDistance(
int gridDistance = 5) {m_gridDistance = gridDistance;}
98 void RunMode(
int runmode = 2) {m_runmode = runmode;}
100 void OutLevel(
int outlevel = 1) {m_outlevel = outlevel;}
102 void Cur_SCQ1_55(
double Cur_SCQ1_55 = 349.4) {m_Cur_SCQ1_55 = Cur_SCQ1_55;}
103 void Cur_SCQ1_89(
double Cur_SCQ1_89 = 426.2) {m_Cur_SCQ1_89 = Cur_SCQ1_89;}
104 void Cur_SCQ2_10(
double Cur_SCQ2_10 = 474.2) {m_Cur_SCQ2_10 = Cur_SCQ2_10;}
106 void UseDBFlag(
bool useDB =
true) {m_useDB = useDB;}
109 bool init_mucMagneticField();
145 StatusCode parseFile( );
146 StatusCode parseFile_TE( );
150 std::string m_filename;
151 std::string m_filename_TE;
157 double m_Cur_SCQ1_55;
158 double m_Cur_SCQ1_89;
159 double m_Cur_SCQ2_10;
161 std::vector<double> m_Q;
162 std::vector<double> m_P;
163 std::vector<double> m_Q_TE;
164 std::vector<double> m_P_TE;
165 std::vector<double> m_Q_1;
166 std::vector<double> m_P_1;
167 std::vector<double> m_Q_2;
168 std::vector<double> m_P_2;
176 double m_max_FL_TE[3];
177 double m_min_FL_TE[3];
192 IDataProviderSvc* m_eventSvc;
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
static const InterfaceID & interfaceID()
Retrieve interface ID.
virtual const InterfaceID & type() const
Service type.
virtual double getReferField()
virtual StatusCode fieldVector(const HepPoint3D &xyz, HepVector3D &fvec) const
virtual ~MagneticFieldSvc()
Virtual destructor.
virtual StatusCode finalize()
Finalise the service.
virtual bool ifRealField() const
virtual StatusCode initialize()
Initialise the service (Inherited Service overrides)
void handle(const Incident &)
virtual StatusCode uniFieldVector(const HepPoint3D &xyz, HepVector3D &fvec) const
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Forward and external declarations.