diff --git a/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx index 6086d2ccb01f8fa7b622ba5c1a9e7296ace36399..7093d2c56217d74b507544dc96486827e24cf793 100644 --- a/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx +++ b/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx @@ -203,10 +203,10 @@ bool egammaSuperClusterBuilder::MatchesInWindow(const xAOD::CaloCluster *ref, float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi()))); // float dEtaBarrel (fabs(ref->etaSample(CaloSampling::EMB2)-clus->eta())); - float dPhiBarrel =(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EMB2),clus->phi())); + float dPhiBarrel (fabs(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EMB2),clus->phi()))); // float dEtaEndcap (fabs(ref->etaSample(CaloSampling::EME2)-clus->eta())); - float dPhiEndcap =(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EME2),clus->phi())); + float dPhiEndcap (fabs(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EME2),clus->phi()))); //Matches any in case of split return ( (dEta < m_searchWindowEtaBarrel && dPhi < m_searchWindowPhiBarrel) || (dEta < m_searchWindowEtaEndcap && dPhi < m_searchWindowPhiEndcap) || @@ -362,8 +362,8 @@ StatusCode egammaSuperClusterBuilder::AddEMCellsToCluster(xAOD::CaloCluster (fabs(ref->etaSample(CaloSampling::EME2)-cell->eta()) > m_addCellsWindowEtaEndcap) ){ continue; } - if ((P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EMB2),cell->phi()) > m_addCellsWindowPhiBarrel)&& - (P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EME2),cell->phi()) > m_addCellsWindowPhiEndcap) ){ + if ((fabs(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EMB2),cell->phi())) > m_addCellsWindowPhiBarrel)&& + (fabs(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EME2),cell->phi())) > m_addCellsWindowPhiEndcap) ){ continue; } }