22 #include "CLHEP/Units/SystemOfUnits.h"
38 ATH_MSG_DEBUG(
" --------------->>>>> CaloSwDeadOTX_ps :: retrieving affectedTool" <<
endmsg);
41 ATH_MSG_DEBUG(
" --------------->>>>> CaloSwDeadOTX_ps :: failure retrieving affectedTool !! " <<
endmsg);
42 return StatusCode::FAILURE;
45 ATH_MSG_DEBUG(
" --------------->>>>> CaloSwDeadOTX_ps :: affectedTool successfully retrieved" <<
endmsg);
47 return StatusCode::SUCCESS;
68 ATH_MSG_WARNING(
"Do not have affected regions info, is this expected ?");
73 the_aeta = std::abs (adj_eta);
75 the_aeta = std::abs (eta);
77 const float etamax =
m_etamax (myctx);
78 if (the_aeta >= etamax)
return;
92 ATH_MSG_DEBUG(
"************************************************************************************************" <<
endmsg);
93 ATH_MSG_DEBUG(
" USING CALIBHITS CALIBRATION : apply correction for dead OTX in the presampler" <<
endmsg);
95 ATH_MSG_DEBUG(
"************************************************************************************************" <<
endmsg);
114 float enePSold = cluster->eSample (samps[si][0]) ;
129 cluster->setEnergy (samps[si][0], 0 );
140 int ibin = (
static_cast<int> (the_aeta / etamax * 100)) ;
152 double raw_energy =0;
153 double shower_lbary_raw =0;
154 for (
int nl = 0 ; nl< 4 ; nl++){
155 raw_energy += cluster->eSample (samps[si][nl]);
156 shower_lbary_raw += (
m_sampling_depth(myctx)[ibin][nl+1] * cluster->eSample (samps[si][nl])) ;
159 if (raw_energy == 0)
return;
160 double shower_lbary = shower_lbary_raw / raw_energy;
164 double depth_max = 20. + raw_energy*(3./
TeV);
166 if ( shower_lbary > depth_max || shower_lbary<0.) {
172 raw_energy = raw_energy * 1
e-3;
179 double p1 = froffset[1] + froffset[2] * raw_energy + froffset[3] * raw_energy * raw_energy ;
180 double p2 = frslope[1] + frslope[2] * raw_energy + frslope[3] * raw_energy * raw_energy ;
181 double p3 = sec[1] + sec[2] * raw_energy + sec[3] * raw_energy * raw_energy ;
183 ATH_MSG_DEBUG(
"p1 " << froffset[1] <<
" " << froffset[2] <<
" " << froffset[3] <<
endmsg);
187 double e_front_reco= (
p1 +
p2 * shower_lbary +
p3 * shower_lbary * shower_lbary);
190 if (e_front_reco<0.) {
191 e_front_reco= enePSold;
199 cluster->setEnergy (samps[si][0], e_front_reco );
203 ATH_MSG_DEBUG(
"CaloSwDeadOTX_ps:: cluster energy before correction --> " << cluster->e() <<
endmsg);
207 float e_temp = cluster->e() - enePSold + e_front_reco ;
210 cluster->setE (e_temp);
212 ATH_MSG_DEBUG(
"CaloSwDeadOTX_ps::Energy after correction --> " << cluster->e() <<
endmsg);