CMS 3D CMS Logo

BFit.h
Go to the documentation of this file.
1 #ifndef BFit_h
2 #define BFit_h
3 
11 #include "rz_poly.h"
12 
13 
14 
15 //_______________________________________________________________________________
16 namespace magfieldparam {
17 class BFit {
18 
19 private:
20 
21 #ifdef BFit_PW
22  static const double Z_nom[4];
23  static const double B_nom[4];
24  static const double C_nom[4][16];
25 #else
26  static const double dZ_0;
27  static const double dZ_2;
28 
29  static const double C_0[16]; //4-fold expansion coefficients
30  static const double C_2[16]; //of the expansion coefficients :)
31  static const double C_4[16];
32 #endif
33  double dZ; //Z-shift
34  double C[16]; //the expansion coeeficients
35 
38 
39 public:
40 
41  BFit();
42  ~BFit() {delete Bz_base; delete Br_base;};
43 
44  void SetField(double B);
45  void GetField(double r, double z, double phi,
46  double &Br, double &Bz, double &Bphi) const;
47 };
48 }
49 
50 #endif
void GetField(double r, double z, double phi, double &Br, double &Bz, double &Bphi) const
Definition: BFit.cc:139
rz_poly * Bz_base
Definition: BFit.h:36
static const double C_0[16]
Definition: BFit.h:29
static const double C_2[16]
Definition: BFit.h:30
rz_poly * Br_base
Definition: BFit.h:37
double C[16]
Definition: BFit.h:34
static const std::string B
static const double dZ_2
Definition: BFit.h:27
void SetField(double B)
Definition: BFit.cc:101
static const double dZ_0
Definition: BFit.h:26
static const double C_4[16]
Definition: BFit.h:31