Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:14

0001 #ifndef DTDriftTimeParametrization_H
0002 #define DTDriftTimeParametrization_H
0003 
0004 /** \class DTDriftTimeParametrization
0005  ************************************************************************
0006  *
0007  * Version 2.1 - November 18, 2003
0008  *
0009  * MB_DT_drift_time()      Calculates the drift time (ns)
0010  *
0011  * See usage details in the README file delivered with the distribution.
0012  *
0013  * Authors: Pablo Garcia-Abia and Jesus Puerta (CIEMAT, Madrid)
0014  * Email:   Pablo.Garcia@ciemat.es, Jesus.Puerta@ciemat.es
0015  *
0016  ************************************************************************
0017  */
0018 
0019 #define N_alpha 11
0020 #define N_By 5
0021 #define N_Bz 5
0022 #define N_Par_t 19
0023 #define N_Sigma_t 7
0024 
0025 class DTDriftTimeParametrization {
0026 public:
0027   /// Constructor
0028   DTDriftTimeParametrization();
0029 
0030   /// Destructor
0031   virtual ~DTDriftTimeParametrization();
0032 
0033   /// Structure used to return output values
0034   typedef struct {
0035     double v_drift, t_drift, delta_t, t_width_m, t_width_p;
0036   } drift_time;
0037 
0038   /// Calculate drift time and spread
0039   unsigned short MB_DT_drift_time(
0040       double x, double alpha, double by, double bz, short ifl, drift_time *DT, short interpolate) const;
0041 
0042 private:
0043   double MB_DT_time(double, double *) const;
0044   double MB_DT_delta_t(double, double *) const;
0045   double MB_DT_sigma_t_m(double, double *) const;
0046   double MB_DT_sigma_t_p(double, double *) const;
0047 
0048   unsigned short MB_DT_Check_boundaries(double distime, double alpha, double by, double bz, short ifl) const;
0049 
0050   void MB_DT_Get_grid_values(
0051       double Var, unsigned short *pi, unsigned short *pj, short Initial, unsigned short N, const double *Values) const;
0052 
0053   void MB_DT_Get_grid_points(double alpha,
0054                              double by,
0055                              double bz,
0056                              unsigned short *p_alpha,
0057                              unsigned short *p_By,
0058                              unsigned short *p_Bz,
0059                              unsigned short *q_alpha,
0060                              unsigned short *q_By,
0061                              unsigned short *q_Bz) const;
0062 
0063   double MB_DT_MLInterpolation(double *al, double *by, double *bz, double *f) const;
0064 
0065   /*** Points of the grid ***/
0066   static const double alpha_value[N_alpha];
0067   static const double By_value[N_By];
0068   static const double Bz_value[N_Bz];
0069 
0070   /*** Parameter values ***/
0071   static const double fun_t[N_alpha][N_By][N_Bz][N_Par_t];
0072   static const double fun_sigma_t[N_alpha][N_By][N_Bz][N_Sigma_t];
0073 
0074   /*** skew factor ***/
0075   static const double velocitySkew;
0076 };
0077 #endif