Skip to content
Snippets Groups Projects
Commit f4803f47 authored by Ruggero Turra's avatar Ruggero Turra :headphones:
Browse files

first working implementation

parent 9dd79d3b
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!30339allow none ambiguity resolution
......@@ -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
)
......@@ -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;
}
}
......
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