49 def make_smp_postprocessor(analysis_name, plot_types=["TurnOn1", "TurnOn2", "EffEta", "EffPhi"], object_types=["Mu","Ele","Photon","MET","PFMET","PFTau","Jet"], extra_str_templates=[]):
50 postprocessor = hltSMPPostProcessor.clone()
51 postprocessor.subDirs = [
"HLT/SMP/" + analysis_name]
52 efficiency_strings = []
54 efficiency_summary_string =
"EffSummaryPaths_" + analysis_name +
"_gen ' Efficiency of paths used in " + analysis_name +
" ; trigger path ' SummaryPaths_" + analysis_name +
"_gen_passingHLT SummaryPaths_" + analysis_name +
"_gen" 55 efficiency_strings.append(efficiency_summary_string)
56 efficiency_strings.append(efficiency_summary_string.replace(
"Generated",
"Reconstructed").
replace(
"Gen",
"Reco").
replace(
"gen",
"rec"))
58 for plot_type
in plot_types:
59 for object_type
in object_types:
60 for trigger
in [x.replace(
"_v",
"")
for x
in _config.__getattribute__(analysis_name).hltPathsToCheck]:
62 efficiency_strings.append(this_efficiency_string)
63 efficiency_strings.append(this_efficiency_string.replace(
"Generated",
"Reconstructed").
replace(
"Gen",
"Reco").
replace(
"gen",
"rec"))
65 for str_template
in extra_str_templates:
66 this_extra_string = str_template.replace(
"@ANALYSIS@", analysis_name).
replace(
"@TRIGGER@", trigger)
67 efficiency_strings.append(this_extra_string)
68 efficiency_strings.append(this_extra_string.replace(
"Generated",
"Reconstructed").
replace(
"Gen",
"Reco").
replace(
"gen",
"rec"))
70 postprocessor.efficiencyProfile = efficiency_strings
def make_efficiency_string(objtype, plot_type, triggerpath)
def make_smp_postprocessor(analysis_name, plot_types=["TurnOn1", TurnOn2, EffEta, EffPhi, object_types=["Mu", Ele, Photon, MET, PFMET, PFTau, Jet, extra_str_templates=[])
def replace(string, replacements)