BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/VertexFit-00-02-82/VertexFit/BField.h
Go to the documentation of this file.
1#ifndef VertexFit_BField_H
2#define VertexFit_BField_H
3
4//
5// Read field from MagneticField Service in Gaudi framework
6// Author: Min Xu data: 4/16/2008, created
7
8#include "CLHEP/Geometry/Point3D.h"
9#include "CLHEP/Matrix/Vector.h"
10#ifndef ENABLE_BACKWARDS_COMPATIBILITY
12#endif
13
14#ifndef BEAN
15#include "MagneticField/IMagneticFieldSvc.h"
16#else
17#include "MagneticField/MagneticFieldSvc.h"
18#endif
19
20using CLHEP::HepVector;
21
23 public :
25 if (s_bfield == 0) {
26 s_bfield = new VertexFitBField();
27 }
28 return s_bfield;
29 }
30 // constructor & deconstructor
32
33 double getBFieldZ(const HepPoint3D& vtx);
34 double getBFieldZRef();
35 // get B*c = B*-0.00299792458
36 double getCBz(const HepVector& vtx, const HepVector& trackPosition);
37
38 private :
40
41#ifndef BEAN
42 IMagneticFieldSvc* m_pIMF;
43#else
44 MagneticFieldSvc* m_pIMF;
45#endif
46
47 static VertexFitBField* s_bfield;
48 static const double alpha;
49};
50#endif
HepGeom::Point3D< double > HepPoint3D
double getCBz(const HepVector &vtx, const HepVector &trackPosition)