BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/KalFitAlg/include/KalFitAlg/coil/Bfield.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// Bfield class
4//
5// 27-Mar-1999 : KUNIYA Toshio
6// Enabled QCS compornent, phi compornent
7//
8// 21-Feb-1999 : KUNIYA Toshio
9// Keeping comatibility, Bfield class is modified.
10// No longer fortran common block is used for bfield map.
11// Access functions are prepared for fortran call.
12//
13// 22-Feb-1999 : KUNIYA Toshio
14// constructor, destructor are go to protected entries.
15//
16
17#pragma once
18
19#include "CLHEP/Geometry/Point3D.h"
20#include "CLHEP/Matrix/Matrix.h"
21#include "CLHEP/Matrix/SymMatrix.h"
22#include "CLHEP/Matrix/Vector.h"
23#include "CLHEP/Vector/ThreeVector.h"
24#ifndef ENABLE_BACKWARDS_COMPATIBILITY
25typedef HepGeom::Point3D<double> HepPoint3D;
26#endif
27
28using CLHEP::Hep3Vector;
29using CLHEP::HepMatrix;
30using CLHEP::HepSymMatrix;
31using CLHEP::HepVector;
32
33using namespace CLHEP;
34
35namespace KalmanFit {
36
37 class Bfield {
38
39 public:
40 /// returns Bfield object.
41 static Bfield* getBfield( int );
42
43 protected:
44 /// Constructor, Destructor
45 Bfield( int );
46 virtual ~Bfield( void ){};
47
48 public: // selectors
49 /// returns B field Map ID
50 int fieldID( void ) const { return _fieldID; }
51
52 /// returns B field
53 const Hep3Vector& fieldMap( double x, double y, double z ) const;
54 const Hep3Vector& fieldMap( const HepPoint3D& xyz ) const;
55 void fieldMap( double* position, double* bfield );
56
57 /// returns an element of B field
58 double bx( double x, double y, double z ) const;
59 double by( double x, double y, double z ) const;
60 double bz( double x, double y, double z ) const;
61 double bx( const HepPoint3D& xyz ) const;
62 double by( const HepPoint3D& xyz ) const;
63 double bz( const HepPoint3D& xyz ) const;
64
65 private:
66 static Bfield* _field[200];
67 double _Bz[175][399];
68 double _Br[175][399];
69 double _Bphi[175][399];
70 double _BzQR[101][163];
71 double _BrQR[101][163];
72 double _BphiQR[101][163];
73 double _BzQL[17][51][52];
74 double _BrQL[17][51][52];
75 double _BphiQL[17][51][52];
76 int _fieldID;
77 mutable double m_Bx;
78 mutable double m_By;
79 mutable double m_Bz;
80 mutable double m_x;
81 mutable double m_y;
82 mutable double m_z;
83 mutable Hep3Vector m_Bfld;
84
85 private:
86 void updateCache( double, double, double ) const;
87 };
88} // namespace KalmanFit
HepGeom::Point3D< double > HepPoint3D
Bfield(int)
Constructor, Destructor.
double bz(const HepPoint3D &xyz) const
const Hep3Vector & fieldMap(const HepPoint3D &xyz) const
const Hep3Vector & fieldMap(double x, double y, double z) const
returns B field
double bz(double x, double y, double z) const
double by(const HepPoint3D &xyz) const
double by(double x, double y, double z) const
double bx(double x, double y, double z) const
returns an element of B field
static Bfield * getBfield(int)
returns Bfield object.
double bx(const HepPoint3D &xyz) const
void fieldMap(double *position, double *bfield)
Bfield(int)
Constructor, Destructor.