| 46 |
// cp->ForceCaloFit(); |
// cp->ForceCaloFit(); |
| 47 |
// cp->SetDebug(true); |
// cp->SetDebug(true); |
| 48 |
// cp->Process(); |
// cp->Process(); |
| 49 |
|
if ( clong ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); |
| 50 |
} |
} |
| 51 |
|
|
| 52 |
|
|
| 378 |
printf(" energyxo:.............. %f \n",energyxo); |
printf(" energyxo:.............. %f \n",energyxo); |
| 379 |
printf(" energyye:.............. %f \n",energyye); |
printf(" energyye:.............. %f \n",energyye); |
| 380 |
printf(" energyyo:.............. %f \n",energyyo); |
printf(" energyyo:.............. %f \n",energyyo); |
| 381 |
|
printf(" fXEen_maxplane:........ %f \n",fXEen_maxplane); |
| 382 |
|
printf(" fXOen_maxplane:........ %f \n",fXOen_maxplane); |
| 383 |
|
printf(" fYEen_maxplane:........ %f \n",fYEen_maxplane); |
| 384 |
|
printf(" fYOen_maxplane:........ %f \n",fYOen_maxplane); |
| 385 |
printf(" x0max :.............. %f \n",x0max); |
printf(" x0max :.............. %f \n",x0max); |
| 386 |
printf(" debug :.............. %i \n",debug); |
printf(" debug :.............. %i \n",debug); |
| 387 |
|
|
| 543 |
Int_t wpl = (Int_t)roundf(x0max/0.76); |
Int_t wpl = (Int_t)roundf(x0max/0.76); |
| 544 |
Bool_t isY = false; |
Bool_t isY = false; |
| 545 |
if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; |
if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; |
| 546 |
|
xomax_en = 0.; |
| 547 |
|
yemax_en = 0.; |
| 548 |
|
xemax_en = 0.; |
| 549 |
|
yomax_en = 0.; |
| 550 |
|
// |
| 551 |
if ( !(wpl%2) ){ |
if ( !(wpl%2) ){ |
| 552 |
// 0, 2, 4, ... |
// 0, 2, 4, ... |
| 553 |
if ( isY ){ |
if ( isY ){ |
| 554 |
yomax_en = 1000.; |
if ( section.Contains("YO") ) yomax_en = 1000.; |
| 555 |
xemax_en = 500.; |
if ( section.Contains("XE") ) xemax_en = 500.; |
| 556 |
fMax_planeyo=wpl/2; |
fMax_planeyo=wpl/2; |
| 557 |
fMax_planexe=wpl/2; |
fMax_planexe=wpl/2; |
| 558 |
|
if ( section.Contains("XO") ) xomax_en = 10.; |
| 559 |
|
if ( section.Contains("YE") ) yemax_en = 5.; |
| 560 |
} else { |
} else { |
| 561 |
yomax_en = 500.; |
if ( section.Contains("YO") ) yomax_en = 500.; |
| 562 |
xemax_en = 1000.; |
if ( section.Contains("XE") ) xemax_en = 1000.; |
| 563 |
fMax_planeyo=wpl/2; |
fMax_planeyo=wpl/2; |
| 564 |
fMax_planexe=wpl/2; |
fMax_planexe=wpl/2; |
| 565 |
|
if ( section.Contains("XO") ) xomax_en = 5.; |
| 566 |
|
if ( section.Contains("YE") ) yemax_en = 10.; |
| 567 |
}; |
}; |
|
xomax_en = 0.; |
|
|
yemax_en = 0.; |
|
| 568 |
} else { |
} else { |
| 569 |
// 1, 3, 5, ... |
// 1, 3, 5, ... |
| 570 |
if ( isY ){ |
if ( isY ){ |
| 571 |
yemax_en = 1000.; |
if ( section.Contains("YE") ) yemax_en = 1000.; |
| 572 |
xomax_en = 500.; |
if ( section.Contains("XO") ) xomax_en = 500.; |
| 573 |
fMax_planeye=(wpl-1)/2; |
fMax_planeye=(wpl-1)/2; |
| 574 |
fMax_planexo=(wpl-1)/2; |
fMax_planexo=(wpl-1)/2; |
| 575 |
|
if ( section.Contains("XE") ) xemax_en = 10.; |
| 576 |
|
if ( section.Contains("YO") ) yomax_en = 5.; |
| 577 |
} else { |
} else { |
| 578 |
yemax_en = 500.; |
if ( section.Contains("YE") ) yemax_en = 500.; |
| 579 |
xomax_en = 1000.; |
if ( section.Contains("XO") ) xomax_en = 1000.; |
| 580 |
fMax_planeye=(wpl-1)/2; |
fMax_planeye=(wpl-1)/2; |
| 581 |
fMax_planexo=(wpl-1)/2; |
fMax_planexo=(wpl-1)/2; |
| 582 |
|
if ( section.Contains("XE") ) xemax_en = 5.; |
| 583 |
|
if ( section.Contains("YO") ) yomax_en = 10.; |
| 584 |
}; |
}; |
|
xemax_en = 0.; |
|
|
yomax_en = 0.; |
|
| 585 |
}; |
}; |
| 586 |
if ( debug ) printf(" x0max %f wpl %i isY %i yomax_en %f xemax_en %f yemax_en %f xomax_en %f fMaxplane %i %i %i %i\n",x0max,wpl,isY,yomax_en,xemax_en,yemax_en,xomax_en,fMax_planeyo,fMax_planexe,fMax_planeye,fMax_planexo); |
if ( debug ) printf(" x0max %f x0max/0.76 %f wpl %i isY %i yomax_en %f xemax_en %f yemax_en %f xomax_en %f fMaxplane %i %i %i %i\n",x0max,(x0max/0.76),wpl,isY,yomax_en,xemax_en,yemax_en,xomax_en,fMax_planeyo,fMax_planexe,fMax_planeye,fMax_planexo); |
| 587 |
}; |
}; |
| 588 |
// |
// |
| 589 |
Int_t nPl = fPl; |
Int_t nPl = fPl; |
| 726 |
// event is contained (or partially contained) hence we can integrate energy up to the maximum and calculate the energy as measured by this section |
// event is contained (or partially contained) hence we can integrate energy up to the maximum and calculate the energy as measured by this section |
| 727 |
// |
// |
| 728 |
if ( fXosel ){ |
if ( fXosel ){ |
| 729 |
for (Int_t iplm=0;iplm<=TMath::Min(10,(Int_t)(fMax_planexo+nPl)) ;iplm++) fXOen_maxplane += en_xop[iplm]; |
for (Int_t iplm=0;iplm<=TMath::Min(10,(Int_t)(fMax_planexo+nPl)) ;iplm++){ |
| 730 |
|
fXOen_maxplane += en_xop[iplm]; |
| 731 |
|
if ( debug ) printf(" XO iplm %i fXOen_maxplane %f en_xop[iplm] %f\n",iplm,fXOen_maxplane,en_xop[iplm]); |
| 732 |
|
}; |
| 733 |
fEnergyxo = fXOen_maxplane/fConv_rxo; |
fEnergyxo = fXOen_maxplane/fConv_rxo; |
| 734 |
}; |
}; |
| 735 |
}; |
}; |
| 778 |
fXesel = true; |
fXesel = true; |
| 779 |
}; |
}; |
| 780 |
if ( fXesel ){ |
if ( fXesel ){ |
| 781 |
for (Int_t iplm=0;iplm<=TMath::Min(10,(Int_t)(fMax_planexe+nPl)) ;iplm++) fXEen_maxplane += en_xep[iplm]; |
for (Int_t iplm=0;iplm<=TMath::Min(10,(Int_t)(fMax_planexe+nPl)) ;iplm++){ |
| 782 |
|
fXEen_maxplane += en_xep[iplm]; |
| 783 |
|
if ( debug ) printf(" XE iplm %i fXOen_maxplane %f en_xop[iplm] %f\n",iplm,fXEen_maxplane,en_xep[iplm]); |
| 784 |
|
}; |
| 785 |
fEnergyxe = fXEen_maxplane/fConv_rxe; |
fEnergyxe = fXEen_maxplane/fConv_rxe; |
| 786 |
}; |
}; |
| 787 |
}; |
}; |
| 991 |
} else { |
} else { |
| 992 |
clong->Fit(); |
clong->Fit(); |
| 993 |
}; |
}; |
| 994 |
fXOen_maxplane = clong->Get_E0(); |
if ( clong->GetLowerLimit() != 0. || clong->GetUpperLimit() != 0. ){ |
| 995 |
|
fXOen_maxplane = clong->Get_defE0(); |
| 996 |
|
} else { |
| 997 |
|
fXOen_maxplane = clong->Get_E0(); |
| 998 |
|
}; |
| 999 |
fYOen_maxplane = 0.; |
fYOen_maxplane = 0.; |
| 1000 |
fYEen_maxplane = 0.; |
fYEen_maxplane = 0.; |
| 1001 |
fXEen_maxplane = 0.; |
fXEen_maxplane = 0.; |