| 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; |
| 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 |
} |
} |