ATLAS Offline Software
PFRunESDtoAOD_TopoTowers_mc21_14TeV.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 if __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  #We need to use EM scale topotowers for pflow
14  cfgFlags.Calo.FwdTower.prepareLCW=False
15  cfgFlags.PF.useTopoTowers = True
16  #Global links don't currently work with topotowers (other CP objects do not support topotowers)
17  cfgFlags.PF.useElPhotLinks = False
18  cfgFlags.PF.useMuLinks = False
19  cfgFlags.lock()
20 
21  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
22  cfg = MainServicesCfg(cfgFlags)
23 
24  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
25  cfg.merge(PoolReadCfg(cfgFlags))
26 
27  #Build EM scale combined topocluster + tower container
28  from CaloRec.CaloFwdTopoTowerConfig import CaloFwdTopoTowerCfg
29  cfg.merge(CaloFwdTopoTowerCfg(cfgFlags,CaloTopoClusterContainerKey="CaloTopoClusters",
30  towerContainerKey="CaloFwdTopoTowers",
31  TowerBuilderName="CaloTopoTowerFromClusterMaker",
32  TowerMergerName="CaloTopoSignalMaker",
33  signalContainerKey="CaloTopoSignal"))
34 
35  #Also rebuild LCW scale combined topocluster + tower container - ensures both containers are of same size,
36  #which is an assumption in the pflow code when dealing with LCW weights
37  cfg.merge(CaloFwdTopoTowerCfg(cfgFlags,TowerBuilderName="CaloCalTopoTowerFromClusterMaker",
38  TowerMergerName="CaloCalTopoSignalMaker",
39  signalContainerKey="CaloCalTopoSignal"))
40 
41  from eflowRec.PFRun3Config import PFFullCfg
42  cfg.merge(PFFullCfg(cfgFlags,runTauReco=True))
43 
44  from eflowRec.PFRun3Remaps import ListRemaps
45 
46  list_remaps=ListRemaps()
47  for mapping in list_remaps:
48  cfg.merge(mapping)
49 
50  cfg.run()
PFRun3Config.PFFullCfg
def PFFullCfg(inputFlags, runTauReco=False, **kwargs)
Definition: PFRun3Config.py:8
python.CaloFwdTopoTowerConfig.CaloFwdTopoTowerCfg
def CaloFwdTopoTowerCfg(flags, **kwargs)
Definition: CaloFwdTopoTowerConfig.py:7
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
PFRun3Remaps.ListRemaps
def ListRemaps()
Definition: PFRun3Remaps.py:3
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69