BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitAlg/KalFitAlg-00-07-55-p03/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#if !defined(BFIELD_H)
18#define BFIELD_H
19
20
21
22#include "CLHEP/Matrix/Vector.h"
23#include "CLHEP/Matrix/Matrix.h"
24#include "CLHEP/Matrix/SymMatrix.h"
25#include "CLHEP/Vector/ThreeVector.h"
26#include "CLHEP/Geometry/Point3D.h"
27#ifndef ENABLE_BACKWARDS_COMPATIBILITY
29#endif
30
31 using CLHEP::HepVector;
32 using CLHEP::Hep3Vector;
33 using CLHEP::HepMatrix;
34 using CLHEP::HepSymMatrix;
35
36using namespace CLHEP;
37
38//class HepPoint3D;
39
40
41//class Bfield;
42
43class Bfield {
44
45public:
46 /// returns Bfield object.
47 static Bfield * getBfield(int);
48
49protected:
50 /// Constructor, Destructor
51 Bfield(int);
52 virtual ~Bfield(void) {};
53
54public://selectors
55
56 ///returns B field Map ID
57 int fieldID(void) const {return _fieldID;}
58
59 ///returns B field
60 const Hep3Vector & fieldMap(double x, double y, double z) const;
61 const Hep3Vector & fieldMap(const HepPoint3D &xyz) const;
62 void fieldMap(double *position, double *bfield);
63
64 ///returns an element of B field
65 double bx(double x, double y, double z) const;
66 double by(double x, double y, double z) const;
67 double bz(double x, double y, double z) const;
68 double bx(const HepPoint3D &xyz) const;
69 double by(const HepPoint3D &xyz) const;
70 double bz(const HepPoint3D &xyz) const;
71
72private:
73 static Bfield *_field[200];
74 double _Bz[175][399];
75 double _Br[175][399];
76 double _Bphi[175][399];
77 double _BzQR[101][163];
78 double _BrQR[101][163];
79 double _BphiQR[101][163];
80 double _BzQL[17][51][52];
81 double _BrQL[17][51][52];
82 double _BphiQL[17][51][52];
83 int _fieldID;
84 mutable double m_Bx;
85 mutable double m_By;
86 mutable double m_Bz;
87 mutable double m_x;
88 mutable double m_y;
89 mutable double m_z;
90 mutable Hep3Vector m_Bfld;
91
92private:
93 void updateCache(double, double, double) const;
94};
95
96#endif /* BFIELD_H */
HepGeom::Point3D< double > HepPoint3D
double bz(double x, double y, double z) const
const Hep3Vector & fieldMap(double x, double y, double z) const
returns B field
double by(double x, double y, double z) const
int fieldID(void) const
returns B field Map ID
double bx(double x, double y, double z) const
returns an element of B field
static Bfield * getBfield(int)
returns Bfield object.
double y[1000]