Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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