/[PAMELA software]/tof/flight/ToFReprocessing/ToFreproc.cpp
ViewVC logotype

Diff of /tof/flight/ToFReprocessing/ToFreproc.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by mocchiut, Thu Apr 12 12:04:20 2012 UTC revision 1.7 by mocchiut, Fri Jan 17 15:16:24 2014 UTC
# Line 255  Int_t Loop(TString ddir,TString list, TS Line 255  Int_t Loop(TString ddir,TString list, TS
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    
# Line 323  Int_t Loop(TString ddir,TString list, TS Line 325  Int_t Loop(TString ddir,TString list, TS
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]);
# Line 333  Int_t Loop(TString ddir,TString list, TS Line 335  Int_t Loop(TString ddir,TString list, TS
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    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23