Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:33

0001 #ifndef BFit_h
0002 #define BFit_h
0003 
0004 /** \class magfieldparam::BFit
0005  *
0006  *  2D parametrization of MTCC data
0007  *
0008  *  \author V. Maroussov
0009  */
0010 
0011 #include "rz_poly.h"
0012 
0013 //_______________________________________________________________________________
0014 namespace magfieldparam {
0015   class BFit {
0016   private:
0017 #ifdef BFit_PW
0018     static const double Z_nom[4];
0019     static const double B_nom[4];
0020     static const double C_nom[4][16];
0021 #else
0022     static const double dZ_0;
0023     static const double dZ_2;
0024 
0025     static const double C_0[16];  //4-fold expansion coefficients
0026     static const double C_2[16];  //of the expansion coefficients :)
0027     static const double C_4[16];
0028 #endif
0029     double dZ;     //Z-shift
0030     double C[16];  //the expansion coeeficients
0031 
0032     rz_poly *Bz_base;
0033     rz_poly *Br_base;
0034 
0035   public:
0036     BFit();
0037     ~BFit() {
0038       delete Bz_base;
0039       delete Br_base;
0040     };
0041 
0042     void SetField(double B);
0043     void GetField(double r, double z, double phi, double &Br, double &Bz, double &Bphi) const;
0044   };
0045 }  // namespace magfieldparam
0046 
0047 #endif