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();
147 StatusCode parseFile( );
148 StatusCode parseFile_TE( );
152 std::string m_filename;
153 std::string m_filename_TE;
155 std::string former_m_filename_TE;
156 std::string former_m_filename;
163 double m_Cur_SCQ1_55;
164 double m_Cur_SCQ1_89;
165 double m_Cur_SCQ2_10;
167 std::vector<double> m_Q;
168 std::vector<double> m_P;
169 std::vector<double> m_Q_TE;
170 std::vector<double> m_P_TE;
171 std::vector<double> m_Q_1;
172 std::vector<double> m_P_1;
173 std::vector<double> m_Q_2;
174 std::vector<double> m_P_2;
182 double m_max_FL_TE[3];
183 double m_min_FL_TE[3];
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
static const InterfaceID & interfaceID()
Retrieve interface ID.
std::vector< double > current
FieldDBUtil::ConnectionDB * m_connect_run
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
std::vector< double > beamEnergy
virtual StatusCode initialize()
Initialise the service (Inherited Service overrides)
void handle(const Incident &)
std::map< int, std::vector< double > > m_mapMagnetInfo
IDataProviderSvc * m_eventSvc
virtual StatusCode uniFieldVector(const HepPoint3D &xyz, HepVector3D &fvec) const
std::map< int, std::vector< double > > m_mapBeamEnergy
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Forward and external declarations.