15 |
|
|
16 |
float time_res[8] = {425.,210.,170.,130.,120.,120.,120.,120.}; |
float time_res[8] = {425.,210.,170.,130.,120.,120.,120.,120.}; |
17 |
for(Int_t i=0;i<8;i++)time_res[i]/=1.4;//1.17;1.5;1.3*/ |
for(Int_t i=0;i<8;i++)time_res[i]/=1.4;//1.17;1.5;1.3*/ |
18 |
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) |
19 |
|
|
20 |
if ((Z > 1) && (Z < 9)) dt1=1.e-12*time_res[(Z-1)]; |
if ((Z > 1) && (Z < 9)) dt1=1.e-12*time_res[(Z-1)]; |
21 |
if (Z > 8) dt1=120.e-12; |
if (Z > 8) dt1=120.e-12; |
463 |
Int_t error = 0,temp=0; |
Int_t error = 0,temp=0; |
464 |
GL_PARAM *glparam = new GL_PARAM(); |
GL_PARAM *glparam = new GL_PARAM(); |
465 |
error = glparam->Query_GL_PARAM(3,202,fDbc); |
error = glparam->Query_GL_PARAM(3,202,fDbc); |
466 |
calfile.str(""); |
if(!error){ |
467 |
calfile << glparam->PATH.Data() << "/"; |
calfile.str(""); |
468 |
calfile << glparam->NAME.Data(); |
calfile << glparam->PATH.Data() << "/"; |
469 |
printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str()); |
calfile << glparam->NAME.Data(); |
470 |
ifstream fileTriggerCalib; |
printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str()); |
471 |
fileTriggerCalib.open(calfile.str().c_str()); |
ifstream fileTriggerCalib; |
472 |
if(!fileTriggerCalib)printf("debug: no trigger calib file!\n"); |
fileTriggerCalib.open(calfile.str().c_str()); |
473 |
// correct readout WM Oct '07 |
for(Int_t i=0; i<np; i++){ |
474 |
for(Int_t i=0; i<np; i++){ |
fileTriggerCalib >> temp; |
475 |
fileTriggerCalib >> temp; |
fileTriggerCalib >> atte1[i]; |
476 |
fileTriggerCalib >> atte1[i]; |
fileTriggerCalib >> lambda1[i]; |
477 |
fileTriggerCalib >> lambda1[i]; |
fileTriggerCalib >> atte2[i]; |
478 |
fileTriggerCalib >> atte2[i]; |
fileTriggerCalib >> lambda2[i]; |
479 |
fileTriggerCalib >> lambda2[i]; |
fileTriggerCalib >> temp; |
480 |
fileTriggerCalib >> temp; |
} |
481 |
|
fileTriggerCalib.close(); |
482 |
|
} |
483 |
|
else{ |
484 |
|
cout<<endl<<" *********** ATTENTION ***********"<<endl; |
485 |
|
cout<<endl<<" TOF: NO trigger calib file!"<<endl<<endl; |
486 |
|
cout<<endl<<" TOF digitized data will be wrong!"<<endl<<endl; |
487 |
|
for(Int_t i=0; i<np; i++){ |
488 |
|
atte1[i]=0.; |
489 |
|
lambda1[i]=0.; |
490 |
|
atte2[i]=0.; |
491 |
|
lambda2[i]=0.; |
492 |
|
} |
493 |
} |
} |
|
fileTriggerCalib.close(); |
|
494 |
//end tof calib |
//end tof calib |
495 |
} |
} |