63 |
|
|
64 |
Float_t charge = 1000.; |
Float_t charge = 1000.; |
65 |
Float_t def = 1./((Float_t)x[0]); |
Float_t def = 1./((Float_t)x[0]); |
66 |
|
// WM 05-03-2009 calibration valid only for def>0 |
67 |
|
def = fabs(def); |
68 |
Float_t dedxtrk = (Float_t) x[1]; dedxtrk = dedxtrk/1.3; |
Float_t dedxtrk = (Float_t) x[1]; dedxtrk = dedxtrk/1.3; |
69 |
|
|
70 |
Float_t ym = dedxtrk; |
Float_t ym = dedxtrk; |
74 |
yl = B0[jj] + B1[jj]*xb + B2[jj]*xb*xb + B3[jj]*xb*xb*xb + B4[jj]*xb*xb*xb*xb; |
yl = B0[jj] + B1[jj]*xb + B2[jj]*xb*xb + B3[jj]*xb*xb*xb + B4[jj]*xb*xb*xb*xb; |
75 |
yh = B0[jj+1] + B1[jj+1]*xb + B2[jj+1]*xb*xb + B3[jj+1]*xb*xb*xb + B4[jj+1]*xb*xb*xb*xb; |
yh = B0[jj+1] + B1[jj+1]*xb + B2[jj+1]*xb*xb + B3[jj+1]*xb*xb*xb + B4[jj+1]*xb*xb*xb*xb; |
76 |
|
|
77 |
if ((yl<ym)&&(ym<yh)){ |
// if ((yl<ym)&&(ym<yh)){ |
78 |
|
//WM 05-03-2009 dEdx=0 => charge=0 |
79 |
|
if ((yl<=ym)&&(ym<yh)){ |
80 |
m = (C0[jj+1]*C0[jj+1] - C0[jj]*C0[jj]) / (yh - yl); |
m = (C0[jj+1]*C0[jj+1] - C0[jj]*C0[jj]) / (yh - yl); |
81 |
b = (C0[jj]*C0[jj]) - m*yl; |
b = (C0[jj]*C0[jj]) - m*yl; |
82 |
chelp = m*ym + b; |
chelp = m*ym + b; |