Commit 2ee27f09 authored by Jovan Mitrevski's avatar Jovan Mitrevski Committed by Walter Lampl
Browse files

Update forward electron configuration

parent 660a2a39
......@@ -59,16 +59,19 @@ StatusCode egammaForwardBuilder::initialize()
ATH_CHECK(m_outClusterContainerCellLinkKey.initialize());
// retrieve object quality tool
if (m_objectQualityTool.name()!="") {
if (!m_objectQualityTool.empty()) {
ATH_CHECK(m_objectQualityTool.retrieve());
} else {
ATH_MSG_DEBUG("egammaOQFlagsBuilder is disabled");
m_objectQualityTool.disable();
}
// retrieve 4-mom builder:
if (!m_fourMomBuilder.empty()) {
ATH_CHECK(m_fourMomBuilder.retrieve());
}
} else {
m_fourMomBuilder.disable();
}
ATH_CHECK(m_forwardElectronIsEMSelectors.retrieve());
......
......@@ -70,7 +70,7 @@ class egammaForwardBuilder : public AthReentrantAlgorithm
/** @brief Tool to perform object quality*/
ToolHandle<IegammaBaseTool> m_objectQualityTool {this,
"ObjectQualityToolName", "",
"ObjectQualityTool", "",
"Name of the object quality tool (empty tool name ignored)"};
/** @brief Tool to perform the 4-mom computation*/
......
......@@ -87,13 +87,6 @@ class FcnWrapper:
def __call__(self):
return self.fcn()
class FullNameWrapper( FcnWrapper ):
"""FcnWrapper to instantiate tool and return tool.getFullName()
usage: FullNameWrapper( ToolFactory(MyPkgConf.MyTool) )
"""
def __call__(self):
return self.fcn().getFullName()
class Factory:
"""Factory: base class of ToolFactory and AlgFactory.
Allows to "lazy" instantiate tools/algs/services. Properties are set in the c-tor ,
......
......@@ -10,7 +10,7 @@ from RecExConfig.Configured import Configured
from egammaRec import egammaKeys
from egammaAlgs import egammaAlgsConf
from egammaRec.Factories import AlgFactory, FcnWrapper, FullNameWrapper
from egammaRec.Factories import AlgFactory, FcnWrapper
from egammaRec import egammaRecFlags as egRecFlags
egammaRecFlags = egRecFlags.jobproperties.egammaRecFlags
from egammaTools.egammaToolsFactories import egammaOQFlagsBuilder, EMFourMomBuilder, LooseForwardElectronSelector, MediumForwardElectronSelector, TightForwardElectronSelector
......@@ -29,7 +29,7 @@ egammaForwardBuilder = AlgFactory( egammaAlgsConf.egammaForwardBuilder,
ClusterContainerName=egammaKeys.outputFwdClusterKey(),
# Tools
ObjectQualityToolName = FullNameWrapper( egammaOQFlagsBuilder ),
ObjectQualityTool = egammaOQFlagsBuilder,
FourMomBuilderTool = EMFourMomBuilder,
# Flags and other properties
......
......@@ -4,7 +4,7 @@ __doc__ = "ToolFactories to instantiate all egammaTools with default configurati
__author__ = "Bruno Lenzi"
import egammaToolsConf
from egammaRec.Factories import FcnWrapper, ToolFactory, FullNameWrapper
from egammaRec.Factories import FcnWrapper, ToolFactory
from egammaRec import egammaKeys
from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags
from RecExConfig.RecFlags import rec
......
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