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
17#include "GaudiKernel/Service.h"
20#include "GaudiKernel/IIncidentListener.h"
28class IDataProviderSvc;
31typedef bool StatusCode;
42 virtual public IIncidentListener {
72 virtual const InterfaceID&
type()
const {
return IMagneticFieldSvc::interfaceID(); };
76 void handle(
const Incident&);
92 void SetPath(std::string new_path) {path = new_path;}
93 std::string GetPath() {
return path;}
95 void GridDistance(
int gridDistance = 5) {m_gridDistance = gridDistance;}
96 void RunMode(
int runmode = 2) {m_runmode = runmode;}
98 void OutLevel(
int outlevel = 1) {m_outlevel = outlevel;}
100 void Cur_SCQ1_55(
double Cur_SCQ1_55 = 349.4) {m_Cur_SCQ1_55 = Cur_SCQ1_55;}
101 void Cur_SCQ1_89(
double Cur_SCQ1_89 = 426.2) {m_Cur_SCQ1_89 = Cur_SCQ1_89;}
102 void Cur_SCQ2_10(
double Cur_SCQ2_10 = 474.2) {m_Cur_SCQ2_10 = Cur_SCQ2_10;}
104 void UseDBFlag(
bool useDB =
true) {m_useDB = useDB;}
107 bool init_mucMagneticField();
145 StatusCode parseFile( );
146 StatusCode parseFile_TE( );
150 std::string m_filename;
151 std::string m_filename_TE;
153 std::string former_m_filename_TE;
154 std::string former_m_filename;
161 double m_Cur_SCQ1_55;
162 double m_Cur_SCQ1_89;
163 double m_Cur_SCQ2_10;
165 std::vector<double> m_Q;
166 std::vector<double> m_P;
167 std::vector<double> m_Q_TE;
168 std::vector<double> m_P_TE;
169 std::vector<double> m_Q_1;
170 std::vector<double> m_P_1;
171 std::vector<double> m_Q_2;
172 std::vector<double> m_P_2;
180 double m_max_FL_TE[3];
181 double m_min_FL_TE[3];
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
FieldDBUtil::ConnectionDB * m_connect_run
virtual const InterfaceID & type() const
Service type.
std::map< int, std::vector< double > > m_mapMagnetInfo
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)
std::map< int, std::vector< double > > m_mapBeamEnergy
void handle(const Incident &)
virtual StatusCode uniFieldVector(const HepPoint3D &xyz, HepVector3D &fvec) const
std::vector< double > current
IDataProviderSvc * m_eventSvc
Forward and external declarations.