diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py new file mode 100644 index 0000000000000000000000000000000000000000..1d07e1c9bb095f782a196a825046636ca99be051 --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py @@ -0,0 +1,198 @@ +# +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + + +#---------------------------------------------------------------------------------# +# MT-specific code +# Get number of processes and threads +from AthenaCommon.ConcurrencyFlags import jobproperties as jp +nThreads = jp.ConcurrencyFlags.NumThreads() +nProc = jp.ConcurrencyFlags.NumProcs() + +if nThreads >=1 : + from AthenaCommon.AlgScheduler import AlgScheduler + AlgScheduler.OutputLevel( INFO ) + AlgScheduler.ShowControlFlow( True ) + AlgScheduler.ShowDataDependencies( True ) + AlgScheduler.setDataLoaderAlg( 'SGInputLoader' ) + + # Support for the MT-MP hybrid mode + if (nProc > 0) : + + from AthenaCommon.Logging import log as msg + if (theApp.EvtMax == -1) : + msg.fatal('EvtMax must be >0 for hybrid configuration') + sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR) + + if ( theApp.EvtMax % nProc != 0 ) : + msg.warning('EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc) + + chunkSize = int (theApp.EvtMax / nProc) + + from AthenaMP.AthenaMPFlags import jobproperties as jps + jps.AthenaMPFlags.ChunkSize= chunkSize + + msg.info('AthenaMP workers will process %s events each',chunkSize) + + ## force loading of data. make sure this alg is at the front of the + ## AlgSequence + # + from SGComps.SGCompsConf import SGInputLoader + topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False) + +# MT-specific code +#---------------------------------------------------------------------------------# + +theApp.EvtMax = 20 + +from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg +topSequence+=xAODMaker__EventInfoCnvAlg() + +#---------------------------------------------------------------------------------# +# NEW Conditions access infrastructure +# +from IOVSvc.IOVSvcConf import CondInputLoader +topSequence += CondInputLoader( "CondInputLoader", OutputLevel=DEBUG, ) + +import StoreGate.StoreGateConf as StoreGateConf +svcMgr += StoreGateConf.StoreGateSvc("ConditionStore") + +from IOVSvc.IOVSvcConf import CondSvc +svcMgr += CondSvc() +# NEW Conditions access infrastructure +#---------------------------------------------------------------------------------# + +# Make sure PerfMon is off +include( "PerfMonGPerfTools/DisablePerfMon_jobOFragment.py" ) + +# Input file +dataFile = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root" + +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +athenaCommonFlags.FilesInput=[dataFile,dataFile] + +# AutoConfiguration +from RecExConfig.RecFlags import rec +rec.AutoConfiguration = ['everything'] +import RecExConfig.AutoConfiguration as auto +auto.ConfigureFromListOfKeys(rec.AutoConfiguration()) + +from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore +from RecExConfig.InputFilePeeker import inputFileSummary +objKeyStore.addManyTypesInputFile(inputFileSummary['eventdata_itemsList']) + +#---------------------------------------------------------------------------------# +# Detector Description + +import MagFieldServices.SetupField + +from AthenaCommon.GlobalFlags import globalflags +globalflags.DetGeo = 'atlas' +from AthenaCommon.DetFlags import DetFlags +DetFlags.detdescr.all_setOff() +DetFlags.detdescr.Muon_setOn() +DetFlags.detdescr.ID_setOn() +DetFlags.detdescr.Calo_setOn() +if hasattr(DetFlags,'BField_on'): DetFlags.BField_setOn() +from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc +AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc + +from AtlasGeoModel import SetGeometryVersion +from AtlasGeoModel import GeoModelInit + +from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV +from TileGeoModel.TileGeoModelConf import TileDetectorTool + +ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"), + TileDetectorTool(GeometryConfig = "RECO") + ] + + +from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv + +include( "TileConditions/TileConditions_jobOptions.py" ) + +include( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py") +include( "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py") + +include( "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py" ) +include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" ) +from LArConditionsCommon import LArAlignable +ServiceMgr.DetDescrCnvSvc.DecodeIdDict = True +# Detector Description +#---------------------------------------------------------------------------------# + +import AthenaPoolCnvSvc.ReadAthenaPool #Maybe better to break up to get rid of MetaData stuff + +svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() + +from GaudiAlg.GaudiAlgConf import EventCounter +topSequence+=EventCounter(Frequency=2) + +from LArROD.LArRODFlags import larRODFlags +larRODFlags.readDigits=False + +from CaloRec.CaloRecFlags import jobproperties +jobproperties.CaloRecFlags.clusterCellGetterName = 'CaloRec.CaloCellGetter.CaloCellGetter' + +from CaloRec.CaloCellFlags import jobproperties +jobproperties.CaloCellFlags.doLArDeadOTXCorr=False + +include( "CaloRec/CaloTopoCluster_jobOptions.py" ) + + +include( "McParticleAlgs/TruthParticleBuilder_jobOptions.py" ) + +from egammaRec.egammaRecFlags import jobproperties + +include( "egammaRec/egammaRec_jobOptions.py" ) + +import AthenaPoolCnvSvc.WriteAthenaPool +logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' ) +from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream + +StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) +include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py") +StreamESD.ItemList+=CaloESDList +include ("egammaRec/egammaOutputItemList_jobOptions.py") +StreamESD.ItemList+=egammaESDList + +print StreamESD.ItemList + +include ( "RecExRecoTest/RecExRecoTest_EgammaHiveRenames.py" ) + +print "==========================================================================================\n" + +# +## set which Algorithms can be cloned +# +# names of algs are: +# SGInputLoader +# xAODMaker::EventInfoCnvAlg +# EventCounter +# CaloCellMaker +# CmbTowerBldr +# CaloClusterMakerSWCmb +# CaloTopoCluster +# StreamESD + +# set algCardinality = 1 to disable cloning for all Algs +algCardinality = nThreads + +if (algCardinality > 1): + for alg in topSequence: + name = alg.name() + if name in ["CaloCellMaker","StreamESD"] : + # suppress INFO message about Alg unclonability + alg.Cardinality = 1 + else: + alg.Cardinality = algCardinality + +# MT-specific code +#---------------------------------------------------------------------------------# + + diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_noAlgs_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_noAlgs_fromESD.py new file mode 100644 index 0000000000000000000000000000000000000000..e8f01299e4e26a2cffda8c496c225ff08903129d --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_noAlgs_fromESD.py @@ -0,0 +1,30 @@ +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"] + +from RecExConfig.RecFlags import rec +rec.doEgamma.set_Value_and_Lock(False) +rec.doMuon.set_Value_and_Lock(False) + +from CaloRec.CaloRecFlags import jobproperties +jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(False) +jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(False) +jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(False) + +#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=10 +include ("RecExCommon/RecExCommon_topOptions.py") diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_EgammaHiveRenames.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_EgammaHiveRenames.py new file mode 100644 index 0000000000000000000000000000000000000000..6539ffcba8c5dacf33deaa2c4818088614bf1b5e --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_EgammaHiveRenames.py @@ -0,0 +1,29 @@ +from SGComps.AddressRemappingSvc import addInputRename +addInputRename ('xAOD::EventAuxInfo','EventInfoAux.', 'old_EventInfoAux.') +addInputRename ('xAOD::EventInfo','EventInfo', 'old_EventInfo') +addInputRename ('xAOD::CaloClusterContainer','CaloCalTopoClusters', 'old_CaloCalTopoClusters') +addInputRename ('xAOD::CaloClusterAuxContainer','CaloCalTopoClustersAux.', 'old_CaloCalTopoClustersAux.') + +addInputRename ('xAOD::ElectronContainer','Electrons', 'old_Electrons') +addInputRename ('xAOD::PhotonContainer','Photons', 'old_Photons') +addInputRename ('xAOD::ElectronAuxContainer','ElectronsAux.', 'old_ElectronsAux.') +addInputRename ('xAOD::PhotonAuxContainer','PhotonsAux.', 'old_PhotonsAux.') + +addInputRename ('xAOD::CaloClusterContainer','ForwardElectronClusters', 'old_ForwardElectronClusters') +addInputRename ('xAOD::CaloClusterContainer','egammaClusters', 'old_egammaClusters') +addInputRename ('xAOD::CaloClusterAuxContainer','ForwardElectronClustersAux.', 'old_ForwardElectronClustersAux.') +addInputRename ('xAOD::CaloClusterAuxContainer','egammaClustersAux.', 'old_egammaClustersAux.') + +addInputRename ('xAOD::ElectronContainer','ForwardElectrons', 'old_ForwardElectrons') +addInputRename ('xAOD::ElectronAuxContainer','ForwardElectronsAux.', 'old_ForwardElectronsAux.') +addInputRename ('xAOD::TruthParticleContainer','egammaTruthParticles', 'old_egammaTruthParticles') +addInputRename ('xAOD::TruthParticleAuxContainer','egammaTruthParticlesAux.', 'old_egammaTruthParticlesAux.') +addInputRename ('xAOD::TrackParticleContainer','GSFTrackParticles', 'old_GSFTrackParticles') +addInputRename ('xAOD::VertexContainer','GSFConversionVertices', 'old_GSFConversionVertices') +addInputRename ('xAOD::TrackParticleAuxContainer','GSFTrackParticlesAux.', 'old_GSFTrackParticlesAux.') +addInputRename ('xAOD::VertexAuxContainer','GSFConversionVerticesAux.', 'old_GSFConversionVerticesAux.') + +addInputRename ('TrackCollection','GSFTracks', 'old_GSFTracks') +addInputRename ('CaloClusterCellLinkContainer','ForwardElectronClusters_links', 'old_ForwardElectronClusters_links') +addInputRename ('CaloClusterCellLinkContainer','egammaClusters_links', 'old_egammaClusters_links') + diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_egamma_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_egamma_fromesd.sh new file mode 100755 index 0000000000000000000000000000000000000000..434a3557fcea787b00baf8c65b5529e306db5744 --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_egamma_fromesd.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +# art-description: Athena runs topoclustering from an ESD file +# art-type: grid +athena RecExRecoTest/RecExRecoTest_ART_egamma_fromESD.py +echo "art-result: $?" diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_noalgs_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_noalgs_fromesd.sh new file mode 100755 index 0000000000000000000000000000000000000000..a61ec2edb87e15b8a2750048d80ec53d3f1c062c --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_noalgs_fromesd.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +# art-description: Athena runs topoclustering from an ESD file +# art-type: grid +athena RecExRecoTest/RecExRecoTest_ART_noAlgs_fromESD.py +echo "art-result: $?" diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_pflow_and_jets_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_pflow_and_jets_fromesd.sh new file mode 100755 index 0000000000000000000000000000000000000000..426f6b22f442dc56e31eac1cb8068b978ac16bdb --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_pflow_and_jets_fromesd.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +# art-description: Athena runs topoclustering from an ESD file +# art-type: grid +athena eflowRec/run_ESDStandardReco.py +echo "art-result: $?" diff --git a/Reconstruction/eflowRec/share/run_ESDStandardReco.py b/Reconstruction/eflowRec/share/run_ESDStandardReco.py index edcf729fd3246caffde93f4723c2ca83e868651b..d7d4abca11459b8dece02413cfba831a9fc8b9d1 100644 --- a/Reconstruction/eflowRec/share/run_ESDStandardReco.py +++ b/Reconstruction/eflowRec/share/run_ESDStandardReco.py @@ -1,7 +1,7 @@ #This file is to run standard reconstruction + pflow + jet finding on an ESD file from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput=["/data/hodgkinson/dataFiles/mc16_13TeV/ESDFiles/mc16_valid.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.recon.ESD.e3698_s2995_r8905/ESD.10230993._000008.pool.root.1"] +athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"] doDumpProperties=True @@ -20,6 +20,6 @@ rec.doWriteTAG.set_Value_and_Lock(False) athenaCommonFlags.EvtMax=1 #Run pflopw jet finding - this cannot be enabled via reconstruction flags currently! (without enabling other things we don't want) -UserAlgs = ["jetAlgs.py"] +UserAlgs = ["eflowRec/jetAlgs.py"] include ("RecExCommon/RecExCommon_topOptions.py")