CMS 3D CMS Logo

Functions | Variables
hltExoticaPostProcessors_cff Namespace Reference

Functions

def make_efficiency_string (objtype, plot_type, triggerpath)
 
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, extra_str_templates=[])
 

Variables

 hltExoticaDSTJets
 
 hltExoticaDSTMuons
 
 hltExoticaEleMu
 
 hltExoticaHTDisplacedJets
 
 hltExoticaPhotonMET
 
 hltExoticaPostCaloHT
 
 hltExoticaPostDiPhoton
 
 hltExoticaPostDisplacedDimuon
 
 hltExoticaPostDisplacedDiPhoton
 
 hltExoticaPostDisplacedL2Dimuon
 
 hltExoticaPostDisplacedMuEG
 
 hltExoticaPostHighPtDielectron
 
 hltExoticaPostHighPtDimuon
 
 hltExoticaPostHighPtElectron
 
 hltExoticaPostHighPtPhoton
 
 hltExoticaPostJetNoBptx
 
 hltExoticaPostLowPtDielectron
 
 hltExoticaPostLowPtDimuon
 
 hltExoticaPostLowPtElectron
 
 hltExoticaPostLowPtTrimuon
 
 hltExoticaPostMETplusTrack
 
 hltExoticaPostMonojet
 
 hltExoticaPostMonojetBackup
 
 hltExoticaPostMuonNoBptx
 
 hltExoticaPostPFHT
 
 hltExoticaPostProcessors
 
 hltExoticaPostPureMET
 
 hltExoticaPostSingleMuon
 
 hltExoticaTracklessJets
 

Function Documentation

◆ make_efficiency_string()

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 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 == "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 
60 #--- IMPORTANT: Trigger are extracted from the hltExoticaValidator_cfi.py module
def make_efficiency_string(objtype, plot_type, triggerpath)

◆ make_exo_postprocessor()

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,
  extra_str_templates = [] 
)

Definition at line 65 of file hltExoticaPostProcessors_cff.py.

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

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

Variable Documentation

◆ hltExoticaDSTJets

hltExoticaPostProcessors_cff.hltExoticaDSTJets

Definition at line 114 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaDSTMuons

hltExoticaPostProcessors_cff.hltExoticaDSTMuons

Definition at line 115 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaEleMu

hltExoticaPostProcessors_cff.hltExoticaEleMu

Definition at line 111 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaHTDisplacedJets

hltExoticaPostProcessors_cff.hltExoticaHTDisplacedJets

Definition at line 113 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPhotonMET

hltExoticaPostProcessors_cff.hltExoticaPhotonMET

Definition at line 112 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostCaloHT

hltExoticaPostProcessors_cff.hltExoticaPostCaloHT

Definition at line 101 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostDiPhoton

hltExoticaPostProcessors_cff.hltExoticaPostDiPhoton

Definition at line 97 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostDisplacedDimuon

hltExoticaPostProcessors_cff.hltExoticaPostDisplacedDimuon

Definition at line 105 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostDisplacedDiPhoton

hltExoticaPostProcessors_cff.hltExoticaPostDisplacedDiPhoton

Definition at line 98 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostDisplacedL2Dimuon

hltExoticaPostProcessors_cff.hltExoticaPostDisplacedL2Dimuon

Definition at line 106 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostDisplacedMuEG

hltExoticaPostProcessors_cff.hltExoticaPostDisplacedMuEG

Definition at line 104 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostHighPtDielectron

hltExoticaPostProcessors_cff.hltExoticaPostHighPtDielectron

Definition at line 91 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostHighPtDimuon

hltExoticaPostProcessors_cff.hltExoticaPostHighPtDimuon

Definition at line 90 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostHighPtElectron

hltExoticaPostProcessors_cff.hltExoticaPostHighPtElectron

Definition at line 92 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostHighPtPhoton

hltExoticaPostProcessors_cff.hltExoticaPostHighPtPhoton

Definition at line 96 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostJetNoBptx

hltExoticaPostProcessors_cff.hltExoticaPostJetNoBptx

Definition at line 102 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostLowPtDielectron

hltExoticaPostProcessors_cff.hltExoticaPostLowPtDielectron

Definition at line 95 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostLowPtDimuon

hltExoticaPostProcessors_cff.hltExoticaPostLowPtDimuon

Definition at line 94 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostLowPtElectron

hltExoticaPostProcessors_cff.hltExoticaPostLowPtElectron

Definition at line 93 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostLowPtTrimuon

hltExoticaPostProcessors_cff.hltExoticaPostLowPtTrimuon

Definition at line 89 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostMETplusTrack

hltExoticaPostProcessors_cff.hltExoticaPostMETplusTrack

Definition at line 110 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostMonojet

hltExoticaPostProcessors_cff.hltExoticaPostMonojet

Definition at line 107 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostMonojetBackup

hltExoticaPostProcessors_cff.hltExoticaPostMonojetBackup

Definition at line 108 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostMuonNoBptx

hltExoticaPostProcessors_cff.hltExoticaPostMuonNoBptx

Definition at line 103 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostPFHT

hltExoticaPostProcessors_cff.hltExoticaPostPFHT

Definition at line 100 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostProcessors

hltExoticaPostProcessors_cff.hltExoticaPostProcessors

Definition at line 118 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostPureMET

hltExoticaPostProcessors_cff.hltExoticaPostPureMET

Definition at line 109 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaPostSingleMuon

hltExoticaPostProcessors_cff.hltExoticaPostSingleMuon

Definition at line 99 of file hltExoticaPostProcessors_cff.py.

◆ hltExoticaTracklessJets

hltExoticaPostProcessors_cff.hltExoticaTracklessJets

Definition at line 116 of file hltExoticaPostProcessors_cff.py.