44 """ Configure AFP+jet chains monitoring algs """
46 monConfig = AthMonitorCfgHelper(flags,
'FwdAFPJetMonitoringAlgs')
51 ref_chains = [
'HLT_mb_sp_L1RD0_FILLED',
'HLT_mb_sptrk_L1RD0_FILLED',
'HLT_noalg_L1RD0_FILLED',
52 'HLT_noalg_L1AFP_A_OR_C',
'HLT_noalg_L1AFP_A_OR_C']
54 log.info(f
'Monitoring {len(chains_afp)} AFP+DiJet chains')
55 log.debug([name
for name, _
in chains_afp])
58 for jet, container
in jet_containers.items():
59 algEff = monConfig.addAlgorithm(CompFactory.FwdAFPJetMonitoringAlg,
'FwdAFP' + jet +
'JetMonitoringAlg')
61 algEff.chains = [name
for name, _
in chains_afp]
62 algEff.jetContainer = container
64 for chain, level
in chains_afp:
65 afpJetGroup = monConfig.addGroup(algEff, f
'{chain}_{container}', topPath=f
'HLT/FwdAFP/{level}/Jet/{chain}/{container}/')
66 afpJetGroup.defineHistogram(
'jetPt', title=f
'{jet} jet pT;Jet pT [GeV];Entries', xbins=100, xmin=0, xmax=200)
67 afpJetGroup.defineHistogram(
'jetEta', title=f
'{jet} jet eta;Jet #eta;Entries', xbins=100, xmin=-4.9, xmax=4.9)
68 afpJetGroup.defineHistogram(
'jetPhi', title=f
'{jet} jet phi;Jet #varphi;Entries', xbins=100, xmin=-math.pi, xmax=math.pi)
69 afpJetGroup.defineHistogram(
'jetEta,jetPhi', type=
'TH2F', title=f
'{jet} jet eta vs phi;Jet #eta;Jet #varphi;Entries',
70 xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=-math.pi, ymax=math.pi)
71 afpJetGroup.defineHistogram(
'jetEta,jetPt', type=
'TH2F', title=f
'{jet} jet eta vs phi;Jet #eta;Jet pT [GeV];Entries',
72 xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=0, ymax=200)
74 afpJetGroup.defineHistogram(
'leadingJetPt', title=f
'Leading {jet} jet pT;Leading jet pT [GeV];Entries',
75 xbins=100, xmin=0, xmax=200)
76 afpJetGroup.defineHistogram(
'leadingJetEta', title=f
'Leading {jet} jet eta;Leading jet #eta;Entries',
77 xbins=100, xmin=-4.9, xmax=4.9)
78 afpJetGroup.defineHistogram(
'leadingJetPhi', title=f
'Leading {jet} jet phi;Leading jet #varphi;Entries',
79 xbins=100, xmin=-math.pi, xmax=math.pi)
80 afpJetGroup.defineHistogram(
'leadingJetEta,leadingJetPhi', type=
'TH2F',
81 title=f
'Leading {jet} jet eta vs phi;Leading jet #eta;Leading jet #varphi;Entries',
82 xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=-math.pi, ymax=math.pi)
83 afpJetGroup.defineHistogram(
'leadingJetEta,leadingJetPt', type=
'TH2F',
84 title=f
'Leading {jet} jet eta vs phi;Leading jet #eta;Leading jet pT [GeV];Entries',
85 xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=0, ymax=200)
88 algEff = monConfig.addAlgorithm(CompFactory.FwdAFPJetEffMonitoringAlg,
'FwdAFPJetEffMonitoringAlg')
89 algEff.chains = [name
for name, _l
in chains_afp
for _r
in range(len(ref_chains))]
90 algEff.references = ref_chains * len(chains_afp)
92 for chain, level
in chains_afp:
93 for ref
in ref_chains:
94 afpJetEffGroup = monConfig.addGroup(algEff, f
'{chain}_{ref}', topPath=f
'HLT/FwdAFP/{level}/Jet/Eff/')
95 afpJetEffGroup.defineHistogram(f
'effPassed,leadingJetPt;{chain}_vs_{ref}', type=
'TEfficiency',
96 title=f
'{chain} vs {ref};Leading jet pT [GeV];Efficiency', xbins=100, xmin=0, xmax=200)
98 return monConfig.result()