CMS 3D CMS Logo

Functions | Variables
hltHiggsPostProcessors_cff Namespace Reference

Functions

def make_efficiency_string (objtype, plot_type, triggerpath)
 
def make_higgs_postprocessor (analysis_name, plot_types=["TurnOn1", "TurnOn2", "EffEta", "EffPhi"], object_types=["Mu","Ele","Photon","MET","PFMET","PFTau","Jet"], extra_str_templates=[])
 

Variables

 extra_str_templates
 
 hltHiggsPostAHttH
 
 hltHiggsPostDoubleHinTaus
 
 hltHiggsPostH2tau
 
 hltHiggsPostHgg
 
 hltHiggsPostHiggsDalitz
 
 hltHiggsPostHtaunu
 
 hltHiggsPostHWW
 
 hltHiggsPostHZZ
 
 hltHiggsPostHZZControlPaths
 
 hltHiggsPostMSSMHbb
 
 hltHiggsPostMSSMHbbmu
 
 hltHiggsPostMuonJet
 
 hltHiggsPostProcessors
 
 hltHiggsPostTTHbbej
 
 hltHiggsPostVBFHbb_0btag
 
 hltHiggsPostVBFHbb_1btag
 
 hltHiggsPostVBFHbb_2btag
 
 hltHiggsPostVBFHToInv
 
 hltHiggsPostWHToENuBB
 
 hltHiggsPostX4b
 
 hltHiggsPostZnnHbb
 
 MSSMHbb_plot_types
 
 MSSMHbbmu_plot_types
 
 NminOneCutNames
 
 NminOneCuts
 
 object_types
 
 plot_types
 
 truevtx_string_template
 
 TTHbbej_HtDist_template
 
 VBFHbb_0btag_plot_types
 
 VBFHbb_1btag_plot_types
 
 VBFHbb_2btag_plot_types
 
 X4b_plot_types
 
 ZnnHbb_plot_types
 

Function Documentation

◆ make_efficiency_string()

def hltHiggsPostProcessors_cff.make_efficiency_string (   objtype,
  plot_type,
  triggerpath 
)

Definition at line 6 of file hltHiggsPostProcessors_cff.py.

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

Referenced by make_higgs_postprocessor().

◆ make_higgs_postprocessor()

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.

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

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

Variable Documentation

◆ extra_str_templates

hltHiggsPostProcessors_cff.extra_str_templates

Definition at line 111 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostAHttH

hltHiggsPostProcessors_cff.hltHiggsPostAHttH

Definition at line 125 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostDoubleHinTaus

hltHiggsPostProcessors_cff.hltHiggsPostDoubleHinTaus

Definition at line 117 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostH2tau

hltHiggsPostProcessors_cff.hltHiggsPostH2tau

Definition at line 119 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostHgg

hltHiggsPostProcessors_cff.hltHiggsPostHgg

Definition at line 114 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostHiggsDalitz

hltHiggsPostProcessors_cff.hltHiggsPostHiggsDalitz

Definition at line 118 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostHtaunu

hltHiggsPostProcessors_cff.hltHiggsPostHtaunu

Definition at line 120 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostHWW

hltHiggsPostProcessors_cff.hltHiggsPostHWW

Definition at line 111 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostHZZ

hltHiggsPostProcessors_cff.hltHiggsPostHZZ

Definition at line 113 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostHZZControlPaths

hltHiggsPostProcessors_cff.hltHiggsPostHZZControlPaths

Definition at line 112 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostMSSMHbb

hltHiggsPostProcessors_cff.hltHiggsPostMSSMHbb

Definition at line 195 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostMSSMHbbmu

hltHiggsPostProcessors_cff.hltHiggsPostMSSMHbbmu

Definition at line 204 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostMuonJet

hltHiggsPostProcessors_cff.hltHiggsPostMuonJet

Definition at line 116 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostProcessors

hltHiggsPostProcessors_cff.hltHiggsPostProcessors

Definition at line 206 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostTTHbbej

