--- PamelaDigitizer/DigitizeTOF.cxx 2008/10/15 14:03:18 1.3 +++ PamelaDigitizer/DigitizeTOF.cxx 2009/05/05 14:17:37 1.5 @@ -15,7 +15,7 @@ float time_res[8] = {425.,210.,170.,130.,120.,120.,120.,120.}; for(Int_t i=0;i<8;i++)time_res[i]/=1.4;//1.17;1.5;1.3*/ - Float_t dt1;// = 1.e-12*time_res[0]; // single PMT resolution for Z=1 (WM, Nov'07) + Float_t dt1 = 0.;// = 1.e-12*time_res[0]; // single PMT resolution for Z=1 (WM, Nov'07) if ((Z > 1) && (Z < 9)) dt1=1.e-12*time_res[(Z-1)]; if (Z > 8) dt1=120.e-12; @@ -463,22 +463,33 @@ Int_t error = 0,temp=0; GL_PARAM *glparam = new GL_PARAM(); error = glparam->Query_GL_PARAM(3,202,fDbc); - calfile.str(""); - calfile << glparam->PATH.Data() << "/"; - calfile << glparam->NAME.Data(); - printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str()); - ifstream fileTriggerCalib; - fileTriggerCalib.open(calfile.str().c_str()); - if(!fileTriggerCalib)printf("debug: no trigger calib file!\n"); - // correct readout WM Oct '07 - for(Int_t i=0; i> temp; - fileTriggerCalib >> atte1[i]; - fileTriggerCalib >> lambda1[i]; - fileTriggerCalib >> atte2[i]; - fileTriggerCalib >> lambda2[i]; - fileTriggerCalib >> temp; + if(!error){ + calfile.str(""); + calfile << glparam->PATH.Data() << "/"; + calfile << glparam->NAME.Data(); + printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str()); + ifstream fileTriggerCalib; + fileTriggerCalib.open(calfile.str().c_str()); + for(Int_t i=0; i> temp; + fileTriggerCalib >> atte1[i]; + fileTriggerCalib >> lambda1[i]; + fileTriggerCalib >> atte2[i]; + fileTriggerCalib >> lambda2[i]; + fileTriggerCalib >> temp; + } + fileTriggerCalib.close(); + } + else{ + cout<