diff --git a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py index f4cd3ce4ce2b0271350b62a7926668d5b759d4f9..1ec174a8d19467a40ce6ee44f8595ccee4d2265a 100644 --- a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py @@ -10,12 +10,14 @@ from egammaRec import egammaKeys from egammaTools.egammaToolsFactories import EGammaAmbiguityTool +print(">>>>>>>>>> I AM RUNNING in " + __file__) + topoEgammaBuilder = AlgFactory( egammaAlgsConf.topoEgammaBuilder, name = 'topoEgammaBuilder', SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(), SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(), ElectronOutputName = egammaKeys.outputElectronKey(), PhotonOutputName = egammaKeys.outputPhotonKey(), - AmbiguityTool = EGammaAmbiguityTool + AmbiguityTool = None # TODO: change back to EGammaAmbiguityTool ) diff --git a/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx index 398fa1ec5b0d6deb8a3bd57e91d53ed6a972fe84..5bc7cadd44a97ee7d0316c73ee2ec969083f3438 100644 --- a/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx @@ -65,7 +65,14 @@ StatusCode topoEgammaBuilder::initialize() } if ( m_doElectrons && m_doPhotons ){ - ATH_CHECK( m_ambiguityTool.retrieve() ); + ATH_MSG_INFO("<<<<<<<< Retrieving ambiguity tool <<<<<<<<<"); + if (m_ambiguityTool.empty()) { + ATH_MSG_INFO("<<<<<<< Ambiguity tool IS empty"); + } + else { + ATH_MSG_INFO("<<<<<<< Ambituity tool is NOT empty"); + ATH_CHECK( m_ambiguityTool.retrieve() ); + } } // retrieve timing profile @@ -129,10 +136,15 @@ StatusCode topoEgammaBuilder::execute(const EventContext& ctx) const{ const xAOD::CaloCluster *const phClus = photonRec->caloCluster(); //See if they have the same hottest cell if (elEta0 == phClus->eta0() && elPhi0 == phClus->phi0()) { - author = m_ambiguityTool->ambiguityResolve(elClus, - photonRec->vertex(), - electronRec->trackParticle(), - type); + if (!m_ambiguityTool.empty()) { // should be the default + author = m_ambiguityTool->ambiguityResolve(elClus, + photonRec->vertex(), + electronRec->trackParticle(), + type); + } + else { // in case the ambiguity tool is not set ambiguity is not resolved + author = xAOD::EgammaParameters::AuthorAmbiguous; + } break; } } @@ -160,10 +172,15 @@ StatusCode topoEgammaBuilder::execute(const EventContext& ctx) const{ const xAOD::CaloCluster *const elClus = electronRec->caloCluster(); //See if they have the same hottest cell if (phEta0 == elClus->eta0() && phPhi0 == elClus->phi0()) { - author = m_ambiguityTool->ambiguityResolve(elClus, - photonRec->vertex(), - electronRec->trackParticle(), - type); + if (!m_ambiguityTool.empty()) { // should be the default + author = m_ambiguityTool->ambiguityResolve(elClus, + photonRec->vertex(), + electronRec->trackParticle(), + type); + } + else { // in case the ambiguity tool is not set ambiguity is not resolved + author = xAOD::EgammaParameters::AuthorAmbiguous; + } break; } }