diff --git a/Calorimeter/CaloCalibHitRec/python/CaloCalibHitDecoratorCfg.py b/Calorimeter/CaloCalibHitRec/python/CaloCalibHitDecoratorCfg.py index c7571e1819e1cd83396f36f8871656ba68a6f5c6..8974758b108c0a150bd9e75130086517406f8bfc 100644 --- a/Calorimeter/CaloCalibHitRec/python/CaloCalibHitDecoratorCfg.py +++ b/Calorimeter/CaloCalibHitRec/python/CaloCalibHitDecoratorCfg.py @@ -1,20 +1,16 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory def CaloCalibHitDecoratorCfg(): result=ComponentAccumulator() - from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterTruthMapMakerAlgorithm - CaloCalibClusterTruthMapMakerAlgorithm = CaloCalibClusterTruthMapMakerAlgorithm() - result.addEventAlgo(CaloCalibClusterTruthMapMakerAlgorithm) + result.addEventAlgo(CompFactory.CaloCalibClusterTruthMapMakerAlgorithm()) - from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterDecoratorAlgorithm - CaloCalibClusterDecoratorAlgorithm = CaloCalibClusterDecoratorAlgorithm() + CaloCalibClusterDecoratorAlgorithm = CompFactory.CaloCalibClusterDecoratorAlgorithm() - from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterTruthAttributerTool as CalibClusterTruthAttributerTool - CaloCalibClusterTruthAttributerTool = CalibClusterTruthAttributerTool() - CaloCalibClusterDecoratorAlgorithm.TruthAttributerTool = CaloCalibClusterTruthAttributerTool + CaloCalibClusterDecoratorAlgorithm.TruthAttributerTool = CompFactory.CaloCalibClusterTruthAttributerTool() result.addEventAlgo(CaloCalibClusterDecoratorAlgorithm) return result \ No newline at end of file diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterTruthAttributerTool.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterTruthAttributerTool.cxx index 72caca62f7b23f48100f06cc0c8ec4dc350a0b0d..eeba8d4c287e53d1a0f9bf4b95d00178a26f94b7 100644 --- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterTruthAttributerTool.cxx +++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterTruthAttributerTool.cxx @@ -11,17 +11,19 @@ CaloCalibClusterTruthAttributerTool::~CaloCalibClusterTruthAttributerTool(){} StatusCode CaloCalibClusterTruthAttributerTool::calculateTruthEnergies(const xAOD::CaloCluster& theCaloCluster, unsigned int numTruthParticles, const std::map<Identifier,std::vector<const CaloCalibrationHit*> >& identifierToCaloHitMap, const std::map<unsigned int,const xAOD::TruthParticle*>& truthBarcodeToTruthParticleMap, std::vector<std::pair<unsigned int, double > >& barcodeTrueCalHitEnergy) const{ + ATH_MSG_DEBUG("In calculateTruthEnergies"); + const CaloClusterCellLink* theCellLinks = theCaloCluster.getCellLinks(); if (!theCellLinks) { ATH_MSG_ERROR("A CaloCluster has no CaloClusterCellLinks"); return StatusCode::FAILURE; - } - + } + //loop once over the cells to find the barcodes and pt of truth particles in this cluster std::map<unsigned int, double> barcodeTruePtMap; - for (auto thisCaloCell : *theCellLinks){ + for (auto thisCaloCell : *theCellLinks){ if (!thisCaloCell){ ATH_MSG_WARNING("Have invalid pointer to CaloCell"); @@ -47,6 +49,8 @@ StatusCode CaloCalibClusterTruthAttributerTool::calculateTruthEnergies(const xAO }//first loop on calorimeter cells to find leading three truth particles with calibration hits + ATH_MSG_DEBUG("Have finished first cell loop"); + std::vector<std::pair<unsigned int, double > > barcodeTruePtPairs; for (const auto& thisEntry : barcodeTruePtMap) barcodeTruePtPairs.emplace_back(thisEntry); diff --git a/Reconstruction/PFlow/PFlowTests/test/test_pflowReco_decorateCalHits_fromESD.sh b/Reconstruction/PFlow/PFlowTests/test/test_pflowReco_decorateCalHits_fromESD.sh new file mode 100755 index 0000000000000000000000000000000000000000..7282ec2d71d5063528eafaec3786916ca1f31d86 --- /dev/null +++ b/Reconstruction/PFlow/PFlowTests/test/test_pflowReco_decorateCalHits_fromESD.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# +# art-description: Athena runs pflow calibration hit decoration reconstruction, after pflow and +# topocluster reco +# art-type: grid +# art-include: master/Athena +# art-athena-mt: 8 +# art-output: AOD.pool.root +# art-output: log_FE_validation.txt + +export ATHENA_CORE_NUMBER=8 # set number of cores used in multithread to 8. + +python $Athena_DIR/python/PFlowUtils/PFRunCalibHitDecorator_PFlowReco_ESDtoAOD_mc20e.py +rc1=$? + +echo "art-result: ${rc1}" diff --git a/Reconstruction/PFlow/PFlowTests/test/test_pflow_EOverP_fromESD_noLinking.sh b/Reconstruction/PFlow/PFlowTests/test/test_pflow_EOverP_fromESD_noLinking.sh index acfb474c3191865f4c8854fdc243e4326e13f171..9a756bb4b24853a0ded4ea6bbdde662e660f3d6a 100755 --- a/Reconstruction/PFlow/PFlowTests/test/test_pflow_EOverP_fromESD_noLinking.sh +++ b/Reconstruction/PFlow/PFlowTests/test/test_pflow_EOverP_fromESD_noLinking.sh @@ -9,7 +9,7 @@ export ATHENA_CORE_NUMBER=8 # set number of cores used in multithread to 8. -athena.py --threads=8 eflowRec/run_ESDPFlowRecoR22_EOverP.py +python $Athena_DIR/python/eflowRec/PFRunESDtoAOD_mc20e_eOverP.py rc1=$? echo "art-result: ${rc1}" diff --git a/Reconstruction/PFlow/PFlowTests/test/test_pflow_decorateCalHits_fromESD.sh b/Reconstruction/PFlow/PFlowTests/test/test_pflow_decorateCalHits_fromESD.sh index c3fb34cd62b88fc3dca1ff7ce47845710bec3b60..732809fa2a967fbe86e3dcac133b0ce7b98b490a 100755 --- a/Reconstruction/PFlow/PFlowTests/test/test_pflow_decorateCalHits_fromESD.sh +++ b/Reconstruction/PFlow/PFlowTests/test/test_pflow_decorateCalHits_fromESD.sh @@ -9,7 +9,7 @@ export ATHENA_CORE_NUMBER=8 # set number of cores used in multithread to 8. -athena.py --threads=8 PFlowUtils/PFlowCalibHitDecorator_jobOptions.py +python $Athena_DIR/python/PFlowUtils/PFRunCalibHitDecorator_ESDtoAOD_mc20e.py rc1=$? echo "art-result: ${rc1}" diff --git a/Reconstruction/PFlow/PFlowTests/test/test_pflow_fromESD_withLinking.sh b/Reconstruction/PFlow/PFlowTests/test/test_pflow_fromESD_withLinking.sh index 0f8ec9a9758994111e7f4c29d3a31c5733660587..532fe2b66ba62ba322394ba316d9f15e95af027e 100755 --- a/Reconstruction/PFlow/PFlowTests/test/test_pflow_fromESD_withLinking.sh +++ b/Reconstruction/PFlow/PFlowTests/test/test_pflow_fromESD_withLinking.sh @@ -9,7 +9,7 @@ export ATHENA_CORE_NUMBER=8 # set number of cores used in multithread to 8. -athena.py --threads=8 eflowRec/run_ESDPFlowRecoR22_withLinking.py +python $Athena_DIR/python/eflowRec/PFRunESDtoAOD_mc20e.py rc1=$? echo "art-result: ${rc1}" diff --git a/Reconstruction/PFlow/PFlowUtils/python/PFRunCalibHitDecorator_ESDtoAOD_mc20e.py b/Reconstruction/PFlow/PFlowUtils/python/PFRunCalibHitDecorator_ESDtoAOD_mc20e.py new file mode 100644 index 0000000000000000000000000000000000000000..429f4bb5bcf4ee68b005ea9e16a3f8ca891122b7 --- /dev/null +++ b/Reconstruction/PFlow/PFlowUtils/python/PFRunCalibHitDecorator_ESDtoAOD_mc20e.py @@ -0,0 +1,37 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +if __name__=="__main__": + + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior = True + + from AthenaConfiguration.AllConfigFlags import ConfigFlags as cfgFlags + + cfgFlags.Concurrency.NumThreads=8 + cfgFlags.Exec.MaxEvents=100 + cfgFlags.Input.isMC=True + cfgFlags.Input.Files= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PFlowTests/mc16_13TeV/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.ESD.e6337_e5984_s3170_r12674/ESD.25732025._000034.pool.root.1"] + cfgFlags.Output.AODFileName="output_AOD.root" + cfgFlags.Output.doWriteAOD=True + cfgFlags.lock() + + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + cfg=MainServicesCfg(cfgFlags) + + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + cfg.merge(PoolReadCfg(cfgFlags)) + + from AtlasGeoModel.GeoModelConfig import GeoModelCfg + cfg.merge(GeoModelCfg(cfgFlags)) + + from LArGeoAlgsNV.LArGMConfig import LArGMCfg + cfg.merge(LArGMCfg(cfgFlags)) + + from TileGeoModel.TileGMConfig import TileGMCfg + cfg.merge(TileGMCfg(cfgFlags)) + + from PFlowUtils.PFlowCalibHitDecoratorCfg import PFlowCalibHitDecoratorCfg + cfg.merge(PFlowCalibHitDecoratorCfg()) + cfg.getEventAlgo("PFlowCalibPFODecoratorAlgorithm").PFOWriteDecorHandleKey_NLeadingTruthParticles="JetETMissNeutralFlowElements.calpfo_NLeadingTruthParticleBarcodeEnergyPairs" + + cfg.run() diff --git a/Reconstruction/PFlow/PFlowUtils/python/PFRunCalibHitDecorator_PFlowReco_ESDtoAOD_mc20e.py b/Reconstruction/PFlow/PFlowUtils/python/PFRunCalibHitDecorator_PFlowReco_ESDtoAOD_mc20e.py new file mode 100644 index 0000000000000000000000000000000000000000..441875acdb7ecd779c5ec9491e88ecb5082bec64 --- /dev/null +++ b/Reconstruction/PFlow/PFlowUtils/python/PFRunCalibHitDecorator_PFlowReco_ESDtoAOD_mc20e.py @@ -0,0 +1,38 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +if __name__=="__main__": + + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior = True + + from AthenaConfiguration.AllConfigFlags import ConfigFlags as cfgFlags + + cfgFlags.Concurrency.NumThreads=8 + cfgFlags.Exec.MaxEvents=100 + cfgFlags.Input.isMC=True + cfgFlags.Input.Files= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PFlowTests/mc16_13TeV/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.ESD.e6337_e5984_s3170_r12674/ESD.25732025._000034.pool.root.1"] + cfgFlags.Output.AODFileName="output_AOD.root" + cfgFlags.Output.doWriteAOD=True + #This flag enables CaloCalTopoCluster to be created, in addition to CaloTopoCluster + cfgFlags.Calo.TopoCluster.doTopoClusterLocalCalib=True + cfgFlags.lock() + + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + cfg=MainServicesCfg(cfgFlags) + + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + cfg.merge(PoolReadCfg(cfgFlags)) + + from eflowRec.PFRun3Config import PFFullCfg + cfg.merge(PFFullCfg(cfgFlags)) + + from eflowRec.PFRun3Remaps import ListRemaps + + list_remaps=ListRemaps() + for mapping in list_remaps: + cfg.merge(mapping) + + from PFlowUtils.PFlowCalibHitDecoratorCfg import PFlowCalibHitDecoratorCfg + cfg.merge(PFlowCalibHitDecoratorCfg()) + + cfg.run() diff --git a/Reconstruction/PFlow/PFlowUtils/python/PFlowCalibHitDecoratorCfg.py b/Reconstruction/PFlow/PFlowUtils/python/PFlowCalibHitDecoratorCfg.py index 37d143d7774b9add46e32359fd2779843713b865..049c8b399f523f1b41d8e75d571e6b666260e1af 100644 --- a/Reconstruction/PFlow/PFlowUtils/python/PFlowCalibHitDecoratorCfg.py +++ b/Reconstruction/PFlow/PFlowUtils/python/PFlowCalibHitDecoratorCfg.py @@ -1,6 +1,7 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory def PFlowCalibHitDecoratorCfg(): result=ComponentAccumulator() @@ -8,11 +9,8 @@ def PFlowCalibHitDecoratorCfg(): from CaloCalibHitRec.CaloCalibHitDecoratorCfg import CaloCalibHitDecoratorCfg result.merge(CaloCalibHitDecoratorCfg()) - from PFlowUtils.PFlowUtilsConf import PFlowCalibPFODecoratorAlgorithm - PFlowCalibPFODecoratorAlgorithm = PFlowCalibPFODecoratorAlgorithm() - from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterTruthAttributerTool as PFlowClusterTruthAttributerTool - PFlowCalibPFOTruthAttributerTool = PFlowClusterTruthAttributerTool("PFlowCalibPFOTruthAttributerTool") - PFlowCalibPFODecoratorAlgorithm.TruthAttributerTool = PFlowCalibPFOTruthAttributerTool + PFlowCalibPFODecoratorAlgorithm = CompFactory.PFlowCalibPFODecoratorAlgorithm() + PFlowCalibPFODecoratorAlgorithm.TruthAttributerTool = CompFactory.CaloCalibClusterTruthAttributerTool("PFlowCalibPFOTruthAttributerTool") result.addEventAlgo(PFlowCalibPFODecoratorAlgorithm) return result diff --git a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py index 63c1842303c658aea3fec810f7ae58d8d49ac004..1af6155cd537749177600139c584f4b25d803268 100755 --- a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py +++ b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py @@ -185,7 +185,7 @@ pdr.flag_domain('eflow') from eflowRec.eflowRecFlags import jobproperties if recAlgs.doEFlow() and jobproperties.eflowRecFlags.usePFFlowElementAssoc: try: - from eflowRec.PFRun3Config import PFTauFlowElementLinkingCfg + from eflowRec.PFCfg import PFTauFlowElementLinkingCfg CAtoGlobalWrapper(PFTauFlowElementLinkingCfg,ConfigFlags) except Exception: treatException("Could not set up tau-FE links") diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_calotopoclustering_pflow_and_jets_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_calotopoclustering_pflow_and_jets_fromesd.sh deleted file mode 100755 index b65b4204a0d0b7ef417772c76cc26098cc5d8764..0000000000000000000000000000000000000000 --- a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_calotopoclustering_pflow_and_jets_fromesd.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# art-description: Athena runs topoclustering, particle flow and particle flow jet reconstruction from an ESD file -# art-type: grid -# art-include: master/Athena -# art-athena-mt: 8 -# art-output: *.log - -export ATHENA_CORE_NUMBER=8 - -athena --threads=8 eflowRec/run_ESDPFlowRecoR22_withLinking.py | tee athenaEightThreads.log -echo "art-result: ${PIPESTATUS[0]}" -test_postProcessing_Errors.sh athenaEightThreads.log | tee errorsEightThreads.log diff --git a/Reconstruction/eflowRec/python/PFCfg.py b/Reconstruction/eflowRec/python/PFCfg.py index 8e42e912991c4833f018aa283fed385661c42b1c..d71c8b2ce0054affeb6ee31a9f111934c642a69a 100644 --- a/Reconstruction/eflowRec/python/PFCfg.py +++ b/Reconstruction/eflowRec/python/PFCfg.py @@ -183,7 +183,7 @@ def getNeutralFlowElementCreatorAlgorithm(inputFlags,neutralFlowElementOutputNam if neutralFlowElementOutputName: FlowElementNeutralCreatorAlgorithm.FlowElementOutputName=neutralFlowElementOutputName if(inputFlags.PF.EOverPMode): - FlowElementNeutralCreatorAlgorithm.FlowElementOutputName="EOverPNeutralParticleFlowObjects" + FlowElementNeutralCreatorAlgorithm.FEOutputName="EOverPNeutralParticleFlowObjects" if(inputFlags.PF.useCalibHitTruthClusterMoments and inputFlags.PF.addClusterMoments): FlowElementNeutralCreatorAlgorithm.useCalibHitTruth=True @@ -195,7 +195,7 @@ def getLCNeutralFlowElementCreatorAlgorithm(inputFlags,neutralFlowElementOutputN if neutralFlowElementOutputName: LCFlowElementNeutralCreatorAlgorithm.FELCOutputName==neutralFlowElementOutputName if(inputFlags.PF.EOverPMode): - LCFlowElementNeutralCreatorAlgorithm.EInputContainerName="EOverPNeutralParticleFlowObjects" + LCFlowElementNeutralCreatorAlgorithm.FEInputContainerName="EOverPNeutralParticleFlowObjects" LCFlowElementNeutralCreatorAlgorithm.FELCOutputName="EOverPLCNeutralParticleFlowObjects" return LCFlowElementNeutralCreatorAlgorithm @@ -397,5 +397,42 @@ def getTauFlowElementAssocAlgorithm(inputFlags,neutral_FE_cont_name="",charged_F return PFTauFlowElementLinkerAlgorithm +def getOfflinePFAlgorithm(inputFlags): + result=ComponentAccumulator() + + PFAlgorithm=CompFactory.PFAlgorithm + PFAlgorithm = PFAlgorithm("PFAlgorithm") + + topoClustersName="CaloTopoClusters" + + PFAlgorithm.PFClusterSelectorTool = getPFClusterSelectorTool(topoClustersName,"CaloCalTopoClusters","PFClusterSelectorTool") + + PFAlgorithm.SubtractionToolList = [getPFCellLevelSubtractionTool(inputFlags,"PFCellLevelSubtractionTool")] + + if(False is inputFlags.PF.EOverPMode): + PFAlgorithm.SubtractionToolList += [getPFRecoverSplitShowersTool(inputFlags,"PFRecoverSplitShowersTool")] + + PFMomentCalculatorTools=result.popToolsAndMerge(getPFMomentCalculatorTool(inputFlags,[])) + PFAlgorithm.BaseToolList = [PFMomentCalculatorTools] + PFAlgorithm.BaseToolList += [getPFLCCalibTool(inputFlags)] + result.addEventAlgo(PFAlgorithm) + return result + +def PFTauFlowElementLinkingCfg(inputFlags,neutral_FE_cont_name="",charged_FE_cont_name="",AODTest=False): + result=ComponentAccumulator() + + result.addEventAlgo(getTauFlowElementAssocAlgorithm(inputFlags,neutral_FE_cont_name,charged_FE_cont_name,AODTest)) + + # the following is needed to reliably determine whether we're really being steered from an old-style job option + # assume we're running CPython + #Snippet provided by Carlo Varni + import inspect + stack = inspect.stack() + if len(stack) >= 2 and stack[1].function == 'CAtoGlobalWrapper': + for el in result._allSequences: + el.name = "TopAlg" + + return result + diff --git a/Reconstruction/eflowRec/python/PFRun3Config.py b/Reconstruction/eflowRec/python/PFRun3Config.py index 2f19b5a9d683f04186feb694e58662bbe37610e5..4f72c3e2466c0ef129a831795e0af528446de30b 100644 --- a/Reconstruction/eflowRec/python/PFRun3Config.py +++ b/Reconstruction/eflowRec/python/PFRun3Config.py @@ -2,50 +2,6 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -def getOfflinePFAlgorithm(inputFlags): - result=ComponentAccumulator() - - PFAlgorithm=CompFactory.PFAlgorithm - PFAlgorithm = PFAlgorithm("PFAlgorithm") - - from eflowRec.PFCfg import getPFClusterSelectorTool - - topoClustersName="CaloTopoClusters" - - PFAlgorithm.PFClusterSelectorTool = getPFClusterSelectorTool(topoClustersName,"CaloCalTopoClusters","PFClusterSelectorTool") - - from eflowRec.PFCfg import getPFCellLevelSubtractionTool - PFAlgorithm.SubtractionToolList = [getPFCellLevelSubtractionTool(inputFlags,"PFCellLevelSubtractionTool")] - - if(False is inputFlags.PF.EOverPMode): - from eflowRec.PFCfg import getPFRecoverSplitShowersTool - PFAlgorithm.SubtractionToolList += [getPFRecoverSplitShowersTool(inputFlags,"PFRecoverSplitShowersTool")] - - from eflowRec.PFCfg import getPFMomentCalculatorTool - PFMomentCalculatorTools=result.popToolsAndMerge(getPFMomentCalculatorTool(inputFlags,[])) - PFAlgorithm.BaseToolList = [PFMomentCalculatorTools] - from eflowRec.PFCfg import getPFLCCalibTool - PFAlgorithm.BaseToolList += [getPFLCCalibTool(inputFlags)] - result.addEventAlgo(PFAlgorithm) - return result - -def PFTauFlowElementLinkingCfg(inputFlags,neutral_FE_cont_name="",charged_FE_cont_name="",AODTest=False): - result=ComponentAccumulator() - - from eflowRec.PFCfg import getTauFlowElementAssocAlgorithm - result.addEventAlgo(getTauFlowElementAssocAlgorithm(inputFlags,neutral_FE_cont_name,charged_FE_cont_name,AODTest)) - - # the following is needed to reliably determine whether we're really being steered from an old-style job option - # assume we're running CPython - #Snippet provided by Carlo Varni - import inspect - stack = inspect.stack() - if len(stack) >= 2 and stack[1].function == 'CAtoGlobalWrapper': - for el in result._allSequences: - el.name = "TopAlg" - - return result - #This configures pflow + everything it needs def PFFullCfg(inputFlags,**kwargs): @@ -66,10 +22,6 @@ def PFFullCfg(inputFlags,**kwargs): from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg result.merge(CaloTopoClusterCfg(inputFlags)) - - #from CaloRec.CaloTopoClusterConfig import caloTopoCoolFolderCfg - #result.merge(caloTopoCoolFolderCfg(inputFlags)) - from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg result.merge(CaloNoiseCondAlgCfg(inputFlags,"totalNoise")) result.merge(CaloNoiseCondAlgCfg(inputFlags,"electronicNoise")) @@ -92,7 +44,7 @@ def PFFullCfg(inputFlags,**kwargs): result.merge(addToESD(inputFlags, toESDAndAOD)) result.merge(addToAOD(inputFlags, toESDAndAOD)) - result.merge(PFCfg(cfgFlags)) + result.merge(PFCfg(inputFlags)) return result #Configures only the pflow algorithms and tools - to be used from RecExCommon to avoid @@ -115,6 +67,7 @@ def PFCfg(inputFlags,**kwargs): useCaching = False result.merge(PFTrackSelectorAlgCfg(inputFlags,"PFTrackSelector",useCaching)) + from eflowRec.PFCfg import getOfflinePFAlgorithm result.merge(getOfflinePFAlgorithm(inputFlags)) # old PFO algorithm, keep gated behind a joboption but expect this is deprecated. @@ -128,17 +81,19 @@ def PFCfg(inputFlags,**kwargs): result.addEventAlgo(getNeutralFlowElementCreatorAlgorithm(inputFlags,"")) result.addEventAlgo(getLCNeutralFlowElementCreatorAlgorithm(inputFlags,"")) - #Currently we do not have egamma reco in the run 3 config and hence there are no electrons/photons if not running from ESD or AOD - #So in new config only schedule from ESD/AOD, in old config always schedule it if requested - if (inputFlags.PF.useElPhotLinks and (inputFlags.Input.Format == "POOL" or inputFlags.PF.useRecExCommon)): - from eflowRec.PFCfg import getEGamFlowElementAssocAlgorithm - result.addEventAlgo(getEGamFlowElementAssocAlgorithm(inputFlags)) + #Only do linking if not in eoverp mode + if (not inputFlags.PF.EOverPMode): + #Currently we do not have egamma reco in the run 3 config and hence there are no electrons/photons if not running from ESD or AOD + #So in new config only schedule from ESD/AOD, in old config always schedule it if requested + if (inputFlags.PF.useElPhotLinks and (inputFlags.Input.Format == "POOL" or inputFlags.PF.useRecExCommon)): + from eflowRec.PFCfg import getEGamFlowElementAssocAlgorithm + result.addEventAlgo(getEGamFlowElementAssocAlgorithm(inputFlags)) - #Currently we do not have muon reco in the run 3 config and hence there are no muons if not running from ESD or AOD - #So in new config only schedule from ESD/AOD, in old config always schedule it if requested it - if (inputFlags.PF.useMuLinks and ((inputFlags.Input.Format == "POOL" and not ('StreamRDO' in inputFlags.Input.ProcessingTags or 'OutputStreamRDO' in inputFlags.Input.ProcessingTags)) or inputFlags.PF.useRecExCommon)): - from eflowRec.PFCfg import getMuonFlowElementAssocAlgorithm - result.addEventAlgo(getMuonFlowElementAssocAlgorithm(inputFlags)) + #Currently we do not have muon reco in the run 3 config and hence there are no muons if not running from ESD or AOD + #So in new config only schedule from ESD/AOD, in old config always schedule it if requested it + if (inputFlags.PF.useMuLinks and ((inputFlags.Input.Format == "POOL" and not ('StreamRDO' in inputFlags.Input.ProcessingTags or 'OutputStreamRDO' in inputFlags.Input.ProcessingTags)) or inputFlags.PF.useRecExCommon)): + from eflowRec.PFCfg import getMuonFlowElementAssocAlgorithm + result.addEventAlgo(getMuonFlowElementAssocAlgorithm(inputFlags)) from OutputStreamAthenaPool.OutputStreamConfig import addToAOD, addToESD toESDAndAOD = "" diff --git a/Reconstruction/eflowRec/python/PFRun3Remaps.py b/Reconstruction/eflowRec/python/PFRun3Remaps.py index bb83be31755ec8acdfb415f58b2efbaadc90c8f5..8b21e67c69090c51f95175cc681de85b754265c1 100644 --- a/Reconstruction/eflowRec/python/PFRun3Remaps.py +++ b/Reconstruction/eflowRec/python/PFRun3Remaps.py @@ -34,7 +34,8 @@ def ListRemaps(): InputRenameCfg ('xAOD::TauJetContainer','TauJets.chargedFELinks','TauJets.chargedFELinks_renamed'), InputRenameCfg ('xAOD::FlowElementContainer','JetETMissChargedFlowElements.FE_TauLinks','JetETMissChargedFlowElements.FE_TauLinks_renamed'), InputRenameCfg ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_TauLinks','JetETMissNeutralFlowElements.FE_TauLinks_renamed'), - #Remap the origin corrected topoclusters + #Remap the calibrated and origin corrected topoclusters + InputRenameCfg ('xAOD::CaloClusterContainer','CaloCalTopoClusters','CaloCalTopoClusters_renamed'), InputRenameCfg ('xAOD::CaloClusterContainer','LCOriginTopoClusters','LCOriginTopoClusters_renamed'), InputRenameCfg ('xAOD::CaloClusterContainer','EMOriginTopoClusters','EMOriginTopoClusters_renamed'), #Remap the muon cluster links to topoclusters diff --git a/Reconstruction/eflowRec/python/PFRunESDtoAOD_mc20e.py b/Reconstruction/eflowRec/python/PFRunESDtoAOD_mc20e.py new file mode 100644 index 0000000000000000000000000000000000000000..44be0488ec6bd60de53c740ca562bd81399ed714 --- /dev/null +++ b/Reconstruction/eflowRec/python/PFRunESDtoAOD_mc20e.py @@ -0,0 +1,31 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +if __name__=="__main__": + + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior = True + + from AthenaConfiguration.AllConfigFlags import ConfigFlags as cfgFlags + + cfgFlags.Concurrency.NumThreads=8 + cfgFlags.Input.isMC=True + cfgFlags.Input.Files= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc20e_13TeV/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.ESD.e4993_s3227_r12689/myESD.pool.root"] + cfgFlags.Output.AODFileName="output_AOD.root" + cfgFlags.Output.doWriteAOD=True + cfgFlags.lock() + + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + cfg=MainServicesCfg(cfgFlags) + + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + cfg.merge(PoolReadCfg(cfgFlags)) + from eflowRec.PFRun3Config import PFFullCfg + cfg.merge(PFFullCfg(cfgFlags)) + + from eflowRec.PFRun3Remaps import ListRemaps + + list_remaps=ListRemaps() + for mapping in list_remaps: + cfg.merge(mapping) + + cfg.run() \ No newline at end of file diff --git a/Reconstruction/eflowRec/python/PFRunESDtoAOD_mc20e_eOverP.py b/Reconstruction/eflowRec/python/PFRunESDtoAOD_mc20e_eOverP.py new file mode 100644 index 0000000000000000000000000000000000000000..81ab6294e0a84b43d8dfcfe61d38494e2f8fa767 --- /dev/null +++ b/Reconstruction/eflowRec/python/PFRunESDtoAOD_mc20e_eOverP.py @@ -0,0 +1,32 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +if __name__=="__main__": + + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior = True + + from AthenaConfiguration.AllConfigFlags import ConfigFlags as cfgFlags + + cfgFlags.Concurrency.NumThreads=8 + cfgFlags.Input.isMC=True + cfgFlags.Input.Files= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc20e_13TeV/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.ESD.e4993_s3227_r12689/myESD.pool.root"] + cfgFlags.Output.AODFileName="output_AOD.root" + cfgFlags.Output.doWriteAOD=True + cfgFlags.PF.EOverPMode=True + cfgFlags.lock() + + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + cfg=MainServicesCfg(cfgFlags) + + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + cfg.merge(PoolReadCfg(cfgFlags)) + from eflowRec.PFRun3Config import PFFullCfg + cfg.merge(PFFullCfg(cfgFlags)) + + from eflowRec.PFRun3Remaps import ListRemaps + + list_remaps=ListRemaps() + for mapping in list_remaps: + cfg.merge(mapping) + + cfg.run() \ No newline at end of file diff --git a/Reconstruction/eflowRec/share/RemapItems.py b/Reconstruction/eflowRec/share/RemapItems.py deleted file mode 100644 index 012d4c345dc092fc8eda89ca9c564bf9ac7a35ac..0000000000000000000000000000000000000000 --- a/Reconstruction/eflowRec/share/RemapItems.py +++ /dev/null @@ -1,38 +0,0 @@ -from SGComps import AddressRemappingSvc -#Remap the EGamma Decorations for PFO and FE -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissChargedFlowElements.FE_ElectronLinks','JetETMissChargedFlowElements.FE_ElectronLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissChargedFlowElements.FE_PhotonLinks','JetETMissChargedFlowElements.FE_PhotonLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_ElectronLinks','JetETMissNeutralFlowElements.FE_ElectronLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_PhotonLinks','JetETMissNeutralFlowElements.FE_PhotonLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PFOContainer','JetETMissChargedParticleFlowObjects.pfo_ElectronLinks','JetETMissChargedParticleFlowObjects.pfo_ElectronLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PFOContainer','JetETMissChargedParticleFlowObjects.pfo_PhotonLinks','JetETMissChargedParticleFlowObjects.pfo_PhotonLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PFOContainer','JetETMissNeutralParticleFlowObjects.pfo_ElectronLinks','JetETMissNeutralParticleFlowObjects.pfo_ElectronLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PFOContainer','JetETMissNeutralParticleFlowObjects.pfo_PhotonLinks','JetETMissNeutralParticleFlowObjects.pfo_PhotonLinks_renamed') - -AddressRemappingSvc.addInputRename ('xAOD::ElectronContainer','Electrons.chargedFELinks','Electrons.chargedFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::ElectronContainer','Electrons.neutralFELinks','Electrons.neutralFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PhotonContainer','Photons.chargedFELinks','Photons.chargedFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PhotonContainer','Photons.neutralFELinks','Photons.neutralFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::ElectronContainer','Electrons.neutralpfoLinks','Electrons.neutralpfoLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::ElectronContainer','Electrons.chargedpfoLinks','Electrons.chargedpfoLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PhotonContainer','Photons.neutralpfoLinks','Photons.neutralpfoLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::PhotonContainer','Photons.chargedpfoLinks','Photons.chargedpfoLinks_renamed') -#Remap the Muon decorations for FE -AddressRemappingSvc.addInputRename ('xAOD::MuonContainer','Muons.chargedFELinks','Muons.chargedFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::MuonContainer','Muons.neutralFELinks','Muons.neutralFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::MuonContainer','Muons.muon_efrac_matched_FE','Muons.muon_efrac_matched_FE_renamed') -AddressRemappingSvc.addInputRename ('xAOD::MuonContainer','Muons.ClusterInfo_deltaR','Muons.ClusterInfo_deltaR_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissChargedFlowElements.FE_MuonLinks','JetETMissChargedFlowElements.FE_MuonLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_MuonLinks','JetETMissNeutralFlowElements.FE_MuonLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_efrac_matched_muon_MuonLinks','JetETMissNeutralFlowElements.FE_efrac_matched_muon_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_nMatchedMuons','JetETMissNeutralFlowElements.FE_nMatchedMuons_renamed') -#Remap the Tau decorations for FE -AddressRemappingSvc.addInputRename ('xAOD::TauJetContainer','TauJets.neutralFELinks','TauJets.neutralFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::TauJetContainer','TauJets.chargedFELinks','TauJets.chargedFELinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissChargedFlowElements.FE_TauLinks','JetETMissChargedFlowElements.FE_TauLinks_renamed') -AddressRemappingSvc.addInputRename ('xAOD::FlowElementContainer','JetETMissNeutralFlowElements.FE_TauLinks','JetETMissNeutralFlowElements.FE_TauLinks_renamed') -#Remap the origin corrected topoclusters -AddressRemappingSvc.addInputRename ('xAOD::CaloClusterContainer','LCOriginTopoClusters','LCOriginTopoClusters_renamed') -AddressRemappingSvc.addInputRename ('xAOD::CaloClusterContainer','EMOriginTopoClusters','EMOriginTopoClusters_renamed') -#Remap the muon cluster links to topoclusters -AddressRemappingSvc.addInputRename ('xAOD::CaloClusterContainer','MuonClusterCollection.constituentClusterLinks','MuonClusterCollection.constituentClusterLinks_renamed') \ No newline at end of file diff --git a/Reconstruction/eflowRec/share/eflowRec_jobOptions.py b/Reconstruction/eflowRec/share/eflowRec_jobOptions.py deleted file mode 100644 index abe527dbf3460e8f732e0397acf0becc952d394b..0000000000000000000000000000000000000000 --- a/Reconstruction/eflowRec/share/eflowRec_jobOptions.py +++ /dev/null @@ -1,3 +0,0 @@ -include("eflowRec/PFlowMTConfig.py") - -from eflowRec import ScheduleCHSPFlowMods diff --git a/Reconstruction/eflowRec/share/metAlgs.py b/Reconstruction/eflowRec/share/metAlgs.py deleted file mode 100644 index 49b8eb661dda23816e31864d8c8a96b65a336bb8..0000000000000000000000000000000000000000 --- a/Reconstruction/eflowRec/share/metAlgs.py +++ /dev/null @@ -1,7 +0,0 @@ -#Rerun the decorations of muon clusters -from AthenaCommon import CfgMgr -muonTCLinkAlg = CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("MuonTCLinks", - ClustersToDecorate="MuonClusterCollection", - UseLeadCellEtaPhi=True) - -topSequence += muonTCLinkAlg diff --git a/Reconstruction/eflowRec/share/run_ESDMT.py b/Reconstruction/eflowRec/share/run_ESDMT.py deleted file mode 100644 index abfaaebfbdb9e4645e9e27dd05cbdb2d6612efb0..0000000000000000000000000000000000000000 --- a/Reconstruction/eflowRec/share/run_ESDMT.py +++ /dev/null @@ -1,59 +0,0 @@ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput=["/data/hodgkinson/scratchFiles/mc15_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s2832_r7968/ESD.08355655._001904.pool.root.1"] - - -doDumpProperties=True - -from RecExConfig.RecAlgsFlags import recAlgs -recAlgs.doEFlow.set_Value_and_Lock(True) - -from RecExConfig.RecFlags import rec -rec.doEgamma.set_Value_and_Lock(False) -rec.doMuon.set_Value_and_Lock(False) - -#change some calo flags -from CaloRec.CaloRecFlags import jobproperties -jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(True) -jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(True) -jobproperties.CaloRecFlags.doEmCluster.set_Value_and_Lock(False) -jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True) - -#this turns off CaloCluster2xAOD -rec.doWritexAOD.set_Value_and_Lock(False) -#nothing to say on these -rec.doWriteTAG.set_Value_and_Lock(False) -rec.doTruth.set_Value_and_Lock(False) -rec.doAODCaloCells.set_Value_and_Lock(False) -rec.doTrigger.set_Value_and_Lock(False) -#Turns off xAODRingSetConfWriter -rec.doCaloRinger.set_Value_and_Lock(False) - -#disables VertexCnvAlg -from InDetRecExample.InDetJobProperties import jobproperties -jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False) -#Disables AllExecutedEvents -rec.doFileMetaData.set_Value_and_Lock(False) - -athenaCommonFlags.EvtMax=1 -include ("RecExCommon/RecExCommon_topOptions.py") -topSequence.CaloTopoCluster.ClustersOutputName="CaloCalTopoClusterV2" -#topSequence.eflowEMCaloObjectBuilder.CalClustersName="CaloCalTopoClusterV2" -topSequence.PFClusterSelector.calClustersName="CaloCalTopoClusterV2" -topSequence.PFOChargedCreatorAlgorithm.PFOOutputName="JetETMissChargedParticleFlowObjectsV2" -#topSequence.PFOChargedCreatorAlgorithm.OutputLevel=DEBUG -topSequence.PFONeutralCreatorAlgorithm.PFOOutputName="JetETMissNeutralParticleFlowObjectsV2" -#topSequence.PFONeutralCreatorAlgorithm.OutputLevel=DEBUG -#topSequence.PFTrackSelector.OutputLevel=DEBUG -#topSequence.PFLeptonSelector.OutputLevel=DEBUG -#topSequence.PFAlgorithm.OutputLevel=DEBUG -#ServiceMgr.MessageSvc.debugLimit = 1000000 -import AthenaCommon.PropertiesManip as manip -manip.removeItemsFromList(StreamAOD,'ItemList','xAOD::PFOContainer#JetETMissChargedParticleFlowObjects') -manip.removeItemsFromList(StreamAOD,'ItemList','xAOD::PFOAuxContainer#JetETMissChargedParticleFlowObjectsAux.') -manip.removeItemsFromList(StreamAOD,'ItemList','xAOD::PFOContainer#JetETMissNeutralParticleFlowObjects') -manip.removeItemsFromList(StreamAOD,'ItemList','xAOD::PFOAuxContainer#JetETMissNeutralParticleFlowObjectsAux.') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::PFOContainer#JetETMissChargedParticleFlowObjectsV2') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::PFOAuxContainer#JetETMissChargedParticleFlowObjectsV2Aux.') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::PFOContainer#JetETMissNeutralParticleFlowObjectsV2') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::PFOAuxContainer#JetETMissNeutralParticleFlowObjectsV2Aux.') - diff --git a/Reconstruction/eflowRec/share/run_ESDPFlowRecoR22_EOverP.py b/Reconstruction/eflowRec/share/run_ESDPFlowRecoR22_EOverP.py deleted file mode 100644 index 9bfd84c09dd7f915686df4efa43bacf269f3ba1d..0000000000000000000000000000000000000000 --- a/Reconstruction/eflowRec/share/run_ESDPFlowRecoR22_EOverP.py +++ /dev/null @@ -1,65 +0,0 @@ -#This file is to run topocluster + pflow reconstruction on an ESD file produced in the release 22 mc16 campaign - -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PFlowTests/mc16_13TeV/mc16_13TeV.361021.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ1W.recon.ESD.e3569_s3170_r12310_r12253_r12310/ESD.23850840._000295.pool.root.1"] - -doDumpProperties=True - -#Turn on calotopocluster algorithms, such that we rebuild CaloTopoCluster -from CaloRec.CaloRecFlags import jobproperties -jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(True) -jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(True) -jobproperties.CaloRecFlags.doEmCluster.set_Value_and_Lock(False) -jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True) - -#Turn pflow on -from RecExConfig.RecAlgsFlags import recAlgs -recAlgs.doEFlow.set_Value_and_Lock(True) - -#Disable reco of trigger, egamma, muons and taus -from RecExConfig.RecFlags import rec -rec.doTrigger.set_Value_and_Lock(False) -# enable egamma reco -rec.doEgamma.set_Value_and_Lock(True) -# enable muon reco -rec.doMuon.set_Value_and_Lock(True) -#Disable tau reco -rec.doTau.set_Value_and_Lock(False) - -#Disable linking of PFO/FE to and from other objects - this won't work because e.g electrons already have links to PFO/FE and -#we cannot overwrite those. -from eflowRec.eflowRecFlags import jobproperties -jobproperties.eflowRecFlags.usePFFlowElementAssoc.set_Value_and_Lock(False) - -#Enable e/p mode -jobproperties.eflowRecFlags.eflowAlgType.set_Value_and_Lock("EOverP") - -#Disable thinning, which would mess up links for e.g taus -from ParticleBuilderOptions.AODFlags import AODFlags -AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False) -AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False) - -#Do not write out TAG file -rec.doWriteTAG.set_Value_and_Lock(False) -#Disable truth reco -rec.doTruth.set_Value_and_Lock(False) -#Don't build AOD CaloCell container -rec.doAODCaloCells.set_Value_and_Lock(False) -#Turn off xAODRingSetConfWriter -rec.doCaloRinger.set_Value_and_Lock(False) - -#Disable VertexCnvAlg -from InDetRecExample.InDetJobProperties import jobproperties -jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False) -#Disable AllExecutedEvents -rec.doFileMetaData.set_Value_and_Lock(False) - -athenaCommonFlags.EvtMax=100 -include ("RecExCommon/RecExCommon_topOptions.py") -#Add in some extra containers that are used for the study of e/p and that are -#not in the default AOD -import AthenaCommon.PropertiesManip as manip -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::CaloClusterContainer#PFCaloCluster') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::CaloClusterAuxContainer#PFCaloClusterAux.') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::TrackParticleContainer#InDetTrackParticles') -manip.appendItemsToList(StreamAOD,'ItemList','xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux.') diff --git a/Reconstruction/eflowRec/share/run_ESDPFlowRecoR22_withLinking.py b/Reconstruction/eflowRec/share/run_ESDPFlowRecoR22_withLinking.py deleted file mode 100644 index 2647d2165283003e6c4830082903a64ccf5c964c..0000000000000000000000000000000000000000 --- a/Reconstruction/eflowRec/share/run_ESDPFlowRecoR22_withLinking.py +++ /dev/null @@ -1,75 +0,0 @@ -#This file is to run topocluster + pflow reconstruction on an ESD file produced in the release 22 mc20e campaign - -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc20e_13TeV/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.ESD.e4993_s3227_r12689/myESD.pool.root"] - -from AthenaCommon.GlobalFlags import globalflags -globalflags.ConditionsTag.set_Value_and_Lock("OFLCOND-MC16-SDR-RUN2-08") - -doDumpProperties=True - -#Set some jet flags to ensure we rebuild origin corrected topoclusters -from JetRec.JetRecFlags import jetFlags -jetFlags.useVertices.set_Value_and_Lock(True) -jetFlags.useTracks.set_Value_and_Lock(True) - -#Turn on calotopocluster algorithms, such that we rebuild CaloTopoCluster -from CaloRec.CaloRecFlags import jobproperties -jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(True) -jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(True) -jobproperties.CaloRecFlags.doEmCluster.set_Value_and_Lock(False) -jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True) - -#Turn pflow on -from RecExConfig.RecAlgsFlags import recAlgs -recAlgs.doEFlow.set_Value_and_Lock(True) - -#Disable reco of trigger -from RecExConfig.RecFlags import rec -rec.doTrigger.set_Value_and_Lock(False) -# enable egamma and muon reco -rec.doEgamma.set_Value_and_Lock(True) -rec.doMuon.set_Value_and_Lock(True) - -#Disable linking of FE to taus - we run tau reco via UserAlgs and so will have to also run the linking there directly -from eflowRec.eflowRecFlags import jobproperties -jobproperties.eflowRecFlags.usePFlowFlowElementTauAssoc.set_Value_and_Lock(False) - -#Disable thinning, which would mess up links for e.g taus -from ParticleBuilderOptions.AODFlags import AODFlags -AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False) -AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False) - -#Do not write out TAG file -rec.doWriteTAG.set_Value_and_Lock(False) -#Disable truth reco -rec.doTruth.set_Value_and_Lock(False) -#Don't build AOD CaloCell container -rec.doAODCaloCells.set_Value_and_Lock(False) -#Turn off xAODRingSetConfWriter -rec.doCaloRinger.set_Value_and_Lock(False) - -#Disable VertexCnvAlg -from InDetRecExample.InDetJobProperties import jobproperties -jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(True) -#Disable AllExecutedEvents -rec.doFileMetaData.set_Value_and_Lock(False) - -athenaCommonFlags.EvtMax=100 -#Rerun jet finding because constituents (pflow,calocluster) were rebuilt -UserAlgs = ["eflowRec/jetAlgs.py"] -#Rerun taus because we rebuild MET - will get errors if do not rebuild taus -from tauRec.tauRecFlags import tauFlags -tauFlags.isStandalone.set_Value_and_Lock(True) -UserAlgs += ["tauRec/tauRec_jobOptions.py"] -#Rerun tau-FE linking -UserAlgs += ["eflowRec/link_tauFE.py"] -#Rebuild MET from the rebuilt PFO etc -import ROOT -ROOT.gROOT.ProcessLine ('#include "xAODTracking/TrackParticleContainer.h"') -ROOT.gROOT.ProcessLine ('#include "xAODJet/JetContainer.h"') -ROOT.gROOT.ProcessLine ('#include "xAODCaloEvent/CaloClusterContainer.h"') -UserAlgs+=["eflowRec/metAlgs.py"] -UserAlgs+=["METReconstruction/METReconstruction_jobOptions.py"] -include ("RecExCommon/RecExCommon_topOptions.py") -include("eflowRec/RemapItems.py")