5def L2muCombMonConfig(helper, isPhaseII=False, **kwargs):
7 from AthenaConfiguration.ComponentFactory
import CompFactory
11 from MuonSelectorTools.MuonSelectorToolsConfig
import MuonLoosenedNonCalibratedSelectionToolCfg
12 from .MuonMatchingToolConfig
import MuonMatchingToolConfig
15 kwargs.setdefault(
"MuonContainerName",
"Muons")
17 monAlg = helper.addAlgorithm(CompFactory.L2muCombMon,
'L2muCombMon',
18 MuonSelectionTool = helper.result().popToolsAndMerge(MuonLoosenedNonCalibratedSelectionToolCfg(helper.flags,
20 MuonMatchingTool = helper.result().popToolsAndMerge(MuonMatchingToolConfig(helper.flags,
22 MuonContainerName=kwargs[
"MuonContainerName"])),
26 from TrigConfigSvc.TriggerConfigAccess
import getHLTMonitoringAccess
27 moniAccess = getHLTMonitoringAccess(helper.flags)
28 Chains = moniAccess.monitoredChains(signatures=
"muonMon",monLevels=[
"shifter",
"t0",
"val"])
29 monAlg.MonitoredChains = [c
for c
in Chains
if (
'mu24_ivarmedium' in c)
or (
'2mu14' in c)]
31 if len(monAlg.MonitoredChains) == 0:
32 monAlg.MonitoredChains = [c
for c
in Chains
if (
'mu6' in c)
or (
'mu8' in c)
or (
'2mu4' in c)]
35 if len(monAlg.MonitoredChains) == 0:
37 monAlg.MonitoredChains = [
'HLT_mu6_L1MU3V',
'HLT_mu8_L1MU8F',
'HLT_2m4_L12MU3V',
'HLT_mu6_L1MU5VF',
'HLT_mu24_ivarmedium_L1MU14FCH',
'HLT_2mu14_L12MU8F']
39 monAlg.Group = GroupName
42 histGroupNonSpecificChain = helper.addGroup(monAlg, GroupName,
'HLT/MuonMon/')
44 histGroupNonSpecificChain.defineHistogram(
'L2CBEta,L2CBPhi;L2muComb_Eta_vs_Phi',
45 title=
'L2muComb Eta vs Phi ;#eta;#phi',
46 type=
'TH2F', path=
'etaphi2D',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
48 histGroupNonSpecificChain.defineHistogram(
'L2CBAboveCut,LB;L2muComb_Over_OfflineCB_4GeV_Cut',
49 title=
'L2muComb Over OfflineCB 4GeV Cut;LB;Ratio',
50 type=
'TEfficiency', path=
'Ratio',xbins=400,xmin=1.,xmax=801.)
54 for chain
in monAlg.MonitoredChains:
56 histGroup = helper.addGroup(monAlg, GroupName+
'_'+chain,
'HLT/MuonMon/L2muComb/'+chain)
60 histGroup.defineHistogram(chain+
'_Pt;L2muComb_Pt',
61 title=
'L2muComb Pt '+chain+
';p_{T} [GeV];Events',
62 type=
'TH1F', path=
'',xbins=210,xmin=-105.,xmax=105.)
64 histGroup.defineHistogram(chain+
'_Eta;L2muComb_Eta',
65 title=
'L2muComb Eta '+chain+
';#eta;Events',
66 type=
'TH1F', path=
'',xbins=108,xmin=-2.7,xmax=2.7)
68 histGroup.defineHistogram(chain+
'_Phi;L2muComb_Phi',
69 title=
'L2muComb Phi '+chain+
';#phi;Events',
70 type=
'TH1F', path=
'',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
72 histGroup.defineHistogram(chain+
'_Eta,'+chain+
'_Phi;L2muComb_Eta_vs_Phi',
73 title=
'L2muComb Eta vs Phi '+chain+
';#eta;#phi',
74 type=
'TH2F', path=
'',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
78 histGroup.defineHistogram(chain+
'_Eta,'+chain+
'_Phi;L2muComb_Eta_vs_Phi_L2CB_success',
79 title=
'L2muComb Eta vs Phi (L2CB reconstruction success) '+chain+
';#eta;#phi',
80 cutmask=chain+
'_L2CB_success',
81 type=
'TH2F', path=
'',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
83 histGroup.defineHistogram(chain+
'_Eta,'+chain+
'_Phi;L2muComb_Eta_vs_Phi_L2CBOFFmatching_failure',
84 title=
'L2muComb Eta vs Phi (L2CB reconstruction success Off match failure) '+chain+
';#eta;#phi',
85 cutmask=chain+
'_L2CBOFFmatching_failure',
86 type=
'TH2F', path=
'',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
88 histGroup.defineHistogram(chain+
'_saEta,'+chain+
'_saPhi;L2MuonSA_Eta_vs_Phi_L2CB_failure',
89 title=
'L2MuonSA Eta vs Phi (L2CB reconstruction failure L2SA Off match success) '+chain+
';#eta;#phi',
90 cutmask=chain+
'_L2CB_failure',
91 type=
'TH2F', path=
'',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
95 histGroup.defineHistogram(chain+
'_saPt;L2muComb_failed_saPt',
96 title=
'L2MuonSA Pt (GeV/c) for muComb fails '+chain+
';p_{T} [GeV];Events',
97 cutmask=chain+
'_L2SA_success',
98 type=
'TH1F', path=
'',xbins=210,xmin=-105.,xmax=105.)
100 histGroup.defineHistogram(chain+
'_saEta;L2muComb_failed_saEta',
101 title=
'L2MuonSA Eta for muComb fails '+chain+
';#eta;Events',
102 cutmask=chain+
'_L2SA_success',
103 type=
'TH1F', path=
'',xbins=108,xmin=-2.7,xmax=2.7)
105 histGroup.defineHistogram(chain+
'_saPhi;L2muComb_failed_saPhi',
106 title=
'L2MuonSA Phi for muComb fails '+chain+
';#phi;Events',
107 cutmask=chain+
'_L2SA_success',
108 type=
'TH1F', path=
'',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
112 histGroup.defineHistogram(chain+
'_ptratio_toSA;L2muComb_ptratio_toSA',
113 title=
'L2muComb pt / L2MuonSA pt '+chain+
';p_{T} ratio;Events',
114 type=
'TH1F', path=
'',xbins=140,xmin=-0.5,xmax=3.)
116 histGroup.defineHistogram(chain+
'_dR_toSA;L2muComb_dR_toSA',
117 title=
'L2muComb delta R to L2MuonSA '+chain+
';#DeltaR;Events',
118 type=
'TH1F', path=
'',xbins=100,xmin=0.,xmax=0.5)
120 histGroup.defineHistogram(chain+
'_dEta_toSA;L2muComb_dEta_toSA',
121 title=
'L2muComb delta eta to L2MuonSA '+chain+
';#Delta#eta;Events',
122 type=
'TH1F', path=
'',xbins=120,xmin=-0.2,xmax=0.2)
124 histGroup.defineHistogram(chain+
'_dPhi_toSA;L2muComb_dPhi_toSA',
125 title=
'L2muComb delta phi to L2MuonSA '+chain+
';#Delta#phi;Events',
126 type=
'TH1F', path=
'',xbins=120,xmin=-0.2,xmax=0.2)
128 histGroup.defineHistogram(chain+
'_MF_error;L2muComb_MF_error',
129 title=
'L2muComb pointer to MuonFeature Error '+chain+
';;Events',
130 type=
'TH1I', path=
'',xbins=4,xmin=0,xmax=4,
131 xlabels=[
"No error",
"Missing muSATrackLink",
"TrackLink and ElementLinnk matching error",
"SA reconstruction Error"])
135 histGroup.defineHistogram(chain+
'_trkPt;L2muComb_trkPt',
136 title=
'L2muComb Trk Pt (GeV/c) '+chain+
';p_{T} [GeV];Events',
137 type=
'TH1F', path=
'',xbins=210,xmin=-105.,xmax=105.)
139 histGroup.defineHistogram(chain+
'_trkEta;L2muComb_trkEta',
140 title=
'L2muComb Trk Eta '+chain+
';#eta;Events',
141 type=
'TH1F', path=
'',xbins=108,xmin=-2.7,xmax=2.7)
143 histGroup.defineHistogram(chain+
'_trkPhi;L2muComb_trkPhi',
144 title=
'L2muComb Trk Phi '+chain+
';#phi;Events',
145 type=
'TH1F', path=
'',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
147 histGroup.defineHistogram(chain+
'_trkZ0;L2muComb_trkZ0',
148 title=
'L2muComb Trk z0 (mm) '+chain+
';z0[mm];Events',
149 type=
'TH1F', path=
'',xbins=150,xmin=-300.,xmax=300.)
151 histGroup.defineHistogram(chain+
'_trkChi2;L2muComb_trkChi2',
152 title=
'L2muComb Trk chi2 '+chain+
';#chi^{2};Events',
153 type=
'TH1F', path=
'',xbins=50,xmin=0.,xmax=10.)
157 histGroup.defineHistogram(chain+
'_ptratio_TrktoSA;L2muComb_ptratio_TrktoSA',
158 title=
'L2muComb Trk pt / L2MuonSA pt '+chain+
';p_{T} ratio;Events',
159 type=
'TH1F', path=
'',xbins=140,xmin=-0.5,xmax=3.)
161 histGroup.defineHistogram(chain+
'_dR_TrktoSA;L2muComb_dR_TrktoSA',
162 title=
'L2muComb delta R Trk to L2MuonSA '+chain+
';#DeltaR;Events',
163 type=
'TH1F', path=
'',xbins=100,xmin=0.,xmax=0.5)
165 histGroup.defineHistogram(chain+
'_dEta_TrktoSA;L2muComb_dEta_TrktoSA',
166 title=
'L2muComb delta eta Trk to L2MuonSA '+chain+
';#Delta#eta;Events',
167 type=
'TH1F', path=
'',xbins=120,xmin=-0.2,xmax=0.2)
169 histGroup.defineHistogram(chain+
'_dPhi_TrktoSA;L2muComb_dPhi_TrktoSA',
170 title=
'L2muComb delta phi Trk to L2MuonSA '+chain+
';#Delta#phi;Events',
171 type=
'TH1F', path=
'',xbins=120,xmin=-0.2,xmax=0.2)
175 histGroup.defineHistogram(chain+
'_dRmin;L2muComb_dR_toOffl',
176 title=
'dR between L2muComb and Offline '+chain+
';#DeltaR;Events',
177 type=
'TH1F', path=
'',xbins=100,xmin=0.,xmax=2.)
179 histGroup.defineHistogram(chain+
'_ptresol;L2muComb_ptresol_toOffl',
180 title=
'L2muComb pT resolution wrt Offline '+chain+
';p_{T} resol;Events',
181 type=
'TH1F', path=
'',xbins=100,xmin=-2.,xmax=2.)
183 histGroup.defineHistogram(chain+
'_offEta,'+chain+
'_ptresol;L2muComb_ptresol_toOffl_eta',
184 title=
'L2muComb pT resolution wrt Offline in eta '+chain+
';#eta;p_{T} resol',
185 type=
'TH2F', path=
'',xbins=16,xmin=-3.2,xmax=3.2, ybins=100,ymin=-2.,ymax=2.)
189 histGroup.defineHistogram(chain+
'_L2SARoI_dR;L2MuonSA_L2SARoI_dR_toRecMuonCB',
190 title=
'L2MuonSA L2SARoI dR wrt offline CB '+chain+
';dR(L2SARoI vs offl CB);Events',
191 type=
'TH1F', path=
'',xbins=100,xmin=0.,xmax=0.5)
193 histGroup.defineHistogram(chain+
'_offEta,'+chain+
'_L2SARoI_dEta;L2MuonSA_L2SARoI_dEta_vs_Eta_toRecMuonCB',
194 title=
'L2MuonSA L2SARoI wrt Offline CB muon, d#eta '+chain+
';offl CB #eta;d#eta(L2SARoI vs offl CB)',
195 type=
'TH2F', path=
'',xbins=54,xmin=-2.7,xmax=2.7, ybins=60,ymin=-0.3,ymax=0.3)
197 histGroup.defineHistogram(chain+
'_offEta,'+chain+
'_L2SARoI_dPhi;L2MuonSA_L2SARoI_dPhi_vs_Eta_toRecMuonCB',
198 title=
'L2MuonSA L2SARoI wrt Offline CB muon, d#phi '+chain+
';offl CB #eta;d#phi(L2SARoI vs offl CB)',
199 type=
'TH2F', path=
'',xbins=54,xmin=-2.7,xmax=2.7, ybins=44,ymin=-0.2,ymax=0.2)