From 1e6b7b5df41fce3a31615b0fca611fe1e3f86b40 Mon Sep 17 00:00:00 2001
From: Shaun Roe <shaun.roe@cern.ch>
Date: Thu, 12 Dec 2024 11:13:49 +0100
Subject: [PATCH] address perf. defects

---
 Reconstruction/eflowRec/src/PFSubtractionTool.cxx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Reconstruction/eflowRec/src/PFSubtractionTool.cxx b/Reconstruction/eflowRec/src/PFSubtractionTool.cxx
index a3e08fdb523d..81fc456d5798 100644
--- a/Reconstruction/eflowRec/src/PFSubtractionTool.cxx
+++ b/Reconstruction/eflowRec/src/PFSubtractionTool.cxx
@@ -1,3 +1,7 @@
+/*
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
+*/
+
 #include "eflowRec/PFSubtractionTool.h"
 
 #include "eflowRec/eflowCaloObject.h"
@@ -526,7 +530,7 @@ void PFSubtractionTool::performTruthSubtraction(eflowCaloObject& thisEflowCaloOb
       //reco algorithm does) or reweight the cells contribution based on subtracting the truth
       //energy from the reco cell energy
 
-      for (; theCell != lastCell; theCell++){
+      for (; theCell != lastCell; ++theCell){
         //get the truth energy for this cell
         double truthEnergy = thisEfRecTrack->getCellTruthEnergy(*theCell);
         //reweight the cell such that energy*weight gives the new energy
@@ -600,7 +604,7 @@ void PFSubtractionTool::addSubtractedCells(eflowCaloObject& thisEflowCaloObject,
       const CaloClusterCellLink* theCellLink = thisCluster->getCellLinks();
       CaloClusterCellLink::const_iterator theCell = theCellLink->begin();
       CaloClusterCellLink::const_iterator lastCell = theCellLink->end();
-      for (; theCell != lastCell; theCell++) thisTrack->addSubtractedCaloCell(ElementLink<CaloCellContainer>("AllCalo",theCell.index()),theCell.weight()/numTracks);
+      for (; theCell != lastCell; ++theCell) thisTrack->addSubtractedCaloCell(ElementLink<CaloCellContainer>("AllCalo",theCell.index()),theCell.weight()/numTracks);
     }
   }
 }
-- 
GitLab