34 unsigned short i,
j, n_func, ial, iby, ibz;
35 unsigned short i_alpha, i_By, i_Bz;
36 unsigned short j_alpha, j_By, j_Bz;
43 double V_al[3], V_by[3], V_bz[3];
45 double DTV_v_drift[N_Func];
46 double DTV_t_drift[N_Func];
47 double DTV_delta_t[N_Func];
48 double DTV_t_width_m[N_Func];
49 double DTV_t_width_p[N_Func];
62 for (j = 0; j < N_Func; j++) {
66 DTV_t_width_m[
j] = -1;
67 DTV_t_width_p[
j] = -1;
76 printf(
"*** ERROR, MB_DT_drift_time: invalid interpolate value = %d\n",
interpolate);
84 printf(
"\nMB_DT_drift_time: Function called with values:\n\n");
85 printf(
"MB_DT_drift_time: x = %f\n",
x);
86 printf(
"MB_DT_drift_time: alpha = %f\n",
alpha);
87 printf(
"MB_DT_drift_time: by = %f\n", by);
88 printf(
"MB_DT_drift_time: bz = %f\n", bz);
89 printf(
"MB_DT_drift_time: ifl = %d\n", ifl);
96 printf(
"*** ERROR, MB_DT_drift_time: invalid ifl value = %d\n", ifl);
100 dist = (ifl == 0) ?
x :
x - DT_Cell_HalfWidth;
116 printf(
"MB_DT_drift_time:\n");
117 printf(
"MB_DT_drift_time: i_alpha j_alpha alpha_value's %d %d %.0f %.0f\n",
123 "MB_DT_drift_time: i_By j_By By_value's %d %d %.2f %.2f\n", i_By, j_By,
By_value[i_By],
By_value[j_By]);
125 "MB_DT_drift_time: i_Bz j_Bz Bz_value's %d %d %.2f %.2f\n", i_Bz, j_Bz,
Bz_value[i_Bz],
Bz_value[j_Bz]);
130 for (j = 0; j < n_func; j++) {
131 ial = (j & 4) ? j_alpha : i_alpha;
132 iby = (j & 2) ? j_By : i_By;
133 ibz = (j & 1) ? j_Bz : i_Bz;
136 par_t[i] =
fun_t[ial][iby][ibz][i];
140 OffSet = par_t[N_Par_t - 1];
142 DTV_v_drift[
j] = par_t[0];
144 DTV_t_drift[
j] =
MB_DT_time(dist, par_t) + DTV_delta_t[
j] + OffSet;
149 printf(
"MB_DT_drift_LOOP: OffSet = %f\n", OffSet);
151 "MB_DT_drift_LOOP: dist, v_drift, t_drift, lin, t_width_m, " 152 "t_width_p = %f %f %f %f %f %f\n",
165 DT->v_drift = DTV_v_drift[0];
166 DT->delta_t = DTV_delta_t[0];
167 DT->t_drift = DTV_t_drift[0];
168 DT->t_width_m = DTV_t_width_m[0];
169 DT->t_width_p = DTV_t_width_p[0];
190 "MB_DT_drift_time: dist, v_drift, t_drift, lin, t_width_m, t_width_p " 191 "= %f %f %f %f %f %f\n",
unsigned short MB_DT_Check_boundaries(double distime, double alpha, double by, double bz, short ifl) const
static const double alpha_value[11]
double MB_DT_time(double, double *) const
double MB_DT_sigma_t_p(double, double *) const
static const double By_value[5]
static const double fun_sigma_t[11][5][5][7]
double MB_DT_delta_t(double, double *) const
double MB_DT_sigma_t_m(double, double *) const
double MB_DT_MLInterpolation(double *al, double *by, double *bz, double *f) const
alpha
zGenParticlesMatch = cms.InputTag(""),
static const double Bz_value[5]
void MB_DT_Get_grid_points(double alpha, double by, double bz, unsigned short *p_alpha, unsigned short *p_By, unsigned short *p_Bz, unsigned short *q_alpha, unsigned short *q_By, unsigned short *q_Bz) const
static const double fun_t[11][5][5][19]