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