hltHiggsPostProcessors_cff.hltHiggsPostTTHbbej

Definition at line 124 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostVBFHbb_0btag

hltHiggsPostProcessors_cff.hltHiggsPostVBFHbb_0btag

Definition at line 162 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostVBFHbb_1btag

hltHiggsPostProcessors_cff.hltHiggsPostVBFHbb_1btag

Definition at line 150 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostVBFHbb_2btag

hltHiggsPostProcessors_cff.hltHiggsPostVBFHbb_2btag

Definition at line 138 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostVBFHToInv

hltHiggsPostProcessors_cff.hltHiggsPostVBFHToInv

Definition at line 121 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostWHToENuBB

hltHiggsPostProcessors_cff.hltHiggsPostWHToENuBB

Definition at line 185 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostX4b

hltHiggsPostProcessors_cff.hltHiggsPostX4b

Definition at line 182 of file hltHiggsPostProcessors_cff.py.

◆ hltHiggsPostZnnHbb

hltHiggsPostProcessors_cff.hltHiggsPostZnnHbb

Definition at line 172 of file hltHiggsPostProcessors_cff.py.

◆ MSSMHbb_plot_types

hltHiggsPostProcessors_cff.MSSMHbb_plot_types

Definition at line 189 of file hltHiggsPostProcessors_cff.py.

◆ MSSMHbbmu_plot_types

hltHiggsPostProcessors_cff.MSSMHbbmu_plot_types

Definition at line 198 of file hltHiggsPostProcessors_cff.py.

◆ NminOneCutNames

hltHiggsPostProcessors_cff.NminOneCutNames

Definition at line 129 of file hltHiggsPostProcessors_cff.py.

◆ NminOneCuts

hltHiggsPostProcessors_cff.NminOneCuts

Definition at line 131 of file hltHiggsPostProcessors_cff.py.

◆ object_types

hltHiggsPostProcessors_cff.object_types

Definition at line 138 of file hltHiggsPostProcessors_cff.py.

◆ plot_types

hltHiggsPostProcessors_cff.plot_types

Definition at line 138 of file hltHiggsPostProcessors_cff.py.

◆ truevtx_string_template

hltHiggsPostProcessors_cff.truevtx_string_template

Definition at line 110 of file hltHiggsPostProcessors_cff.py.

◆ TTHbbej_HtDist_template

hltHiggsPostProcessors_cff.TTHbbej_HtDist_template

Definition at line 123 of file hltHiggsPostProcessors_cff.py.

◆ VBFHbb_0btag_plot_types

hltHiggsPostProcessors_cff.VBFHbb_0btag_plot_types

Definition at line 154 of file hltHiggsPostProcessors_cff.py.

◆ VBFHbb_1btag_plot_types

hltHiggsPostProcessors_cff.VBFHbb_1btag_plot_types

Definition at line 142 of file hltHiggsPostProcessors_cff.py.

◆ VBFHbb_2btag_plot_types

hltHiggsPostProcessors_cff.VBFHbb_2btag_plot_types

Definition at line 130 of file hltHiggsPostProcessors_cff.py.

◆ X4b_plot_types

hltHiggsPostProcessors_cff.X4b_plot_types

Definition at line 176 of file hltHiggsPostProcessors_cff.py.

◆ ZnnHbb_plot_types

hltHiggsPostProcessors_cff.ZnnHbb_plot_types

Definition at line 166 of file hltHiggsPostProcessors_cff.py.

hltHiggsPostProcessors_cff.make_efficiency_string
def make_efficiency_string(objtype, plot_type, triggerpath)
Definition: hltHiggsPostProcessors_cff.py:6
hltHiggsPostProcessors_cff.make_higgs_postprocessor
def make_higgs_postprocessor(analysis_name, plot_types=["TurnOn1", "TurnOn2", "EffEta", "EffPhi"], object_types=["Mu","Ele","Photon","MET","PFMET","PFTau","Jet"], extra_str_templates=[])
Definition: hltHiggsPostProcessors_cff.py:86
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444