42#include "GaudiKernel/MsgStream.h"
43#include "GaudiKernel/ThreadLocalContext.h"
50 return StatusCode::SUCCESS;
61 <<
" " << cluster->
etaSample(CaloSampling::EMB1)
62 <<
" " << cluster->
etaSample(CaloSampling::EMB2)
65 <<
" " << cluster->
phiSample(CaloSampling::EMB1)
66 <<
" " << cluster->
phiSample(CaloSampling::EMB2)
70 return StatusCode::SUCCESS;
76 float em,
float etam,
float phim,
77 float emax,
float etamax,
float phimax,
78 float etas,
float phis)
const
80 cluster->setEnergy(sampling, em);
81 cluster->
setEta(sampling, etam);
82 cluster->
setPhi(sampling, phim);
84 cluster->setEmax(sampling,emax);
85 cluster->setEtamax(sampling,etamax);
86 cluster->setPhimax(sampling,phimax);
88 cluster->setEtasize(sampling, etas);
89 cluster->setPhisize(sampling, phis);
96 if (cluster->
e() == 0) {
99 <<
"Attempt to rescale zero-energy cluster to energy " << energy
104 float correction = energy/cluster->
e();
105 cluster->
setE(energy);
109 for (
int iSample=CaloSampling::PreSamplerB;
110 iSample < CaloSampling::Unknown;
115 double e = cluster->
eSample(sampling);
116 cluster->setEnergy(sampling,e*correction) ;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const override
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
virtual StatusCode initialize() override
Initialize method.
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *) const =0
virtual void setsample(xAOD::CaloCluster *cluster, CaloSampling::CaloSample sampling, float em, float etam, float phim, float emax, float etamax, float phimax, float etas, float phis) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Principal data class for CaloCell clusters.
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
double phiSample(sampling_type sampling) const
Retrieve barycenter in a given sample.
virtual double e() const
Retrieve energy independent of signal state.
double etaBE(int sampling) const
EMB/EMEC combined barycenter .
double phiBE(int sampling) const
EMB/EMEC combined barycenter .
virtual double eta() const
Retrieve eta independent of signal state.
virtual void setEta(double eta)
Set eta.
double etaSample(sampling_type sampling) const
Retrieve barycenter in a given sample.
bool hasSampling(const sampling_type &theSampling) const
Checks if certain sampling contributes to cluster.
virtual double phi() const
Retrieve phi independent of signal state.
virtual void setPhi(double phi)
Set phi.
virtual void setE(double e)
Set energy.
virtual double et() const
transverse energy defined to be e*sin(theta)
CaloSampling::CaloSample CaloSample
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.