Skip to content
Snippets Groups Projects
Commit 95b6e084 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'allow_no_ambiguitytool_egamma' into 'master'

allow none ambiguity resolution

See merge request atlas/athena!30339
parents 2619f257 28c7bcdc
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,13 @@ StatusCode topoEgammaBuilder::initialize() ...@@ -65,7 +65,13 @@ StatusCode topoEgammaBuilder::initialize()
} }
if ( m_doElectrons && m_doPhotons ){ if ( m_doElectrons && m_doPhotons ){
ATH_CHECK( m_ambiguityTool.retrieve() ); ATH_MSG_DEBUG("Retrieving ambiguity tool");
if (not m_ambiguityTool.isSet()) {
ATH_MSG_DEBUG("Ambiguity tool IS NOT set. Not using it");
}
else {
ATH_CHECK( m_ambiguityTool.retrieve() );
}
} }
// retrieve timing profile // retrieve timing profile
...@@ -129,10 +135,15 @@ StatusCode topoEgammaBuilder::execute(const EventContext& ctx) const{ ...@@ -129,10 +135,15 @@ StatusCode topoEgammaBuilder::execute(const EventContext& ctx) const{
const xAOD::CaloCluster *const phClus = photonRec->caloCluster(); const xAOD::CaloCluster *const phClus = photonRec->caloCluster();
//See if they have the same hottest cell //See if they have the same hottest cell
if (elEta0 == phClus->eta0() && elPhi0 == phClus->phi0()) { if (elEta0 == phClus->eta0() && elPhi0 == phClus->phi0()) {
author = m_ambiguityTool->ambiguityResolve(elClus, if (m_ambiguityTool.isSet()) { // should be the default
photonRec->vertex(), author = m_ambiguityTool->ambiguityResolve(elClus,
electronRec->trackParticle(), photonRec->vertex(),
type); electronRec->trackParticle(),
type);
}
else { // in case the ambiguity tool is not set ambiguity is not resolved
author = xAOD::EgammaParameters::AuthorAmbiguous;
}
break; break;
} }
} }
...@@ -160,10 +171,15 @@ StatusCode topoEgammaBuilder::execute(const EventContext& ctx) const{ ...@@ -160,10 +171,15 @@ StatusCode topoEgammaBuilder::execute(const EventContext& ctx) const{
const xAOD::CaloCluster *const elClus = electronRec->caloCluster(); const xAOD::CaloCluster *const elClus = electronRec->caloCluster();
//See if they have the same hottest cell //See if they have the same hottest cell
if (phEta0 == elClus->eta0() && phPhi0 == elClus->phi0()) { if (phEta0 == elClus->eta0() && phPhi0 == elClus->phi0()) {
author = m_ambiguityTool->ambiguityResolve(elClus, if (m_ambiguityTool.isSet()) { // should be the default
photonRec->vertex(), author = m_ambiguityTool->ambiguityResolve(elClus,
electronRec->trackParticle(), photonRec->vertex(),
type); electronRec->trackParticle(),
type);
}
else { // in case the ambiguity tool is not set ambiguity is not resolved
author = xAOD::EgammaParameters::AuthorAmbiguous;
}
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment