20     return StatusCode::FAILURE;
 
   23   std::map<unsigned int, double> truthIDTruePtMap;
 
   29   for (; firstCell != lastCell; ++firstCell) {
 
   30     const CaloCell* thisCaloCell = (*firstCell);
 
   41     double cellWeight = firstCell.
weight();
 
   44     std::map<Identifier,std::vector<const CaloCalibrationHit*> >::const_iterator identifierToCaloHitMapIterator = identifierToCaloHitMap.find(cellID);
 
   45     if (identifierToCaloHitMap.end() == identifierToCaloHitMapIterator) 
continue;
 
   46     std::vector<const CaloCalibrationHit*> theseCalibrationHits = (*identifierToCaloHitMapIterator).second;
 
   48     for (
const auto *thisCalibrationHit : theseCalibrationHits){
 
   50       double thisCalHitTruthEnergy = thisCalibrationHit->energyEM() + thisCalibrationHit->energyNonEM();
 
   51       if (
true == 
m_fullTruthEnergy) thisCalHitTruthEnergy += (thisCalibrationHit->energyEscaped() + thisCalibrationHit->energyInvisible());
 
   61         truthIDTruePtMap[truthID] += thisCalHitTruthEnergy;
 
   69   std::vector<std::pair<unsigned int, double > > truthIDTruePtPairs;
 
   71   truthIDTruePtPairs.reserve(truthIDTruePtMap.size());
 
   72   for (
const auto& thisEntry : truthIDTruePtMap) truthIDTruePtPairs.emplace_back(thisEntry);
 
   75   std::sort(truthIDTruePtPairs.begin(),truthIDTruePtPairs.end(),[]( std::pair<unsigned int, double> 
a, std::pair<unsigned int, double> 
b) -> 
bool {return a.second > b.second;} );
 
   78   if (numTruthParticles > truthIDTruePtPairs.size()) numTruthParticles = truthIDTruePtPairs.size();
 
   81   for (
const auto& thisPair : truthIDTrueCalHitEnergy) 
ATH_MSG_DEBUG(
"Truncated loop 2: truthID and true energy are " << thisPair.first << 
" and " << thisPair.second << 
" for cluster with e, eta of " << theCaloCluster.
e() << 
" and " << theCaloCluster.
eta() );
 
   83   return StatusCode::SUCCESS;