From 93111620f1af6bcc15ae34261bc43475808db753 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 7 Jan 2021 03:56:41 +0100
Subject: [PATCH] Add L0 and L1 ,if they fall inside any of the range for the
 Barrel or Endcap. Should fix ATLASRECTS-5870

---
 .../egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
index 8992f6f411b0..ff9308fef2c3 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
@@ -464,16 +464,14 @@ egammaSuperClusterBuilder::fillClusterConstrained(
       // lets remove from consideration if outside the range
       if (cp0.emaxB > 0) { // cluster has cells in the barrel
         if (std::abs(cp0.etaB - dde->eta_raw()) < m_addCellsWindowEtaBarrel &&
-            std::abs(
-              P4Helpers::deltaPhi(cp0.phiB, cell->caloDDE()->phi_raw())) <
+            std::abs(P4Helpers::deltaPhi(cp0.phiB, dde->phi_raw())) <
               m_addCellsWindowPhiBarrel) {
           inBroadRange = true;
         }
       }
       if (cp0.emaxEC > 0) { // cluster has cells in the endcap
         if (std::abs(cp0.etaEC - dde->eta_raw()) < m_addCellsWindowEtaEndcap &&
-            std::abs(
-              P4Helpers::deltaPhi(cp0.phiEC, cell->caloDDE()->phi_raw())) <
+            std::abs(P4Helpers::deltaPhi(cp0.phiEC, dde->phi_raw())) <
               m_addCellsWindowPhiEndcap) {
           inBroadRange = true;
         }
-- 
GitLab