ATLAS Offline Software
Loading...
Searching...
No Matches
PFRunESDtoAOD_WithJetsTausMET_ACTSExtrapolation_mc21_14TeV.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3if __name__=="__main__":
4
5 from AthenaConfiguration.AllConfigFlags import initConfigFlags
6 cfgFlags = initConfigFlags()
7 cfgFlags.Concurrency.NumThreads=1
8 cfgFlags.Exec.MaxEvents=100
9 cfgFlags.Input.isMC=True
10 cfgFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PFlowTests/mc21_14TeV/mc21_14TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8481_s4383_r15934/AOD.41490164._005514.pool.root.1"]
11 cfgFlags.Output.AODFileName="output_AOD.root"
12 cfgFlags.Output.doWriteAOD=True
13 cfgFlags.DiTau.doDiTauRec = False #does not run from ESD - tries to use aux variables which do not exist
14 cfgFlags.Detector.GeometryCalo = True
15 cfgFlags.Acts.TrackingGeometry.UseBlueprint = True
16 cfgFlags.Detector.GeometryITk = True
17 cfgFlags.Detector.GeometryBpipe = True
18 cfgFlags.PF.useActsExtrapolation=True #Toggle usage of ACTS extrapolation for track propagation to calorimeter
19 #Auto configure works by reading the conditions tag metadata from the input file.
20 #Hence for files produced using pre-CREST conditions tags this choice is not
21 #compatible with the latest releases which only support CREST conditions tags.
22 #So we force it to use the current Run 4 tag
23 #See https://its.cern.ch/jira/browse/ATLASRECTS-8434
24 from AthenaConfiguration.TestDefaults import defaultConditionsTags
25 cfgFlags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
26 cfgFlags.fillFromArgs()
27 cfgFlags.lock()
28
29 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
30 cfg = MainServicesCfg(cfgFlags)
31
32 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
33 cfg.merge(PoolReadCfg(cfgFlags))
34
35 from eflowRec.PFRun3Config import PFFullCfg
36 cfg.merge(PFFullCfg(cfgFlags,runTauReco=True))
37
38 from eflowRec.PFRun3Config import PFTauFELinkCfg
39 cfg.merge(PFTauFELinkCfg(cfgFlags))
40
41 from eflowRec.PFRun3Remaps import ListRemaps
42
43 list_remaps=ListRemaps(cfg, 'AOD')
44 for mapping in list_remaps:
45 cfg.merge(mapping)
46
47 from PFlowUtils.configureRecoForPFlow import configureRecoForPFlowCfg
48 cfg.merge(configureRecoForPFlowCfg(cfgFlags))
49
50 #Add containers needed to run jet finding from resultant AOD for pflow CP studies
51 from PFlowUtils.configureRecoForPFlow import addContainersForPFlowCPStudiesCfg
52 cfg.merge(addContainersForPFlowCPStudiesCfg(cfgFlags))
53
54 from ActsConfig.ActsGeometryConfig import ActsTrackingGeometrySvcCfg
55 from pathlib import Path
56 trackingGeometrySvc = ActsTrackingGeometrySvcCfg(cfgFlags,
57 RunConsistencyChecks=True,
58 # ConsistencyCheckOutput="trk_geo_check.csv", # enable debug output writing
59 BlueprintGraphviz=str(Path.cwd() / "blueprint.dot"),
60 ObjDebugOutput=False)
61
62 cfg.merge(trackingGeometrySvc)
63
64 cfg.run()