5 '''@file MTMonitoring.py
6 @authors P-A. Delsart, Jona Bossio
8 @brief Python configuration for the Run III Trigger Jet Monitoring
11 from AthenaCommon.Logging
import logging
12 logger = logging.getLogger(__name__)
14 from TrigDecisionTool.TrigDecisionToolConfig
import getRun3NavigationContainerFromInput
31 OfflineJetCollections = dict()
33 OfflineJetCollections[
'pp'] = {
34 'AntiKt4EMTopoJets' : {
'MatchTo' :
'AntiKt4EMPFlowJets' },
35 'AntiKt4EMPFlowJets' : {
'MatchTo' :
'NONE' },
39 OfflineJetCollections[
'HI'] = {
40 'AntiKt4HIJets' : {
'MatchTo' :
'AntiKt4HIJets' },
51 L1JetCollections = dict()
53 match_smallRL1_OfflineJets_List = [
'AntiKt4EMPFlowJets',
'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf']
55 match_largeRL1_OfflineJets_List = [
'AntiKt4EMPFlowJets',
'HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf']
56 match_HIL1_OfflineJets_List = [
'AntiKt4HIJets',
'HLT_AntiKt4HIJets']
58 L1JetCollections[
'pp'] = {
59 'L1_jFexSRJetRoI': {
'MatchTo': match_smallRL1_OfflineJets_List},
60 'L1_gFexSRJetRoI': {
'MatchTo': match_smallRL1_OfflineJets_List},
61 'L1_gFexLRJetRoI': {
'MatchTo': match_largeRL1_OfflineJets_List},
64 L1JetCollections[
'HI'] = {
65 'L1_jFexSRJetRoI': {
'MatchTo': match_HIL1_OfflineJets_List},
66 'L1_gFexSRJetRoI': {
'MatchTo': match_HIL1_OfflineJets_List},
69 for case
in L1JetCollections.keys():
71 items = L1JetCollections[case].
items()
72 except (AttributeError, TypeError):
73 raise RuntimeError(
'L1JetCollections for %s is not a mapping type'%case)
78 except (AttributeError, TypeError):
79 raise RuntimeError(
'L1JetCollections value for %s is not a mapping type'%case)
81 if 'MatchTo' not in d:
82 errmsg =
'L1Collections entry %s has no (possibly empty) MatchType list' % (
84 raise RuntimeError(errmsg)
94 'L1_jFexSRJetRoI':
'L1jFexSRJetRoIContainerName',
95 'L1_gFexSRJetRoI':
'L1gFexJetRoIContainerName',
96 'L1_gFexLRJetRoI':
'L1gFexJetRoIContainerName',
99 for case
in L1JetCollections.keys():
100 for k, d
in L1JetCollections[case].
items():
102 if k
not in l1Coll2MatcherKey:
103 errmsg =
'Match(es) to an L1 container requested entry '\
104 '%s but no C++ MatcherAlg attribute name provided' % (
str(k),)
105 raise RuntimeError(errmsg)
111 Chain2L1JetCollDict = dict()
113 Chain2L1JetCollDict[
'pp'] = {
115 'L1_jJ40': [
'L1_jFexSRJetRoI'],
116 'L1_jJ50': [
'L1_jFexSRJetRoI'],
117 'L1_jJ160': [
'L1_jFexSRJetRoI'],
118 'L1_jJ85p0ETA21_3jJ40p0ETA25': [
'L1_jFexSRJetRoI'],
119 'L1_3jJ70p0ETA23': [
'L1_jFexSRJetRoI'],
120 'L1_4jJ40': [
'L1_jFexSRJetRoI'],
123 'L1_gJ20p0ETA25': [
'L1_gFexSRJetRoI'],
124 'L1_gJ50p0ETA25': [
'L1_gFexSRJetRoI'],
125 'L1_gJ100p0ETA25': [
'L1_gFexSRJetRoI'],
126 'L1_gJ400p0ETA25': [
'L1_gFexSRJetRoI'],
128 'L1_gLJ80p0ETA25': [
'L1_gFexLRJetRoI'],
129 'L1_gLJ100p0ETA25': [
'L1_gFexLRJetRoI'],
130 'L1_gLJ140p0ETA25': [
'L1_gFexLRJetRoI'],
131 'L1_gLJ160p0ETA25': [
'L1_gFexLRJetRoI'],
133 'L1_SC111-CjJ40': [
'L1_jFexSRJetRoI'],
134 'L1_HT190-jJ40s5pETA21': [
'L1_jFexSRJetRoI'],
137 Chain2L1JetCollDict[
'HI'] = {
139 'L1_jJ40': [
'L1_jFexSRJetRoI'],
140 'L1_jJ55': [
'L1_jFexSRJetRoI'],
141 'L1_jJ80': [
'L1_jFexSRJetRoI'],
143 'L1_jJ40p30ETA49': [
'L1_jFexSRJetRoI'],
153 JetCollections = dict()
155 JetCollections[
'pp'] = {
156 'HLT_AntiKt4EMTopoJets_subjesIS' : {
'MatchTo' :
'AntiKt4EMPFlowJets'},
157 'HLT_AntiKt4EMTopoJets_subjesIS_fastftag' : {
'MatchTo' :
'NONE'},
158 'HLT_AntiKt4EMTopoJets_subresjesgscIS_ftf' : {
'MatchTo' :
'AntiKt4EMPFlowJets'},
159 'HLT_AntiKt4EMTopoJets_subjesgscIS_ftf' : {
'MatchTo' :
'AntiKt4EMPFlowJets'},
160 'HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf' : {
'MatchTo' :
'AntiKt4EMPFlowJets'},
161 'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf' : {
'MatchTo' :
'AntiKt4EMPFlowJets'},
162 'HLT_AntiKt4EMPFlowJets_nojcalib_ftf' : {
'MatchTo' :
'NONE'},
163 'HLT_AntiKt10EMTopoRCJets_subjesIS' : {
'MatchTo' :
'NONE'},
164 'HLT_AntiKt10LCTopoJets_subjes' : {
'MatchTo' :
'NONE'},
165 'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes' : {
'MatchTo' :
'NONE'},
166 'HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_nojcalib_ftf' : {
'MatchTo' :
'NONE'},
167 'HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf' : {
'MatchTo' :
'NONE'},
170 JetCollections[
'HI'] = {
171 'HLT_AntiKt4HIJets' : {
'MatchTo':
'AntiKt4HIJets'},
172 'HLT_AntiKt4EMPFlowJets_jes_ftf' : {
'MatchTo':
'AntiKt4HIJets'},
178 Chains2Monitor = dict()
179 from TrigConfigSvc.TriggerConfigAccess
import getHLTMonitoringAccess
184 ListOfMonChains = monAccess.monitoredChains(signatures=
"jetMon", monLevels = [
"shifter",
"t0"])
186 default_dict = {
"HLTColl":
"NONE",
"RefChain":
"NONE" ,
"OfflineColl":
"NONE"}
187 Chains2Monitor[monMode] = dict((chain, default_dict.copy())
for chain
in ListOfMonChains)
190 for chainName
in Chains2Monitor[
'HI']:
191 if '_ion_' in chainName:
192 Chains2Monitor[
'HI'][chainName][
"HLTColl"] =
"HLT_AntiKt4HIJets"
193 Chains2Monitor[
'HI'][chainName][
"OfflineColl"] =
"AntiKt4HIJets"
195 Chains2Monitor[
'HI'][chainName][
"HLTColl"] =
"HLT_AntiKt4EMPFlowJets_jes_ftf"
196 Chains2Monitor[
'HI'][chainName][
"OfflineColl"] =
"AntiKt4EMPFlowJets"
201 if Chains2Monitor[
'HI'].
get(
'HLT_j60_ion_L1jJ40'): Chains2Monitor[
'HI'][
'HLT_j60_ion_L1jJ40'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
202 if Chains2Monitor[
'HI'].
get(
'HLT_j75_ion_L1jJ55'): Chains2Monitor[
'HI'][
'HLT_j75_ion_L1jJ55'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
203 if Chains2Monitor[
'HI'].
get(
'HLT_j85_ion_L1jJ55'): Chains2Monitor[
'HI'][
'HLT_j85_ion_L1jJ55'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
204 if Chains2Monitor[
'HI'].
get(
'HLT_j150_ion_L1jJ80'): Chains2Monitor[
'HI'][
'HLT_j150_ion_L1jJ80'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
205 if Chains2Monitor[
'HI'].
get(
'HLT_j200_ion_L1jJ80'): Chains2Monitor[
'HI'][
'HLT_j200_ion_L1jJ80'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
207 if Chains2Monitor[
'HI'].
get(
'HLT_j50f_ion_L1jJ40p30ETA49'): Chains2Monitor[
'HI'][
'HLT_j50f_ion_L1jJ40p30ETA49'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
208 if Chains2Monitor[
'HI'].
get(
'HLT_j60f_ion_L1jJ40p30ETA49'): Chains2Monitor[
'HI'][
'HLT_j60f_ion_L1jJ40p30ETA49'].update({
"RefChain":
"HLT_noalg_L1jTE50",
"OfflineColl":
"AntiKt4HIJets"})
210 elif monMode ==
"pp":
212 for chainName
in Chains2Monitor[
'pp']:
213 Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt4EMTopoJets_subjesIS"
214 if '_pf_' in chainName
and 'a10' not in chainName:
215 Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf"
216 Chains2Monitor[
'pp'][chainName][
"OfflineColl"] =
"AntiKt4EMPFlowJets"
217 elif 'a10' in chainName:
218 if 'a10t' in chainName: Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes"
219 elif 'sd_cssk_pf' in chainName: Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf"
220 elif 'a10r' in chainName: Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt10EMTopoRCJets_subjesIS"
221 else: Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt10LCTopoJets_subjes"
222 elif '_noalg_' in chainName:
223 Chains2Monitor[
'pp'][chainName][
"RefChain"] =
"HLT_j45_pf_ftf_preselj20_L1jJ40"
224 Chains2Monitor[
'pp'][chainName][
"OfflineColl"] =
"AntiKt4EMPFlowJets"
225 if 'gLJ' in chainName: Chains2Monitor[
'pp'][chainName][
"HLTColl"] =
"HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf"
229 if Chains2Monitor[
'pp'].
get(
'HLT_j420_L1jJ160'): Chains2Monitor[
'pp'][
'HLT_j420_L1jJ160'].update({
"RefChain":
"HLT_j85_L1jJ50",
"OfflineColl":
"AntiKt4EMPFlowJets"})
230 if Chains2Monitor[
'pp'].
get(
'HLT_3j200_L1jJ160'): Chains2Monitor[
'pp'][
'HLT_3j200_L1jJ160'].update({
"RefChain":
"HLT_j85_L1jJ50",
"OfflineColl":
"AntiKt4EMPFlowJets"})
231 if Chains2Monitor[
'pp'].
get(
'HLT_4j120_L13jJ90'): Chains2Monitor[
'pp'][
'HLT_4j120_L13jJ90'].update({
"RefChain":
"HLT_j85_L1jJ50",
"OfflineColl":
"AntiKt4EMPFlowJets"})
232 if Chains2Monitor[
'pp'].
get(
'HLT_5j80_pf_ftf_presel5j50_L14jJ40'): Chains2Monitor[
'pp'][
'HLT_5j80_pf_ftf_presel5j50_L14jJ40'].update({
"RefChain":
"HLT_j45_pf_ftf_preselj20_L1jJ40",
"OfflineColl":
"AntiKt4EMPFlowJets"})
233 if Chains2Monitor[
'pp'].
get(
'HLT_j400_pf_ftf_L1jJ160'): Chains2Monitor[
'pp'][
'HLT_j400_pf_ftf_L1jJ160'].update({
"RefChain":
"HLT_j85_pf_ftf_preselj50_L1jJ50",
"OfflineColl":
"AntiKt4EMPFlowJets"})
234 if Chains2Monitor[
'pp'].
get(
'HLT_j400_pf_ftf_preselj225_L1jJ160'): Chains2Monitor[
'pp'][
'HLT_j400_pf_ftf_preselj225_L1jJ160'].update({
"RefChain":
"HLT_j85_pf_ftf_preselj50_L1jJ50",
"OfflineColl":
"AntiKt4EMPFlowJets"})
237 errmsg =
'Returned empty Chains2Monitor due to invalid monMode'
238 raise RuntimeError(errmsg)
239 return Chains2Monitor
246 etaMin,etaMax = 0,2.5
248 if 'eta490_j' in chain:
249 etaMin,etaMax = 0,4.9
251 etaParts = chain.split(
'eta')
252 etaMinTemp = etaParts[0].
split(
'_')
253 etaMin = etaMinTemp[len(etaMinTemp)-1]
254 etaMin =
int(etaMin)/10
255 etaMax = etaParts[1].
split(
'_')[0]
256 etaMax =
int(etaMax)/10
259 if re.search(
r'\d{2,3}f_', chain):
260 etaMin,etaMax = 3.2,4.9
263 etaMin,etaMax = 0,4.9
269 xbins, xmin, xmax = 160,0.,800000.
271 if varname ==
"pt" or varname ==
"et":
273 if 'jJ500' in chain
or 'J400' in chain:
return 160,xmin,800000
274 else:
return 100,xmin,500000
277 threshold =
int(re.search(
r'\d+',chain.split(
"_")[1].
split(
'j')[1]).
group())
279 return 40, 0., 100000.
281 return 36, 20000., 200000.
284 xmin = 50000.+100000.*(
int(threshold/100)-1)
285 if threshold % 100 == 0:
286 xmin = 1000.*(threshold - 100.)
287 xmax = xmin + 200000.
297 xbins, xmin, xmax = 35, 30000., 100000.
298 return xbins, xmin, xmax
301 parts = chain.split(
'HT')
302 threshold = parts[1].
split(
'_')[0]
303 if 'XX' in threshold:
304 threshold = threshold.split(
'XX')[0]
305 xmin =
int(0.9 *
int(threshold))
307 xbins =
int((xmax-xmin)/binwidth)-1
308 return xbins, xmin, xmax
316 xvar = f
"{network_prefix}_p{f}"
317 varname = f
"ftag_p{f}"
318 fillerTools += [HistoSpec(varname, xvar=xvar, bins=(70, -0.2, 1.2), title=f
"{varname};{varname};;Entries")]
319 fastDipsSelectSpec = SelectSpec(f
"{network_prefix}_{cutname}",
'20<pt:GeV&|eta|<3.2', path=
'NoTriggerSelection/'+cutname, FillerTools=fillerTools)
320 conf.appendHistos(fastDipsSelectSpec)
325 from JetMonitoring.JetMonitoringConfig
import JetMonAlgSpec, HistoSpec, EventHistoSpec, SelectSpec, ToolSpec
326 from AthenaConfiguration.ComponentFactory
import CompFactory
329 ExtraOfflineHists = [
336 "TrackWidthPt1000[0]",
341 ExtraSmallROnlineHists = [
342 HistoSpec(
'et:GeV;eta', (100,0,750, 50,-5,5) , title=
'#eta vs E_{T};E_{T} [GeV];#eta;Entries'),
353 ExtraLargeROnlineHists = [
356 ExtraOnlineNJetHists = [
361 OfflineScaleMomenta = [
"ConstitScale",
"EMScale",
"PileupScale",
"EtaJESScale"]
362 OnlineScaleMomenta = [
"ConstitScale" ]
363 for var
in [
"pt",
"eta",
"m" ]:
364 for offlinescale
in OfflineScaleMomenta:
365 ExtraOfflineHists.append(
"Jet"+offlinescale+
"Momentum_"+var)
366 for onlinescale
in OnlineScaleMomenta:
367 ExtraSmallROnlineHists.append(
"Jet"+onlinescale+
"Momentum_"+var)
369 OnlineScaleMomenta.append(
"")
370 OfflineScaleMomenta.append(
"")
375 Schedules JetCopier tool to make a shallow copy of
376 the original offline/HLT jet container, for the JetMatcherAlg to decorate.
377 This prevents our jet monitoring from decorating
378 the original jet containers, which may end up being
379 persistified in AOD/ESD (ATLASRECTS-7168,ATR-27980,ATR-26076)
381 jcopy = CompFactory.JetCopier(
388 jprovider = CompFactory.JetRecAlg(
389 "jetalg_copy_"+outjets,
392 OutputContainer = outjets,
399 Schedules L1JetCopyAlgorithm to make a shallow copy of
400 the original L1 jet container, for the JetMatcherAlg to decorate.
401 This prevents our jet monitoring from decorating
402 the original jet containers, which may end up being
403 persistified in AOD/ESD (ATLASRECTS-7168,ATR-27980,ATR-26076).
404 The L1JetCopyAlgorithm is a templated class (e.g. L1JetCopyAlgorithm<JTM_JetRoIContainer>).
405 The python class name is what is generated by Athena during build time.
406 The template types are defined in JTMContainers.h.
409 jcopy_alg_name =
"l1jetcopy_alg_"+injets
410 if injets ==
"L1_jFexSRJetRoI":
411 jcopy_alg = CompFactory.L1JetCopyAlgorithm_JTM_jFexSRJetRoIContainer_(jcopy_alg_name)
412 elif injets
in [
"L1_gFexSRJetRoI",
"L1_gFexLRJetRoI"]:
413 jcopy_alg = CompFactory.L1JetCopyAlgorithm_JTM_gFexJetRoIContainer_(jcopy_alg_name)
415 raise ValueError(f
"L1 jet container {injets} not recognised")
416 jcopy_alg.JetInContainerName = injets
417 jcopy_alg.JetOutContainerName = outjets
423 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
427 if inputFlags.Reco.EnableHI: monMode =
'HI'
435 for chain,chaindict
in Chains2Monitor[monMode].
items():
436 if chaindict[
'HLTColl']
not in JetCollections[case]:
437 JetCollections[case][chaindict[
'HLTColl']] = {
'MatchTo':
'NONE'}
440 CopiedJetCollections = copy.deepcopy(JetCollections)
441 for hltColl,collDict
in JetCollections[monMode].
items():
442 if collDict[
'MatchTo'] !=
'NONE':
443 copiedhltColl = f
'{hltColl}_{copySuffix}'
444 CopiedJetCollections[monMode][copiedhltColl] = CopiedJetCollections[monMode].pop(hltColl)
446 jetcopyalg.ExtraInputs.add((
'xAOD::TrigCompositeContainer',
448 cfg.addEventAlgo(jetcopyalg)
449 for jetcalibscale
in OnlineScaleMomenta:
450 scalestring =
"_"+jetcalibscale
if jetcalibscale !=
"" else ""
451 name =
'Matching_{}{}_{}'.
format(hltColl,scalestring,collDict[
'MatchTo'])
452 alg = CompFactory.JetMatcherAlg(name,
453 JetContainerName1=copiedhltColl,
454 JetContainerName2=collDict[
'MatchTo'],
455 JetCalibScale=jetcalibscale)
457 alg.ExtraInputs.add((
'xAOD::TrigCompositeContainer',
459 cfg.addEventAlgo(alg)
462 CopiedOfflineJetCollections = copy.deepcopy(OfflineJetCollections)
463 for offjetColl,collDict
in OfflineJetCollections[monMode].
items():
464 if collDict[
'MatchTo'] !=
'NONE':
465 copiedjetcoll = f
'{offjetColl}_{copySuffix}'
466 CopiedOfflineJetCollections[monMode][copiedjetcoll] = CopiedOfflineJetCollections[monMode].pop(offjetColl)
468 cfg.addEventAlgo(jetcopyalg)
469 for jetcalibscale
in OfflineScaleMomenta:
470 scalestring =
"_"+jetcalibscale
if jetcalibscale !=
"" else ""
471 name =
'Matching_{}{}_{}'.
format(offjetColl,scalestring,collDict[
'MatchTo'])
472 alg = CompFactory.JetMatcherAlg(name,
473 JetContainerName1=copiedjetcoll,
474 JetContainerName2=collDict[
'MatchTo'],
475 JetCalibScale=jetcalibscale)
477 alg.ExtraInputs.add((
'xAOD::TrigCompositeContainer',
479 cfg.addEventAlgo(alg)
483 CopiedL1JetCollections = copy.deepcopy(L1JetCollections)
484 for l1jetColl,collDict
in L1JetCollections[monMode].
items():
485 copiedl1jetColl = f
'{l1jetColl}_{copySuffix}'
486 CopiedL1JetCollections[monMode][copiedl1jetColl] = CopiedL1JetCollections[monMode].pop(l1jetColl)
488 l1jetcopyalg.ExtraInputs.add((
'xAOD::TrigCompositeContainer',
490 cfg.addEventAlgo(l1jetcopyalg)
491 for matchjetcoll
in collDict[
'MatchTo']:
493 kwds = {
'name':
'Matching_{}_{}'.
format(l1jetColl,matchjetcoll),
494 l1Coll2MatcherKey[l1jetColl]: copiedl1jetColl,
495 'JetContainerName2': matchjetcoll,
499 alg = CompFactory.JetMatcherAlg(**kwds)
500 alg.ExtraInputs.add((
'xAOD::TrigCompositeContainer',
502 cfg.addEventAlgo(alg)
506 from AthenaMonitoring
import AthMonitorCfgHelper
507 helper = AthMonitorCfgHelper(inputFlags,
'TrigJetMonitorAlgorithm')
509 from AthenaMonitoring.EventFlagFilterToolConfig
import EventFlagFilterToolCfg
510 from AthenaMonitoring.BadLBFilterToolConfig
import LArBadLBFilterToolCfg
512 for jetcoll
in CopiedL1JetCollections[monMode]:
514 alg=l1jetconf.toAlg(helper)
518 for chain,jetcolls
in Chain2L1JetCollDict[monMode].
items():
519 for jetcoll
in jetcolls:
521 alg=l1chainconf.toAlg(helper)
525 for jetcoll
in CopiedOfflineJetCollections[monMode]:
526 offlineMonitorConf =
jetMonitoringConfig(inputFlags,jetcoll,CopiedOfflineJetCollections,monMode)
527 alg=offlineMonitorConf.toAlg(helper)
531 for jetcoll
in CopiedJetCollections[monMode]:
535 monitorConf.toAlg(helper)
538 for chain,chainDict
in Chains2Monitor[monMode].
items():
539 jetcoll = chainDict[
'HLTColl']
543 if 'noalg' not in chain:
545 alg=chainMonitorConfT.toAlg(helper)
549 alg=chainMonitorConfF.toAlg(helper)
552 if chainDict[
'RefChain'] !=
'NONE' and chainDict[
'OfflineColl'] !=
'NONE':
554 effMonitorConf.toAlg(helper)
556 cfg.merge(helper.result())
563 path =
'NoTriggerSelection' if isOnline
else 'standardHistos/'
564 minNjetBin = 1
if isOnline
else 0
566 TopLevelDir =
'HLT/JetMon/'
567 TopLevelDir +=
'Online/' if isOnline
else 'Offline/'
569 jetcollFolder = jetcoll
570 jetcollFolder=jetcoll.replace(f
"_{copySuffix}",
"")
571 Conf = JetMonAlgSpec(jetcoll+
"Mon",JetContainerName = jetcoll, defaultPath = path, topLevelDir=TopLevelDir, bottomLevelDir=jetcollFolder, failureOnMissingContainer=
False)
636 SelectSpec(
'central',
'|eta|<3.2', path, FillerTools = [
"pt",
"et",
"m"] ),
637 SelectSpec(
'forward',
'3.2<|eta|', path, FillerTools = [
"pt",
"et",
"m"] ),
638 SelectSpec(
'lowmu',
'avgMu<30', path, isEventVariable=
True, FillerTools = [
"pt",
"et",
"m",
"phi",
"eta"]),
639 SelectSpec(
'highmu',
'30<avgMu', path, isEventVariable=
True, FillerTools = [
"pt",
"et",
"m",
"phi",
"eta"]),
641 EventHistoSpec(
'njets', (25,minNjetBin,25), title=
'NJets;NJets;Entries' ),
642 EventHistoSpec(
'njetsPt20', (25,minNjetBin,25), title=
'NJetsPt20;NJetsPt20;Entries' ),
643 EventHistoSpec(
'njetsPt50', (25,minNjetBin,25), title=
'NJetsPt50;NJetsPt50;Entries' ),
652 path =
'NoTriggerSelection' if isOnline
else 'standardHistos/'
654 TopLevelDir =
'HLT/JetMon/'
655 TopLevelDir +=
'Online/' if isOnline
else 'Offline/'
657 jetcollFolder = jetcoll
658 jetcollFolder=jetcoll.replace(f
"_{copySuffix}",
"")
659 Conf = JetMonAlgSpec(jetcoll+
"Mon",JetContainerName = jetcoll, defaultPath = path, topLevelDir=TopLevelDir, bottomLevelDir=jetcollFolder, failureOnMissingContainer=
False)
717 HistoSpec(
'pt:GeV;m:GeV', (100,0,400, 100,0,400) , title=
'p_{T} vs mass;p_{T} [GeV];m [GeV];Entries'),
718 HistoSpec(
'eta;et:GeV', (100,-5,5, 100,0,400) , title=
'#eta vs e_{T};#eta;E_{T} [GeV];Entries'),
719 HistoSpec(
'phi;et:GeV', (60,-math.pi,math.pi, 100,0,400) , title=
'#phi vs E_{T};#phi;E_{T} [GeV];Entries'),
722 SelectSpec(
'central',
'|eta|<3.2', path, FillerTools = [
"pt",
"et",
"m"] ),
723 SelectSpec(
'forward',
'3.2<|eta|', path, FillerTools = [
"pt",
"et",
"m"] ),
724 SelectSpec(
'pt60',
'60<pt:GeV', path, FillerTools = [
"m",
"phi",
"eta",
"eta;phi"]),
731 '''Function to configures some algorithms in the monitoring system.'''
733 isOnline =
True if 'HLT' in jetcoll
else False
740 jetCollMonDetails = jetCollDict[monMode][jetcoll]
744 if 'AntiKt4' in jetcoll
or 'a4tcem' in jetcoll:
746 for hist
in ExtraSmallROnlineHists: conf.appendHistos(hist)
748 conf.appendHistos(
"Jvt")
749 conf.appendHistos(
"JVFCorr")
750 conf.appendHistos(
"JvtRpt")
751 conf.appendHistos(
"SumPtTrkPt500[0]")
752 conf.appendHistos(
"NumTrkPt1000[0]")
753 conf.appendHistos(
"TrackWidthPt1000[0]")
755 conf.appendHistos(
"SumPtChargedPFOPt500[0]")
756 conf.appendHistos(
"fCharged")
757 if "subresjesgscIS" in jetcoll:
761 if 'fastftag' in jetcoll:
766 if 'EMTopo' in jetcoll:
767 conf.appendHistos(
"Timing")
769 for hist
in ExtraLargeROnlineHists: conf.appendHistos(hist)
771 if jetCollMonDetails[
'MatchTo'] !=
'NONE':
772 def defineHistoForHLTJetMatch(conf, parentAlg, monhelper , path):
774 group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+
'/'+conf.bottomLevelDir+
'/NoTriggerSelection/')
776 for histname
in [
'ptdiff',
'energydiff',
'massdiff' ]:
777 group.defineHistogram(histname,title=histname, type=
"TH1F",
778 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
779 xbins=100 , xmin=-100000., xmax=100000. ,)
781 for histname
in [
'ptresp',
'energyresp',
'massresp' ]:
782 group.defineHistogram(histname,title=histname, type=
"TH1F",
783 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
784 xbins=100 , xmin=-2., xmax=2. ,)
786 group.defineHistogram(
'ptresp,ptref;ptresp_vs_ptRef',title=
'ptresponse vs ptRef', type=
"TH2F",
787 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
788 xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=0., ymax=500000.,)
790 group.defineHistogram(
'ptresp,etaref;ptresp_vs_etaRef',title=
'ptresponse vs etaRef', type=
"TH2F",
791 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
792 xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=-5., ymax=5.,)
794 group.defineHistogram(
'ptref,ptresp;ptRef_vs_ptresp',title=
'ptRef vs ptresponse', type=
"TH2F",
795 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
796 xbins=100 , xmin=0., xmax=400000., ybins=80, ymin=-2., ymax=2.,)
798 group.defineHistogram(
'etaref,ptresp;etaRef_vs_ptresp',title=
'etaRef vs ptresponse', type=
"TH2F",
799 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
800 xbins=100 , xmin=-5., xmax=5., ybins=80, ymin=-2., ymax=2.,)
802 matchedJetColl = jetCollMonDetails[
'MatchTo']
805 jetmatchKey =
'{}.matched_{}'.
format(jetcoll,matchedJetColl)
806 jetptdiffKey =
'{}.ptdiff_{}'.
format(jetcoll,matchedJetColl)
807 jetenergydiffKey =
'{}.energydiff_{}'.
format(jetcoll,matchedJetColl)
808 jetmassdiffKey =
'{}.massdiff_{}'.
format(jetcoll,matchedJetColl)
809 jetptrespKey =
'{}.ptresp_{}'.
format(jetcoll,matchedJetColl)
810 jetenergyrespKey =
'{}.energyresp_{}'.
format(jetcoll,matchedJetColl)
811 jetmassrespKey =
'{}.massresp_{}'.
format(jetcoll,matchedJetColl)
812 jetptrefKey =
'{}.ptRef_{}'.
format(jetcoll,matchedJetColl)
813 jetetarefKey =
'{}.etaRef_{}'.
format(jetcoll,matchedJetColl)
814 name =
'jetMatched_{}_{}'.
format(jetcoll,matchedJetColl)
815 conf.appendHistos(ToolSpec(
'JetHistoMatchedFiller', name,
816 JetMatchedKey=jetmatchKey, JetPtDiffKey=jetptdiffKey,
817 JetEnergyDiffKey=jetenergydiffKey,
818 JetMassDiffKey=jetmassdiffKey, JetPtRespKey=jetptrespKey,
819 JetEnergyRespKey=jetenergyrespKey, JetMassRespKey=jetmassrespKey,
820 JetPtRefKey=jetptrefKey,JetEtaRefKey=jetetarefKey,
821 defineHistoFunc=defineHistoForHLTJetMatch,Group=
'matchedJets_'+jetcoll)
824 for hist
in ExtraOfflineHists: conf.appendHistos(hist)
825 if 'AntiKt4' in jetcoll
and monMode==
"pp":
826 conf.appendHistos(SelectSpec(
'LooseBadFailedJets',
'LooseBad',
833 conf.appendHistos(
"SumPtChargedPFOPt500[0]")
834 conf.appendHistos(
"fCharged")
835 elif 'EMTopo' in jetcoll:
836 conf.appendHistos(
"Timing")
837 if jetCollMonDetails[
'MatchTo'] !=
'NONE':
838 def defineHistoForOfflineJetMatch(conf, parentAlg, monhelper , path):
840 group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+
'/'+conf.bottomLevelDir+
'/standardHistos/')
842 for histname
in [
'ptdiff',
'energydiff',
'massdiff' ]:
843 group.defineHistogram(histname,title=histname, type=
"TH1F",
844 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
845 xbins=100 , xmin=-100000., xmax=100000. ,)
847 for histname
in [
'ptresp',
'energyresp',
'massresp' ]:
848 group.defineHistogram(histname,title=histname, type=
"TH1F",
849 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
850 xbins=100 , xmin=-2., xmax=2. ,)
852 group.defineHistogram(
'ptresp,ptref;ptresp_vs_ptRef',title=
'ptresp vs ptRef', type=
"TH2F",
853 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
854 xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=0., ymax=500000.,)
856 group.defineHistogram(
'ptresp,etaref;ptresp_vs_etaRef',title=
'ptresp vs etaRef', type=
"TH2F",
857 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
858 xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=-5., ymax=5.,)
860 group.defineHistogram(
'ptref,ptresp;ptRef_vs_ptresp',title=
'ptRef vs ptresponse', type=
"TH2F",
861 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
862 xbins=100 , xmin=0., xmax=400000., ybins=80, ymin=-2., ymax=2.,)
864 group.defineHistogram(
'etaref,ptresp;etaRef_vs_ptresp',title=
'etaRef vs ptresponse', type=
"TH2F",
865 path=
'MatchedJets_{}'.
format(jetCollMonDetails[
'MatchTo']),
866 xbins=100 , xmin=-5., xmax=5., ybins=80, ymin=-2., ymax=2.,)
868 matchedJetColl = jetCollMonDetails[
'MatchTo']
869 jetmatchKey =
'{}.matched_{}'.
format(jetcoll,matchedJetColl)
870 jetptdiffKey =
'{}.ptdiff_{}'.
format(jetcoll,matchedJetColl)
871 jetenergydiffKey =
'{}.energydiff_{}'.
format(jetcoll,matchedJetColl)
872 jetmassdiffKey =
'{}.massdiff_{}'.
format(jetcoll,matchedJetColl)
873 jetptrespKey =
'{}.ptresp_{}'.
format(jetcoll,matchedJetColl)
874 jetenergyrespKey =
'{}.energyresp_{}'.
format(jetcoll,matchedJetColl)
875 jetmassrespKey =
'{}.massresp_{}'.
format(jetcoll,matchedJetColl)
876 jetptrefKey =
'{}.ptRef_{}'.
format(jetcoll,matchedJetColl)
877 jetetarefKey =
'{}.etaRef_{}'.
format(jetcoll,matchedJetColl)
878 name =
'jetMatched_{}_{}'.
format(jetcoll,matchedJetColl)
879 conf.appendHistos(ToolSpec(
'JetHistoMatchedFiller',name,
880 JetMatchedKey=jetmatchKey, JetPtDiffKey=jetptdiffKey,
881 JetEnergyDiffKey=jetenergydiffKey,
882 JetMassDiffKey=jetmassdiffKey, JetPtRespKey=jetptrespKey,
883 JetEnergyRespKey=jetenergyrespKey,
884 JetMassRespKey=jetmassrespKey,
885 JetPtRefKey=jetptrefKey, JetEtaRefKey=jetetarefKey,
886 defineHistoFunc=defineHistoForOfflineJetMatch,Group=
'matchedJets_'+jetcoll)
893 from TrigJetMonitoring.L1JetMonitoringConfig
import L1JetMonAlg
894 name = jetColl
if chain==
'' else jetColl+
'_'+chain
897 jetColl = jetColl.replace(f
"_{copySuffix}",
"")
899 if not jetDict[monMode][jetCollKey][
'MatchTo']:
900 conf = L1JetMonAlg(name,jetColl,jetCollKey,chain)
902 assert len(jetDict[monMode][jetCollKey][
'MatchTo']) == 2
904 conf = L1JetMonAlg(name,jetColl,jetCollKey,chain,
905 matched,jetDict[monMode][jetCollKey][
'MatchTo'][0],
906 jetDict[monMode][jetCollKey][
'MatchTo'][1])
911 '''Function to configures some algorithms in the monitoring system.'''
913 jetcollFolder = jetcoll
918 jetMonAlgSpecName = chain+
"TrigMon"
919 if not onlyUsePassingJets:
920 chainFolder = chainFolder +
"/ExpertHistos"
921 jetMonAlgSpecName = jetMonAlgSpecName +
"_ExpertHistos"
925 return parts[1].
split(
'_')[0]
927 def getEtaRangeString(chain):
928 etaMin, etaMax = 0, 32
929 if 'eta490_j' in chain:
930 etaMin, etaMax = 0, 49
932 etaParts = chain.split(
'eta')
933 etaMinTemp = etaParts[0].
split(
'_')
934 etaMin = etaMinTemp[len(etaMinTemp)-1]
935 etaMax = etaParts[1].
split(
'_')[0]
939 etaMin, etaMax = 32, 49
940 return 'Eta{}_{}'.
format(etaMin,etaMax)
942 def getNjetHistName(chain):
943 NjetHistName =
'NONE'
944 parts = chain.split(
'j')
946 multiplicity = parts[0].
split(
'_')[1]
947 if (chain.count(
'_j')-chain.count(
'_jes')) > 1
or multiplicity !=
'':
952 trigConf = JetMonAlgSpec(
954 JetContainerName = jetcoll,
955 TriggerChain = chain,
956 defaultPath = chainFolder,
957 topLevelDir=
"HLT/JetMon/Online/",
958 bottomLevelDir=jetcollFolder,
959 failureOnMissingContainer=
True,
960 onlyPassingJets=onlyUsePassingJets,
961 isExpressStreamJob=inputFlags.Common.doExpressProcessing,
964 trigConf.appendHistos(
971 for hist
in ExtraOnlineNJetHists: trigConf.appendHistos(EventHistoSpec(hist, (20,0,25), title=hist+
';'+hist+
';Entries'))
973 if 'ht' not in chain
and 'HT' not in chain
and 'dijet' not in chain
and 'DIJET' not in chain
and 'fbdj' not in chain
and 'noalg' not in chain:
974 NjetHistName = getNjetHistName(chain)
975 from JetMonitoring.JetStandardHistoSpecs
import knownEventVar
976 if knownEventVar.get(NjetHistName,
None)
is not None and NjetHistName
not in ExtraOnlineNJetHists:
977 trigConf.appendHistos(
978 EventHistoSpec(NjetHistName, (25,0,25), title=NjetHistName+
';'+NjetHistName+
';Entries' ),
980 NjetHistName = NjetHistName.replace(
'Et',
'Pt')
981 if knownEventVar.get(NjetHistName,
None)
is not None and NjetHistName
not in ExtraOnlineNJetHists:
982 trigConf.appendHistos(
983 EventHistoSpec(NjetHistName, (25,0,25), title=NjetHistName+
';'+NjetHistName+
';Entries' ),
985 if 'ftf' in chain
and 'a10' not in chain:
986 trigConf.appendHistos(
"Jvt")
987 trigConf.appendHistos(
"JVFCorr")
988 trigConf.appendHistos(
"JvtRpt")
990 if 'ht' in chain
or 'HT' in chain:
991 def defineHistoForHTChain(conf, parentAlg, monhelper , path):
993 group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+jetcollFolder+
'/')
996 group.defineHistogram(
"jetHT;HT",title=
"Jet HT;H_{T} [GeV];Entries", type=
"TH1F", path=chainFolder, xbins=xbins , xmin=xmin, xmax=xmax ,)
997 trigConf.appendHistos(ToolSpec(
'JetHistoHTFiller',
'JetHistoHTFiller_'+chain,MinPt=30.,MaxEta=3.2,FailureOnMissingContainer=
False,
998 defineHistoFunc=defineHistoForHTChain,Group=
'jetHT_'+jetcoll))
1003 '''Function to configures some algorithms in the monitoring system.'''
1005 jetcollFolder = onlinejetcoll
1013 def defineHistoForJetTrigg(conf, parentAlg, monhelper , path):
1015 group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+jetcollFolder+
'/')
1017 append =
"offlineCut_"+conf.name.split(
"_")[-1]
if "offlineCut" in conf.name
else "noOfflineCut"
1018 histname =
"trigEff_vs_"+conf.Var.Name+
"_"+append
1020 group.defineHistogram(
'trigPassed,jetVar;'+histname, title=histname, type=
"TEfficiency",
1022 xbins=xbins , xmin=xmin, xmax=xmax,)
1025 validchain = chain.replace(
'noalg',
'j0')
1026 parts = validchain.split(
'j')
1027 multiplicity = parts[0].
split(
'_')[1]
1028 if multiplicity !=
'': index =
int(multiplicity) - 1
1032 from JetMonitoring.JetMonitoringConfig
import retrieveVarToolConf
1033 trigConf = JetMonAlgSpec(
1035 JetContainerName = offlinejetcoll,
1036 TriggerChain = refChain,
1037 defaultPath = chainFolder,
1038 topLevelDir =
"HLT/JetMon/Online/",
1039 bottomLevelDir = jetcollFolder,
1040 failureOnMissingContainer =
True,
1041 onlyPassingJets =
False,
1043 trigConf.appendHistos(
1044 SelectSpec(
'eff',
'{}<|eta|<{}'.
format(etaMin,etaMax), chainFolder, SelectedIndex=index, FillerTools = [
1046 ToolSpec(
'JetHistoTriggEfficiency', chain,
1048 Group=
'jetTrigGroup_'+chain,
1051 ProbeTrigChain=chain,defineHistoFunc=defineHistoForJetTrigg),
1056 trigConf.appendHistos(
1057 SelectSpec(
'm50',
'50<m:GeV&{}<|eta|<{}'.
format(etaMin,etaMax), chainFolder, SelectedIndex=index, FillerTools = [
1058 ToolSpec(
'JetHistoTriggEfficiency', chain+
'_offlineCut_m50',
1059 Group=
'jetTrigGroup_'+chain+
'_m50',
1061 ProbeTrigChain=chain,defineHistoFunc=defineHistoForJetTrigg
1064 SelectSpec(
'et500',
'500<et:GeV&{}<|eta|<{}'.
format(etaMin,etaMax), chainFolder, SelectedIndex=index, FillerTools = [
1065 ToolSpec(
'JetHistoTriggEfficiency', chain+
'_offlineCut_et500',
1066 Group=
'jetTrigGroup_'+chain+
'_et500',
1069 ProbeTrigChain=chain,defineHistoFunc=defineHistoForJetTrigg
1076 if __name__==
'__main__':
1081 parser = argparse.ArgumentParser()
1082 parser.add_argument(
'--runTruthReco', action=
'store_true', dest=
'runTruthReco', default=
False)
1083 parser.add_argument(
'--genOfflineR10PF', action=
'store_true', dest=
'genOfflineR10PF', default=
False)
1084 parser.add_argument(
'--printDetailedConfig', action=
'store_true', dest=
'printDetailedConfig', default=
False)
1085 parser.add_argument(
'--input', action=
'store', dest=
'inputFile')
1086 args = parser.parse_args()
1087 RunTruth = args.runTruthReco
1088 GenOfflineR10PF = args.genOfflineR10PF
1089 PrintDetailedConfig = args.printDetailedConfig
1092 if args.inputFile
is not None: inputFile = args.inputFile
1094 logger.error(
'ERROR: No input file provided, exiting')
1098 from AthenaCommon.Logging
import log
1103 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
1105 flags.Input.Files = [inputFile]
1106 flags.Input.isMC =
True
1107 flags.Output.HISTFileName =
'AthenaMTMonitorOutput.root'
1111 if flags.Reco.EnableHI: monMode =
'HI'
1119 for chain,chaindict
in Chains2Monitor[monMode].
items():
1120 if chaindict[
'HLTColl']
not in JetCollections[case]:
1121 JetCollections[case][chaindict[
'HLTColl']] = {
'MatchTo':
'NONE'}
1124 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
1125 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
1129 outputlist = [
"xAOD::EventInfo#*",
"xAOD::VertexContainer#*",
"xAOD::JetContainer#AntiKt4*Jets",
"xAOD::JetAuxContainer#AntiKt4*JetsAux.-PseudoJet",
"xAOD::JetContainer#HLT_*",
"xAOD::JetAuxContainer#HLT_*Aux.-PseudoJet",
"xAOD::ShallowAuxContainer#HLT_*Aux.-PseudoJet"]
1132 from JetRecConfig.StandardSmallRJets
import AntiKt4Truth
1134 from JetRecConfig.JetRecConfig
import JetRecCfg
1138 key =
"{0}Jets".
format(AntiKt4Truth.basename)
1139 outputlist += [
"xAOD::JetContainer#"+key,
"xAOD::JetAuxContainer#"+key+
"Aux.-PseudoJet"]
1143 from JetRecConfig.JetDefinition
import JetConstitSeq, JetDefinition, xAODType
1144 EMPFlowCSSK = JetConstitSeq(
"EMPFlowCSSK", xAODType.ParticleFlow, [
"CorrectPFO",
"CS",
"SK",
"CHS"],
"JetETMissParticleFlowObjects",
"CSSKParticleFlowObjects", label=
"EMPFlowCSSK")
1145 AntiKt10EMPFlowCSSK = JetDefinition(
"AntiKt",1.0,EMPFlowCSSK,ptmin=2e3,)
1146 AntiKt10EMPFlowCSSK.modifiers = [
"ConstitFourMom",
"Sort",
"Filter:2000"]
1147 from JetRecConfig.JetGrooming
import JetSoftDrop
1148 from JetRecConfig.StandardLargeRJets
import standardrecomods,substrmods
1149 AntiKt10EMPFlowCSSKSoftDrop = JetSoftDrop(AntiKt10EMPFlowCSSK,modifiers=standardrecomods+substrmods,ZCut=0.1,Beta=1.0)
1151 from JetRecConfig.JetRecConfig
import JetRecCfg
1152 comp =
JetRecCfg(AntiKt10EMPFlowCSSKSoftDrop,flags)
1155 key =
"{0}Jets".
format(AntiKt10EMPFlowCSSKSoftDrop.basename)
1156 outputlist += [
"xAOD::JetContainer#"+key,
"xAOD::JetAuxContainer#"+key+
"Aux.-PseudoJet"]
1159 if RunTruth
or GenOfflineR10PF:
1161 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
1168 from AthenaMonitoring
import AthMonitorCfgHelper
1169 helper = AthMonitorCfgHelper(flags,
'TrigJetMonitorAlgorithm')
1170 cfg.merge(helper.result())
1173 for hltColl,collDict
in JetCollections[monMode].
items():
1174 if collDict[
'MatchTo'] !=
'NONE':
1175 for jetcalibscale
in OnlineScaleMomenta:
1176 scalestring =
"_"+jetcalibscale
if jetcalibscale !=
"" else ""
1177 name =
'Matching_{}{}_{}'.
format(hltColl,scalestring,collDict[
'MatchTo'])
1178 alg = CompFactory.JetMatcherAlg(name, JetContainerName1=hltColl,JetContainerName2=collDict[
'MatchTo'],JetCalibScale=jetcalibscale)
1180 cfg.addEventAlgo(alg,sequenceName=
'AthMonSeq_TrigJetMonitorAlgorithm')
1183 for offjetColl,collDict
in OfflineJetCollections[monMode].
items():
1184 if collDict[
'MatchTo'] !=
'NONE':
1185 for jetcalibscale
in OfflineScaleMomenta:
1186 scalestring =
"_"+jetcalibscale
if jetcalibscale !=
"" else ""
1187 name =
'Matching_{}{}_{}'.
format(offjetColl,scalestring,collDict[
'MatchTo'])
1188 alg = CompFactory.JetMatcherAlg(name, JetContainerName1=offjetColl,JetContainerName2=collDict[
'MatchTo'],JetCalibScale=jetcalibscale)
1190 cfg.addEventAlgo(alg,sequenceName=
'AthMonSeq_TrigJetMonitorAlgorithm')
1193 for l1jetColl,collDict
in L1JetCollections[monMode].
items():
1194 for matchjetcoll
in collDict[
'MatchTo']:
1195 if matchjetcoll !=
'NONE':
1196 name =
'Matching_{}_{}'.
format(l1jetColl,matchjetcoll)
1197 alg = CompFactory.JetMatcherAlg(name, L1JetContainerName1=l1jetColl,JetContainerName2=matchjetcoll,MatchL1=
True)
1199 cfg.addEventAlgo(alg,sequenceName=
'AthMonSeq_TrigJetMonitorAlgorithm')
1202 for jetcoll
in L1JetCollections[monMode]:
1204 l1jetconf.toAlg(helper)
1207 for chain,jetcoll
in Chain2L1JetCollDict[monMode].
items():
1209 l1chainconf.toAlg(helper)
1212 for jetcoll
in OfflineJetCollections[monMode]:
1214 offlineMonitorConf.toAlg(helper)
1217 for jetcoll
in JetCollections[monMode]:
1221 monitorConf.toAlg(helper)
1224 for chain,chainDict
in Chains2Monitor[monMode].
items():
1225 jetcoll = chainDict[
'HLTColl']
1229 if 'noalg' not in chain:
1231 chainMonitorConfT.toAlg(helper)
1234 chainMonitorConfF.toAlg(helper)
1236 if chainDict[
'RefChain'] !=
'NONE' and chainDict[
'OfflineColl'] !=
'NONE':
1238 chainDict[
'OfflineColl'], chain,
1239 chainDict[
'RefChain'])
1240 effMonitorConf.toAlg(helper)
1242 cfg.merge(helper.result())
1245 cfg.printConfig(withDetails=PrintDetailedConfig)