CMS 3D CMS Logo

Functions
hltExoticaPostProcessors_cff Namespace Reference

Functions

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

Function Documentation

def hltExoticaPostProcessors_cff.add_reco_strings (   strings)

Definition at line 60 of file hltExoticaPostProcessors_cff.py.

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

60 def add_reco_strings(strings):
61  reco_strings = []
62  for entry in strings:
63  reco_strings.append(entry
64  .replace("Generated", "Reconstructed")
65  .replace("Gen", "Reco")
66  .replace("gen", "rec"))
67  strings.extend(reco_strings)
68 
69 
def replace(string, replacements)
def hltExoticaPostProcessors_cff.efficiency_string (   objtype,
  plot_type,
  triggerpath 
)

Definition at line 6 of file hltExoticaPostProcessors_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 == "refittedStandAloneMuons":
12  objtypeLatex="refittedStandAlone #mu"
13  elif objtype == "Ele":
14  objtypeLatex="e"
15  elif objtype == "Photon":
16  objtypeLatex="#gamma"
17  elif objtype == "PFTau":
18  objtypeLatex="#tau"
19  else:
20  objtypeLatex=objtype
21  numer_description = "# gen %s passed the %s" % (objtypeLatex,triggerpath)
22  denom_description = "# gen %s " % (objtypeLatex)
23 
24  if plot_type == "TurnOn1":
25  title = "pT Turn-On"
26  xAxis = "p_{T} of Leading Generated %s (GeV/c)" % (objtype)
27  input_type = "gen%sMaxPt1" % (objtype)
28  if plot_type == "TurnOn2":
29  title = "Next-to-Leading pT Turn-On"
30  xAxis = "p_{T} of Next-to-Leading Generated %s (GeV/c)" % (objtype)
31  input_type = "gen%sMaxPt2" % (objtype)
32  if plot_type == "TurnOn3":
33  title = "Next-to-next-to-Leading pT Turn-On"
34  xAxis = "p_{T} of Next-to-next-to-Leading Generated %s (GeV/c)" % (objtype)
35  input_type = "gen%sMaxPt3" % (objtype)
36  if plot_type == "TurnOn4":
37  title = "SumEt Turn-On"
38  xAxis = "SumEt of Leading Generated %s (GeV/c)" % (objtype)
39  input_type = "gen%sSumEt" % (objtype)
40  if plot_type == "EffEta":
41  title = "#eta Efficiency"
42  xAxis = "#eta of Generated %s " % (objtype)
43  input_type = "gen%sEta" % (objtype)
44  if plot_type == "EffPhi":
45  title = "#phi Efficiency"
46  xAxis = "#phi of Generated %s " % (objtype)
47  input_type = "gen%sPhi" % (objtype)
48  if plot_type == "EffDxy":
49  title = "Dxy Efficiency"
50  xAxis = "Dxy of Generated %s " % (objtype)
51  input_type = "gen%sDxy" % (objtype)
52 
53  yAxis = "%s / %s" % (numer_description, denom_description)
54  all_titles = "%s for trigger %s; %s; %s" % (title, triggerpath,
55  xAxis, yAxis)
56  return "Eff_%s_%s '%s' %s_%s %s" % (input_type,triggerpath,
57  all_titles,input_type,triggerpath,input_type)
58 
59 # Adding the reco objects
def efficiency_string(objtype, plot_type, triggerpath)