CMS 3D CMS Logo

Functions
hltSMPPostProcessors_cff Namespace Reference

Functions

def add_reco_strings (strings)
 
def efficiency_string (objtype, plot_type, triggerpath)
 

Function Documentation

def hltSMPPostProcessors_cff.add_reco_strings (   strings)

Definition at line 49 of file hltSMPPostProcessors_cff.py.

References efficiency_string(), list(), genParticles_cff.map, and python.rootplot.root2matplotlib.replace().

49 def add_reco_strings(strings):
50  reco_strings = []
51  for entry in strings:
52  reco_strings.append(entry
53  .replace("Generated", "Reconstructed")
54  .replace("Gen", "Reco")
55  .replace("gen", "rec"))
56  strings.extend(reco_strings)
57 
58 
def replace(string, replacements)
def hltSMPPostProcessors_cff.efficiency_string (   objtype,
  plot_type,
  triggerpath 
)

Definition at line 6 of file hltSMPPostProcessors_cff.py.

Referenced by add_reco_strings().

6 def 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 == "PFTau":
18  objtypeLatex="#tau"
19  else:
20  objtypeLatex=objtype
21 
22  numer_description = "# gen %s passed the %s" % (objtypeLatex,triggerpath)
23  denom_description = "# gen %s " % (objtypeLatex)
24 
25  if plot_type == "TurnOn1":
26  title = "pT Turn-On"
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)
41 
42  yAxis = "%s / %s" % (numer_description, denom_description)
43  all_titles = "%s for trigger %s; %s; %s" % (title, triggerpath,
44  xAxis, yAxis)
45  return "Eff_%s_%s '%s' %s_%s %s" % (input_type,triggerpath,
46  all_titles,input_type,triggerpath,input_type)
47 
48 # Adding the reco objects
def efficiency_string(objtype, plot_type, triggerpath)