/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/coil/Bfield.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Bfield class
00004 //
00005 // 27-Mar-1999 : KUNIYA Toshio
00006 //   Enabled QCS compornent, phi compornent
00007 //
00008 // 21-Feb-1999 : KUNIYA Toshio
00009 //   Keeping comatibility, Bfield class is modified.
00010 //   No longer fortran common block is used for bfield map.
00011 //   Access functions are prepared for fortran call.
00012 //
00013 // 22-Feb-1999 : KUNIYA Toshio
00014 //   constructor, destructor are go to protected entries.
00015 // 
00016 
00017 #if !defined(BFIELD_H)
00018 #define BFIELD_H
00019 
00020 
00021 
00022 #include "CLHEP/Matrix/Vector.h"
00023 #include "CLHEP/Matrix/Matrix.h"
00024 #include "CLHEP/Matrix/SymMatrix.h"
00025 #include "CLHEP/Vector/ThreeVector.h"
00026 #include "CLHEP/Geometry/Point3D.h"
00027 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00028 typedef HepGeom::Point3D<double> HepPoint3D;
00029 #endif
00030 
00031  using CLHEP::HepVector; 
00032  using CLHEP::Hep3Vector;
00033  using CLHEP::HepMatrix;
00034  using CLHEP::HepSymMatrix;
00035 
00036 using namespace CLHEP;
00037 
00038 //class HepPoint3D;
00039 
00040 
00041 //class Bfield;
00042 
00043 class Bfield {
00044   
00045 public:
00047   static Bfield * getBfield(int);
00048   
00049 protected:
00051   Bfield(int);
00052   virtual ~Bfield(void) {};
00053   
00054 public://selectors
00055   
00057   int fieldID(void) const {return _fieldID;}
00058   
00060   const Hep3Vector & fieldMap(double x, double y, double z) const;
00061   const Hep3Vector & fieldMap(const HepPoint3D &xyz) const;
00062   void fieldMap(double *position, double *bfield);
00063   
00065   double bx(double x, double y, double z) const;
00066   double by(double x, double y, double z) const;
00067   double bz(double x, double y, double z) const;
00068   double bx(const HepPoint3D &xyz) const;
00069   double by(const HepPoint3D &xyz) const;
00070   double bz(const HepPoint3D &xyz) const;
00071   
00072 private:
00073   static  Bfield *_field[200];
00074   double _Bz[175][399];
00075   double _Br[175][399];
00076   double _Bphi[175][399];
00077   double _BzQR[101][163];
00078   double _BrQR[101][163];
00079   double _BphiQR[101][163];
00080   double _BzQL[17][51][52];
00081   double _BrQL[17][51][52];
00082   double _BphiQL[17][51][52];
00083   int   _fieldID;
00084   mutable double m_Bx;
00085   mutable double m_By;
00086   mutable double m_Bz;
00087   mutable double m_x;
00088   mutable double m_y;
00089   mutable double m_z;
00090   mutable Hep3Vector m_Bfld;
00091   
00092 private:
00093   void updateCache(double, double, double) const;
00094 };
00095 
00096 #endif /* BFIELD_H */

Generated on Tue Nov 29 23:13:22 2016 for BOSS_7.0.2 by  doxygen 1.4.7