ATLAS Offline Software
Loading...
Searching...
No Matches
JetRecoCommon.py
Go to the documentation of this file.
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3#
4
5
9
10from JetRecConfig.JetDefinition import JetInputConstitSeq,JetInputConstit, xAODType, JetInputType, JetDefinition, formatRvalue
11from JetRecConfig.JetGrooming import GroomingDefinition
12from ..Menu.SignatureDicts import JetRecoKeys as recoKeys
13# this is to define trigger specific JetModifiers (ex: ConstitFourMom_copy) :
14from . import TriggerJetMods
15
16import copy
17
18from AthenaCommon.Logging import logging
19log = logging.getLogger(__name__)
20
21
23etaRangeAbbrev = {
24 "j":"0eta320", # default
25 "a":"0eta490",
26 "c":"0eta240",
27 "C":"0eta210",
28 "f":"320eta490"
29}
30
31
33
34def jetChainParts(chainParts):
35 jChainParts = []
36 for p in chainParts:
37 if p['trigType'] == 'j':
38 jChainParts.append(p)
39 return jChainParts
40
41
43
44# Translate the reco dict to a string for suffixing etc
45def jetRecoDictToString(jetRecoDict):
46 if jetRecoDict['ionopt'] in ['ion', 'ionp']:
47 # Unique settings for heavy ions
48 # other values will be default
49 return jetRecoDict['recoAlg'] + "_" + jetRecoDict['ionopt']
50 strtemp = "{recoAlg}_{constitMod}{constitType}_{clusterCalib}_{jetCalib}"
51 if doTracking(jetRecoDict):
52 strtemp += "_{trkopt}"
53 return strtemp.format(**jetRecoDict)
54
55# Extract the jet reco dict from the chainDict
56def extractRecoDict(chainParts):
57 # interpret the reco configuration only
58 # eventually should just be a subdict in the chainDict
59 recoDict = {}
60 for p in chainParts:
61 for k in recoKeys:
62 # Look for our key in the chain part
63 if k in p.keys():
64 # found the key, check for consistency with other chain parts of this chain
65 if k in recoDict.keys():
66 if p[k] != recoDict[k]:
67 raise RuntimeError('Inconsistent reco setting for %s' % k)
68 # copy this entry to the reco dictionary
69 recoDict[k] = p[k]
70
71 # set proper jetCalib key in default case
72 if recoDict['jetCalib'] == "default":
73 recoDict['jetCalib'] = getJetCalibDefaultString(recoDict['recoAlg'],recoDict['constitType'],recoDict['trkopt'])
74
75 recoDict['jetDefStr'] = jetRecoDictToString(recoDict)
76
77 return recoDict
78
79# Inverse of the above, essentially only for CF tests
80def jetRecoDictFromString(jet_def_string):
81
82 # Translate the definition string into an approximation
83 # of the "recoParts" in the jet chainParts.
84 jetRecoDict = {}
85 from TriggerMenuMT.HLT.Menu.SignatureDicts import JetChainParts,JetChainParts_Default
86 for key in recoKeys:
87 keyFound = False
88 tmp_key = key
89 for part in jet_def_string.split('_'):
90 if part in JetChainParts[tmp_key]:
91 jetRecoDict[key] = part
92 keyFound = True
93 if not keyFound:
94 jetRecoDict[key] = JetChainParts_Default[key]
95
96 # set proper jetCalib key in default case
97 if jetRecoDict['jetCalib'] == "default":
98 jetRecoDict['jetCalib'] = getJetCalibDefaultString(jetRecoDict['recoAlg'],jetRecoDict['constitType'],jetRecoDict['trkopt'])
99
100 jetRecoDict['jetDefStr'] = jetRecoDictToString(jetRecoDict)
101
102 return jetRecoDict
103
104# Assist with grooming and reclustering workflows, we need to
105# ensure that the name is updated consistently
106def cloneAndUpdateJetRecoDict(jetRecoDict,**kwargs):
107 newJetRecoDict = copy.copy(jetRecoDict)
108 newJetRecoDict.update(dict(**kwargs))
109 newJetRecoDict["jetDefStr"] = jetRecoDictToString(newJetRecoDict)
110 return newJetRecoDict
111
112
114
115# Condense the jet definition down into a string representation
116# compatible with the jetDefStr in jetRecoDict
117# Also useful as a consistency check
118def jetDefToString(jetDef):
119 _jetDef = jetDef
120 poststr = ''
121 if isinstance(jetDef,GroomingDefinition):
122 _jetDef = jetDef.ungroomeddef
123 # We don't support multiple configurations of a given grooming
124 if jetDef.groomSpecAsStr().startswith('Trimmed'):
125 poststr = 't'
126 elif jetDef.groomSpecAsStr().startswith('SoftDrop'):
127 poststr = 'sd'
128 else:
129 raise ValueError('Unsupported grooming type for HLT')
130 elif jetDef.inputdef.jetinputtype == JetInputType.Jet:
131 # Reclustered
132 poststr = 'r'
133
134 algstr = f'{str.lower(_jetDef.algorithm[0])}{formatRvalue(_jetDef._radius)}{poststr}'
135 constitdef = _jetDef.inputdef
136 if constitdef.label == 'HI':
137 if _jetDef.context == 'hi': constitstr = 'ion'
138 else: constitstr = 'ionp'
139 else:
140 clusterCalib = 'lcw' if 'LC' in constitdef.label else 'em'
141 constittype = 'pf' if 'PFlow' in constitdef.label else 'tc'
142 constitmods = ''
143 if isinstance(constitdef,JetInputConstitSeq):
144 ignore = ['EM','LC','CHS','CorrectPFO']
145 for mod in constitdef.modifiers:
146 if mod not in ignore:
147 constitmods += str.lower(mod)
148 constitstr = f'{constitmods}{constittype}_{clusterCalib}'
149 jetdefstr = f'{algstr}_{constitstr}{jetDef.suffix}'
150
151 return jetdefstr
152
154 jetCalib = jetDef.suffix[1:]
155 if jetCalib.endswith('_ftf'):
156 jetCalib = jetCalib[:-4]
157 return jetCalib
158
159
161
162# decodes SignatureDict field recoAlg
163# returns 3 values:
164# - jet reco alg: 'a' (antikT)
165# - jet radius: 4, 10,..
166# - extra reco details: e.g. 'r' (reclustered), 't' (trimmed), 'sd' (softdrop)
167def interpretRecoAlg(recoAlg):
168 import re
169 jetalg, jetradius, jetextra = re.split(r'(\d+)',recoAlg)
170 return jetalg, int(jetradius), jetextra
171
172# Check if jet definition needs tracks or if it should be agnostic of the tracking choice
173def jetDefNeedsTracks(jetRecoDict):
174 # For tc_a10, tc_a10t and tc_a10sd, we will be agnostic of tracking (no suffix will be added)
175 # For everything else (constitType=pf or dependence on small-R jets) we need to be aware of what tracking was used
176 return jetRecoDict["trkopt"]!="notrk" and (jetRecoDict["constitType"]!="tc" or jetRecoDict["recoAlg"] in ['a2','a4','a10'])
177
178# Check if track reconstruction is enabled
179def doTracking(jetRecoDict):
180 return jetRecoDict["trkopt"]!="notrk"
181# Check if full scan track reconstruction is enabled
182def doFSTracking(jetRecoDict):
183 return jetRecoDict["trkopt"]=="ftf"
184
185# Check if constituent type is pflow. Concurrently check that the tracking option is valid.
186def isPFlow(jetRecoDict):
187 isPFlow = jetRecoDict["constitType"] == "pf"
188 if isPFlow and not doFSTracking(jetRecoDict):
189 raise ValueError("This is a PFlow chain but an incompatible tracking option is given!")
190 return isPFlow
191
192# return the min jet pT in MeV for the configured recoAlg
193def getFilterCut(recoAlg):
194 return {"a2":4000, "a4":4000, "a10":50000, "a10r": 50000, "a10t":50000, "a10sd":50000}[recoAlg]
195
197
198 flags.addFlag("Jet.Context.notrk", lambda prevFlags : prevFlags.Jet.Context.default )
199
200
201 def _buildContextDic(prevFlags, trkopt):
202 # *****************
203 idFlags = prevFlags.Trigger.InDetTracking
204 (tracksname,verticesname) = {
205 'ftf': (idFlags.fullScan.tracks_FTF,
206 idFlags.fullScan.vertex),
207 'roiftf': (idFlags.jetSuper.tracks_FTF,
208 idFlags.jetSuper.vertex),
209 }[trkopt]
210
211 tvaname = f"JetTrackVtxAssoc_{trkopt}"
212 label = f"GhostTrack_{trkopt}"
213 ghosttracksname = f"PseudoJet{label}"
214
215 contextDic = prevFlags.Jet.Context.default.clone(
216 Tracks = tracksname,
217 Vertices = verticesname,
218 TVA = tvaname,
219 GhostTracks = ghosttracksname,
220 GhostTracksLabel = label ,
221 JetTracks = f'JetSelectedTracks_{trkopt}',
222 )
223 # also declare some JetInputExternal corresponding to trkopt
224 # This ensures the JetRecConfig helpers know about them.
225 # We declare simplistic JetInputExternal, without algoBuilder, because the rest of the trigger config is in charge of producing these containers.
226 from JetRecConfig.StandardJetConstits import stdInputExtDic
227 if tracksname not in stdInputExtDic:
228 from JetRecConfig.JetDefinition import JetInputExternal
229 from xAODBase.xAODType import xAODType
230 stdInputExtDic[tracksname] = JetInputExternal( tracksname, xAODType.TrackParticle )
231 stdInputExtDic[verticesname] = JetInputExternal( verticesname, xAODType.Vertex )
232
233
234 return contextDic
235
236
237
238 flags.addFlag("Jet.Context.ftf", lambda prevFlags : _buildContextDic(prevFlags,"ftf") )
239 flags.addFlag("Jet.Context.roiftf", lambda prevFlags : _buildContextDic(prevFlags,"roiftf") )
240
241
242
243
244
246
248 prefix = "HLT_"
249 return prefix
250
251def getClustersKey(recoDict):
252 if recoDict['ionopt'] in ['ion', 'ionp']:
253 return "HLT_HICaloClustersFS"
254 clusterCalib = recoDict["clusterCalib"]
255 if clusterCalib == "em":
256 from ..CommonSequences.FullScanDefs import em_clusters
257 return em_clusters
258 elif clusterCalib == "lcw":
259 from ..CommonSequences.FullScanDefs import lc_clusters
260 return lc_clusters
261 else:
262 raise ValueError("Invalid value for calib: '{}'".format(clusterCalib))
263
264def getJetCalibDefaultString(recoAlg, constitType, trkopt):
265 if recoAlg == 'a4' or recoAlg == 'a2':
266 if constitType == 'tc':
267 return 'subresjesgscIS' if trkopt == 'ftf' else 'subjesIS'
268 elif constitType == 'pf':
269 return 'subresjesgscIS'
270 elif recoAlg == 'a10':
271 return 'subjes'
272 elif recoAlg == 'a10t':
273 return 'jes'
274 elif recoAlg == 'a10sd':
275 return 'jes'
276 elif recoAlg == 'a10r':
277 return 'subjesIS' # calibration for the small-R jets used to reconstruct the reclustered jets
278 else:
279 raise RuntimeError(f'No default calibration is defined for {recoAlg}, {constitType}, {trkopt}')
280
281cleaningDict = {
282 'CLEANlb': 'LooseBad',
283 'CLEANllp': 'LooseBadLLP',
284}
285# returns cleaning string based on prefilter list
286def getPrefilterCleaningString(prefilters_list):
287 found_cleanings= [ci for ck, ci in cleaningDict.items() if ck in prefilters_list]
288 if len(found_cleanings) <= 1: # Only one supported cleaning decoration at the moment
289 return 'noCleaning' if len(found_cleanings) == 0 else found_cleanings[0]
290 else:
291 raise RuntimeError(
292 'Multijet jet cleanings found in jet trigger reco dictionary {}. Multiple jet cleanings are currently unsupported'.format(found_cleanings))
293
294
295
297
298# Translate calib specification into something understood by
299# the calibration config helper
300def getCalibMods(flags,jetRecoDict,rhoKey="auto"):
301
302 # Minimum modifier set for calibration w/o track GSC
303 # Should eventually build in more mods, depend on track info etc
304 jetalg = jetRecoDict["recoAlg"]
305 if jetRecoDict["jetCalib"] == "nojcalib" or jetalg=="a10r":
306 calibMods = []
307 else:
308 dotracking = doTracking(jetRecoDict)
309 if not dotracking and "gsc" in jetRecoDict["jetCalib"]:
310 raise ValueError("Track GSC requested but no track source provided!")
311
312 if not dotracking and "subres" in jetRecoDict["jetCalib"]:
313 raise ValueError("Pileup residual calibration requested but no track source provided!")
314
315 if jetRecoDict["constitType"] == "tc":
316 calibKey = flags.Trigger.Jet.emtopoCalibKey
317 calibContext,calibSeq = {
318 ("a4","subjes"): (calibKey,"JetArea_EtaJES_GSC"), # Calo GSC only ( + insitu in data)
319 ("a4","subjesIS"): (calibKey,"JetArea_EtaJES_GSC"), # Calo GSC only (no insitu)
320 ("a4","subjesgscIS"): (calibKey,"JetArea_EtaJES_GSC"), # Calo+Trk GSC ( + insitu in data)
321 ("a4","subresjesgscIS"): (calibKey,"JetArea_Residual_EtaJES_GSC"), # pu residual + calo+trk GSC ( + insitu in data)
322 ("a4","subjesgsc"): (calibKey,"JetArea_EtaJES_GSC"), # Calo+Trk GSC (no insitu)
323 ("a4","subresjesgsc"): (calibKey,"JetArea_Residual_EtaJES_GSC"), # pu residual + calo+trk GSC (no insitu)
324 ("a10","subjes"): ("TrigUngroomed","JetArea_EtaJES"),
325 ("a10t","jes"): ("TrigTrimmed","EtaJES_JMS"),
326 }[(jetRecoDict["recoAlg"],jetRecoDict["jetCalib"])]
327
328 pvname = ""
329 gscDepth = "EM3"
330 if "gsc" in jetRecoDict["jetCalib"]:
331 gscDepth = "trackWIDTH"
332 pvname = flags.Trigger.InDetTracking.fullScan.vertex_jet
333
334 elif jetRecoDict["constitType"] == "pf":
335 gscDepth = "auto"
336 if 'sd' in jetRecoDict["recoAlg"]:
337 calibContext = flags.Trigger.Jet.pflowLJCalibKey # large-R pflow
338 calibSeq = "EtaJES_JMS"
339 else:
340 calibKey = flags.Trigger.Jet.pflowCalibKey # small-R pflow
341 gscDepth = "trackWIDTH"
342 if "gsc" not in jetRecoDict["jetCalib"]:
343 gscDepth = "EM3" # calo-only GSC
344 calibContext,calibSeq = {
345 ("a4","jes"): (calibKey,"EtaJES_GSC"), # w/o jet area sub, w/o pu residual + calo GSC only (no insitu)
346 ("a4","subjesgsc"): (calibKey,"JetArea_EtaJES_GSC"), # w/o pu residual + calo+trk GSC
347 ("a4","subresjesgsc"): (calibKey,"JetArea_Residual_EtaJES_GSC"), # pu residual + calo+trk GSC
348 ("a4","subjesgscIS"): (calibKey,"JetArea_EtaJES_GSC"), # w/o pu residual + calo+trk GSC
349 ("a4","subresjesgscIS"): (calibKey,"JetArea_Residual_EtaJES_GSC"), # pu residual + calo+trk GSC
350 }[(jetRecoDict["recoAlg"],jetRecoDict["jetCalib"])]
351 pvname = flags.Trigger.InDetTracking.fullScan.vertex_jet
352 if jetRecoDict["jetCalib"].endswith("IS") and (not flags.Input.isMC):
353 calibSeq += "_Insitu"
354
355 dataSource = "mc" if flags.Input.isMC else "data"
356 calibSpec = ":".join( [calibContext, dataSource, calibSeq, rhoKey, pvname, gscDepth] )
357
358 if jetalg=="a4":
359 calibMods = ["EMScaleMom",
360 "ConstitFourMom_copy",
361 "CaloEnergies", # Needed for GSC
362 "Calib:"+calibSpec]
363 else:
364 calibMods = ["ConstitFourMom_copy",
365 "Calib:"+calibSpec]
366
367 return calibMods
368
369# Make generating the list a bit more comprehensible
370# TODO document where and how this is used.
371def getModSpec(modname,modspec=''):
372 return (TriggerJetMods.stdJetModifiers[modname],str(modspec))
373
374# Get list of jet attributes to be calculated for jet
375def getDecorList(jetDef):
376 # Basic jet info provided by the jet builder
377 decorlist = []
378
379 # return empty list for non-calibrated jets
380 if jetCalibFromJetDef(jetDef) == 'nojcalib': return decorlist
381
382 decorlist += [ 'AlgorithmType', 'InputType',
383 'ActiveArea', 'ActiveArea4vec_eta', 'ActiveArea4vec_m',
384 'ActiveArea4vec_phi', 'ActiveArea4vec_pt',
385 'EMFrac','HECFrac','EnergyPerSampling','N90Constituents','constit','Tile0Frac']
386
387 if jetDef.context == 'ftf':
388 decorlist += ["GhostTrack_ftf",
389 "NumTrkPt500","NumTrkPt1000",
390 "SumPtTrkPt500","SumPtTrkPt1000",
391 "TrackWidthPt1000",
392 "JVFCorr", "JvtRpt", "Jvt",
393 'NNJvtTrkAugV1','NNJvtTrkAugV1Pass', 'RPtTrkPt500', 'DTrackWidthPt1000', 'DNumTrkPt1000', 'DRPtTrkPt500', 'SumPtTrkOrderedTrackWidthPt1000', 'SumPtTrkOrderedNumTrkPt1000']
394 if 'PFlow' in jetDef.basename:
395 decorlist += ["SumPtChargedPFOPt500"]
396 return decorlist
397
398
399
401
402# Define the jet constituents to be interpreted by JetRecConfig
403# When actually specifying the reco, clustersKey should be
404# set, but default to None to allow certain checks, in particular
405# grooming configuration
406def defineJetConstit(jetRecoDict,clustersKey=None,pfoPrefix=None):
407 constitMods = []
408 # Get the details of the constituent definition:
409 # type, mods and the input container name
410
411 if jetRecoDict["constitType"] == "pf":
412 if pfoPrefix is None:
413 raise RuntimeError("JetRecoCommon: Cannot define PF jets without pfo prefix!")
414
415 constitMods = ["CorrectPFO"]
416 # apply constituent pileup suppression
417 if "vs" in jetRecoDict["constitMod"]:
418 constitMods.append("Vor")
419 if "cs" in jetRecoDict["constitMod"]:
420 constitMods.append("CS")
421 if "sk" in jetRecoDict["constitMod"]:
422 constitMods.append("SK")
423 constitMods += ["CHS"]
424
425 inputPFO = pfoPrefix+"ParticleFlowObjects"
426 modstring = ''.join(constitMods[1:-1])
427 if modstring == '':
428 modstring='CHS'
429
430 inputxAODType = xAODType.FlowElement
431 if not constitMods:
432 jetConstit = JetInputConstitSeq( "HLT_EMPFlow", inputxAODType, constitMods, inputname=inputPFO, outputname=pfoPrefix+"CHSParticleFlowObjects", label="EMPFlow", jetinputtype="EMPFlow")
433 else:
434 jetConstit = JetInputConstitSeq( "HLT_EMPFlow"+modstring, inputxAODType, constitMods, inputname=inputPFO, outputname=pfoPrefix+modstring+"ParticleFlowObjects",label='EMPFlow'+(modstring if modstring!='CHS' else ''), jetinputtype="EMPFlow" )
435
436
437 if jetRecoDict["constitType"] == "tc":
438 # apply constituent pileup suppression
439 if "vs" in jetRecoDict["constitMod"]:
440 constitMods.append("Vor")
441 if "cs" in jetRecoDict["constitMod"]:
442 constitMods.append("CS")
443 if "sk" in jetRecoDict["constitMod"]:
444 constitMods.append("SK")
445 # build a modifier identifier :
446 modstring = ''.join(constitMods)
447 # prepend the cluster calib state :
448 if jetRecoDict["clusterCalib"] == "em":
449 constitMods = ["EM"] + constitMods
450 elif jetRecoDict["clusterCalib"] == "lcw":
451 constitMods = ["LC"] + constitMods
452 else:
453 log.error("cluster calib state not recognised : %s",jetRecoDict["clusterCalib"])
454 if not clustersKey:
455 raise ValueError("cluster key must be provided for topocluster jets.")
456
457
458 if not constitMods:
459 jetConstit = JetInputConstitSeq( "HLT_EMTopo",xAODType.CaloCluster, constitMods, inputname=clustersKey, outputname=clustersKey+modstring,label='EMTopo'+modstring)
460 else:
461 jetConstit = JetInputConstitSeq( "HLT_"+constitMods[0]+"Topo",xAODType.CaloCluster, constitMods, inputname=clustersKey, outputname=clustersKey+modstring,label=constitMods[0]+'Topo'+modstring)
462
463 # declare our new JetInputConstitSeq in the standard dictionary
464 from JetRecConfig.StandardJetConstits import stdConstitDic
465 stdConstitDic.setdefault(jetConstit.name, jetConstit)
466
467 return jetConstit
468
469
470# Arbitrary min pt for fastjet, set to be low enough for MHT(?)
471# Could/should adjust higher for large-R
472def defineJets(flags,jetRecoDict,clustersKey=None,prefix='',suffix='',pfoPrefix=None):
473 minpt = {
474 "default": {
475 4: 7000,
476 10: 50000 },
477 "lowpt": { # used for HI UPC jet reco, ATR-28158
478 4: 4000,
479 10: 50000 }
480 }
481
482 filter_type = "lowpt" if flags.Trigger.Jet.LowPtFilter else "default"
483 jetalg, jetradius, jetextra = interpretRecoAlg(jetRecoDict["recoAlg"])
484 actualradius = float(jetradius)/10
485 jetConstit = defineJetConstit(jetRecoDict,clustersKey,pfoPrefix)
486
487 suffix="_"+jetRecoDict["jetCalib"]+'_'*(suffix.strip()!='')+suffix
488 if jetDefNeedsTracks(jetRecoDict):
489 suffix += "_"+jetRecoDict["trkopt"]
490
491 jetDef = JetDefinition( "AntiKt", actualradius, jetConstit, ptmin=minpt[filter_type][jetradius], prefix=prefix, suffix=suffix, context=jetRecoDict["trkopt"])
492 return jetDef
493
494def defineReclusteredJets(jetRecoDict,smallRjets,inputlabel,prefix,suffix):
495 rcJetConstit = JetInputConstit("RCJet", xAODType.Jet, smallRjets, label=inputlabel+'RC', lock=True)
496 rcJetDef = JetDefinition( "AntiKt", 1.0, rcJetConstit, prefix=prefix, suffix=suffix, context=jetRecoDict['trkopt'])
497 return rcJetDef
498
499def defineGroomedJets(jetRecoDict,ungroomedDef):#,ungroomedJetsName):
500 from JetRecConfig.JetGrooming import JetTrimming, JetSoftDrop
501 groomAlg = jetRecoDict["recoAlg"][3:] if 'sd' in jetRecoDict["recoAlg"] else jetRecoDict["recoAlg"][-1]
502 suffix = "_"+ jetRecoDict["jetCalib"]
503 if jetDefNeedsTracks(jetRecoDict):
504 suffix += "_"+jetRecoDict["trkopt"]
505
506 groomDef = {
507 "sd":JetSoftDrop(ungroomedDef,ZCut=0.1,Beta=1.0,suffix=suffix,context=jetRecoDict['trkopt']),
508 "t" :JetTrimming(ungroomedDef,RClus=0.2,PtFrac=0.04,suffix=suffix,context=jetRecoDict['trkopt']),
509 }[groomAlg]
510 return groomDef
511
512#Jet Definition for VR track jets
513def defineVRTrackJets(Rmax, Rmin, VRMassScale, Ptmin, prefix, suffix):
514 jetconstit = JetInputConstit("PV0Track", xAODType.TrackParticle, "PV0JetSelectedTracks_ftf")
515 VRTrackJetDef = JetDefinition("AntiKt", Rmax, jetconstit, ptmin=Ptmin, VRMinR=Rmin, VRMassSc=VRMassScale, prefix=prefix, suffix=suffix, lock=True)
516 return VRTrackJetDef
517
518
519def defineHIJets(jetRecoDict,clustersKey=None,prefix='',suffix=''):
520 minpt = {2:7000, 3:7000, 4:7000, 6:7000, 10:50000}
521 jetalg, jetradius, jetextra = interpretRecoAlg(jetRecoDict["recoAlg"])
522 actualradius = float(jetradius)/10
523 context = "hip" if jetRecoDict["ionopt"] == "ionp" else "hi"
524 constitMods = [] # modifiers
525 jetConstit = []
526 jetConstit = JetInputConstitSeq( "HLT_HIConstit",xAODType.CaloCluster, constitMods, inputname=clustersKey, outputname=clustersKey,label='HI')
527 from JetRecConfig.StandardJetConstits import stdConstitDic
528 stdConstitDic.setdefault(jetConstit.name, jetConstit)
529
530 jetDef = JetDefinition( "AntiKt", actualradius, jetConstit, ptmin=minpt[jetradius], prefix=prefix, suffix=suffix, context = context)
531 return jetDef
jetRecoDictFromString(jet_def_string)
defineGroomedJets(jetRecoDict, ungroomedDef)
jetDefToString(jetDef)
— Interpreting JetDefinition —
interpretRecoAlg(recoAlg)
— General helpers —
defineHIJets(jetRecoDict, clustersKey=None, prefix='', suffix='')
cloneAndUpdateJetRecoDict(jetRecoDict, **kwargs)
getModSpec(modname, modspec='')
defineVRTrackJets(Rmax, Rmin, VRMassScale, Ptmin, prefix, suffix)
getHLTPrefix()
— String getters —
jetRecoDictToString(jetRecoDict)
— General reco dict handling —
defineJetConstit(jetRecoDict, clustersKey=None, pfoPrefix=None)
— Jet Object getters —
getPrefilterCleaningString(prefilters_list)
defineJets(flags, jetRecoDict, clustersKey=None, prefix='', suffix='', pfoPrefix=None)
jetChainParts(chainParts)
— Extracting jet chain parts —
getJetCalibDefaultString(recoAlg, constitType, trkopt)
getCalibMods(flags, jetRecoDict, rhoKey="auto")
— Modifier and decoration list getters —
defineReclusteredJets(jetRecoDict, smallRjets, inputlabel, prefix, suffix)