Commit 7b4556f1 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

After fixing conflicts, use egammaCaloExtrapolator and add some tests for the Extrapolator config

parent 1289c9d9
......@@ -33,7 +33,7 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', **
if "MVACalibSvc" not in kwargs:
mvacal = egammaMVASvcCfg(flags)
kwargs["MVACalibSvc"] = acc.popToolsAndMerge(mvacal)
kwargs["MVACalibSvc"] = acc.getPrimaryAndMerge(mvacal)
kwargs.setdefault(
"InputEgammaRecContainerName",
......@@ -74,7 +74,7 @@ def photonSuperClusterBuilderCfg(
if "MVACalibSvc" not in kwargs:
mvacal = egammaMVASvcCfg(flags)
kwargs["MVACalibSvc"] = acc.popToolsAndMerge(mvacal)
kwargs["MVACalibSvc"] = acc.getPrimaryAndMerge(mvacal)
kwargs.setdefault(
"InputEgammaRecContainerName",
......
......@@ -6,14 +6,11 @@ __doc__ = """Tool configuration to instantiate all
from AthenaCommon.Logging import logging
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
from TrkConfig.AtlasExtrapolatorConfig import (
egammaCaloExtrapolatorCfg, InDetExtrapolatorCfg)
from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
EMExtrapolationTools = CompFactory.EMExtrapolationTools
# The extrapolator is not quite correct
# we need to able to set the particular
# egamma ones.
def EMExtrapolationToolsCfg(flags, **kwargs):
......@@ -23,9 +20,8 @@ def EMExtrapolationToolsCfg(flags, **kwargs):
acc = ComponentAccumulator()
if "Extrapolator" not in kwargs:
extrapAcc = AtlasExtrapolatorCfg(flags)
kwargs["Extrapolator"] = extrapAcc.popPrivateTools()
acc.merge(extrapAcc)
extrapAcc = egammaCaloExtrapolatorCfg(flags)
kwargs["Extrapolator"] = acc.popToolsAndMerge(extrapAcc)
if "PerigeeCaloExtensionTool" not in kwargs:
perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg(
......@@ -34,9 +30,8 @@ def EMExtrapolationToolsCfg(flags, **kwargs):
Extrapolator=kwargs["Extrapolator"],
ParticleType="electron",
StartFromPerigee=True)
kwargs["PerigeeCaloExtensionTool"] = (
perigeeCaloExtrapAcc.popPrivateTools())
acc.merge(perigeeCaloExtrapAcc)
kwargs["PerigeeCaloExtensionTool"] = acc.popToolsAndMerge(
perigeeCaloExtrapAcc)
if "LastCaloExtensionTool" not in kwargs:
lastCaloExtrapAcc = ParticleCaloExtensionToolCfg(
......@@ -44,9 +39,8 @@ def EMExtrapolationToolsCfg(flags, **kwargs):
name="EMLastCaloExtensionTool",
ParticleType="electron",
Extrapolator=kwargs["Extrapolator"])
kwargs["LastCaloExtensionTool"] = lastCaloExtrapAcc.popPrivateTools()
acc.merge(lastCaloExtrapAcc)
kwargs["LastCaloExtensionTool"] = acc.popToolsAndMerge(
lastCaloExtrapAcc)
emExtrapolationTools = EMExtrapolationTools(**kwargs)
acc.setPrivateTools(emExtrapolationTools)
......@@ -64,7 +58,8 @@ def GSFTrackSummaryToolCfg(flags, name="GSFBuildInDetTrackSummaryTool", **kwargs
acc = ComponentAccumulator()
if "InDetSummaryHelperTool" not in kwargs:
from InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
from InDetConfig.InDetRecToolConfig import (
InDetTrackSummaryHelperToolCfg)
kwargs["InDetSummaryHelperTool"] = acc.getPrimaryAndMerge(
InDetTrackSummaryHelperToolCfg(
flags,
......@@ -88,16 +83,13 @@ def GSFTrackSummaryToolCfg(flags, name="GSFBuildInDetTrackSummaryTool", **kwargs
return acc
# egammaTrkRefitterTool also needs a config, but depends on some
# tracking that is not ready
# CaloCluster_OnTrackBuilder is currently not used at all
def egammaTrkRefitterToolCfg(flags, name='GSFRefitterTool', **kwargs):
acc = ComponentAccumulator()
kwargs.setdefault("useBeamSpot", False)
kwargs.setdefault("ReintegrateOutliers", True)
if "Extrapolator" not in kwargs:
from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg
kwargs["Extrapolator"] = acc.getPrimaryAndMerge(InDetExtrapolatorCfg(flags, name="egammaExtrapolator"))
kwargs["Extrapolator"] = acc.getPrimaryAndMerge(
InDetExtrapolatorCfg(flags, name="egammaExtrapolator"))
if "FitterTool" not in kwargs:
from InDetConfig.TrackingCommonConfig import GaussianSumFitterCfg
kwargs["FitterTool"] = acc.popToolsAndMerge(
......
......@@ -19,3 +19,7 @@ atlas_add_test( AtlasTrackingGeometrySvcCfgTest
atlas_add_test( SolenoidalIntersectorConfig_test
SCRIPT python -m TrkConfig.SolenoidalIntersectorConfig
LOG_SELECT_PATTERN "ComponentAccumulator|^private tools" )
atlas_add_test( AtlasExtrapolatorCfgTest
SCRIPT python -m TrkConfig.AtlasExtrapolatorConfig
POST_EXEC_SCRIPT nopost.sh )
......@@ -9,197 +9,244 @@ from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
import TrkConfig.AtlasExtrapolatorToolsConfig as TC
# import the Extrapolator configurable
Trk__Extrapolator=CompFactory.Trk.Extrapolator
Trk__Extrapolator = CompFactory.Trk.Extrapolator
# define the class
def AtlasExtrapolatorCfg( flags, name = 'AtlasExtrapolator' ):
result=ComponentAccumulator()
acc = MagneticFieldSvcCfg(flags)
result.merge(acc)
# PROPAGATOR DEFAULTS --------------------------------------------------------------------------------------
AtlasRungeKuttaPropagator = result.getPrimaryAndMerge( TC.AtlasRKPropagatorCfg(flags) )
AtlasSTEP_Propagator = result.getPrimaryAndMerge( TC.AtlasSTEP_PropagatorCfg(flags) )
AtlasPropagators = []
AtlasPropagators += [AtlasRungeKuttaPropagator]
AtlasPropagators += [AtlasSTEP_Propagator]
# UPDATOR DEFAULTS -----------------------------------------------------------------------------------------
AtlasMaterialEffectsUpdator = result.getPrimaryAndMerge( TC.AtlasMaterialEffectsUpdatorCfg(flags) )
AtlasMaterialEffectsUpdatorLandau = result.getPrimaryAndMerge( TC.AtlasMaterialEffectsUpdatorLandauCfg(flags) )
AtlasUpdators = []
AtlasUpdators += [ AtlasMaterialEffectsUpdator ]
AtlasUpdators += [ AtlasMaterialEffectsUpdatorLandau ]
AtlasNavigator = result.getPrimaryAndMerge( TC.AtlasNavigatorCfg(flags) )
# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
AtlasSubPropagators = []
AtlasSubPropagators += [ AtlasRungeKuttaPropagator.name ] # Global
AtlasSubPropagators += [ AtlasRungeKuttaPropagator.name ] # ID
AtlasSubPropagators += [ AtlasSTEP_Propagator.name ] # BeamPipe
AtlasSubPropagators += [ AtlasSTEP_Propagator.name ] # Calo
AtlasSubPropagators += [ AtlasSTEP_Propagator.name ] # MS
AtlasSubPropagators += [ AtlasRungeKuttaPropagator.name ] # Cavern
AtlasSubUpdators = []
AtlasSubUpdators += [ AtlasMaterialEffectsUpdator.name ] # Global
AtlasSubUpdators += [ AtlasMaterialEffectsUpdator.name ] # ID
AtlasSubUpdators += [ AtlasMaterialEffectsUpdator.name ] # BeamPipe
AtlasSubUpdators += [ AtlasMaterialEffectsUpdator.name ] # Calo
AtlasSubUpdators += [ AtlasMaterialEffectsUpdator.name ] # MS
AtlasSubUpdators += [ AtlasMaterialEffectsUpdator.name ] # Cavern
# call the base class constructor
Extrapolator = Trk__Extrapolator(name,\
Navigator = AtlasNavigator,\
MaterialEffectsUpdators = AtlasUpdators,\
Propagators = AtlasPropagators,\
SubPropagators = AtlasSubPropagators,\
SubMEUpdators = AtlasSubUpdators
)
result.setPrivateTools(Extrapolator)
return result
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator'):
result = ComponentAccumulator()
# Based on Reconstruction/egamma/egammaTools/python/egammaExtrapolators.py
def egammaCaloExtrapolatorCfg( flags, name = 'egammaCaloExtrapolator' ):
result=ComponentAccumulator()
acc = MagneticFieldSvcCfg(flags)
result.merge(acc)
egammaExtrapolator = result.popToolsAndMerge(AtlasExtrapolatorCfg(flags, name))
# PROPAGATOR DEFAULTS --------------------------------------------------------------------------------------
# this turns off dynamic calculation of eloss in calorimeters
egammaExtrapolator.DoCaloDynamic = False
AtlasRungeKuttaPropagator = result.getPrimaryAndMerge(
TC.AtlasRKPropagatorCfg(flags))
AtlasSTEP_Propagator = result.getPrimaryAndMerge(
TC.AtlasSTEP_PropagatorCfg(flags))
RungeKuttaPropagator = result.getPrimaryAndMerge( TC.AtlasRKPropagatorCfg(flags) )
NoMatSTEP_Propagator = result.getPrimaryAndMerge( TC.AtlasNoMatSTEP_PropagatorCfg(flags) )
AtlasPropagators = []
AtlasPropagators += [AtlasRungeKuttaPropagator]
AtlasPropagators += [AtlasSTEP_Propagator]
egammaPropagators = []
egammaPropagators += [RungeKuttaPropagator]
egammaPropagators += [NoMatSTEP_Propagator]
# UPDATOR DEFAULTS -----------------------------------------------------------------------------------------
MaterialEffectsUpdator = result.getPrimaryAndMerge( TC.AtlasMaterialEffectsUpdatorCfg(flags) )
NoElossMaterialEffectsUpdator = result.getPrimaryAndMerge( TC.AtlasNoElossMaterialEffectsUpdatorCfg(flags) )
AtlasMaterialEffectsUpdator = result.getPrimaryAndMerge(
TC.AtlasMaterialEffectsUpdatorCfg(flags))
AtlasMaterialEffectsUpdatorLandau = result.getPrimaryAndMerge(
TC.AtlasMaterialEffectsUpdatorLandauCfg(flags))
egammaUpdators = []
egammaUpdators += [ MaterialEffectsUpdator ]
egammaUpdators += [ NoElossMaterialEffectsUpdator ]
AtlasUpdators = []
AtlasUpdators += [AtlasMaterialEffectsUpdator]
AtlasUpdators += [AtlasMaterialEffectsUpdatorLandau]
# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
AtlasNavigator = result.getPrimaryAndMerge(TC.AtlasNavigatorCfg(flags))
egammaSubPropagators = []
egammaSubPropagators += [ RungeKuttaPropagator.name ] # Global
egammaSubPropagators += [ RungeKuttaPropagator.name ] # ID
egammaSubPropagators += [ RungeKuttaPropagator.name ] # BeamPipe (default is STEP)
egammaSubPropagators += [ RungeKuttaPropagator.name ] # Calo (default is STEP)
egammaSubPropagators += [ NoMatSTEP_Propagator.name ] # MS (default is STEP)
egammaSubPropagators += [ RungeKuttaPropagator.name ] # Cavern
# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
egammaSubUpdators = []
egammaSubUpdators += [ MaterialEffectsUpdator.name ] # Global
egammaSubUpdators += [ MaterialEffectsUpdator.name ] # ID
egammaSubUpdators += [ MaterialEffectsUpdator.name ] # BeamPipe
egammaSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # Calo (default is Mat)
egammaSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # MS (default is Mat)
egammaSubUpdators += [ MaterialEffectsUpdator.name ] # Cavern
AtlasSubPropagators = []
AtlasSubPropagators += [AtlasRungeKuttaPropagator.name] # Global
AtlasSubPropagators += [AtlasRungeKuttaPropagator.name] # ID
AtlasSubPropagators += [AtlasSTEP_Propagator.name] # BeamPipe
AtlasSubPropagators += [AtlasSTEP_Propagator.name] # Calo
AtlasSubPropagators += [AtlasSTEP_Propagator.name] # MS
AtlasSubPropagators += [AtlasRungeKuttaPropagator.name] # Cavern
egammaExtrapolator.MaterialEffectsUpdators = egammaUpdators
egammaExtrapolator.SubMEUpdators = egammaSubUpdators
egammaExtrapolator.Propagators = egammaPropagators
egammaExtrapolator.SubPropagators = egammaSubPropagators
# egamma STEP with no eloss for calo intersections
egammaExtrapolator.STEP_Propagator = NoMatSTEP_Propagator
AtlasSubUpdators = []
AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name] # Global
AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name] # ID
AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name] # BeamPipe
AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name] # Calo
AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name] # MS
AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name] # Cavern
result.setPrivateTools(egammaExtrapolator)
# call the base class constructor
Extrapolator = Trk__Extrapolator(name,
Navigator=AtlasNavigator,
MaterialEffectsUpdators=AtlasUpdators,
Propagators=AtlasPropagators,
SubPropagators=AtlasSubPropagators,
SubMEUpdators=AtlasSubUpdators
)
return result
result.setPrivateTools(Extrapolator)
return result
# Based on PhysicsAnalysis/MCTruthClassifier/python/MCTruthClassifierBase.py
def MCTruthClassifierExtrapolatorCfg( flags, name = 'MCTruthClassifierExtrapolator' ):
result=ComponentAccumulator()
# Based on Reconstruction/egamma/egammaTools/python/egammaExtrapolators.py
def egammaCaloExtrapolatorCfg(flags, name='egammaCaloExtrapolator'):
result = ComponentAccumulator()
MCTruthExtrapolator = result.popToolsAndMerge(AtlasExtrapolatorCfg(flags, name))
egammaExtrapolator = result.popToolsAndMerge(
AtlasExtrapolatorCfg(flags, name))
RungeKuttaPropagator = result.getPrimaryAndMerge(
TC.AtlasRKPropagatorCfg(flags))
NoMatSTEP_Propagator = result.getPrimaryAndMerge(
TC.AtlasNoMatSTEP_PropagatorCfg(flags))
egammaPropagators = []
egammaPropagators += [RungeKuttaPropagator]
egammaPropagators += [NoMatSTEP_Propagator]
MaterialEffectsUpdator = result.getPrimaryAndMerge(
TC.AtlasMaterialEffectsUpdatorCfg(flags))
NoElossMaterialEffectsUpdator = result.getPrimaryAndMerge(
TC.AtlasNoElossMaterialEffectsUpdatorCfg(flags))
egammaUpdators = []
egammaUpdators += [MaterialEffectsUpdator]
egammaUpdators += [NoElossMaterialEffectsUpdator]
# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
egammaSubPropagators = []
egammaSubPropagators += [RungeKuttaPropagator.name] # Global
egammaSubPropagators += [RungeKuttaPropagator.name] # ID
# BeamPipe (default is STEP)
egammaSubPropagators += [RungeKuttaPropagator.name]
# Calo (default is STEP)
egammaSubPropagators += [RungeKuttaPropagator.name]
egammaSubPropagators += [NoMatSTEP_Propagator.name] # MS (default is STEP)
egammaSubPropagators += [RungeKuttaPropagator.name] # Cavern
egammaSubUpdators = []
egammaSubUpdators += [MaterialEffectsUpdator.name] # Global
egammaSubUpdators += [MaterialEffectsUpdator.name] # ID
egammaSubUpdators += [MaterialEffectsUpdator.name] # BeamPipe
# Calo (default is Mat)
egammaSubUpdators += [NoElossMaterialEffectsUpdator.name]
# MS (default is Mat)
egammaSubUpdators += [NoElossMaterialEffectsUpdator.name]
egammaSubUpdators += [MaterialEffectsUpdator.name] # Cavern
egammaExtrapolator.MaterialEffectsUpdators = egammaUpdators
egammaExtrapolator.SubMEUpdators = egammaSubUpdators
egammaExtrapolator.Propagators = egammaPropagators
egammaExtrapolator.SubPropagators = egammaSubPropagators
# egamma STEP with no eloss for calo intersections
egammaExtrapolator.STEP_Propagator = NoMatSTEP_Propagator
result.setPrivateTools(egammaExtrapolator)
# this turns off dynamic calculation of eloss in calorimeters
MCTruthExtrapolator.DoCaloDynamic = False
return result
MCTruthUpdators = []
NoElossMaterialEffectsUpdator = result.getPrimaryAndMerge( TC.AtlasNoElossMaterialEffectsUpdatorCfg(flags) )
MCTruthUpdators += [ NoElossMaterialEffectsUpdator ]
# Based on PhysicsAnalysis/MCTruthClassifier/python/MCTruthClassifierBase.py
def MCTruthClassifierExtrapolatorCfg(flags, name='MCTruthClassifierExtrapolator'):
result = ComponentAccumulator()
MCTruthSubUpdators = []
MCTruthExtrapolator = result.popToolsAndMerge(
AtlasExtrapolatorCfg(flags, name))
# -------------------- set it depending on the geometry ----------------------------------------------------
MCTruthSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # Global
MCTruthSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # ID
MCTruthSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # beampipe
MCTruthSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # calo
MCTruthSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # MS
MCTruthSubUpdators += [ NoElossMaterialEffectsUpdator.name ] # cavern
MCTruthUpdators = []
MCTruthExtrapolator.MaterialEffectsUpdators = MCTruthUpdators
MCTruthExtrapolator.SubMEUpdators = MCTruthSubUpdators
NoElossMaterialEffectsUpdator = result.getPrimaryAndMerge(
TC.AtlasNoElossMaterialEffectsUpdatorCfg(flags))
MCTruthUpdators += [NoElossMaterialEffectsUpdator]
result.setPrivateTools(MCTruthExtrapolator)
MCTruthSubUpdators = []
return result
# -------------------- set it depending on the geometry ----------------------------------------------------
MCTruthSubUpdators += [NoElossMaterialEffectsUpdator.name] # Global
MCTruthSubUpdators += [NoElossMaterialEffectsUpdator.name] # ID
MCTruthSubUpdators += [NoElossMaterialEffectsUpdator.name] # beampipe
MCTruthSubUpdators += [NoElossMaterialEffectsUpdator.name] # calo
MCTruthSubUpdators += [NoElossMaterialEffectsUpdator.name] # MS
MCTruthSubUpdators += [NoElossMaterialEffectsUpdator.name] # cavern
MCTruthExtrapolator.MaterialEffectsUpdators = MCTruthUpdators
MCTruthExtrapolator.SubMEUpdators = MCTruthSubUpdators
def InDetExtrapolatorCfg(flags, name='InDetExtrapolator', **kwargs) :
result = ComponentAccumulator()
result.setPrivateTools(MCTruthExtrapolator)
# FIXME copied from the old config, also needs fixing on the c++ side.
if 'Propagators' not in kwargs :
InDetPropagator = result.getPrimaryAndMerge(TC.InDetPropagatorCfg(flags))
Propagators = [InDetPropagator]
kwargs.setdefault( "Propagators", Propagators )
return result
propagator= kwargs.get('Propagators')[0].name if kwargs.get('Propagators',None) is not None and len(kwargs.get('Propagators',None))>0 else None
if 'MaterialEffectsUpdators' not in kwargs :
InDetMaterialEffectsUpdator = result.getPrimaryAndMerge(TC.InDetMaterialEffectsUpdatorCfg(flags))
MaterialEffectsUpdators = [InDetMaterialEffectsUpdator]
kwargs.setdefault( "MaterialEffectsUpdators", MaterialEffectsUpdators )
material_updator= kwargs.get('MaterialEffectsUpdators')[0].name if kwargs.get('MaterialEffectsUpdators',None) is not None and len(kwargs.get('MaterialEffectsUpdators',None))>0 else None
def InDetExtrapolatorCfg(flags, name='InDetExtrapolator', **kwargs):
result = ComponentAccumulator()
if 'Navigator' not in kwargs :
AtlasNavigator = result.getPrimaryAndMerge( TC.AtlasNavigatorCfg(flags) )
kwargs.setdefault( "Navigator", AtlasNavigator)
# FIXME copied from the old config, also needs fixing on the c++ side.
if 'Propagators' not in kwargs:
InDetPropagator = result.getPrimaryAndMerge(
TC.InDetPropagatorCfg(flags))
Propagators = [InDetPropagator]
kwargs.setdefault("Propagators", Propagators)
propagator = kwargs.get('Propagators')[0].name if kwargs.get(
'Propagators', None) is not None and len(kwargs.get('Propagators', None)) > 0 else None
if 'MaterialEffectsUpdators' not in kwargs:
InDetMaterialEffectsUpdator = result.getPrimaryAndMerge(
TC.InDetMaterialEffectsUpdatorCfg(flags))
MaterialEffectsUpdators = [InDetMaterialEffectsUpdator]
kwargs.setdefault("MaterialEffectsUpdators", MaterialEffectsUpdators)
material_updator = kwargs.get('MaterialEffectsUpdators')[0].name if kwargs.get(
'MaterialEffectsUpdators', None) is not None and len(kwargs.get('MaterialEffectsUpdators', None)) > 0 else None
if 'Navigator' not in kwargs:
AtlasNavigator = result.getPrimaryAndMerge(TC.AtlasNavigatorCfg(flags))
kwargs.setdefault("Navigator", AtlasNavigator)
sub_propagators = []
sub_updators = []
sub_updators = []
# -------------------- set it depending on the geometry ----------------------------------------------------
# default for ID is (Rk,Mat)
sub_propagators += [ propagator ]
sub_updators += [ material_updator ]
sub_propagators += [propagator]
sub_updators += [material_updator]
# default for Calo is (Rk,MatLandau)
sub_propagators += [ propagator ]
sub_updators += [ material_updator ]
sub_propagators += [propagator]
sub_updators += [material_updator]
# default for MS is (STEP,Mat)
# sub_propagators += [ InDetStepPropagator.name() ]
sub_updators += [ material_updator ]
sub_updators += [material_updator]
# @TODO should check that all sub_propagators and sub_updators are actually defined.
kwargs.setdefault("SubPropagators" , sub_propagators)
kwargs.setdefault("SubMEUpdators" , sub_updators)
kwargs.setdefault("SubPropagators", sub_propagators)
kwargs.setdefault("SubMEUpdators", sub_updators)
extrapolator = CompFactory.Trk.Extrapolator(name, **kwargs)
result.addPublicTool(extrapolator, primary=True)
return result
if __name__ == "__main__":
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.ComponentAccumulator import printProperties
from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaCommon.Logging import logging
Configurable.configurableRun3Behavior = True
ConfigFlags.Input.Files = defaultTestFiles.RDO
ConfigFlags.fillFromArgs()
ConfigFlags.lock()
ConfigFlags.dump()
cfg = ComponentAccumulator()
mlog = logging.getLogger("AtlasExtrapolatorConfigTest")
mlog.info("Configuring AtlasExtrapolator : ")
printProperties(mlog, cfg.popToolsAndMerge(
AtlasExtrapolatorCfg(ConfigFlags)),
nestLevel=1,
printDefaults=True)
mlog.info("Configuring egammaCaloExtrapolator : ")
printProperties(mlog, cfg.popToolsAndMerge(
egammaCaloExtrapolatorCfg(ConfigFlags)),
nestLevel=1,
printDefaults=True)
mlog.info("Configuring MCTruthClassifierExtrapolator : ")
printProperties(mlog, cfg.popToolsAndMerge(
MCTruthClassifierExtrapolatorCfg(ConfigFlags)),
nestLevel=1,
printDefaults=True)
f = open("atlasextrapolator.pkl", "wb")
cfg.store(f)
f.close()
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