255 |
if ( !(iev%100000) ) printf(" ATIME %u re %u \n",(Int_t)tabs,(UInt_t)iev); |
if ( !(iev%100000) ) printf(" ATIME %u re %u \n",(Int_t)tabs,(UInt_t)iev); |
256 |
|
|
257 |
//================================================================== |
//================================================================== |
258 |
Float_t dedx_corr_m[2000][48],dedx_corr[48]; |
Float_t dedx_corr_m[2000][48];//,dedx_corr[48]; |
259 |
Double_t mtime[2000],t1,t2,tm; |
Double_t mtime[2000],t1,t2,tm; |
260 |
Float_t yhelp1,yhelp2,slope,inter,thelp1,thelp2; |
// Float_t yhelp1,yhelp2,slope,inter,thelp1,thelp2; |
261 |
|
Float_t yhelp1,yhelp2; |
262 |
Float_t xmean1,xwidth1; |
Float_t xmean1,xwidth1; |
263 |
|
|
264 |
Int_t ical,ii,j,jj; |
Int_t ical=0; |
265 |
|
Int_t ii,j,jj; |
266 |
|
|
267 |
if (iev==0) { |
if (iev==0) { |
268 |
|
|
325 |
//== interpolate betwen time limits |
//== interpolate betwen time limits |
326 |
//================================================================== |
//================================================================== |
327 |
|
|
328 |
thelp1 = mtime[ical]; |
// thelp1 = mtime[ical]; |
329 |
thelp2 = mtime[ical+1]; |
// thelp2 = mtime[ical+1]; |
330 |
|
|
331 |
for (ii=0; ii<48;ii++) { |
for (ii=0; ii<48;ii++) { |
332 |
yhelp1 = fabs(dedx_corr_m[ical][ii]); |
yhelp1 = fabs(dedx_corr_m[ical][ii]); |
335 |
yhelp2 = fabs(dedx_corr_m[ical+1][ii]); |
yhelp2 = fabs(dedx_corr_m[ical+1][ii]); |
336 |
// yhelp2 = 6.; |
// yhelp2 = 6.; |
337 |
if ( yhelp2 < 0.1 ) yhelp2 = 4.; |
if ( yhelp2 < 0.1 ) yhelp2 = 4.; |
338 |
slope = (yhelp2-yhelp1)/(thelp2-thelp1); |
// slope = (yhelp2-yhelp1)/(thelp2-thelp1); |
339 |
inter = yhelp1 - slope*thelp1; |
// inter = yhelp1 - slope*thelp1; |
340 |
dedx_corr[ii] = slope*tabs + inter; |
// dedx_corr[ii] = slope*tabs + inter; |
341 |
// if (ii==0) cout<<thelp1<<" "<<thelp2<<" "<<tabs<<" "<<yhelp1<<" "<<yhelp2<<" "<<dedx_corr[0]<<endl; |
// if (ii==0) cout<<thelp1<<" "<<thelp2<<" "<<tabs<<" "<<yhelp1<<" "<<yhelp2<<" "<<dedx_corr[0]<<endl; |
342 |
} |
} |
343 |
|
|