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 28 of file JetRecoSteering.py.

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

◆ addTruthPileupJetsToOutputCfg()

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

Definition at line 8 of file JetRecoSteering.py.

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

◆ JetRecoSteeringCfg()

python.JetRecoSteering.JetRecoSteeringCfg ( flags)

Definition at line 68 of file JetRecoSteering.py.

68def JetRecoSteeringCfg(flags):
69 result = ComponentAccumulator()
70
71 # the Standard list of jets to run :
72 jetdefs = [AntiKt4EMTopo, AntiKt4EMPFlow, AntiKt4LCTopo, AntiKt4Truth, AntiKt10LCTopo_tau, AntiKt10UFOCSSKSoftDrop_trigger]
73
74 # We're in Reco job : propagate this info to the runIII jet config
75 # (see JetConfigFlags.py for motivations on this way of doing)
76
77 #--------------------------------------------------------------
78 # Create the jet algs from the jet definitions
79 #--------------------------------------------------------------
80 for jd in jetdefs:
81 result.merge(JetRecCfg(flags, jd))
82
83 if flags.Output.doWriteAOD and flags.Jet.WriteToAOD:
84 result.merge(addJetsToOutputCfg(flags, jetdefs, toAOD=True, toESD=False))
85 if flags.Output.doWriteESD:
86 jetdefs.remove(AntiKt10UFOCSSKSoftDrop_trigger)
87 result.merge(addJetsToOutputCfg(flags, jetdefs, toAOD=False, toESD=True))
88
89 # Schedule specific EventShape to use newer jet calibrations when running DQ in RAWtoALL
90 if flags.Beam.Type is not BeamType.Cosmics:
91 from JetRecConfig.JetRecConfig import getConstitPJGAlg
92 from JetRecConfig.StandardJetConstits import stdConstitDic as cst
93 from JetRecConfig.JetInputConfig import buildEventShapeAlg
94 result.addEventAlgo(getConstitPJGAlg(cst.GPFlow, suffix='Neut'))
95 result.addEventAlgo(buildEventShapeAlg(cst.GPFlow, '', suffix = 'Neut' ))
96
97 return result
98

◆ JetRecoSteeringTest()

python.JetRecoSteering.JetRecoSteeringTest ( flags = None)

Definition at line 99 of file JetRecoSteering.py.

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