00001 //-------------------------------------------------------------------------- 00002 // File and Version Information: 00003 // $Id: BField.h,v 1.4 2008/09/17 08:30:39 zhangy Exp $ 00004 // 00005 // Description: 00006 // The BField class contains the magnetic field map. This class is now a 00007 // virtual class 00008 // 00009 // 00010 // Environment: 00011 // Software developed for the BaBar Detector at the SLAC B-Factory. 00012 // 00013 // Author List: 00014 // Bob Jacobsen 00015 // Dave Brown, 12-23-96; Added Kalman filter tracking functions, prepared 00016 // for a full field map implementation 00017 // Fri Sep 25 11:57:57 PDT 1998 - A. Snyder 00018 // Remove bFieldVectDF and bFieldZDF 00019 // The are replaced by derivative 00020 // Dave Brown, 12/20/99 Make this a virtual class, remove the 00021 // obsolete and dangerous static bFieldNom; 00022 // 00023 // Copyright Information: 00024 // Copyright (C) 1995, 1996 00025 // 00026 //------------------------------------------------------------------------ 00027 00028 #ifndef BFIELD_H 00029 #define BFIELD_H 00030 00031 #include "MagneticField/IMagneticFieldSvc.h" 00032 00033 class BField { 00034 00035 public: 00036 00037 BField(IMagneticFieldSvc* magSvc); 00038 ~BField(); 00039 00040 // return the Z component of the magnetic field at a point 00041 double bFieldZ() const; 00042 00043 // return nominal field 00044 double bFieldNominal()const; 00045 00046 //print 00047 void print()const; 00048 00049 // for converting radius*field to GeV/c of transverse momentum 00050 static const double cmTeslaToGeVc; 00051 static const double gaussToTesla; 00052 00053 private: 00054 // nominal field only 00055 double _nomFieldZ; 00056 IMagneticFieldSvc* m_pIMF; 00057 }; 00058 00059 #endif 00060