139 {
141
142
143 const static SG::AuxElement::ConstAccessor<float> accHEC0("LAYERENERGY_HEC0");
144 const static SG::AuxElement::ConstAccessor<float> accHEC1("LAYERENERGY_HEC1");
145 const static SG::AuxElement::ConstAccessor<float> accHEC2("LAYERENERGY_HEC2");
146 const static SG::AuxElement::ConstAccessor<float> accHEC3("LAYERENERGY_HEC3");
147
148 float sum_HEC = 0.0;
149
150
151 if(accHEC0.isAvailable(*fe) && accHEC1.isAvailable(*fe) && accHEC2.isAvailable(*fe) && accHEC3.isAvailable(*fe)){
152 sum_HEC = accHEC0(*fe) + accHEC1(*fe) + accHEC2(*fe) + accHEC3(*fe);
153 }
154 else{
158
160
161
164 }
165
166 else {
170 }
171 }
172 if(cluster){
173 sum_HEC += cluster->
eSample( CaloSampling::HEC0 ) + cluster->
eSample( CaloSampling::HEC1 ) + cluster->
eSample( CaloSampling::HEC2 ) + cluster->
eSample( CaloSampling::HEC3 );
174 }
175 }
176 }
177 return sum_HEC;
178 }
float eSample(const CaloSample sampling) const
std::vector< const xAOD::IParticle * > otherObjects() const
const xAOD::IParticle * otherObject(std::size_t i) const
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
@ CaloCluster
The object is a calorimeter cluster.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".