method to perform the correction.
The correction type is defined by the tool which also uses this interface. In some cases, the tool needs more than the cluster to perform the calibration. This can be passed via the void pointer
51 float the_aeta = (clus->
eta());
53 the_aeta = (the_aeta>0)?(the_aeta):(- the_aeta);
55 if (the_aeta >= etamax)
return;
58 ATH_MSG_DEBUG(
"************************************************************************************************" );
60 ATH_MSG_DEBUG(
"************************************************************************************************" );
63 if (the_aeta < eta_start_crack)
65 else if (the_aeta > eta_end_crack)
73 int ibin = (
static_cast<int> (the_aeta / etamax * 100));
74 int ibin_frontCorr = ibin;
77 ibin_frontCorr = (
static_cast<int> (235. / etamax ));
81 ATH_MSG_DEBUG(
"Check etas -------------------------------------------------------------------" );
82 ATH_MSG_DEBUG(
"Eta --> " << the_aeta <<
" Bin --> " << ibin <<
" Cluster eta = " << clus->
eta() );
84 ATH_MSG_DEBUG(
"Check calibration coefficients -----------------------------------------------" );
94 float shower_lbary = showerDepth.
depth(the_aeta,
103 if (shower_lbary < 5. || shower_lbary > 25.){
114 for (
int sampling=1; sampling<4; sampling++) {
123 ATH_MSG_DEBUG(
"E accordion base --->>>> " << eacc_base <<
" Eps base " << eps_base );
131 float depth_max = 20. + 3. * (eacc_base+eps_base) * 1
e-6;
133 ATH_MSG_DEBUG(
"Raw energy ---->> " << (eacc_base+eps_base) );
134 ATH_MSG_DEBUG(
"Bary max for this event ---->> " << depth_max );
137 if ( shower_lbary > depth_max ) {
150 float e_out_perc = 0;
151 if (the_aeta < eta_start_crack) {
158 float e_acc_reco=acc_corr*(eacc_base )*(1+(e_out_perc)/100);
164 float e_leak_perc = 0;
167 if (e_leak_perc < 0 ) e_leak_perc = 0.;
168 if (e_leak_perc > 100.) e_leak_perc = 100.;
169 float e_leak_reco = e_leak_perc * (e_acc_reco)/100;
175 float raw_energy=e_acc_reco*.001;
176 float e_front_reco = eps_base;
178 if (raw_energy <= 1) {
182 else if (the_aeta < 1.8) {
184 if (the_aeta < eta_start_crack) {
185 float WpsOff =
correction[3][ibin_frontCorr][1] +
correction[3][ibin_frontCorr][2] * raw_energy +
correction[3][ibin_frontCorr][3] * raw_energy * raw_energy;
187 e_front_reco=WpsOff + WpsSlo*(eps_base);
193 ATH_MSG_DEBUG(
" WpsOff,WpsSlo " << WpsOff <<
" " << WpsSlo );
194 ATH_MSG_DEBUG(
" eps_base, efront_reco " << eps_base <<
" " << e_front_reco );
200 if (raw_energy<20.) raw_energy=20.;
202 float WpsOff =
correction[3][ibin_frontCorr][1] +
correction[3][ibin_frontCorr][2] * raw_energy +
correction[3][ibin_frontCorr][3] * sqrt(raw_energy);
204 float WpsSlo2 =
correction[5][ibin_frontCorr][1] +
correction[5][ibin_frontCorr][2] * raw_energy -
correction[5][ibin_frontCorr][3] / (raw_energy * raw_energy) ;
205 e_front_reco=WpsOff + WpsSlo*(eps_base) + WpsSlo2*(eps_base)*(eps_base);
206 if (e_front_reco<0.) e_front_reco= eps_base;
212 ATH_MSG_DEBUG(
" WpsOff, WpsSlo, WpsSlo2 " << WpsOff <<
" " << WpsSlo <<
" " << WpsSlo2 );
213 ATH_MSG_DEBUG(
" eps_base, efront_reco " << eps_base <<
" " << e_front_reco );
230 e_front_reco= (
p1 +
p2 * shower_lbary +
p3 * shower_lbary * shower_lbary);
231 if (e_front_reco<0.) e_front_reco=eps_base;
238 float e_calo_reco =e_front_reco + e_leak_reco + e_acc_reco;
241 ATH_MSG_DEBUG(
"CaloSwCalibrationHits::Final reco energy ---------------------- " << e_calo_reco );
242 ATH_MSG_DEBUG(
"CaloSwCalibrationHits::Front ---------------------- " << e_front_reco );
243 ATH_MSG_DEBUG(
"CaloSwCalibrationHits::Accordion ------------------ " << e_acc_reco );
244 ATH_MSG_DEBUG(
"CaloSwCalibrationHits::out of cone ---------------- " << acc_corr*(eacc_base )*(e_out_perc)/100 );
245 ATH_MSG_DEBUG(
"CaloSwCalibrationHits::Leakage -------------------- " << e_leak_reco );
268 for (
int sampling=1; sampling<=2; sampling++){
279 ATH_MSG_DEBUG(
"---------- Sum of the sampling energy --- >> " << e_temp <<
" EcaloReco = " << e_calo_reco );
280 ATH_MSG_DEBUG(
"CaloSwCalibHitsCalibration Energy after correction --> " << clus->
energy() );