CMS 3D CMS Logo

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

Functions

def make_efficiency_string
 
def make_exo_postprocessor
 

Variables

tuple hltExoticaDSTJets = make_exo_postprocessor("DSTJets")
 
tuple hltExoticaDSTMuons = make_exo_postprocessor("DSTMuons")
 
tuple hltExoticaEleMu = make_exo_postprocessor("EleMu")
 
tuple hltExoticaHTDisplacedJets = make_exo_postprocessor("HTDisplacedJets")
 
tuple hltExoticaPhotonMET = make_exo_postprocessor("PhotonMET")
 
tuple hltExoticaPostCaloHT = make_exo_postprocessor("CaloHT")
 
tuple hltExoticaPostDiPhoton = make_exo_postprocessor("DiPhoton")
 
tuple hltExoticaPostDisplacedDimuon = make_exo_postprocessor("DisplacedDimuon")
 
tuple hltExoticaPostDisplacedMuEG = make_exo_postprocessor("DisplacedMuEG")
 
tuple hltExoticaPostHighPtDielectron = make_exo_postprocessor("HighPtDielectron")
 
tuple hltExoticaPostHighPtDimuon = make_exo_postprocessor("HighPtDimuon")
 
tuple hltExoticaPostHighPtElectron = make_exo_postprocessor("HighPtElectron")
 
tuple hltExoticaPostHighPtPhoton = make_exo_postprocessor("HighPtPhoton")
 
tuple hltExoticaPostJetNoBptx = make_exo_postprocessor("JetNoBptx")
 
tuple hltExoticaPostLowPtDielectron = make_exo_postprocessor("LowPtDielectron")
 
tuple hltExoticaPostLowPtDimuon = make_exo_postprocessor("LowPtDimuon")
 
tuple hltExoticaPostLowPtElectron = make_exo_postprocessor("LowPtElectron")
 
tuple hltExoticaPostLowPtTrimuon = make_exo_postprocessor("LowPtTrimuon")
 
tuple hltExoticaPostMETplusTrack = make_exo_postprocessor("METplusTrack")
 
tuple hltExoticaPostMonojet = make_exo_postprocessor("Monojet")
 
tuple hltExoticaPostMonojetBackup = make_exo_postprocessor("MonojetBackup")
 
tuple hltExoticaPostMuonNoBptx = make_exo_postprocessor("MuonNoBptx")
 
tuple hltExoticaPostPFHT = make_exo_postprocessor("PFHT")
 
tuple hltExoticaPostProcessors
 
tuple hltExoticaPostPureMET = make_exo_postprocessor("PureMET")
 
tuple hltExoticaPostSingleMuon = make_exo_postprocessor("SingleMuon")
 
tuple hltExoticaTracklessJets = make_exo_postprocessor("TracklessJets")
 

Function Documentation

def hltExoticaPostProcessors_cff.make_efficiency_string (   objtype,
  plot_type,
  triggerpath 
)

Definition at line 6 of file hltExoticaPostProcessors_cff.py.

