Commit 0611c47a authored by Christos Anastopoulos's avatar Christos Anastopoulos Committed by Frank Winklmeier
Browse files

topoEgammaBuilder rename to xAODEgammaBuilder.

parent 213dc137
......@@ -11,10 +11,10 @@ from RecExConfig.RecFlags import rec
from egammaTools.egammaToolsFactories import EGammaAmbiguityTool
topoEgammaBuilder = AlgFactory(
egammaAlgsConf.topoEgammaBuilder,
egammaAlgsConf.xAODEgammaBuilder,
name='topoEgammaBuilder',
SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(),
SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(),
InputElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(),
InputPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(),
ElectronOutputName=egammaKeys.outputElectronKey(),
PhotonOutputName=egammaKeys.outputPhotonKey(),
AmbiguityTool=EGammaAmbiguityTool,
......
......@@ -8,7 +8,7 @@ __doc__ = """
from AthenaCommon.Logging import logging
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
topoEgammaBuilder = CompFactory.topoEgammaBuilder
xAODEgammaBuilder = CompFactory.xAODEgammaBuilder
EGammaAmbiguityTool = CompFactory.EGammaAmbiguityTool
......@@ -20,10 +20,10 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs):
acc = ComponentAccumulator()
kwargs.setdefault(
"SuperElectronRecCollectionName",
"InputElectronRecCollectionName",
flags.Egamma.Keys.Internal.ElectronSuperRecs)
kwargs.setdefault(
"SuperPhotonRecCollectionName",
"InputPhotonRecCollectionName",
flags.Egamma.Keys.Internal.PhotonSuperRecs)
kwargs.setdefault(
"ElectronOutputName",
......@@ -35,7 +35,7 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs):
"AmbiguityTool",
EGammaAmbiguityTool())
topoegAlg = topoEgammaBuilder(flags, **kwargs)
topoegAlg = xAODEgammaBuilder(flags, **kwargs)
acc.addEventAlgo(topoegAlg)
return acc
#include "../egammaRecBuilder.h"
#include "../topoEgammaBuilder.h"
#include "../xAODEgammaBuilder.h"
#include "../egammaForwardBuilder.h"
#include "../egammaTruthAssociationAlg.h"
#include "../egammaTrackSlimmer.h"
......@@ -13,7 +13,7 @@
#include "../EMGSFCaloExtensionBuilder.h"
DECLARE_COMPONENT( egammaRecBuilder )
DECLARE_COMPONENT( topoEgammaBuilder )
DECLARE_COMPONENT( xAODEgammaBuilder )
DECLARE_COMPONENT( egammaForwardBuilder )
DECLARE_COMPONENT( egammaTruthAssociationAlg )
DECLARE_COMPONENT( egammaTrackSlimmer )
......
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "topoEgammaBuilder.h"
#include "xAODEgammaBuilder.h"
#include "AthenaKernel/errorcheck.h"
#include "GaudiKernel/EventContext.h"
......@@ -26,19 +26,19 @@
#include <vector>
#include <memory>
topoEgammaBuilder::topoEgammaBuilder(const std::string& name,
xAODEgammaBuilder::xAODEgammaBuilder(const std::string& name,
ISvcLocator* pSvcLocator)
: AthReentrantAlgorithm(name, pSvcLocator)
{}
StatusCode
topoEgammaBuilder::initialize()
xAODEgammaBuilder::initialize()
{
m_deltaEta1Pear = std::make_unique<electronPearShapeAlignmentCorrection>();
// the data handle keys
ATH_CHECK(m_electronSuperClusterRecContainerKey.initialize(m_doElectrons));
ATH_CHECK(m_photonSuperClusterRecContainerKey.initialize(m_doPhotons));
ATH_CHECK(m_electronClusterRecContainerKey.initialize(m_doElectrons));
ATH_CHECK(m_photonClusterRecContainerKey.initialize(m_doPhotons));
ATH_CHECK(m_electronOutputKey.initialize());
ATH_CHECK(m_photonOutputKey.initialize());
// retrieve tools
......@@ -72,13 +72,13 @@ topoEgammaBuilder::initialize()
}
StatusCode
topoEgammaBuilder::finalize()
xAODEgammaBuilder::finalize()
{
return StatusCode::SUCCESS;
}
StatusCode
topoEgammaBuilder::execute(const EventContext& ctx) const
xAODEgammaBuilder::execute(const EventContext& ctx) const
{
const EgammaRecContainer* inputElRecs = nullptr;
......@@ -90,11 +90,11 @@ topoEgammaBuilder::execute(const EventContext& ctx) const
* nullptr for electron or photons or both
*/
if (m_doElectrons) {
SG::ReadHandle<EgammaRecContainer> electronSuperRecs(m_electronSuperClusterRecContainerKey, ctx);
SG::ReadHandle<EgammaRecContainer> electronSuperRecs(m_electronClusterRecContainerKey, ctx);
inputElRecs = electronSuperRecs.ptr();
}
if (m_doPhotons) {
SG::ReadHandle<EgammaRecContainer> photonSuperRecs(m_photonSuperClusterRecContainerKey, ctx);
SG::ReadHandle<EgammaRecContainer> photonSuperRecs(m_photonClusterRecContainerKey, ctx);
inputPhRecs = photonSuperRecs.ptr();
}
......@@ -263,7 +263,7 @@ topoEgammaBuilder::execute(const EventContext& ctx) const
}
StatusCode
topoEgammaBuilder::doAmbiguityLinks(
xAODEgammaBuilder::doAmbiguityLinks(
const EventContext& ctx,
xAOD::ElectronContainer* electronContainer,
xAOD::PhotonContainer* photonContainer)
......@@ -329,7 +329,7 @@ topoEgammaBuilder::doAmbiguityLinks(
}
StatusCode
topoEgammaBuilder::CallTool(
xAODEgammaBuilder::CallTool(
const EventContext& ctx,
const ToolHandle<IegammaBaseTool>& tool,
xAOD::ElectronContainer* electronContainer /* = 0*/,
......@@ -356,7 +356,7 @@ topoEgammaBuilder::CallTool(
}
bool
topoEgammaBuilder::getElectron(const egammaRec* egRec,
xAODEgammaBuilder::getElectron(const egammaRec* egRec,
xAOD::ElectronContainer* electronContainer,
const unsigned int author,
const uint8_t type) const
......@@ -439,7 +439,7 @@ topoEgammaBuilder::getElectron(const egammaRec* egRec,
}
bool
topoEgammaBuilder::getPhoton(const egammaRec* egRec,
xAODEgammaBuilder::getPhoton(const egammaRec* egRec,
xAOD::PhotonContainer* photonContainer,
const unsigned int author,
const uint8_t type) const
......
......@@ -2,10 +2,10 @@
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef EGAMMAALGS_TOPOEGAMMABUILDER_H
#define EGAMMAALGS_TOPOEGAMMABUILDER_H
#ifndef EGAMMAALGS_XAODEGAMMABUILDER_H
#define EGAMMAALGS_XAODEGAMMABUILDER_H
/**
@class topoEgammaBuilder
@class xAODEgammaBuilder
The last step of the electron and photon reconstruction algorithm. The
algorithm builds physics objects (xAOD::Electron, xAOD::Photon) from the
egammaRec containers built by the previous algorithms. In the step of the
......@@ -13,10 +13,10 @@
resolution is applied.
Input collections:
- SuperElectronRecCollectionName: default=ElectronSuperRecCollection.
A container of egammaRec with the cluster set to the supercluster
- SuperPhotonRecCollectionName: default=PhotonSuperRecCollection.
A container of egammaRec with the cluster set to the supercluster
- InputElectronRecCollectionName: default=ElectronSuperRecCollection.
A container of egammaRec for electrons
- InputPhotonRecCollectionName: default=PhotonSuperRecCollection.
A container of egammaRec for photons
Output collections:
- ElectronOutputName: default=ElectronContainer. A container of xAOD::Electron.
......@@ -80,11 +80,11 @@
class egammaRec;
class topoEgammaBuilder : public AthReentrantAlgorithm
class xAODEgammaBuilder : public AthReentrantAlgorithm
{
public:
topoEgammaBuilder(const std::string& name, ISvcLocator* pSvcLocator);
xAODEgammaBuilder(const std::string& name, ISvcLocator* pSvcLocator);
StatusCode initialize() override final;
StatusCode finalize() override final;
......@@ -160,14 +160,14 @@ private:
"Name of Photon Container to be created"};
/** @brief Name of input super cluster electron egammaRec container */
SG::ReadHandleKey<EgammaRecContainer> m_electronSuperClusterRecContainerKey {this,
"SuperElectronRecCollectionName",
SG::ReadHandleKey<EgammaRecContainer> m_electronClusterRecContainerKey {this,
"InputElectronRecCollectionName",
"ElectronSuperRecCollection",
"Input container for electron Super Cluster egammaRec objects"};
/** @brief Name of input super cluster photon egammaRec container */
SG::ReadHandleKey<EgammaRecContainer> m_photonSuperClusterRecContainerKey {this,
"SuperPhotonRecCollectionName",
SG::ReadHandleKey<EgammaRecContainer> m_photonClusterRecContainerKey {this,
"InputPhotonRecCollectionName",
"PhotonSuperRecCollection",
"Input container for electron Super Cluster egammaRec objects"};
......
......@@ -87,9 +87,9 @@ LRTEMClusterTool = EMClusterTool.copy(
LRTtopoEgammaBuilder = topoEgammaBuilder.copy(
name='LRTtopoEgammaBuilder',
SuperElectronRecCollectionName="LRT"+egammaKeys.ElectronSuperRecKey(),
InputElectronRecCollectionName="LRT"+egammaKeys.ElectronSuperRecKey(),
ElectronOutputName="LRT"+egammaKeys.outputElectronKey(),
SuperPhotonRecCollectionName="LRT"+egammaKeys.PhotonSuperRecKey(),
InputPhotonRecCollectionName="LRT"+egammaKeys.PhotonSuperRecKey(),
PhotonOutputName="LRT"+egammaKeys.outputPhotonKey(),
EMClusterTool=LRTEMClusterTool,
EMShowerTool=EMShowerBuilder,
......
......@@ -73,7 +73,7 @@ def precisionElectronRecoSequence(RoIs, ion=False):
## TrigTopoEgammaElectronCfg_noGSF ##
TrigTopoEgammaAlgo = TrigTopoEgammaElectronCfg("TrigTopoEgammaElectronCfg_noGSF" + tag)
thesequence += TrigTopoEgammaAlgo
TrigTopoEgammaAlgo.SuperElectronRecCollectionName = TrigSuperElectronAlgo.SuperElectronRecCollectionName
TrigTopoEgammaAlgo.InputElectronRecCollectionName = TrigSuperElectronAlgo.SuperElectronRecCollectionName
collectionOut = TrigTopoEgammaAlgo.ElectronOutputName
TrigTopoEgammaAlgo.DummyElectronOutputName = "HLT_PrecisionDummyElectron"
collectionOut_dummy = TrigTopoEgammaAlgo.DummyElectronOutputName
......
......@@ -68,7 +68,7 @@ def precisionElectronRecoSequence_LRT(RoIs):
## TrigTopoEgammaElectronCfg_LRT ##
TrigTopoEgammaAlgo = TrigTopoEgammaElectronCfg("TrigTopoEgammaElectronCfg_LRT")
thesequence += TrigTopoEgammaAlgo
TrigTopoEgammaAlgo.SuperElectronRecCollectionName = TrigSuperElectronAlgo.SuperElectronRecCollectionName
TrigTopoEgammaAlgo.InputElectronRecCollectionName = TrigSuperElectronAlgo.SuperElectronRecCollectionName
TrigTopoEgammaAlgo.ElectronOutputName = TrigEgammaKeys_LRT.outputElectronKey_LRT
collectionOut = TrigTopoEgammaAlgo.ElectronOutputName
TrigTopoEgammaAlgo.DummyElectronOutputName = "HLT_PrecisionDummyElectron"
......
......@@ -51,9 +51,9 @@ def TrigTopoEgammaElectronCfg(name='topoEgammaBuilder_TrigElectrons'):
mlog = logging.getLogger(__name__)
mlog.info('Starting configuration')
TrigTopoEgammaElectron = AlgFactory( egammaAlgsConf.topoEgammaBuilder, name = name,
SuperElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName,
SuperPhotonRecCollectionName = TrigEgammaKeys.SuperPhotonRecCollectionName,
TrigTopoEgammaElectron = AlgFactory( egammaAlgsConf.xAODEgammaBuilder, name = name,
InputElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName,
InputPhotonRecCollectionName = TrigEgammaKeys.SuperPhotonRecCollectionName,
ElectronOutputName = TrigEgammaKeys.outputElectronKey,
PhotonOutputName = TrigEgammaKeys.outputPhotonKey,
AmbiguityTool = EGammaAmbiguityTool,
......
......@@ -213,9 +213,9 @@ def _precisionElectronSeq(flags, doIDperf=False):
def TrigTopoEgammaElectronCfg(flags, name='topoEgammaBuilder_TrigElectrons'):
acc = ComponentAccumulator()
from egammaTools.EMShowerBuilderConfig import EMShowerBuilderCfg
builder = CompFactory.topoEgammaBuilder(name,
SuperElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName,
SuperPhotonRecCollectionName = TrigEgammaKeys.SuperPhotonRecCollectionName,
builder = CompFactory.xAODEgammaBuilder(name,
InputElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName,
InputPhotonRecCollectionName = TrigEgammaKeys.SuperPhotonRecCollectionName,
ElectronOutputName = TrigEgammaKeys.outputElectronKey,
PhotonOutputName = TrigEgammaKeys.outputPhotonKey,
AmbiguityTool = CompFactory.EGammaAmbiguityTool(),
......
......@@ -49,7 +49,7 @@ def precisionPhotonRecoSequence(RoIs):
thesequence += trigPhotonAlgo
trigTopoEgammaAlgo = TrigTopoEgammaPhotons()
trigTopoEgammaAlgo.SuperPhotonRecCollectionName = trigPhotonAlgo.SuperPhotonRecCollectionName
trigTopoEgammaAlgo.InputPhotonRecCollectionName = trigPhotonAlgo.SuperPhotonRecCollectionName
collectionOut = trigTopoEgammaAlgo.PhotonOutputName
thesequence += trigTopoEgammaAlgo
......
......@@ -54,10 +54,10 @@ TrigPhotonSuperClusterBuilder = AlgFactory( egammaAlgsConf.photonSuperClusterBui
)
#Factory for photons
TrigTopoEgammaPhotons = AlgFactory( egammaAlgsConf.topoEgammaBuilder,
TrigTopoEgammaPhotons = AlgFactory( egammaAlgsConf.xAODEgammaBuilder,
name = 'TrigTopoEgammaPhotons',
SuperElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName,
SuperPhotonRecCollectionName = TrigEgammaKeys.SuperPhotonRecCollectionName,
InputElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName,
InputPhotonRecCollectionName = TrigEgammaKeys.SuperPhotonRecCollectionName,
ElectronOutputName = TrigEgammaKeys.outputElectronKey,
PhotonOutputName = TrigEgammaKeys.outputPhotonKey,
AmbiguityTool = EGammaAmbiguityTool,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment