Skip to content
Snippets Groups Projects
Commit a7346959 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'ufoEnergyPerLayerFix' into 'master'

UFO energy per layer fix

See merge request atlas/athena!57021
parents 7744fa70 0be9b790
No related merge requests found
......@@ -209,7 +209,7 @@ void JetCaloEnergies::fillEperSamplingFE(const xAOD::Jet& jet, std::vector<float
for (size_t n = 0; n < constit->otherObjects().size(); ++n) {
if(! constit->otherObject(n)) continue;
int index_pfo = constit->otherObject(n)->index();
int index_pfo = constit->otherObject(n)->index();
if(index_pfo<0) continue;
const auto* fe = (constit->otherObject(n));
......@@ -222,7 +222,7 @@ void JetCaloEnergies::fillEperSamplingFE(const xAOD::Jet& jet, std::vector<float
//If we have a PFO, we should still get the associated cluster first
else {
const xAOD::FlowElement* pfo = dynamic_cast<const xAOD::FlowElement*>(fe);
if(pfo->otherObjects().size() > 0 && pfo->otherObject(0)->type() == xAOD::Type::CaloCluster){
if(pfo->otherObjects().size() > 0 && pfo->otherObject(0) && pfo->otherObject(0)->type() == xAOD::Type::CaloCluster){
cluster = dynamic_cast<const xAOD::CaloCluster*> (pfo->otherObject(0));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment