ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
eflowRec
python
PFRunESDtoAOD_TopoTowers_mc21_14TeV.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 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
#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
#Build EM scale combined topocluster + tower container
36
from
CaloRec.CaloFwdTopoTowerConfig
import
CaloFwdTopoTowerCfg
37
cfg.merge(CaloFwdTopoTowerCfg(cfgFlags,CaloTopoClusterContainerKey=
"CaloTopoClusters"
,
38
towerContainerKey=
"CaloFwdTopoTowers"
,
39
TowerBuilderName=
"CaloTopoTowerFromClusterMaker"
,
40
TowerMergerName=
"CaloTopoSignalMaker"
,
41
signalContainerKey=
"CaloTopoSignal"
))
42
43
#Also rebuild LCW scale combined topocluster + tower container - ensures both containers are of same size,
44
#which is an assumption in the pflow code when dealing with LCW weights
45
cfg.merge(CaloFwdTopoTowerCfg(cfgFlags,TowerBuilderName=
"CaloCalTopoTowerFromClusterMaker"
,
46
TowerMergerName=
"CaloCalTopoSignalMaker"
,
47
signalContainerKey=
"CaloCalTopoSignal"
))
48
49
from
eflowRec.PFRun3Config
import
PFFullCfg
50
cfg.merge(PFFullCfg(cfgFlags,runTauReco=
True
))
51
52
from
eflowRec.PFRun3Remaps
import
ListRemaps
53
54
list_remaps=ListRemaps(cfg,
'AOD'
)
55
for
mapping
in
list_remaps:
56
cfg.merge(mapping)
57
58
cfg.run()
Generated on
for ATLAS Offline Software by
1.17.0