/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/TrackUtil/TrackUtil-00-00-08/TrackUtil/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 #include "CLHEP/Vector/ThreeVector.h"
00021 using CLHEP::Hep3Vector;
00022 
00023 #ifndef CLHEP_POINT3D_H
00024 #include "CLHEP/Geometry/Point3D.h"
00025 #endif
00026 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00027     typedef HepGeom::Point3D<double> HepPoint3D;
00028 #endif
00029 using HepGeom::Point3D;
00030 
00031 //class HepPoint3D;
00032 
00033 //class Bfield;
00034 
00035 class Bfield {
00036   
00037 public:
00039   static Bfield * getBfield(int);
00040   
00041 protected:
00043   Bfield(int);
00044 //zsl  virtual ~Bfield(void) {};
00045   
00046 public://selectors
00047   
00049   int fieldID(void) const {return _fieldID;}
00050   
00052   const Hep3Vector & fieldMap(float x, float y, float z) const;
00053   const Hep3Vector & fieldMap(const HepPoint3D &xyz) const;
00054   void fieldMap(float *position, float *bfield);
00055   
00057   float bx(float x, float y, float z) const;
00058   float by(float x, float y, float z) const;
00059   float bz(float x, float y, float z) const;
00060   float bx(const HepPoint3D &xyz) const;
00061   float by(const HepPoint3D &xyz) const;
00062   float bz(const HepPoint3D &xyz) const;
00063   
00064 private:
00065   static  Bfield *_field[200];
00066   float _Bz[175][399];
00067   float _Br[175][399];
00068   float _Bphi[175][399];
00069   float _BzQR[101][163];
00070   float _BrQR[101][163];
00071   float _BphiQR[101][163];
00072   float _BzQL[17][51][52];
00073   float _BrQL[17][51][52];
00074   float _BphiQL[17][51][52];
00075   int   _fieldID;
00076   mutable float m_Bx;
00077   mutable float m_By;
00078   mutable float m_Bz;
00079   mutable float m_x;
00080   mutable float m_y;
00081   mutable float m_z;
00082   mutable Hep3Vector m_Bfld;
00083   
00084 private:
00085   void updateCache(float, float, float) const;
00086 };
00087 
00088 #endif /* BFIELD_H */

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