43#include "GaudiKernel/MsgStream.h"
57 <<
" inEndcap "<<cluster->
inEndcap()) ;
59 for(
int i=0; i<5; i=i+4 )
62 if (i==0 && !cluster->
inBarrel())
continue;
63 if (i==4 && !cluster->
inEndcap())
continue;
70 float e0 = cluster->
eSample(sam0);
71 float e1 = cluster->
eSample(sam1);
72 float e2 = cluster->
eSample(sam2);
73 float e3 = cluster->
eSample(sam3);
76 energy += (e0 + e1 + e2 + e3);
79 if (e1 <= 0 && e2 <= 0)
continue;
83 if (cluster->
hasSampling(sam2) && eta2 == -999.)
continue;
86 if (cluster->
hasSampling(sam1) && eta1 == -999.)
continue;
100 eta += (eta1*w1+eta2*w2) ;
107 if (
eta != -999. && weta != 0)
111 " EB1 = " << cluster->
eSample(CaloSampling::EMB1)
112 <<
" etaB1 = " << cluster->
etaSample(CaloSampling::EMB1)
113 <<
" EE1 = " << cluster->
eSample(CaloSampling::EME1)
114 <<
" etaE1 = " << cluster->
etaSample(CaloSampling::EME1)
115 <<
" EB2 = " << cluster->
eSample(CaloSampling::EMB2)
116 <<
" etaB2 = " << cluster->
etaSample(CaloSampling::EMB2)
117 <<
" EE2 = " << cluster->
eSample(CaloSampling::EME2)
118 <<
" etaE2 = " << cluster->
etaSample(CaloSampling::EME2));
124 if (cluster->
eSample(CaloSampling::EMB2) >
125 cluster->
eSample(CaloSampling::EME2))
136 cluster->
setE(energy);
Scalar eta() const
pseudorapidity method
CaloPhiRange class declaration.
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
Gaudi::Property< float > m_w1
Constant< bool > m_update_energy
Principal data class for CaloCell clusters.
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
double phiBE(int sampling) const
EMB/EMEC combined barycenter .
virtual void setEta(double eta)
Set eta.
double etaSample(sampling_type sampling) const
Retrieve barycenter in a given sample.
bool inEndcap() const
Returns true if at least one clustered cell in EMEC.
bool hasSampling(const sampling_type &theSampling) const
Checks if certain sampling contributes to cluster.
virtual void setPhi(double phi)
Set phi.
bool inBarrel() const
Returns true if at least one clustered cell in EMB.
virtual void setE(double e)
Set energy.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.