#include <BField.h>
Public Member Functions | |
double | getBFieldZ (const HepPoint3D &vtx) |
double | getBFieldZ (const HepPoint3D &vtx) |
double | getBFieldZRef () |
double | getBFieldZRef () |
double | getCBz (const HepVector &vtx, const HepVector &trackPosition) |
double | getCBz (const HepVector &vtx, const HepVector &trackPosition) |
~VertexFitBField () | |
~VertexFitBField () | |
Static Public Member Functions | |
VertexFitBField * | instance () |
VertexFitBField * | instance () |
Private Member Functions | |
VertexFitBField () | |
VertexFitBField () | |
Private Attributes | |
IMagneticFieldSvc * | m_pIMF |
IMagneticFieldSvc * | m_pIMF |
Static Private Attributes | |
const double | alpha = -0.00299792458 |
VertexFitBField * | s_bfield |
VertexFitBField * | s_bfield = 0 |
|
00034 {}
|
|
00015 { 00016 ISvcLocator* svcLocator = Gaudi::svcLocator(); 00017 m_pIMF = NULL; 00018 StatusCode sc = svcLocator->service("MagneticFieldSvc",m_pIMF); 00019 assert(m_pIMF != NULL); 00020 if (sc != StatusCode::SUCCESS) { 00021 std::cout << "ERROR : Unable to open Magnetic field service" << std::endl; 00022 // assert(false); 00023 } 00024 }
|
|
00034 {}
|
|
|
|
|
|
00026 { 00027 HepVector3D vector(0.0, 0.0, 0.0); 00028 // fixed 2008-8-1 00029 double radius = sqrt(vtx.x()*vtx.x() + vtx.y()*vtx.y()); 00030 if (radius < 150 && abs(vtx.z()) < 150) { 00031 m_pIMF->fieldVector(10.0*vtx, vector); 00032 return 1000 * vector.z(); //unit of m_BFieldZ is Tesla 00033 } else { 00034 return 1000 * m_pIMF->getReferField(); 00035 } 00036 }
|
|
|
|
00038 { 00039 return 1000 * m_pIMF->getReferField(); 00040 }
|
|
|
|
00042 { 00043 HepPoint3D Vtx(vtx[0], vtx[1], vtx[2]); 00044 HepPoint3D TrkPosition(trackPosition[0], trackPosition[1], trackPosition[2]); 00045 00046 HepVector3D vector_vtx(0.0, 0.0, 0.0); 00047 HepVector3D vector_trk(0.0, 0.0, 0.0); 00048 double radius = sqrt(vtx[0]*vtx[0] + vtx[1]*vtx[1]); 00049 if (radius < 150 && abs(vtx[2]) < 150) { 00050 m_pIMF->fieldVector(10.0*Vtx, vector_vtx); 00051 m_pIMF->fieldVector(10.0*TrkPosition, vector_trk); 00052 return 1000 * alpha * (vector_vtx.z() + vector_trk.z())/2;//unit of m_BFieldZ is Tesla 00053 } else { 00054 return 1000 * alpha* m_pIMF->getReferField(); 00055 } 00056 }
|
|
00027 { 00028 if (s_bfield == 0) { 00029 s_bfield = new VertexFitBField(); 00030 } 00031 return s_bfield; 00032 }
|
|
00027 { 00028 if (s_bfield == 0) { 00029 s_bfield = new VertexFitBField(); 00030 } 00031 return s_bfield; 00032 }
|
|
|
|
|
|
|
|
|
|
|