CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 namespace magfieldparam {
15  class BFit {
16  private:
17 #ifdef BFit_PW
18  static const double Z_nom[4];
19  static const double B_nom[4];
20  static const double C_nom[4][16];
21 #else
22  static const double dZ_0;
23  static const double dZ_2;
24 
25  static const double C_0[16]; //4-fold expansion coefficients
26  static const double C_2[16]; //of the expansion coefficients :)
27  static const double C_4[16];
28 #endif
29  double dZ; //Z-shift
30  double C[16]; //the expansion coeeficients
31 
34 
35  public:
36  BFit();
37  ~BFit() {
38  delete Bz_base;
39  delete Br_base;
40  };
41 
42  void SetField(double B);
43  void GetField(double r, double z, double phi, double &Br, double &Bz, double &Bphi) const;
44  };
45 } // namespace magfieldparam
46 
47 #endif
void GetField(double r, double z, double phi, double &Br, double &Bz, double &Bphi) const
Definition: BFit.cc:190
rz_poly * Bz_base
Definition: BFit.h:32
static const double C_0[16]
Definition: BFit.h:25
static const double C_2[16]
Definition: BFit.h:26
rz_poly * Br_base
Definition: BFit.h:33
double C[16]
Definition: BFit.h:30
static const std::string B
static const double dZ_2
Definition: BFit.h:23
void SetField(double B)
Definition: BFit.cc:152
static const double dZ_0
Definition: BFit.h:22
static const double C_4[16]
Definition: BFit.h:27