From d3d902fc899bc98d8cc3d9684a53fb7a7362728a Mon Sep 17 00:00:00 2001 From: christos <christos@cern.ch> Date: Tue, 5 Jan 2021 03:15:25 +0100 Subject: [PATCH] Disable TRTNN for PID for now , reprocessing. autopep8/flake8 aesthetic fixes --- .../python/EMBremCollectionBuilder.py | 4 +- .../python/EMGSFCaloExtensionBuilder.py | 5 +- .../python/EMGSFCaloExtensionBuilderConfig.py | 40 +++++++++------ .../python/egammaForwardBuilderConfig.py | 49 +++++++++++++------ .../egammaLargeClusterMakerAlgConfig.py | 31 +++++++----- .../egammaLargeFWDClusterMakerAlgConfig.py | 29 ++++++----- .../egammaAlgs/python/egammaRecBuilder.py | 4 +- .../python/egammaRecBuilderConfig.py | 21 +++++--- .../python/egammaSelectedTrackCopyConfig.py | 31 +++++++----- .../python/egammaSuperClusterBuilder.py | 2 +- .../python/egammaSuperClusterBuilderConfig.py | 34 +++++++++---- .../python/egammaTopoClusterCopier.py | 11 +++-- .../python/egammaTopoClusterCopierConfig.py | 21 +++++--- .../python/egammaTrackSlimmerConfig.py | 24 ++++++--- .../python/egammaTruthAssociationConfig.py | 41 +++++++++++----- .../python/topoEgammaBuilderConfig.py | 31 ++++++++---- 16 files changed, 249 insertions(+), 129 deletions(-) diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index 4732fd0e3628..50481a3372a0 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = """ToolFactory to instantiate egammaBremCollectionBuilder with default configuration""" @@ -73,7 +73,7 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder): GSFBuildTRT_ElectronPidTool = ( TrackingCommon.getInDetTRT_ElectronPidTool( name="GSFBuildTRT_ElectronPidTool", - CalculateNNPid=True, + CalculateNNPid=False, MinimumTrackPtForNNPid=0., private=True)) diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py index ec3efeba67d6..23359d40c498 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py @@ -1,6 +1,7 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate the EMGSFCaloExtensionBuilder with default configuration" +__doc__ = """ToolFactory to instantiate the + EMGSFCaloExtensionBuilder with default configuration""" __author__ = "Christos" from egammaAlgs import egammaAlgsConf diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py index ad5fae0a1be6..38b76725cecc 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py @@ -1,15 +1,19 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate the EMGSFCaloExtensionBuilder with default configuration" - -from AthenaCommon.Logging import logging -from AthenaConfiguration.ComponentFactory import CompFactory -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg -EMGSFCaloExtensionBuilder=CompFactory.EMGSFCaloExtensionBuilder +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory +from AthenaCommon.Logging import logging +__doc__ = """ Instantiate the EMGSFCaloExtensionBuilder +with default configuration """ + +EMGSFCaloExtensionBuilder = CompFactory.EMGSFCaloExtensionBuilder -def EMGSFCaloExtensionBuilderCfg(flags, name='EMGSFCaloExtensionBuilder', **kwargs): +def EMGSFCaloExtensionBuilderCfg( + flags, + name='EMGSFCaloExtensionBuilder', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') @@ -17,21 +21,25 @@ def EMGSFCaloExtensionBuilderCfg(flags, name='EMGSFCaloExtensionBuilder', **kwar acc = ComponentAccumulator() if "PerigeeCaloExtensionTool" not in kwargs: - perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags, - name="PerigeeCaloExtensionTool", - ParticleType="electron", - StartFromPerigee=True) + perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg( + flags, + name="PerigeeCaloExtensionTool", + ParticleType="electron", + StartFromPerigee=True) kwargs["PerigeeCaloExtensionTool"] = perigeeCaloExtrapAcc.popPrivateTools() acc.merge(perigeeCaloExtrapAcc) if "LastCaloExtensionTool" not in kwargs: - lastCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags, - name="LastCaloExtensionTool", - ParticleType="electron") + lastCaloExtrapAcc = ParticleCaloExtensionToolCfg( + flags, + name="LastCaloExtensionTool", + ParticleType="electron") kwargs["LastCaloExtensionTool"] = lastCaloExtrapAcc.popPrivateTools() acc.merge(lastCaloExtrapAcc) - kwargs.setdefault("GFFTrkPartContainerName", flags.Egamma.Keys.Output.GSFTrackParticles) + kwargs.setdefault( + "GFFTrkPartContainerName", + flags.Egamma.Keys.Output.GSFTrackParticles) emgscaloextfAlg = EMGSFCaloExtensionBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py index b8db76eb73b4..5ebb0a91a7be 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py @@ -1,14 +1,15 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +from ROOT import egammaPID +from ElectronPhotonSelectorTools.AsgForwardElectronIsEMSelectorsConfig import ( + AsgForwardElectronIsEMSelectorCfg) import cppyy from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from egammaTools.egammaOQFlagsBuilderConfig import egammaOQFlagsBuilderCfg -EMFourMomBuilder=CompFactory.EMFourMomBuilder -from ElectronPhotonSelectorTools.AsgForwardElectronIsEMSelectorsConfig import AsgForwardElectronIsEMSelectorCfg -egammaForwardBuilder=CompFactory.egammaForwardBuilder -from ROOT import egammaPID +EMFourMomBuilder = CompFactory.EMFourMomBuilder +egammaForwardBuilder = CompFactory.egammaForwardBuilder cppyy.load_library('libElectronPhotonSelectorToolsDict') @@ -21,14 +22,26 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs): acc = ComponentAccumulator() if "forwardelectronIsEMselectors" not in kwargs: - LooseFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "LooseForwardElectronSelector", egammaPID.ForwardElectronIDLoose) - MediumFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "MediumForwardElectronSelector", egammaPID.ForwardElectronIDMedium) - TightFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "TightForwardElectronSelector", egammaPID.ForwardElectronIDTight) + LooseFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg( + flags, + "LooseForwardElectronSelector", + egammaPID.ForwardElectronIDLoose) + MediumFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg( + flags, + "MediumForwardElectronSelector", + egammaPID.ForwardElectronIDMedium) + TightFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg( + flags, + "TightForwardElectronSelector", + egammaPID.ForwardElectronIDTight) - kwargs.setdefault("forwardelectronIsEMselectors", [LooseFwdElectronSelector.popPrivateTools(), - MediumFwdElectronSelector.popPrivateTools(), - TightFwdElectronSelector.popPrivateTools()]) - kwargs.setdefault("forwardelectronIsEMselectorResultNames", ["Loose", "Medium", "Tight"]) + kwargs.setdefault("forwardelectronIsEMselectors", + [LooseFwdElectronSelector.popPrivateTools(), + MediumFwdElectronSelector.popPrivateTools(), + TightFwdElectronSelector.popPrivateTools()]) + kwargs.setdefault( + "forwardelectronIsEMselectorResultNames", + ["Loose", "Medium", "Tight"]) acc.merge(LooseFwdElectronSelector) acc.merge(MediumFwdElectronSelector) @@ -39,10 +52,14 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs): kwargs["ObjectQualityTool"] = egOQ.popPrivateTools() acc.merge(egOQ) - kwargs.setdefault("ElectronOutputName", flags.Egamma.Keys.Output.ForwardElectrons) - kwargs.setdefault("TopoClusterName", flags.Egamma.Keys.Input.ForwardTopoClusters) - kwargs.setdefault("ClusterContainerName", flags.Egamma.Keys.Output.ForwardClusters) - kwargs.setdefault("FourMomBuilderTool", EMFourMomBuilder()) + kwargs.setdefault("ElectronOutputName", + flags.Egamma.Keys.Output.ForwardElectrons) + kwargs.setdefault("TopoClusterName", + flags.Egamma.Keys.Input.ForwardTopoClusters) + kwargs.setdefault("ClusterContainerName", + flags.Egamma.Keys.Output.ForwardClusters) + kwargs.setdefault("FourMomBuilderTool", + EMFourMomBuilder()) fwdAlg = egammaForwardBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py index 0436e5b6d8a8..4c16498a582d 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py @@ -1,31 +1,38 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Configure egammaLargeClusterMaker, which chooses cells to store in the AOD" +__doc__ = """ + Configure egammaLargeClusterMaker, + which chooses cells to store in the AOD""" __author__ = "Jovan Mitrevski" from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from egammaTools.egammaLargeClusterMakerConfig import egammaLargeClusterMakerCfg from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections -CaloClusterMaker=CompFactory.CaloClusterMaker +CaloClusterMaker = CompFactory.CaloClusterMaker -def egammaLargeClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs): + +def egammaLargeClusterMakerAlgCfg( + flags, + name="egammaLargeClusterMaker", + **kwargs): acc = ComponentAccumulator - + kwargs.setdefault("SaveUncalibratedSignalState", False) - kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeClusters) + kwargs.setdefault("ClustersOutputName", + flags.Egamma.Keys.Output.EgammaLargeClusters) if "ClusterMakerTools" not in kwargs: toolAcc = egammaLargeClusterMakerCfg(flags) - kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ] + kwargs["ClusterMakerTools"] = [toolAcc.popPrivateTools()] acc.merge(toolAcc) - kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("ele7_11", - suffix="Nocorr", - version="none", - cells_name=flags.Egamma.Keys.Input.CaloCells)) + kwargs.setdefault("ClusterCorrectionTools", + make_CaloSwCorrections("ele7_11", + suffix="Nocorr", + version="none", + cells_name=flags.Egamma.Keys.Input.CaloCells)) acc.addEventAlgo(CaloClusterMaker(name, **kwargs)) return acc - diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py index 5bfcfc53493f..054435602180 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py @@ -1,31 +1,36 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" +__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" __author__ = "Jovan Mitrevski" from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from egammaTools.egammaLargeFWDClusterMakerConfig import egammaLargeFWDClusterMakerCfg from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections -CaloClusterMaker=CompFactory.CaloClusterMaker +CaloClusterMaker = CompFactory.CaloClusterMaker -def egammaLargeFWDClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs): + +def egammaLargeFWDClusterMakerAlgCfg( + flags, + name="egammaLargeClusterMaker", + **kwargs): acc = ComponentAccumulator - + kwargs.setdefault("SaveUncalibratedSignalState", False) - kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeFWDClusters) + kwargs.setdefault("ClustersOutputName", + flags.Egamma.Keys.Output.EgammaLargeFWDClusters) if "ClusterMakerTools" not in kwargs: toolAcc = egammaLargeFWDClusterMakerCfg(flags) - kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ] + kwargs["ClusterMakerTools"] = [toolAcc.popPrivateTools()] acc.merge(toolAcc) - kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("FWDele6_6", - suffix="Nocorr", - version="none", - cells_name=flags.Egamma.Keys.Input.CaloCells)) + kwargs.setdefault("ClusterCorrectionTools", + make_CaloSwCorrections("FWDele6_6", + suffix="Nocorr", + version="none", + cells_name=flags.Egamma.Keys.Input.CaloCells)) acc.addEventAlgo(CaloClusterMaker(name, **kwargs)) return acc - diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py index f80be96ec0f9..fd9078a89935 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py @@ -1,6 +1,6 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = """ToolFactory to instantiate +__doc__ = """ToolFactory to instantiate egammaRecBuilder with default configuration""" __author__ = "Jovan Mitrevski" diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py index 71d40ce6798b..f7ab862c60c9 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py @@ -1,16 +1,21 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate egammaRecBuilder with default configuration" +__doc__ = """ + Instantiate egammaRecBuilder with default configuration + """ from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from egammaTools.EMTrackMatchBuilderConfig import EMTrackMatchBuilderCfg from egammaTools.EMConversionBuilderConfig import EMConversionBuilderCfg -egammaRecBuilder=CompFactory.egammaRecBuilder +egammaRecBuilder = CompFactory.egammaRecBuilder -def egammaRecBuilderCfg(flags, name='egammaRecBuilder', **kwargs): +def egammaRecBuilderCfg( + flags, + name='egammaRecBuilder', + **kwargs): mlog = logging.getLogger(name) mlog.debug('Start configuration') @@ -26,8 +31,12 @@ def egammaRecBuilderCfg(flags, name='egammaRecBuilder', **kwargs): kwargs["ConversionBuilderTool"] = emcnv.popPrivateTools() acc.merge(emcnv) - kwargs.setdefault("egammaRecContainer", flags.Egamma.Keys.Internal.EgammaRecs) - kwargs.setdefault("InputTopoClusterContainerName", flags.Egamma.Keys.Internal.EgammaTopoClusters) + kwargs.setdefault( + "egammaRecContainer", + flags.Egamma.Keys.Internal.EgammaRecs) + kwargs.setdefault( + "InputTopoClusterContainerName", + flags.Egamma.Keys.Internal.EgammaTopoClusters) egrecAlg = egammaRecBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py index ddffe1437793..a338ede05e85 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = "Instantiate egammaSelectedTrackCopy with default configuration" @@ -11,7 +11,10 @@ egammaCaloClusterSelector = CompFactory.egammaCaloClusterSelector egammaSelectedTrackCopy = CompFactory.egammaSelectedTrackCopy -def egammaSelectedTrackCopyCfg(flags, name='egammaSelectedTrackCopy', **kwargs): +def egammaSelectedTrackCopyCfg( + flags, + name='egammaSelectedTrackCopy', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') @@ -19,24 +22,28 @@ def egammaSelectedTrackCopyCfg(flags, name='egammaSelectedTrackCopy', **kwargs): acc = ComponentAccumulator() if "egammaCaloClusterSelector" not in kwargs: - egammaCaloClusterGSFSelector = egammaCaloClusterSelector(name='caloClusterGSFSelector', - EMEtCut=2250., - EMEtSplittingFraction = 0.7, - EMFCut=0.5 - ) + egammaCaloClusterGSFSelector = egammaCaloClusterSelector( + name='caloClusterGSFSelector', + EMEtCut=2250., + EMEtSplittingFraction=0.7, + EMFCut=0.5 + ) kwargs["egammaCaloClusterSelector"] = egammaCaloClusterGSFSelector - kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool()) + kwargs.setdefault("egammaCheckEnergyDepositTool", + egammaCheckEnergyDepositTool()) if "ExtrapolationTool" not in kwargs: extraptool = EMExtrapolationToolsCfg(flags) kwargs["ExtrapolationTool"] = extraptool.popPrivateTools() acc.merge(extraptool) - kwargs.setdefault("ClusterContainerName", - flags.Egamma.Keys.Internal.EgammaTopoClusters) - kwargs.setdefault("TrackParticleContainerName", - flags.Egamma.Keys.Input.TrackParticles) + kwargs.setdefault( + "ClusterContainerName", + flags.Egamma.Keys.Internal.EgammaTopoClusters) + kwargs.setdefault( + "TrackParticleContainerName", + flags.Egamma.Keys.Input.TrackParticles) egseltrkcpAlg = egammaSelectedTrackCopy(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py index 0de10c4dee17..dd260c0b99f1 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = """ToolFactory to instantiate the two supercluster builders with default configuration""" diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py index 0205a247ecdf..97b02ddf1677 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py @@ -1,6 +1,7 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate the two supercluster builders with default configuration" +__doc__ = """Instantiate the two supercluster +builders with default configuration""" from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -36,9 +37,15 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', ** kwargs["ClusterCorrectionTool"] = egswtool.popPrivateTools() acc.merge(egswtool) - kwargs.setdefault("InputEgammaRecContainerName", flags.Egamma.Keys.Internal.EgammaRecs) - kwargs.setdefault("SuperElectronRecCollectionName", flags.Egamma.Keys.Internal.ElectronSuperRecs) - kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool()) + kwargs.setdefault( + "InputEgammaRecContainerName", + flags.Egamma.Keys.Internal.EgammaRecs) + kwargs.setdefault( + "SuperElectronRecCollectionName", + flags.Egamma.Keys.Internal.ElectronSuperRecs) + kwargs.setdefault( + "egammaCheckEnergyDepositTool", + egammaCheckEnergyDepositTool()) kwargs.setdefault("EtThresholdCut", 1000) elscAlg = electronSuperClusterBuilder(name, **kwargs) @@ -47,7 +54,10 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', ** return acc -def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', **kwargs): +def photonSuperClusterBuilderCfg( + flags, + name='photonSuperClusterBuilder', + **kwargs): from egammaAlgs.egammaAlgsConf import photonSuperClusterBuilder @@ -71,9 +81,15 @@ def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', **kwar kwargs["ClusterCorrectionTool"] = egswtool.popPrivateTools() acc.merge(egswtool) - kwargs.setdefault("InputEgammaRecContainerName", flags.Egamma.Keys.Internal.EgammaRecs) - kwargs.setdefault("SuperPhotonRecCollectionName", flags.Egamma.Keys.Internal.PhotonSuperRecs) - kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool()) + kwargs.setdefault( + "InputEgammaRecContainerName", + flags.Egamma.Keys.Internal.EgammaRecs) + kwargs.setdefault( + "SuperPhotonRecCollectionName", + flags.Egamma.Keys.Internal.PhotonSuperRecs) + kwargs.setdefault( + "egammaCheckEnergyDepositTool", + egammaCheckEnergyDepositTool()) phscAlg = photonSuperClusterBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py index 3b314af0653a..5451f8b0c09e 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py @@ -1,7 +1,8 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = """ -ToolFactory to instantiate egammaTopoClusterCopier with default configuration""" + ToolFactory to instantiate egammaTopoClusterCopier + with default configuration""" __author__ = "Jovan Mitrevski" from egammaAlgs import egammaAlgsConf @@ -11,8 +12,10 @@ from egammaRec.egammaRecFlags import jobproperties egammaTopoClusterCopier = AlgFactory( egammaAlgsConf.egammaTopoClusterCopier, name='egammaTopoClusterCopier', - InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(), - OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), + InputTopoCollection=( + jobproperties.egammaRecFlags.inputTopoClusterCollection()), + OutputTopoCollection=( + jobproperties.egammaRecFlags.egammaTopoClusterCollection()), OutputTopoCollectionShallow="tmp_" + jobproperties.egammaRecFlags.egammaTopoClusterCollection() ) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py index 2424f0eeb344..a6e107739360 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py @@ -1,25 +1,34 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = "Instantiate egammaTopoClusterCopier with default configuration" from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaTopoClusterCopier=CompFactory.egammaTopoClusterCopier +egammaTopoClusterCopier = CompFactory.egammaTopoClusterCopier -def egammaTopoClusterCopierCfg(flags, name='egammaTopoClusterCopier', **kwargs): +def egammaTopoClusterCopierCfg( + flags, + name='egammaTopoClusterCopier', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') acc = ComponentAccumulator() - kwargs.setdefault("InputTopoCollection", flags.Egamma.Keys.Input.TopoClusters) + kwargs.setdefault( + "InputTopoCollection", + flags.Egamma.Keys.Input.TopoClusters) egtopocluster = flags.Egamma.Keys.Internal.EgammaTopoClusters - kwargs.setdefault("OutputTopoCollection", egtopocluster) - kwargs.setdefault("OutputTopoCollectionShallow", "tmp_"+egtopocluster) + kwargs.setdefault( + "OutputTopoCollection", + egtopocluster) + kwargs.setdefault( + "OutputTopoCollectionShallow", + "tmp_"+egtopocluster) egcopierAlg = egammaTopoClusterCopier(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py index a7f3ed03db4b..0c3192d5bb4b 100755 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py @@ -1,12 +1,15 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaTrackSlimmer=CompFactory.egammaTrackSlimmer +egammaTrackSlimmer = CompFactory.egammaTrackSlimmer -def egammaTrackSlimmerCfg(flags, name='egammaTrackSlimmer', **kwargs): +def egammaTrackSlimmerCfg( + flags, + name='egammaTrackSlimmer', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') @@ -14,11 +17,16 @@ def egammaTrackSlimmerCfg(flags, name='egammaTrackSlimmer', **kwargs): acc = ComponentAccumulator() kwargs.setdefault("StreamName", 'StreamAOD') - kwargs.setdefault("InputElectronContainerName", flags.Egamma.Keys.Output.Electrons) - kwargs.setdefault("InputPhotonContainerName", flags.Egamma.Keys.Output.Photons) - kwargs.setdefault("TrackParticleContainerName", flags.Egamma.Keys.Output.GSFTrackParticles) - kwargs.setdefault("VertexContainerName", flags.Egamma.Keys.Output.ConversionVertices) - kwargs.setdefault("InDetTrackParticleContainerName", flags.Egamma.Keys.Input.TrackParticles) + kwargs.setdefault("InputElectronContainerName", + flags.Egamma.Keys.Output.Electrons) + kwargs.setdefault("InputPhotonContainerName", + flags.Egamma.Keys.Output.Photons) + kwargs.setdefault("TrackParticleContainerName", + flags.Egamma.Keys.Output.GSFTrackParticles) + kwargs.setdefault("VertexContainerName", + flags.Egamma.Keys.Output.ConversionVertices) + kwargs.setdefault("InDetTrackParticleContainerName", + flags.Egamma.Keys.Input.TrackParticles) egtrkslimmerAlg = egammaTrackSlimmer(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py index effa519afea4..bf82b915619f 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py @@ -1,12 +1,12 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCaloTruthMatchCfg __doc__ = "Configure egammaTruthAssociation" from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaTruthAssociationAlg=CompFactory.egammaTruthAssociationAlg -from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCaloTruthMatchCfg +egammaTruthAssociationAlg = CompFactory.egammaTruthAssociationAlg def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs): @@ -21,15 +21,32 @@ def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs): kwargs["MCTruthClassifier"] = mctruth.popPrivateTools() acc.merge(mctruth) - kwargs.setdefault("ClusterContainerName", flags.Egamma.Keys.Output.CaloClusters) - kwargs.setdefault("ElectronContainerName", flags.Egamma.Keys.Output.Electrons) - kwargs.setdefault("PhotonContainerName", flags.Egamma.Keys.Output.Photons) - kwargs.setdefault("FwdElectronContainerName", flags.Egamma.Keys.Output.ForwardElectrons) - kwargs.setdefault("TruthEventContainerName", flags.Egamma.Keys.Input.TruthEvents) - kwargs.setdefault("TruthParticleContainerName", flags.Egamma.Keys.Input.TruthParticles) - kwargs.setdefault("EgammaTruthContainerName", flags.Egamma.Keys.Output.TruthParticles) - kwargs.setdefault("MatchForwardElectrons", flags.Egamma.doForwardSeeded) - kwargs.setdefault("SimBarcodeOffset", flags.Sim.SimBarcodeOffset) + kwargs.setdefault( + "ClusterContainerName", + flags.Egamma.Keys.Output.CaloClusters) + kwargs.setdefault( + "ElectronContainerName", + flags.Egamma.Keys.Output.Electrons) + kwargs.setdefault( + "PhotonContainerName", + flags.Egamma.Keys.Output.Photons) + kwargs.setdefault( + "FwdElectronContainerName", + flags.Egamma.Keys.Output.ForwardElectrons) + kwargs.setdefault( + "TruthEventContainerName", + flags.Egamma.Keys.Input.TruthEvents) + kwargs.setdefault( + "TruthParticleContainerName", + flags.Egamma.Keys.Input.TruthParticles) + kwargs.setdefault( + "EgammaTruthContainerName", + flags.Egamma.Keys.Output.TruthParticles) + kwargs.setdefault( + "MatchForwardElectrons", + flags.Egamma.doForwardSeeded) + kwargs.setdefault("SimBarcodeOffset", + flags.Sim.SimBarcodeOffset) egtruthAlg = egammaTruthAssociationAlg(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py index 9d6f6725e5e6..33b14a49f348 100644 --- a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py @@ -1,12 +1,15 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate the two supercluster builders with default configuration" +__doc__ = """ + Instantiate the two supercluster + builders with default configuration + """ from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -topoEgammaBuilder=CompFactory.topoEgammaBuilder -EGammaAmbiguityTool=CompFactory.EGammaAmbiguityTool +topoEgammaBuilder = CompFactory.topoEgammaBuilder +EGammaAmbiguityTool = CompFactory.EGammaAmbiguityTool def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs): @@ -16,11 +19,21 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs): acc = ComponentAccumulator() - kwargs.setdefault("SuperElectronRecCollectionName", flags.Egamma.Keys.Internal.ElectronSuperRecs) - kwargs.setdefault("SuperPhotonRecCollectionName", flags.Egamma.Keys.Internal.PhotonSuperRecs) - kwargs.setdefault("ElectronOutputName", flags.Egamma.Keys.Output.Electrons) - kwargs.setdefault("PhotonOutputName", flags.Egamma.Keys.Output.Photons) - kwargs.setdefault("AmbiguityTool", EGammaAmbiguityTool()) + kwargs.setdefault( + "SuperElectronRecCollectionName", + flags.Egamma.Keys.Internal.ElectronSuperRecs) + kwargs.setdefault( + "SuperPhotonRecCollectionName", + flags.Egamma.Keys.Internal.PhotonSuperRecs) + kwargs.setdefault( + "ElectronOutputName", + flags.Egamma.Keys.Output.Electrons) + kwargs.setdefault( + "PhotonOutputName", + flags.Egamma.Keys.Output.Photons) + kwargs.setdefault( + "AmbiguityTool", + EGammaAmbiguityTool()) topoegAlg = topoEgammaBuilder(flags, **kwargs) -- GitLab