23 #include "CLHEP/Units/SystemOfUnits.h"
39 ATH_MSG_DEBUG(
" --------------->>>>> CaloSwDeadOTX_back :: retrieving affectedTool" <<
endmsg);
42 ATH_MSG_DEBUG(
" --------------->>>>> CaloSwDeadOTX_back :: failure retrieving affectedTool !! " <<
endmsg);
43 return StatusCode::FAILURE;
46 ATH_MSG_DEBUG(
" --------------->>>>> CaloSwDeadOTX_back :: affectedTool successfully retrieved" <<
endmsg);
48 return StatusCode::SUCCESS;
69 ATH_MSG_WARNING(
"Do not have affected regions info, is this expected ?");
74 the_aeta = std::abs (adj_eta);
76 the_aeta = std::abs (eta);
78 const float etamax =
m_etamax (myctx);
79 if (the_aeta >= etamax)
return;
93 ATH_MSG_DEBUG(
"************************************************************************************************" <<
endmsg);
94 ATH_MSG_DEBUG(
" USING CALIBHITS CALIBRATION : apply correction for dead OTX in the back" <<
endmsg);
96 ATH_MSG_DEBUG(
"************************************************************************************************" <<
endmsg);
115 float eneBackold = cluster->eSample (samps[si][3]) ;
121 int layer = si * 4 + 3 ;
129 cluster->setEnergy (samps[si][3], 0 );
140 int ibin = (
static_cast<int> (the_aeta / etamax * 100)) ;
150 double raw_energy =0;
151 double shower_lbary_raw =0;
152 for (
int nl = 0 ; nl< 4 ; nl++){
153 raw_energy += cluster->eSample (samps[si][nl]);
154 shower_lbary_raw += (
m_sampling_depth(myctx)[ibin][nl+1] * cluster->eSample (samps[si][nl])) ;
157 if (raw_energy == 0)
return;
158 double shower_lbary = shower_lbary_raw / raw_energy;
162 double depth_max = 20. + raw_energy*(3./
TeV) ;
164 if ( shower_lbary > depth_max || shower_lbary < 0.) {
171 raw_energy = raw_energy * 1
e-3;
178 double e_acc_reco = 0;
179 for (
int nl = 1 ; nl< 4 ; nl++){
180 e_acc_reco += cluster->eSample (samps[si][nl]);
184 <<
" " << lleak[2] <<
" " << lleak[3] <<
endmsg);
186 double e_leak_perc = lleak[3] + lleak[1] * shower_lbary + lleak[2] *
exp(shower_lbary);
190 if (e_leak_perc < 0 ) e_leak_perc = 0.;
191 if (e_leak_perc > 100.) e_leak_perc = 100.;
193 double e_leak_reco = e_leak_perc * (e_acc_reco)*0.01;
196 if (e_leak_reco<0.) e_leak_reco= eneBackold;
203 cluster->setEnergy (samps[si][3], e_leak_reco );
207 ATH_MSG_DEBUG(
"CaloSwDeadOTX_back:: cluster energy before correction --> " << cluster->e() <<
endmsg);
211 float e_temp = cluster->e() - eneBackold + e_leak_reco ;
214 cluster->setE (e_temp);
216 ATH_MSG_DEBUG(
"CaloSwDeadOTX_back::Energy after correction --> " << cluster->e() <<
endmsg);