|
ATLAS Offline Software
|
Go to the documentation of this file.
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]);
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);
std::vector< CaloAffectedRegionInfo > CaloAffectedRegionInfoVec
Constant< float > m_eta_start_crack
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
Constant< bool > m_use_raw_eta
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...
ToolHandle< ICaloAffectedTool > m_affectedTool
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
virtual StatusCode initialize() override
Initialize method.
SG::ReadCondHandleKey< CaloAffectedRegionInfoVec > m_affKey
::StatusCode StatusCode
StatusCode definition for legacy code.
Constant< float > m_etamax
Principal data class for CaloCell clusters.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
Initialize method.
StatusCode initialize(bool used=true)
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< float > m_eta_end_crack
Constant< CxxUtils::Array< 3 > > m_correction
Constant< CxxUtils::Array< 2 > > m_sampling_depth
virtual void makeTheCorrection(const Context &myctx, 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.