|
ATLAS Offline Software
|
Go to the documentation of this file.
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]);
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);
std::vector< CaloAffectedRegionInfo > CaloAffectedRegionInfoVec
Constant< float > m_eta_start_crack
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
virtual void makeTheCorrection(const Context &muctx, xAOD::CaloCluster *cluster, const CaloDetDescrElement *elt, float eta, float adj_eta, float phi, float adj_phi, CaloSampling::CaloSample samp) const override
Virtual function for the correction-specific code.
Constant< CxxUtils::Array< 2 > > m_sampling_depth
ToolHandle< ICaloAffectedTool > m_affectedTool
Scalar eta() const
pseudorapidity method
const EventContext & ctx() const
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Constant< float > m_etamax
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
virtual StatusCode initialize() override
Initialize method.
::StatusCode StatusCode
StatusCode definition for legacy code.
Principal data class for CaloCell clusters.
#define CHECK(...)
Evaluate an expression and check for errors.
Constant< bool > m_use_raw_eta
Constant< float > m_eta_end_crack
StatusCode initialize(bool used=true)
virtual StatusCode initialize() override
Initialize method.
virtual void setE(double e)
Set energy.
#define ATH_MSG_WARNING(x)
virtual double e() const
Retrieve energy independent of signal state.
Context object for retrieving ToolConstant values.
Constant< CxxUtils::Array< 3 > > m_correction
SG::ReadCondHandleKey< CaloAffectedRegionInfoVec > m_affKey