1 import FWCore.ParameterSet.Config
as cms
11 elif objtype ==
"Photon":
13 elif objtype ==
"Ele":
15 elif objtype ==
"MET" :
17 elif objtype ==
"PFTau":
22 numer_description =
"# gen %s passed the %s" % (objtypeLatex,triggerpath)
23 denom_description =
"# gen %s " % (objtypeLatex)
25 if plot_type ==
"TurnOn1":
27 xAxis =
"p_{T} of Leading Generated %s (GeV/c)" % (objtype)
28 input_type =
"gen%sMaxPt1" % (objtype)
29 if plot_type ==
"TurnOn2":
30 title =
"Next-to-Leading pT Turn-On" 31 xAxis =
"p_{T} of Next-to-Leading Generated %s (GeV/c)" % (objtype)
32 input_type =
"gen%sMaxPt2" % (objtype)
33 if plot_type ==
"EffEta":
34 title =
"#eta Efficiency" 35 xAxis =
"#eta of Generated %s " % (objtype)
36 input_type =
"gen%sEta" % (objtype)
37 if plot_type ==
"EffPhi":
38 title =
"#phi Efficiency" 39 xAxis =
"#phi of Generated %s " % (objtype)
40 input_type =
"gen%sPhi" % (objtype)
42 yAxis =
"%s / %s" % (numer_description, denom_description)
43 all_titles =
"%s for trigger %s; %s; %s" % (title, triggerpath,
45 return "Eff_%s_%s '%s' %s_%s %s" % (input_type,triggerpath,
46 all_titles,input_type,triggerpath,input_type)
52 reco_strings.append(entry
53 .
replace(
"Generated",
"Reconstructed")
56 strings.extend(reco_strings)
59 plot_types = [
"TurnOn1",
"TurnOn2",
"EffEta",
"EffPhi"]
62 obj_types = [
"Mu",
"Ele",
"Photon",
"MET",
"PFTau"]
65 efficiency_strings = []
70 for an
in _config.analysis:
71 s = _config.__getattribute__(an)
72 vstr = s.__getattribute__(
"hltPathsToCheck")
73 map(
lambda x: triggers.add(x.replace(
"_v",
"")),vstr)
74 triggers =
list(triggers)
78 for type
in plot_types:
85 for an
in _config.analysis:
86 efficiency_strings.append(
"EffSummaryPaths_"+an+
"_gen ' Efficiency of paths used in "+an+
" ; trigger path ' SummaryPaths_"+an+
"_gen_passingHLT SummaryPaths_"+an+
"_gen")
88 efficiency_strings.append(
"Eff_trueVtxDist_"+an+
"_gen_"+trig+
" ' Efficiency of "+trig+
" vs nb of interactions ; nb events passing each path ' trueVtxDist_"+an+
"_gen_"+trig+
" trueVtxDist_"+an+
"_gen")
94 hltSMPPostSingleEle = hltSMPPostProcessor.clone()
95 hltSMPPostSingleEle.subDirs = [
'HLT/SMP/SingleEle']
96 hltSMPPostSingleEle.efficiencyProfile = efficiency_strings
102 hltSMPPostSinglePhoton = hltSMPPostProcessor.clone()
103 hltSMPPostSinglePhoton.subDirs = [
'HLT/SMP/SinglePhoton']
104 hltSMPPostSinglePhoton.efficiencyProfile = efficiency_strings
106 hltSMPPostProcessors = cms.Sequence(
109 hltSMPPostSinglePhoton
def replace(string, replacements)
def efficiency_string(objtype, plot_type, triggerpath)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def add_reco_strings(strings)