Referenced by make_exo_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 == "refittedStandAloneMuons":
13  objtypeLatex="refittedStandAlone #mu"
14  elif objtype == "Ele":
15  objtypeLatex="e"
16  elif objtype == "Photon":
17  objtypeLatex="#gamma"
18  elif objtype == "PFTau":
19  objtypeLatex="#tau"
20  else:
21  objtypeLatex=objtype
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 == "TurnOn3":
34  title = "Next-to-next-to-Leading pT Turn-On"
35  xAxis = "p_{T} of Next-to-next-to-Leading Generated %s (GeV/c)" % (objtype)
36  input_type = "gen%sMaxPt3" % (objtype)
37  if plot_type == "TurnOn4":
38  title = "SumEt Turn-On"
39  xAxis = "SumEt of Leading Generated %s (GeV/c)" % (objtype)
40  input_type = "gen%sSumEt" % (objtype)
41  if plot_type == "EffEta":
42  title = "#eta Efficiency"
43  xAxis = "#eta of Generated %s " % (objtype)
44  input_type = "gen%sEta" % (objtype)
45  if plot_type == "EffPhi":
46  title = "#phi Efficiency"
47  xAxis = "#phi of Generated %s " % (objtype)
48  input_type = "gen%sPhi" % (objtype)
49  if plot_type == "EffDxy":
50  title = "Dxy Efficiency"
51  xAxis = "Dxy of Generated %s " % (objtype)
52  input_type = "gen%sDxy" % (objtype)
53 
54  yAxis = "%s / %s" % (numer_description, denom_description)
55  all_titles = "%s for trigger %s; %s; %s" % (title, triggerpath,
56  xAxis, yAxis)
57  return "Eff_%s_%s '%s' %s_%s %s" % (input_type,triggerpath,
58  all_titles,input_type,triggerpath,input_type)
59 
60 
#--- IMPORTANT: Trigger are extracted from the hltExoticaValidator_cfi.py module
def hltExoticaPostProcessors_cff.make_exo_postprocessor (   analysis_name,
  plot_types = ["TurnOn1",
  TurnOn2,
  TurnOn3,
  TurnOn4,
  EffEta,
  EffPhi,
  EffDxy,
  object_types = ["Mu",
  refittedStandAloneMuons,
  Track,
  Ele,
  Photon,
  PFTau,
  PFJet,
  MET,
  PFMET,
  PFMHT,
  GenMET,
  CaloJet,
  CaloMET,
  CaloMHT,
  l1MET,
  extra_str_templates = [] 
)

Definition at line 65 of file hltExoticaPostProcessors_cff.py.

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

65 
66 def make_exo_postprocessor(analysis_name, plot_types=["TurnOn1", "TurnOn2", "TurnOn3", "TurnOn4", "EffEta", "EffPhi", "EffDxy"], object_types=["Mu","refittedStandAloneMuons","Track","Ele","Photon","PFTau","PFJet","MET","PFMET","PFMHT","GenMET","CaloJet","CaloMET","CaloMHT","l1MET"], extra_str_templates=[]):
67  postprocessor = hltExoticaPostProcessor.clone()
68  postprocessor.subDirs = ["HLT/Exotica/" + analysis_name]
69  efficiency_strings = [] # List of plots to look for. This is quite a bit larger than the number of plots that will be made.
70 
71  # Higgs and SMP postprocessors use this string, but exo does not, for now.
72  #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"
73  #efficiency_strings.append(efficiency_summary_string)
74  #efficiency_strings.append(efficiency_summary_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec"))
75 
76  for plot_type in plot_types:
77  for object_type in object_types:
78  for trigger in [x.replace("_v", "") for x in _config.__getattribute__(analysis_name).hltPathsToCheck]:
79  this_efficiency_string = make_efficiency_string(object_type, plot_type, trigger)
80  efficiency_strings.append(this_efficiency_string)
81  efficiency_strings.append(this_efficiency_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec"))
82 
83  for str_template in extra_str_templates:
84  this_extra_string = str_template.replace("@ANALYSIS@", analysis_name).replace("@TRIGGER@", trigger)
85  efficiency_strings.append(this_extra_string)
86  efficiency_strings.append(this_extra_stringreplace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec"))
87  postprocessor.efficiencyProfile = efficiency_strings
88  return postprocessor

Variable Documentation

tuple hltExoticaPostProcessors_cff.hltExoticaDSTJets = make_exo_postprocessor("DSTJets")

Definition at line 112 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaDSTMuons = make_exo_postprocessor("DSTMuons")

Definition at line 113 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaEleMu = make_exo_postprocessor("EleMu")

Definition at line 109 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaHTDisplacedJets = make_exo_postprocessor("HTDisplacedJets")

Definition at line 111 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPhotonMET = make_exo_postprocessor("PhotonMET")

Definition at line 110 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostCaloHT = make_exo_postprocessor("CaloHT")

Definition at line 100 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostDiPhoton = make_exo_postprocessor("DiPhoton")

Definition at line 97 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostDisplacedDimuon = make_exo_postprocessor("DisplacedDimuon")

Definition at line 104 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostDisplacedMuEG = make_exo_postprocessor("DisplacedMuEG")

Definition at line 103 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostHighPtDielectron = make_exo_postprocessor("HighPtDielectron")

Definition at line 91 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostHighPtDimuon = make_exo_postprocessor("HighPtDimuon")

Definition at line 90 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostHighPtElectron = make_exo_postprocessor("HighPtElectron")

Definition at line 92 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostHighPtPhoton = make_exo_postprocessor("HighPtPhoton")

Definition at line 96 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostJetNoBptx = make_exo_postprocessor("JetNoBptx")

Definition at line 101 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostLowPtDielectron = make_exo_postprocessor("LowPtDielectron")

Definition at line 95 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostLowPtDimuon = make_exo_postprocessor("LowPtDimuon")

Definition at line 94 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostLowPtElectron = make_exo_postprocessor("LowPtElectron")

Definition at line 93 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostLowPtTrimuon = make_exo_postprocessor("LowPtTrimuon")

Definition at line 89 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostMETplusTrack = make_exo_postprocessor("METplusTrack")

Definition at line 108 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostMonojet = make_exo_postprocessor("Monojet")

Definition at line 105 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostMonojetBackup = make_exo_postprocessor("MonojetBackup")

Definition at line 106 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostMuonNoBptx = make_exo_postprocessor("MuonNoBptx")

Definition at line 102 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostPFHT = make_exo_postprocessor("PFHT")

Definition at line 99 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostProcessors

Definition at line 116 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostPureMET = make_exo_postprocessor("PureMET")

Definition at line 107 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaPostSingleMuon = make_exo_postprocessor("SingleMuon")

Definition at line 98 of file hltExoticaPostProcessors_cff.py.

tuple hltExoticaPostProcessors_cff.hltExoticaTracklessJets = make_exo_postprocessor("TracklessJets")

Definition at line 114 of file hltExoticaPostProcessors_cff.py.