Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:44

0001 /*
0002  * This class taken for the pakage MBDigitizer implements the
0003  * Rovelli-Gresele parametrization used in ORCA 6. It is included here
0004  * for comparison with the current parametrization.
0005  *
0006  */
0007 
0008 #ifndef DTBNORMPARAM_H
0009 #define DTBNORMPARAM_H
0010 
0011 /** \class DTBNormParam
0012  *
0013  * Provide time vs x correction functions for different normal B field values
0014  *
0015  * \author P. Ronchese           INFN - PADOVA
0016  *
0017  * Modification:
0018  *    01-Oct-2002 SL Doxygenate
0019  *
0020  */
0021 
0022 /* Base Class Headers */
0023 
0024 /* Collaborating Class Declarations */
0025 
0026 /* C++ Headers */
0027 
0028 /* ====================================================================== */
0029 
0030 /* Class DTBNormParam Interface */
0031 
0032 class DTBNormParam {
0033 public:
0034   /** Constructor Field=0*/
0035   DTBNormParam();
0036   /** Constructor Field normal in Tesla*/
0037   DTBNormParam(float bnorm);
0038 
0039   /** Destructor (empty)*/
0040   ~DTBNormParam();
0041 
0042   /* Operations */
0043   /// return the correction for Bnorm field
0044   float tcor(float xpos) const;
0045 
0046 private:
0047   // tables of function parameters for 10 normal B filed values
0048   const static float table_offsc[11];
0049   const static float table_coeff[11];
0050 
0051   /// private class to hold parameters for a Bnorm bin
0052   class ParamFunc {
0053   public:
0054     ParamFunc();
0055     ParamFunc(int bin);
0056     ~ParamFunc();
0057 
0058     // reset
0059     //   void set(int bin);
0060 
0061     // function  to compute drift time correction
0062     float tcor(float xpos) const;
0063 
0064     // functions to compute normal B field component difference
0065     inline float dist(float bnorm) const  // to a given value
0066     {
0067       return bnorm - bin_bnorm;
0068     }
0069     inline float dist(const ParamFunc &func) const  // to another bin
0070     {
0071       return func.bin_bnorm - bin_bnorm;
0072     }
0073 
0074   private:
0075     float bin_bnorm;
0076     const float *offsc;
0077     const float *coeff;
0078   };
0079 
0080   // Bnorm value and function parameters for lower/higher Bnorm bins
0081   float _bnorm;
0082   ParamFunc l_func;
0083   ParamFunc h_func;
0084 
0085   friend class ParamFunc;
0086 
0087 protected:
0088 };
0089 #endif  // MUBARBNORMPARAM_H