Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

VertexFitBField Class Reference

#include <BField.h>

List of all members.

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

VertexFitBFieldinstance ()
VertexFitBFieldinstance ()

Private Member Functions

 VertexFitBField ()
 VertexFitBField ()

Private Attributes

IMagneticFieldSvcm_pIMF
IMagneticFieldSvcm_pIMF

Static Private Attributes

const double alpha = -0.00299792458
VertexFitBFields_bfield
VertexFitBFields_bfield = 0


Constructor & Destructor Documentation

VertexFitBField::~VertexFitBField  )  [inline]
 

00034 {}

VertexFitBField::VertexFitBField  )  [private]
 

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 }

VertexFitBField::~VertexFitBField  )  [inline]
 

00034 {}

VertexFitBField::VertexFitBField  )  [private]
 


Member Function Documentation

double VertexFitBField::getBFieldZ const HepPoint3D vtx  ) 
 

double VertexFitBField::getBFieldZ const HepPoint3D vtx  ) 
 

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 }

double VertexFitBField::getBFieldZRef  ) 
 

double VertexFitBField::getBFieldZRef  ) 
 

00038                                       {
00039   return 1000 * m_pIMF->getReferField();
00040 }

double VertexFitBField::getCBz const HepVector &  vtx,
const HepVector &  trackPosition
 

double VertexFitBField::getCBz const HepVector &  vtx,
const HepVector &  trackPosition
 

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 }

VertexFitBField* VertexFitBField::instance  )  [inline, static]
 

00027                                            {
00028             if (s_bfield == 0) {
00029                 s_bfield = new VertexFitBField();
00030             }
00031             return s_bfield;
00032         }

VertexFitBField* VertexFitBField::instance  )  [inline, static]
 

00027                                            {
00028             if (s_bfield == 0) {
00029                 s_bfield = new VertexFitBField();
00030             }
00031             return s_bfield;
00032         }


Member Data Documentation

const double VertexFitBField::alpha = -0.00299792458 [static, private]
 

IMagneticFieldSvc* VertexFitBField::m_pIMF [private]
 

IMagneticFieldSvc* VertexFitBField::m_pIMF [private]
 

VertexFitBField* VertexFitBField::s_bfield [static, private]
 

VertexFitBField * VertexFitBField::s_bfield = 0 [static, private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:13:57 2011 for BOSS6.5.5 by  doxygen 1.3.9.1