1 import FWCore.ParameterSet.Config
as cms
6 plot_type, output_label=None):
8 if output_label
is None:
9 output_label = numer_label
10 if denom_label ==
"All" and numer_label !=
"L1":
11 output_description =
"Full Path"
13 output_description = numer_label
14 if denom_label ==
"All":
15 denom_description =
"# Gen #mu"
17 denom_description =
"# Gen #mu Matched to %s" % (denom_label)
18 numer_description =
"# Gen #mu Matched to %s" % (numer_label)
20 if plot_type ==
"TurnOn1":
22 xAxis =
"p_{T} of Leading Generated Muon (GeV)"
23 input_type =
"PassMaxPt1"
24 if plot_type ==
"TurnOn2":
25 title =
"Next-to-Leading pT Turn-On"
26 xAxis =
"p_{T} of Next-to-Leading Generated Muon (GeV)"
27 input_type =
"PassMaxPt2"
28 if plot_type ==
"EffEta":
29 title =
"#eta Efficiency"
30 xAxis =
"#eta of Generated Muon (GeV)"
31 input_type =
"PassEta"
32 if plot_type ==
"EffPhi":
33 title =
"#phi Efficiency"
34 xAxis =
"#phi of Generated Muon (GeV)"
35 input_type =
"PassPhi"
37 yAxis =
"%s / %s" % (numer_description, denom_description)
38 all_titles =
"%s for %s; %s; %s" % (title, output_description,
40 return "gen%s_%s '%s' gen%s_%s gen%s_%s" % (plot_type, output_label,
41 all_titles, input_type,
42 numer_label, input_type,
49 reco_strings.append(entry
50 .
replace(
"Generated",
"Reconstructed")
53 strings.extend(reco_strings)
56 plot_types = [
"TurnOn1",
"TurnOn2",
"EffEta",
"EffPhi"]
57 efficiency_strings = []
61 for type
in plot_types:
63 for step
in [
"L2",
"L2Iso",
"L3",
"Tk",
"L3EcalIso",
"L3HcalIso",
"L3TkIso"]:
74 hltMuonPostMain = hltMuonPostProcessor.clone()
75 hltMuonPostMain.subDirs = [
'HLT/Muon/Distributions/*']
76 hltMuonPostMain.efficiencyProfile = efficiency_strings
78 hltMuonPostNonIso = hltMuonPostMain.clone()
80 hltMuonPostNonIso.subDirs = [
'HLT/Muon/Distributions/((?!Iso).)*$']
81 hltMuonPostNonIso.efficiencyProfile = noniso_strings
83 hltMuonPostIso = hltMuonPostMain.clone()
84 hltMuonPostIso.subDirs = [
'HLT/Muon/Distributions/.*Iso.*$']
85 hltMuonPostIso.efficiencyProfile = iso_strings
87 hltMuonPostProcessors = cms.Sequence(