CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
hltHiggsPostProcessors_cff Namespace Reference

Functions

def make_efficiency_string
 
def make_higgs_postprocessor
 

Variables

tuple hltHiggsPostAHttH = make_higgs_postprocessor("AHttH", extra_str_templates=[truevtx_string_template, TTHbbej_HtDist_template])
 
tuple hltHiggsPostDoubleHinTaus = make_higgs_postprocessor("DoubleHinTaus", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostH2tau = make_higgs_postprocessor("H2tau", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostHgg = make_higgs_postprocessor("Hgg", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostHiggsDalitz = make_higgs_postprocessor("HiggsDalitz", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostHtaunu = make_higgs_postprocessor("Htaunu", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostHWW = make_higgs_postprocessor("HWW", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostHZZ = make_higgs_postprocessor("HZZ", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostHZZControlPaths = make_higgs_postprocessor("HZZControlPaths", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostMSSMHbb = make_higgs_postprocessor("MSSMHbb", plot_types=MSSMHbb_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostMSSMHbbmu = make_higgs_postprocessor("MSSMHbbmu", plot_types=MSSMHbbmu_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostMuonJet = make_higgs_postprocessor("MuonJet", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostProcessors
 
tuple hltHiggsPostTTHbbej = make_higgs_postprocessor("TTHbbej", extra_str_templates=[truevtx_string_template, TTHbbej_HtDist_template])
 
tuple hltHiggsPostVBFHbb_0btag = make_higgs_postprocessor("VBFHbb_0btag", plot_types=VBFHbb_0btag_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostVBFHbb_1btag = make_higgs_postprocessor("VBFHbb_1btag", plot_types=VBFHbb_1btag_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostVBFHbb_2btag = make_higgs_postprocessor("VBFHbb_2btag", object_types=["Jet"], plot_types=VBFHbb_2btag_plot_types, extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostVBFHToInv = make_higgs_postprocessor("VBFHToInv", extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostWHToENuBB = make_higgs_postprocessor("WHToENuBB", extra_str_templates=[truevtx_string_template, TTHbbej_HtDist_template])
 
tuple hltHiggsPostX4b = make_higgs_postprocessor("X4b", plot_types=X4b_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])
 
tuple hltHiggsPostZnnHbb = make_higgs_postprocessor("ZnnHbb", plot_types=ZnnHbb_plot_types, object_types=["Jet", "PFMET"], extra_str_templates=[truevtx_string_template])
 
list MSSMHbb_plot_types = ["EffEta", "EffPhi", "TurnOn1"]
 
list MSSMHbbmu_plot_types = ["EffEta", "EffPhi", "TurnOn1"]
 
tuple NminOneCutNames = ("EffdEtaqq", "Effmqq", "EffdPhibb", "EffCSV1", "EffCSV2", "EffCSV3", "EffmaxCSV", "", "", "TurnOn1", "TurnOn2", "TurnOn3", "TurnOn4")
 
 NminOneCuts = _config.VBFHbb_2btag.NminOneCuts
 
string truevtx_string_template = "Eff_trueVtxDist_@ANALYSIS@_gen_@TRIGGER@ ' Efficiency of @TRIGGER@ vs nb of interactions ; nb events passing each path ' trueVtxDist_@ANALYSIS@_gen_@TRIGGER@ trueVtxDist_@ANALYSIS@_gen"
 
string TTHbbej_HtDist_template = "Eff_HtDist_@ANALYSIS@_gen_@TRIGGER@ ' Efficiency of @TRIGGER@ vs sum pT of jets ; sum pT of jets ' HtDist_@ANALYSIS@_gen_@TRIGGER@ HtDist_@ANALYSIS@_gen"
 
list VBFHbb_0btag_plot_types = []
 
list VBFHbb_1btag_plot_types = []
 
list VBFHbb_2btag_plot_types = []
 
list X4b_plot_types = ["EffEta", "EffPhi", "TurnOn1"]
 
list ZnnHbb_plot_types = ["EffEta", "EffPhi", "TurnOn1"]
 

Function Documentation

def hltHiggsPostProcessors_cff.make_efficiency_string (   objtype,
  plot_type,
  triggerpath 
)

Definition at line 6 of file hltHiggsPostProcessors_cff.py.

Referenced by make_higgs_postprocessor().

6 
7 def make_efficiency_string(objtype,plot_type,triggerpath):
8  # --- IMPORTANT: Add here a elif if you are introduce a new collection
9  # (see EVTColContainer::getTypeString)
10  if objtype == "Mu":
11  objtypeLatex="#mu"
12  elif objtype == "Photon":
13  objtypeLatex="#gamma"
14  elif objtype == "Ele":
15  objtypeLatex="e"
16  elif objtype == "MET" :
17  objtypeLatex="MET"
18  elif objtype == "PFMET" :
19  objtypeLatex="PFMET"
20  elif objtype == "PFTau":
21  objtypeLatex="#tau"
22  elif objtype == "Jet":
23  objtypeLatex="jet"
24  else:
25  objtypeLatex=objtype
26 
27  numer_description = "# gen %s passed the %s" % (objtypeLatex,triggerpath)
28  denom_description = "# gen %s " % (objtypeLatex)
29 
30  if plot_type == "TurnOn1":
31  title = "pT Turn-On"
32  xAxis = "p_{T} of Leading Generated %s (GeV/c)" % (objtype)
33  input_type = "gen%sMaxPt1" % (objtype)
34  elif plot_type == "TurnOn2":
35  title = "Next-to-Leading pT Turn-On"
36  xAxis = "p_{T} of Next-to-Leading Generated %s (GeV/c)" % (objtype)
37  input_type = "gen%sMaxPt2" % (objtype)
38  elif plot_type == "EffEta":
39  title = "#eta Efficiency"
40  xAxis = "#eta of Generated %s " % (objtype)
41  input_type = "gen%sEta" % (objtype)
42  elif plot_type == "EffPhi":
43  title = "#phi Efficiency"
44  xAxis = "#phi of Generated %s " % (objtype)
45  input_type = "gen%sPhi" % (objtype)
46  elif "TurnOn" in plot_type:
47  title = "%sth Leading pT Turn-On" % (plot_type[-1])
48  xAxis = "p_{T} of %sth Leading Generated %s (GeV/c)" % (plot_type[-1], objtype)
49  input_type = "gen%sMaxPt%s" % (objtype, plot_type[-1])
50  elif plot_type == "EffdEtaqq":
51  title = "#Delta #eta_{qq} Efficiency"
52  xAxis = "#Delta #eta_{qq} of Generated %s " % (objtype)
53  input_type = "gen%sdEtaqq" % (objtype)
54  elif plot_type == "Effmqq":
55  title = "m_{qq} Efficiency"
56  xAxis = "m_{qq} of Generated %s " % (objtype)
57  input_type = "gen%smqq" % (objtype)
58  elif plot_type == "EffdPhibb":
59  title = "#Delta #phi_{bb} Efficiency"
60  xAxis = "#Delta #phi_{bb} of Generated %s " % (objtype)
61  input_type = "gen%sdPhibb" % (objtype)
62  elif plot_type == "EffCSV1":
63  title = "CSV1 Efficiency"
64  xAxis = "CSV1 of Generated %s " % (objtype)
65  input_type = "gen%sCSV1" % (objtype)
66  elif plot_type == "EffCSV2":
67  title = "CSV2 Efficiency"
68  xAxis = "CSV2 of Generated %s " % (objtype)
69  input_type = "gen%sCSV2" % (objtype)
70  elif plot_type == "EffCSV3":
71  title = "CSV3 Efficiency"
72  xAxis = "CSV3 of Generated %s " % (objtype)
73  input_type = "gen%sCSV3" % (objtype)
74  elif plot_type == "EffmaxCSV":
75  title = "max CSV Efficiency"
76  xAxis = "max CSV of Generated %s " % (objtype)
77  input_type = "gen%smaxCSV" % (objtype)
78 
79  yAxis = "%s / %s" % (numer_description, denom_description)
80  all_titles = "%s for trigger %s; %s; %s" % (title, triggerpath,
81  xAxis, yAxis)
82  return "Eff_%s_%s '%s' %s_%s %s" % (input_type,triggerpath,
83  all_titles,input_type,triggerpath,input_type)
84 
#--- IMPORTANT: Trigger are extracted from the hltHiggsValidator_cfi.py module
def hltHiggsPostProcessors_cff.make_higgs_postprocessor (   analysis_name,
  plot_types = ["TurnOn1",
  TurnOn2,
  EffEta,
  EffPhi,
  object_types = ["Mu",
  Ele,
  Photon,
  MET,
  PFMET,
  PFTau,
  Jet,
  extra_str_templates = [] 
)

Definition at line 86 of file hltHiggsPostProcessors_cff.py.

References make_efficiency_string(), and python.rootplot.root2matplotlib.replace().

86 
87 def make_higgs_postprocessor(analysis_name, plot_types=["TurnOn1", "TurnOn2", "EffEta", "EffPhi"], object_types=["Mu","Ele","Photon","MET","PFMET","PFTau","Jet"], extra_str_templates=[]):
88  postprocessor = hltHiggsPostProcessor.clone()
89  postprocessor.subDirs = ["HLT/Higgs/" + analysis_name]
90  efficiency_strings = [] # List of plots to look for. This is quite a bit larger than the number of plots that will be made.
91 
92  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"
93  efficiency_strings.append(efficiency_summary_string)
94  efficiency_strings.append(efficiency_summary_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec"))
95 
96  for plot_type in plot_types:
97  for object_type in object_types:
98  for trigger in [x.replace("_v", "") for x in _config.__getattribute__(analysis_name).hltPathsToCheck]:
99  this_efficiency_string = make_efficiency_string(object_type, plot_type, trigger)
100  efficiency_strings.append(this_efficiency_string)
101  efficiency_strings.append(this_efficiency_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec"))
102 
103  for str_template in extra_str_templates:
104  this_extra_string = str_template.replace("@ANALYSIS@", analysis_name).replace("@TRIGGER@", trigger)
105  efficiency_strings.append(this_extra_string)
106  efficiency_strings.append(this_extra_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec"))
107 
108  postprocessor.efficiencyProfile = efficiency_strings
109  return postprocessor

Variable Documentation

tuple hltHiggsPostProcessors_cff.hltHiggsPostAHttH = make_higgs_postprocessor("AHttH", extra_str_templates=[truevtx_string_template, TTHbbej_HtDist_template])

Definition at line 125 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostDoubleHinTaus = make_higgs_postprocessor("DoubleHinTaus", extra_str_templates=[truevtx_string_template])

Definition at line 117 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostH2tau = make_higgs_postprocessor("H2tau", extra_str_templates=[truevtx_string_template])

Definition at line 119 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostHgg = make_higgs_postprocessor("Hgg", extra_str_templates=[truevtx_string_template])

Definition at line 114 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostHiggsDalitz = make_higgs_postprocessor("HiggsDalitz", extra_str_templates=[truevtx_string_template])

Definition at line 118 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostHtaunu = make_higgs_postprocessor("Htaunu", extra_str_templates=[truevtx_string_template])

Definition at line 120 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostHWW = make_higgs_postprocessor("HWW", extra_str_templates=[truevtx_string_template])

Definition at line 111 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostHZZ = make_higgs_postprocessor("HZZ", extra_str_templates=[truevtx_string_template])

Definition at line 113 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostHZZControlPaths = make_higgs_postprocessor("HZZControlPaths", extra_str_templates=[truevtx_string_template])

Definition at line 112 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostMSSMHbb = make_higgs_postprocessor("MSSMHbb", plot_types=MSSMHbb_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])

Definition at line 195 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostMSSMHbbmu = make_higgs_postprocessor("MSSMHbbmu", plot_types=MSSMHbbmu_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])

Definition at line 204 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostMuonJet = make_higgs_postprocessor("MuonJet", extra_str_templates=[truevtx_string_template])

Definition at line 116 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostProcessors
Initial value:
1 = cms.Sequence(
2  hltHiggsPostHWW+
3  hltHiggsPostHZZ+
4  hltHiggsPostHZZControlPaths+
5  hltHiggsPostHgg+
6  #hltHiggsPostHggControlPaths+
7  hltHiggsPostMuonJet+
8  hltHiggsPostHtaunu+
9  hltHiggsPostH2tau+
10  hltHiggsPostTTHbbej+
11  hltHiggsPostAHttH+
12  hltHiggsPostVBFHbb_0btag+
13  hltHiggsPostVBFHbb_1btag+
14  hltHiggsPostVBFHbb_2btag+
15  hltHiggsPostZnnHbb+
16  hltHiggsPostDoubleHinTaus+
17  hltHiggsPostHiggsDalitz+
18  hltHiggsPostX4b+
19  hltHiggsPostWHToENuBB+
20  hltHiggsPostMSSMHbb+
21  hltHiggsPostMSSMHbbmu+
22  hltHiggsPostVBFHToInv
23 )

Definition at line 206 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostTTHbbej = make_higgs_postprocessor("TTHbbej", extra_str_templates=[truevtx_string_template, TTHbbej_HtDist_template])

Definition at line 124 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostVBFHbb_0btag = make_higgs_postprocessor("VBFHbb_0btag", plot_types=VBFHbb_0btag_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])

Definition at line 162 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostVBFHbb_1btag = make_higgs_postprocessor("VBFHbb_1btag", plot_types=VBFHbb_1btag_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])

Definition at line 150 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostVBFHbb_2btag = make_higgs_postprocessor("VBFHbb_2btag", object_types=["Jet"], plot_types=VBFHbb_2btag_plot_types, extra_str_templates=[truevtx_string_template])

Definition at line 138 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostVBFHToInv = make_higgs_postprocessor("VBFHToInv", extra_str_templates=[truevtx_string_template])

Definition at line 121 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostWHToENuBB = make_higgs_postprocessor("WHToENuBB", extra_str_templates=[truevtx_string_template, TTHbbej_HtDist_template])

Definition at line 185 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostX4b = make_higgs_postprocessor("X4b", plot_types=X4b_plot_types, object_types=["Jet"], extra_str_templates=[truevtx_string_template])

Definition at line 182 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.hltHiggsPostZnnHbb = make_higgs_postprocessor("ZnnHbb", plot_types=ZnnHbb_plot_types, object_types=["Jet", "PFMET"], extra_str_templates=[truevtx_string_template])

Definition at line 172 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.MSSMHbb_plot_types = ["EffEta", "EffPhi", "TurnOn1"]

Definition at line 189 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.MSSMHbbmu_plot_types = ["EffEta", "EffPhi", "TurnOn1"]

Definition at line 198 of file hltHiggsPostProcessors_cff.py.

tuple hltHiggsPostProcessors_cff.NminOneCutNames = ("EffdEtaqq", "Effmqq", "EffdPhibb", "EffCSV1", "EffCSV2", "EffCSV3", "EffmaxCSV", "", "", "TurnOn1", "TurnOn2", "TurnOn3", "TurnOn4")

Definition at line 129 of file hltHiggsPostProcessors_cff.py.

hltHiggsPostProcessors_cff.NminOneCuts = _config.VBFHbb_2btag.NminOneCuts

Definition at line 131 of file hltHiggsPostProcessors_cff.py.

string hltHiggsPostProcessors_cff.truevtx_string_template = "Eff_trueVtxDist_@ANALYSIS@_gen_@TRIGGER@ ' Efficiency of @TRIGGER@ vs nb of interactions ; nb events passing each path ' trueVtxDist_@ANALYSIS@_gen_@TRIGGER@ trueVtxDist_@ANALYSIS@_gen"

Definition at line 110 of file hltHiggsPostProcessors_cff.py.

string hltHiggsPostProcessors_cff.TTHbbej_HtDist_template = "Eff_HtDist_@ANALYSIS@_gen_@TRIGGER@ ' Efficiency of @TRIGGER@ vs sum pT of jets ; sum pT of jets ' HtDist_@ANALYSIS@_gen_@TRIGGER@ HtDist_@ANALYSIS@_gen"

Definition at line 123 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.VBFHbb_0btag_plot_types = []

Definition at line 154 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.VBFHbb_1btag_plot_types = []

Definition at line 142 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.VBFHbb_2btag_plot_types = []

Definition at line 130 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.X4b_plot_types = ["EffEta", "EffPhi", "TurnOn1"]

Definition at line 176 of file hltHiggsPostProcessors_cff.py.

list hltHiggsPostProcessors_cff.ZnnHbb_plot_types = ["EffEta", "EffPhi", "TurnOn1"]

Definition at line 166 of file hltHiggsPostProcessors_cff.py.