diff --git a/InnerDetector/InDetExample/InDetRecExample/python/InDetKeys.py b/InnerDetector/InDetExample/InDetRecExample/python/InDetKeys.py index 010f426d1d3dbce9ca0541ef483aef945b38979c..a5213db0c8951144aabb1b126fc7e8495ccb591d 100644 --- a/InnerDetector/InDetExample/InDetRecExample/python/InDetKeys.py +++ b/InnerDetector/InDetExample/InDetRecExample/python/InDetKeys.py @@ -868,7 +868,7 @@ class CaloClusterContainer(JobProperty): """Brem Reco: Container of EM clusters""" statusOn = True allowedTypes = ['str'] - StoredValue = 'egammaTopoCluster' + StoredValue = 'egammaTopoClusters' class CaloCellContainer(JobProperty): """Brem Reco: Container of calo cell""" diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedEgammaTopoClusterCopier.py b/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedEgammaTopoClusterCopier.py deleted file mode 100644 index 31e39587463288118ba633f74ebfe5d3f098f556..0000000000000000000000000000000000000000 --- a/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedEgammaTopoClusterCopier.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -__doc__ = """ -ToolFactory to instantiate egammaTopoClusterCopier with default configuration""" -__author__ = "Jovan Mitrevski" - -from egammaAlgs import egammaAlgsConf -from egammaRec.Factories import AlgFactory -from egammaRec.egammaRecFlags import jobproperties - -SubtractedEgammaTopoClusterCopier = AlgFactory( - egammaAlgsConf.egammaTopoClusterCopier, - name='SubtractedEgammaTopoClusterCopier', - InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(), - OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), - OutputTopoCollectionShallow="tmp_" + - jobproperties.egammaRecFlags.egammaTopoClusterCollection() -) diff --git a/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py b/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py index dad87051dc686c1f0646304e42097505a5b281b5..c908211f1f786e88b6b454ee141a50106f6ce847 100644 --- a/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py +++ b/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py @@ -23,12 +23,6 @@ jobproperties.CaloRecFlags.clusterCellGetterName='HIJetRec.SubtractedCellGetter. rec.doEgamma = True -from egammaRec.egammaRecFlags import jobproperties -jobproperties.egammaRecFlags.inputTopoClusterCollection='SubtractedCaloTopoCluster' -jobproperties.egammaRecFlags.egammaTopoClusterCollection='SubtractedEgammaTopoCluster' -jobproperties.egammaRecFlags.cellContainerName='SubtractedCells' - - from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() @@ -70,14 +64,12 @@ if DetFlags.haveRIO.Calo_on() : treatException("Problem with EMTopoCluster. Switched off") jobproperties.CaloRecFlags.doCaloEMTopoCluster=False - #EgammaTopoCluster - try: - from HIJetRec.SubtractedEgammaTopoClusterCopier import SubtractedEgammaTopoClusterCopier - SubtractedEgammaTopoClusterCopier() - except Exception: - treatException("Problem with egammaTopoClusterCopier in HIJetRec") - + from AthenaConfiguration.ComponentAccumulator import CAtoGlobalWrapper + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg + CAtoGlobalWrapper(egammaTopoClusterCopierCfg,ConfigFlags, + name='SubtractedEgammaTopoClusterCopier') #Run CaloExtension if (rec.doESD()) and (rec.doEgamma()) : diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index 1221138087bdff2d4372fa9d446aba3291e8a2b8..afe3fe4d3a51dbbed771aec304af5c8484a9fad5 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -448,11 +448,7 @@ if recAlgs.doEFlow(): ConfigFlags.PF.useElPhotLinks = False ConfigFlags.PF.useMuLinks = False -if rec.doEgamma(): - # C.A uses Clusters RecExCommom Cluster (rm the "s") - ConfigFlags.Egamma.Keys.Internal.EgammaTopoClusters = 'egammaTopoCluster' - ConfigFlags.Egamma.Keys.Input.TopoClusters = 'CaloTopoClusters' - +HIDict = {} if rec.doHeavyIon(): # This is copy from the old style to the new # We need to have HI flags to do it nicer @@ -461,6 +457,13 @@ if rec.doHeavyIon(): ConfigFlags.Egamma.Keys.Input.CaloCells = 'SubtractedCells' ConfigFlags.Egamma.doCentral = True ConfigFlags.Egamma.doForward = False + # This is a trick : in HeavyIon, egammaTopoClusterCopier is run two times + # one on the unsubtracted clusters (in SystemRec_config.py), + # the other on subtracted clusters (in HIegamma_jobO). + # Why is the first followed by InDetCaloClusterROISelector needed in Heavy Ion reco ? + HIDict['InputTopoCollection'] = 'CaloTopoClusters' + HIDict['OutputTopoCollection'] = 'egammaTopoClusters' + HIDict['OutputTopoCollectionShallow'] = 'tmp_egammaTopoClusters' # Lock the flags logRecExCommon_topOptions.info("Locking ConfigFlags") diff --git a/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py b/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py index 0e24aac02f907f36c80ac2a59003d8e8655e0e3d..a5ab1979d7e9182ab8692d1d7d2646b49a7da3fb 100755 --- a/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py +++ b/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py @@ -25,7 +25,7 @@ AODFix_postCaloRec() if jobproperties.CaloRecFlags.doCaloTopoCluster(): from AthenaConfiguration.AllConfigFlags import ConfigFlags from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg - CAtoGlobalWrapper(egammaTopoClusterCopierCfg,ConfigFlags) + CAtoGlobalWrapper(egammaTopoClusterCopierCfg,ConfigFlags,**HIDict) #then run ID reco: