ATLAS Offline Software
Loading...
Searching...
No Matches
python.JetRecoSteering Namespace Reference

Functions

 addTruthPileupJetsToOutputCfg (flags, toAOD=True, toESD=True)
 addJetsToOutputCfg (flags, jetdefs, toAOD=True, toESD=True)
 JetRecoSteeringCfg (flags)
 JetRecoSteeringTest (flags=None)

Function Documentation

◆ addJetsToOutputCfg()

python.JetRecoSteering.addJetsToOutputCfg ( flags,
jetdefs,
toAOD = True,
toESD = True )
Write out the jet containers as defined by jetdefs (a list of JetDefinition).

In Run3 we don't write out jets in AOD : this function is left for convenience and testing purpose.

Definition at line 27 of file JetRecoSteering.py.

27def addJetsToOutputCfg(flags,jetdefs, toAOD=True, toESD=True):
28 """Write out the jet containers as defined by jetdefs (a list of JetDefinition).
29
30 In Run3 we don't write out jets in AOD : this function is left for convenience and testing purpose.
31 """
32 result = ComponentAccumulator()
33
34 #--------------------------------------------------------------
35 # Build output container list.
36 #--------------------------------------------------------------
37 jetList = []
38
39 for jetdef in jetdefs:
40 jetList += [ f"xAOD::JetContainer#{jetdef.fullname()}" ,
41 f"xAOD::JetAuxContainer#{jetdef.fullname()}Aux.-PseudoJet"]
42 # Not sure if this trigger special AuxContainer is obsolete in Run3 ?
43 # if trigger:
44 # auxprefix = "Trig"
45 # jetAODList += [ f"xAOD::Jet{auxprefix}AuxContainer#{jetdef.fullname()}Aux." ,
46
47 # Store event shapes when jets are being stored to output
48 jetList += ["xAOD::EventShape#Kt4EMPFlowEventShape",
49 "xAOD::EventShapeAuxInfo#Kt4EMPFlowEventShapeAux.",
50 "xAOD::EventShape#Kt4EMPFlowNeutEventShape",
51 "xAOD::EventShapeAuxInfo#Kt4EMPFlowNeutEventShapeAux.",
52 "xAOD::EventShape#Kt4EMPFlowPUSBEventShape",
53 "xAOD::EventShapeAuxInfo#Kt4EMPFlowPUSBEventShapeAux.",
54 "xAOD::EventShape#Kt4EMTopoOriginEventShape",
55 "xAOD::EventShapeAuxInfo#Kt4EMTopoOriginEventShapeAux.",
56 "xAOD::EventShape#Kt4LCTopoOriginEventShape",
57 "xAOD::EventShapeAuxInfo#Kt4LCTopoOriginEventShapeAux."]
58
59 from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD
60 if toESD:
61 result.merge(addToESD(flags, jetList))
62 if toAOD:
63 result.merge(addToAOD(flags, jetList))
64
65 return result
66

◆ addTruthPileupJetsToOutputCfg()

python.JetRecoSteering.addTruthPileupJetsToOutputCfg ( flags,
toAOD = True,
toESD = True )

Definition at line 7 of file JetRecoSteering.py.

7def addTruthPileupJetsToOutputCfg(flags, toAOD=True, toESD=True):
8 result = ComponentAccumulator()
9
10 jetdefs = ["InTimeAntiKt4TruthJets", "OutOfTimeAntiKt4TruthJets"]
11
12 jetList = []
13 for jetdef in jetdefs:
14 if f"xAOD::JetContainer#{jetdef}" in flags.Input.TypedCollections:
15 jetList += [ f"xAOD::JetContainer#{jetdef}" ,
16 f"xAOD::AuxContainerBase!#{jetdef}Aux.-PseudoJet.-constituentLinks.-constituentWeights"]
17
18 from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD
19 if toESD:
20 result.merge(addToESD(flags, jetList))
21 if toAOD:
22 result.merge(addToAOD(flags, jetList))
23
24 return result
25
26

◆ JetRecoSteeringCfg()

python.JetRecoSteering.JetRecoSteeringCfg ( flags)

Definition at line 67 of file JetRecoSteering.py.

67def JetRecoSteeringCfg(flags):
68 result = ComponentAccumulator()
69
70 # the Standard list of jets to run :
71 jetdefs = [AntiKt4EMTopo, AntiKt4EMPFlow, AntiKt4LCTopo, AntiKt4Truth, AntiKt10LCTopo_noVR, AntiKt10UFOCSSKSoftDrop_trigger]
72
73 # We're in Reco job : propagate this info to the runIII jet config
74 # (see JetConfigFlags.py for motivations on this way of doing)
75
76 #--------------------------------------------------------------
77 # Create the jet algs from the jet definitions
78 #--------------------------------------------------------------
79 for jd in jetdefs:
80 result.merge(JetRecCfg(flags, jd))
81
82 if flags.Output.doWriteAOD and flags.Jet.WriteToAOD:
83 result.merge(addJetsToOutputCfg(flags, jetdefs, toAOD=True, toESD=False))
84 if flags.Output.doWriteESD:
85 jetdefs.remove(AntiKt10UFOCSSKSoftDrop_trigger)
86 result.merge(addJetsToOutputCfg(flags, jetdefs, toAOD=False, toESD=True))
87
88 return result
89

◆ JetRecoSteeringTest()

python.JetRecoSteering.JetRecoSteeringTest ( flags = None)

Definition at line 90 of file JetRecoSteering.py.

90def JetRecoSteeringTest(flags=None):
91
92 if flags is None:
93 from AthenaConfiguration.AllConfigFlags import initConfigFlags
94 flags = initConfigFlags()
95
96 from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultConditionsTags
97 flags.Input.Files = defaultTestFiles.AOD_RUN3_MC
98 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_MC
99
100 # We have to set the production step, which PFFlow muon linking uses for autoconfiguration.
101 from AthenaConfiguration.Enums import ProductionStep
102 flags.Common.ProductionStep=ProductionStep.Derivation
103
104 flags.fillFromArgs()
105 flags.lock()
106
107 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
108 acc = MainServicesCfg(flags)
109
110 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
111 acc.merge(PoolReadCfg(flags))
112
113 # Setup calorimeter geometry, which is needed for jet reconstruction
114 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
115 acc.merge(LArGMCfg(flags))
116
117 from TileGeoModel.TileGMConfig import TileGMCfg
118 acc.merge(TileGMCfg(flags))
119
120 acc.merge(JetRecoSteeringCfg(flags))
121
122 # We also need to build links between the newly
123 # created jet constituents (GlobalFE)
124 # and electrons,photons,muons and taus
125 from eflowRec.PFCfg import PFGlobalFlowElementLinkingCfg
126 acc.merge(PFGlobalFlowElementLinkingCfg(flags))
127
128 acc.run()
129