CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/MagneticField/ParametrizedEngine/plugins/BFit.h

Go to the documentation of this file.
00001 #ifndef BFit_h
00002 #define BFit_h
00003 
00013 #include "rz_poly.h"
00014 
00015 
00016 
00017 //_______________________________________________________________________________
00018 namespace magfieldparam {
00019 class BFit {
00020 
00021 private:
00022 
00023 #ifdef BFit_PW
00024    static const double Z_nom[4];
00025    static const double B_nom[4];
00026    static const double C_nom[4][16];
00027 #else
00028    static const double dZ_0;
00029    static const double dZ_2;
00030 
00031    static const double C_0[16];   //4-fold expansion coefficients
00032    static const double C_2[16];   //of the expansion coefficients :)
00033    static const double C_4[16];
00034 #endif   
00035    double dZ;    //Z-shift
00036    double C[16]; //the expansion coeeficients 
00037 
00038    rz_poly *Bz_base;
00039    rz_poly *Br_base;
00040  
00041 public:
00042 
00043    BFit();
00044    ~BFit() {delete Bz_base; delete Br_base;};
00045    
00046    void SetField(double B);
00047    void GetField(double r,   double z,   double phi,
00048                  double &Br, double &Bz, double &Bphi);
00049 };
00050 }
00051 
00052 #endif