1 import FWCore.ParameterSet.Config
as cms
11 elif objtype ==
"refittedStandAloneMuons":
12 objtypeLatex=
"refittedStandAlone #mu"
13 elif objtype ==
"Ele":
15 elif objtype ==
"Photon":
17 elif objtype ==
"PFTau":
21 numer_description =
"# gen %s passed the %s" % (objtypeLatex,triggerpath)
22 denom_description =
"# gen %s " % (objtypeLatex)
24 if plot_type ==
"TurnOn1":
26 xAxis =
"p_{T} of Leading Generated %s (GeV/c)" % (objtype)
27 input_type =
"gen%sMaxPt1" % (objtype)
28 if plot_type ==
"TurnOn2":
29 title =
"Next-to-Leading pT Turn-On"
30 xAxis =
"p_{T} of Next-to-Leading Generated %s (GeV/c)" % (objtype)
31 input_type =
"gen%sMaxPt2" % (objtype)
32 if plot_type ==
"TurnOn3":
33 title =
"Next-to-next-to-Leading pT Turn-On"
34 xAxis =
"p_{T} of Next-to-next-to-Leading Generated %s (GeV/c)" % (objtype)
35 input_type =
"gen%sMaxPt3" % (objtype)
36 if plot_type ==
"TurnOn4":
37 title =
"SumEt Turn-On"
38 xAxis =
"SumEt of Leading Generated %s (GeV/c)" % (objtype)
39 input_type =
"gen%sSumEt" % (objtype)
40 if plot_type ==
"EffEta":
41 title =
"#eta Efficiency"
42 xAxis =
"#eta of Generated %s " % (objtype)
43 input_type =
"gen%sEta" % (objtype)
44 if plot_type ==
"EffPhi":
45 title =
"#phi Efficiency"
46 xAxis =
"#phi of Generated %s " % (objtype)
47 input_type =
"gen%sPhi" % (objtype)
48 if plot_type ==
"EffDxy":
49 title =
"Dxy Efficiency"
50 xAxis =
"Dxy of Generated %s " % (objtype)
51 input_type =
"gen%sDxy" % (objtype)
53 yAxis =
"%s / %s" % (numer_description, denom_description)
54 all_titles =
"%s for trigger %s; %s; %s" % (title, triggerpath,
56 return "Eff_%s_%s '%s' %s_%s %s" % (input_type,triggerpath,
57 all_titles,input_type,triggerpath,input_type)
65 def make_exo_postprocessor(analysis_name, plot_types=["TurnOn1", "TurnOn2", "TurnOn3", "TurnOn4", "EffEta", "EffPhi", "EffDxy"], object_types=["Mu","refittedStandAloneMuons","Track","Ele","Photon","PFTau","PFJet","MET","PFMET","PFMHT","GenMET","CaloJet","CaloMET","CaloMHT","l1MET"], extra_str_templates=[]):
66 postprocessor = hltExoticaPostProcessor.clone()
67 postprocessor.subDirs = [
"HLT/Exotica/" + analysis_name]
68 efficiency_strings = []
75 for plot_type
in plot_types:
76 for object_type
in object_types:
77 for trigger
in [x.replace(
"_v",
"")
for x
in _config.__getattribute__(analysis_name).hltPathsToCheck]:
79 efficiency_strings.append(this_efficiency_string)
80 efficiency_strings.append(this_efficiency_string.replace(
"Generated",
"Reconstructed").
replace(
"Gen",
"Reco").
replace(
"gen",
"rec"))
82 for str_template
in extra_str_templates:
83 this_extra_string = str_template.replace(
"@ANALYSIS@", analysis_name).
replace(
"@TRIGGER@", trigger)
84 efficiency_strings.append(this_extra_string)
85 efficiency_strings.append(this_extra_stringreplace(
"Generated",
"Reconstructed").
replace(
"Gen",
"Reco").
replace(
"gen",
"rec"))
86 postprocessor.efficiencyProfile = efficiency_strings
116 hltExoticaPostProcessors = cms.Sequence(
118 hltExoticaPostLowPtTrimuon +
120 hltExoticaPostHighPtDimuon +
121 hltExoticaPostHighPtDielectron +
122 hltExoticaPostLowPtDimuon +
123 hltExoticaPostLowPtDielectron +
125 hltExoticaPostHighPtElectron +
126 hltExoticaPostLowPtElectron +
128 hltExoticaPostHighPtPhoton +
129 hltExoticaPostDiPhoton +
132 hltExoticaPostCaloHT +
134 hltExoticaPostJetNoBptx +
135 hltExoticaPostMuonNoBptx +
137 hltExoticaPostDisplacedMuEG +
138 hltExoticaPostDisplacedDimuon +
140 hltExoticaPostMonojet +
141 hltExoticaPostMonojetBackup +
142 hltExoticaPostPureMET +
143 hltExoticaPostMETplusTrack +
144 hltExoticaPostSingleMuon +
146 hltExoticaPhotonMET +
147 hltExoticaHTDisplacedJets +
148 hltExoticaTracklessJets +