CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTTauPostProcessor_cfi.py
Go to the documentation of this file.
2 
4 
5 def makeInclusiveAnalyzer(monitorModule):
6  m1 = cms.EDAnalyzer("DQMGenericClient",
7  subDirs = cms.untracked.vstring(monitorModule.DQMBaseFolder.value()+"/"+monitorModule.PathSummaryPlotter.DQMFolder.value()),
8  verbose = cms.untracked.uint32(0), # Set to 2 for all messages
9  outputFileName = cms.untracked.string(''),
10  resolution = cms.vstring(),
11  efficiency = cms.vstring(),
12  efficiencyProfile = cms.untracked.vstring(
13  "PathEfficiency 'Accepted Events per Path;;' helpers/PathTriggerBits helpers/RefEvents"
14  ),
15  )
16 
17  m2 = cms.EDAnalyzer("HLTTauPostProcessor",
18  DQMBaseFolder = cms.untracked.string(monitorModule.DQMBaseFolder.value())
19  )
20 
21  return (m1, m2)
22 
23 def makePFTauAnalyzer(monitorModule):
24  (m1, m2) = makeInclusiveAnalyzer(monitorModule)
25  m1.subDirs.extend([monitorModule.DQMBaseFolder.value()+"/HLT_.*",
26  monitorModule.DQMBaseFolder.value()+"/"+monitorModule.L1Plotter.DQMFolder.value()])
27 
28  def _addEfficiencies(level, quantities, nameFormat, titleObject="#tau", postfix=""):
29  if postfix != "":
30  postfix = " "+postfix
31  for quantity, titleLabel in quantities:
32  name = nameFormat % (level, quantity)
33  title = "%s %s %s efficiency%s" % (level, titleObject, titleLabel, postfix)
34  m1.efficiencyProfile.append("%s '%s' helpers/%sNum helpers/%sDenom" % (name, title, name, name))
35 
36  _addEfficiencies("L1", [("Et", "E_{T}"),
37  ("Eta", "#eta"),
38  ("Phi", "#phi")], "%sTau%sEff")
39  _addEfficiencies("L1", [("HighEt", "E_{T}")], "%sTau%sEff", postfix="(high E_{T})")
40 
41  _addEfficiencies("L1", [("Et", "E_{T}"),
42  ("Eta", "#eta"),
43  ("Phi", "#phi")], "%sIsoTau%sEff")
44  _addEfficiencies("L1", [("HighEt", "E_{T}")], "%sIsoTau%sEff", postfix="(high E_{T})")
45 
46  _addEfficiencies("L1", [("Et", "E_{T}")], "%sJet%sEff")
47  _addEfficiencies("L1", [("HighEt", "E_{T}")], "%sJet%sEff", "central jet", postfix="(high E_{T})")
48  _addEfficiencies("L1", [("Eta", "#eta"),
49  ("Phi", "#phi")], "%sJet%sEff", "central jet", "(E_{T} > %.1f)" % monitorModule.L1Plotter.L1JetMinEt.value())
50  _addEfficiencies("L1", [("Et", "E_{T}")], "%sETM%sEff", "ETM")
51 
52  _addEfficiencies("L2", [("Et", "E_{T}"),
53  ("Phi", "#phi")], "%sTrigMET%sEff", "MET")
54 
55  for level in ["L2", "L3"]:
56  _addEfficiencies(level, [("Et", "p_{T}"),
57  ("Eta", "#eta"),
58  ("Phi", "#phi")], "%sTrigTau%sEff")
59  _addEfficiencies(level, [("HighEt", "p_{T}")], "%sTrigTau%sEff", postfix="(high p_{T})")
60  _addEfficiencies(level, [("Et", "p_{T}"),
61  ("Eta", "#eta"),
62  ("Phi", "#phi")], "%sTrigElectron%sEff", "electron")
63  _addEfficiencies(level, [("Et", "p_{T}"),
64  ("Eta", "#eta"),
65  ("Phi", "#phi")], "%sTrigMuon%sEff", "muon")
66  return (m1, m2)
67 
68 
69 (HLTTauPostAnalysis_Inclusive, HLTTauPostAnalysis_Inclusive2) = makeInclusiveAnalyzer(hltTauOfflineMonitor_Inclusive)
70 (HLTTauPostAnalysis_PFTaus, HLTTauPostAnalysis_PFTaus2) = makePFTauAnalyzer(hltTauOfflineMonitor_PFTaus)
71 HLTTauPostSeq = cms.Sequence(
72  HLTTauPostAnalysis_Inclusive+HLTTauPostAnalysis_Inclusive2+
73  HLTTauPostAnalysis_PFTaus+HLTTauPostAnalysis_PFTaus2
74 )