File indexing completed on 2024-04-06 12:26:07
0001 #ifndef DTTime2DriftParametrization_H
0002 #define DTTime2DriftParametrization_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #define N_alpha 11
0013 #define N_By 5
0014 #define N_Bz 5
0015 #define N_Par_x 15
0016 #define N_Sigma_t 7
0017
0018 class DTTime2DriftParametrization {
0019 public:
0020
0021 DTTime2DriftParametrization();
0022
0023
0024 virtual ~DTTime2DriftParametrization();
0025
0026
0027 typedef struct {
0028 double v_drift, x_drift, delta_x, x_width_m, x_width_p;
0029 } drift_distance;
0030
0031
0032
0033
0034
0035
0036
0037
0038 bool computeDriftDistance_mode(
0039 double time, double alpha, double by, double bz, short interpolate, drift_distance *dx) const;
0040
0041
0042
0043
0044
0045
0046
0047
0048 bool computeDriftDistance_mean(
0049 double time, double alpha, double by, double bz, short interpolate, drift_distance *dx) const;
0050
0051 private:
0052
0053 unsigned short MB_DT_drift_distance(
0054 double time, double alpha, double by, double bz, drift_distance *DX, short interpolate) const;
0055
0056 double MB_DT_dist(double, double *) const;
0057 double MB_DT_delta_x(double, double *) const;
0058 double MB_DT_sigma_t_m(double, double *) const;
0059 double MB_DT_sigma_t_p(double, double *) const;
0060
0061 unsigned short MB_DT_Check_boundaries(double distime, double alpha, double by, double bz, short ifl) const;
0062
0063 void MB_DT_Get_grid_values(
0064 double Var, unsigned short *pi, unsigned short *pj, short Initial, unsigned short N, const double *Values) const;
0065
0066 void MB_DT_Get_grid_points(double alpha,
0067 double by,
0068 double bz,
0069 unsigned short *p_alpha,
0070 unsigned short *p_By,
0071 unsigned short *p_Bz,
0072 unsigned short *q_alpha,
0073 unsigned short *q_By,
0074 unsigned short *q_Bz) const;
0075
0076 double MB_DT_MLInterpolation(double *al, double *by, double *bz, double *f) const;
0077
0078
0079 static const double alpha_value[N_alpha];
0080 static const double By_value[N_By];
0081 static const double Bz_value[N_Bz];
0082
0083
0084 static const double fun_x[N_alpha][N_By][N_Bz][N_Par_x];
0085 static const double fun_sigma_t[N_alpha][N_By][N_Bz][N_Sigma_t];
0086
0087
0088 static const double velocitySkew;
0089 };
0090 #endif