101 |
pmtleft=0; |
pmtleft=0; |
102 |
pmtright=0; |
pmtright=0; |
103 |
// WM: S12 paddles are "reversed" (Nov'07) |
// WM: S12 paddles are "reversed" (Nov'07) |
104 |
if (ip==2) |
if (ip==2){ |
105 |
if (ipad==0) |
if (ipad==0) |
106 |
ipad=1; |
ipad=1; |
107 |
else |
else |
108 |
ipad=0; |
ipad=0; |
109 |
|
} |
110 |
if ((ip>-1)&&(ip<6)) { //ToF paddles only, not S4 |
if ((ip>-1)&&(ip<6)) { //ToF paddles only, not S4 |
111 |
Paddle2Pmt(ip, ipad, &pmtleft, &pmtright); |
Paddle2Pmt(ip, ipad, &pmtleft, &pmtright); |
112 |
// DC: evaluates mean position and path inside the paddle |
// DC: evaluates mean position and path inside the paddle |
464 |
Int_t error = 0,temp=0; |
Int_t error = 0,temp=0; |
465 |
GL_PARAM *glparam = new GL_PARAM(); |
GL_PARAM *glparam = new GL_PARAM(); |
466 |
error = glparam->Query_GL_PARAM(3,202,fDbc); |
error = glparam->Query_GL_PARAM(3,202,fDbc); |
467 |
calfile.str(""); |
if(!error){ |
468 |
calfile << glparam->PATH.Data() << "/"; |
calfile.str(""); |
469 |
calfile << glparam->NAME.Data(); |
calfile << glparam->PATH.Data() << "/"; |
470 |
printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str()); |
calfile << glparam->NAME.Data(); |
471 |
ifstream fileTriggerCalib; |
printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str()); |
472 |
fileTriggerCalib.open(calfile.str().c_str()); |
ifstream fileTriggerCalib; |
473 |
if(!fileTriggerCalib)printf("debug: no trigger calib file!\n"); |
fileTriggerCalib.open(calfile.str().c_str()); |
474 |
// correct readout WM Oct '07 |
for(Int_t i=0; i<np; i++){ |
475 |
for(Int_t i=0; i<np; i++){ |
fileTriggerCalib >> temp; |
476 |
fileTriggerCalib >> temp; |
fileTriggerCalib >> atte1[i]; |
477 |
fileTriggerCalib >> atte1[i]; |
fileTriggerCalib >> lambda1[i]; |
478 |
fileTriggerCalib >> lambda1[i]; |
fileTriggerCalib >> atte2[i]; |
479 |
fileTriggerCalib >> atte2[i]; |
fileTriggerCalib >> lambda2[i]; |
480 |
fileTriggerCalib >> lambda2[i]; |
fileTriggerCalib >> temp; |
481 |
fileTriggerCalib >> temp; |
} |
482 |
|
fileTriggerCalib.close(); |
483 |
|
} |
484 |
|
else{ |
485 |
|
cout<<endl<<" *********** ATTENTION ***********"<<endl; |
486 |
|
cout<<endl<<" TOF: NO trigger calib file!"<<endl<<endl; |
487 |
|
cout<<endl<<" TOF digitized data will be wrong!"<<endl<<endl; |
488 |
|
for(Int_t i=0; i<np; i++){ |
489 |
|
atte1[i]=0.; |
490 |
|
lambda1[i]=0.; |
491 |
|
atte2[i]=0.; |
492 |
|
lambda2[i]=0.; |
493 |
|
} |
494 |
} |
} |
|
fileTriggerCalib.close(); |
|
495 |
//end tof calib |
//end tof calib |
496 |
} |
} |