CMS 3D CMS Logo

LepHTMonitor_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
3 from copy import deepcopy
4 
5 
6 ### Single Electron + HT triggers
7 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
8 DQMOffline_Ele15_HT600 = DQMEDAnalyzer('LepHTMonitor',
9  electronCollection = cms.InputTag('gedGsfElectrons'),
10  electronVID = cms.InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-medium"),
11  muonCollection = cms.InputTag(''),
12  muonIDlevel = cms.untracked.int32(2), ## 1: loose, 2: medium, 3: tight
13  pfMetCollection = cms.InputTag('pfMet'),
14  pfJetCollection = cms.InputTag('ak4PFJets'),
15  jetTagCollection = cms.InputTag(''),
16 
17  vertexCollection = cms.InputTag('offlinePrimaryVertices'),
18  conversionCollection = cms.InputTag('conversions'),
19  beamSpot = cms.InputTag('offlineBeamSpot'),
20 
21  folderName = cms.string('HLT_Ele15_IsoVVVL_PFHT600'),
22 
23  jetPtCut = cms.untracked.double(30.0),
24  jetEtaCut = cms.untracked.double(2.5),
25  metCut = cms.untracked.double(-1.0),
26  htCut = cms.untracked.double(-1.0),
27  nels = cms.untracked.double(1),
28  nmus = cms.untracked.double(0),
29  leptonPtPlateau = cms.untracked.double(30.0), #defines plateau region for eta, phi distributions
30  leptonCountingThreshold = cms.untracked.double(10.0), # min lepton pT for lepton counting
31  lepIsoCut = cms.untracked.double(0.1), # max lepton reliso
32  lepEtaCut = cms.untracked.double(2.5), # max abs(eta)
33  lep_d0_cut_b = cms.untracked.double(0.0118), #barrel
34  lep_dz_cut_b = cms.untracked.double(0.373),
35  lep_d0_cut_e = cms.untracked.double(0.0739), #endcap
36  lep_dz_cut_e = cms.untracked.double(0.602),
37 
38  ptbins = cms.vdouble(0,5,10,20,30,40,50,75,100,125,160,200,250),
39  htbins = cms.vdouble(0,50,100,150,200,250,300,350,400,450,500,600,750,1000,1500,2000),
40  nbins_eta = cms.untracked.int32(10),
41  nbins_phi = cms.untracked.int32(10),
42  nbins_npv = cms.untracked.int32(35),
43  etabins_min = cms.untracked.double(-2.5),
44  etabins_max = cms.untracked.double(2.5),
45  phibins_min = cms.untracked.double(-3.142),
46  phibins_max = cms.untracked.double(3.142),
47  npvbins_min = cms.untracked.double(0),
48  npvbins_max = cms.untracked.double(70),
49 
50  numGenericTriggerEventPSet = cms.PSet(
51  andOr = cms.bool( False ),
52  andOrHlt = cms.bool(True),# True:=OR; False:=AND
53  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
54  hltPaths = cms.vstring("HLT_Ele15_IsoVVVL_PFHT600_v*"),
55  errorReplyHlt = cms.bool( False ),
56  verbosityLevel = cms.uint32(0)
57  ),
58  den_lep_GenericTriggerEventPSet = cms.PSet(
59  andOr = cms.bool( False ),
60  andOrHlt = cms.bool(True),# True:=OR; False:=AND
61  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
62  hltPaths = cms.vstring("HLT_PFHT1050_v*"),
63  errorReplyHlt = cms.bool( False ),
64  dcsInputTag = cms.InputTag( "scalersRawToDigi" ),
65  dcsPartitions = cms.vint32 ( 24, 25, 26, 27, 28, 29 ), # 24-27: strip, 28-29: pixel, we should add all other detectors !
66  andOrDcs = cms.bool( False ),
67  errorReplyDcs = cms.bool( True ),
68  verbosityLevel = cms.uint32(0)
69  ),
70  den_HT_GenericTriggerEventPSet = cms.PSet(
71  andOr = cms.bool( False ),
72  andOrHlt = cms.bool(True),# True:=OR; False:=AND
73  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
74  hltPaths = cms.vstring("HLT_Ele38_WPTight_Gsf_v*","HLT_Ele27_WPTight_Gsf_v*","HLT_Ele35_WPTight_Gsf_v*","HLT_Ele40_WPTight_Gsf_v*"),
75  errorReplyHlt = cms.bool( False ),
76  dcsInputTag = cms.InputTag( "scalersRawToDigi" ),
77  dcsPartitions = cms.vint32 ( 24, 25, 26, 27, 28, 29 ), # 24-27: strip, 28-29: pixel, we should add all other detectors !
78  andOrDcs = cms.bool( False ),
79  errorReplyDcs = cms.bool( True ),
80  verbosityLevel = cms.uint32(0)
81  ),
82  )
83 
84 
85 DQMOffline_Ele15_HT450 = DQMOffline_Ele15_HT600.clone()
86 DQMOffline_Ele15_HT450.folderName = cms.string('HLT_Ele15_IsoVVVL_PFHT450')
87 DQMOffline_Ele15_HT450.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Ele15_IsoVVVL_PFHT450_v*")
88 
89 DQMOffline_Ele50_HT450 = DQMOffline_Ele15_HT600.clone()
90 DQMOffline_Ele50_HT450.folderName = cms.string('HLT_Ele50_IsoVVVL_PFH450')
91 DQMOffline_Ele50_HT450.leptonPtPlateau = cms.untracked.double(60.0)
92 DQMOffline_Ele50_HT450.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Ele50_IsoVVVL_PFHT450_v*")
93 
94 
95 ### Single Muon + HT triggers
96 DQMOffline_Mu15_HT600 = DQMOffline_Ele15_HT600.clone()
97 DQMOffline_Mu15_HT600.electronCollection = cms.InputTag('')
98 DQMOffline_Mu15_HT600.conversionCollection = cms.InputTag('')
99 DQMOffline_Mu15_HT600.muonCollection = cms.InputTag('muons')
100 DQMOffline_Mu15_HT600.muonIDlevel = cms.untracked.int32(2) ## 1: loose, 2: medium, 3: tight
101 DQMOffline_Mu15_HT600.nels = cms.untracked.double(0)
102 DQMOffline_Mu15_HT600.nmus = cms.untracked.double(1)
103 DQMOffline_Mu15_HT600.lepIsoCut = cms.untracked.double(0.2)
104 DQMOffline_Mu15_HT600.lepEtaCut = cms.untracked.double(2.4)
105 DQMOffline_Mu15_HT600.lep_d0_cut_b = cms.untracked.double(0.2) #endcap parameter not used for muons
106 DQMOffline_Mu15_HT600.lep_dz_cut_b = cms.untracked.double(0.5)
107 
108 DQMOffline_Mu15_HT600.folderName = cms.string('HLT_Mu15_IsoVVVL_PFH600')
109 DQMOffline_Mu15_HT600.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu15_IsoVVVL_PFHT600_v*")
110 DQMOffline_Mu15_HT600.den_HT_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_IsoMu27_v*","HLT_IsoMu24_v*")
111 
112 DQMOffline_Mu15_HT450 = DQMOffline_Mu15_HT600.clone()
113 DQMOffline_Mu15_HT450.folderName = cms.string('HLT_Mu15_IsoVVVL_PFHT450')
114 DQMOffline_Mu15_HT450.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu15_IsoVVVL_PFHT450_v*")
115 
116 DQMOffline_Mu50_HT450 = DQMOffline_Mu15_HT600.clone()
117 DQMOffline_Mu50_HT450.folderName = cms.string('HLT_Mu50_IsoVVVL_PFH450')
118 DQMOffline_Mu50_HT450.leptonPtPlateau = cms.untracked.double(60.0)
119 DQMOffline_Mu50_HT450.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu50_IsoVVVL_PFHT450_v*")
120 
121 
122 ### Dilepton + HT triggers
123 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350 = DQMOffline_Mu15_HT600.clone()
124 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.nmus = cms.untracked.double(2)
125 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.folderName = cms.string('HLT_DoubleMu4_Mass8_DZ_PFHT350')
126 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.leptonPtPlateau = cms.untracked.double(6.0)
127 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.leptonCountingThreshold = cms.untracked.double(4.0)
128 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_DoubleMu4_Mass8_DZ_PFHT350_v*")
129 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.den_lep_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu15_IsoVVVL_PFHT450_v*")
130 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.den_HT_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_Mass8_v*")
131 
132 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350 = DQMOffline_Ele15_HT600.clone()
133 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.nels = cms.untracked.double(2)
134 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.folderName = cms.string('HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350')
135 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.leptonPtPlateau = cms.untracked.double(10.0)
136 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.leptonCountingThreshold = cms.untracked.double(8.0)
137 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350_v*")
138 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.den_lep_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Ele15_IsoVVVL_PFHT450_v*")
139 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.den_HT_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Ele23_Ele12_CaloIdL_TrackIdL_IsoVL_DZ*")
140 
141 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ = DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.clone()
142 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.muonCollection = cms.InputTag('muons')
143 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.nels = cms.untracked.double(1)
144 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.nmus = cms.untracked.double(1)
145 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.folderName = cms.string('HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ')
146 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ_v*")
147 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.den_lep_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Ele15_IsoVVVL_PFHT450_v*","HLT_Mu15_IsoVVVL_PFHT450_v*")
148 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.den_HT_GenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu12_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_v*", "HLT_Mu23_TrkIsoVVL_Ele12_CaloIdL_TrackIdL_IsoVL_v*","HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_v*")
149 
150 ### Alternate dilepton + HT without DZ requirement
151 DQMOffline_DoubleMu4_Mass8_PFHT350 = DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.clone()
152 DQMOffline_DoubleMu4_Mass8_PFHT350.folderName = cms.string('HLT_DoubleMu4_Mass8_PFHT350')
153 DQMOffline_DoubleMu4_Mass8_PFHT350.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_DoubleMu4_Mass8_PFHT350_v*")
154 
155 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350 = DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.clone()
156 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350.folderName = cms.string('HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350')
157 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350_v*")
158 
159 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350 = DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.clone()
160 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350.folderName = cms.string('HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350')
161 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350.numGenericTriggerEventPSet.hltPaths = cms.vstring("HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_v*")
162 
163 
164 # fastsim has no conversion collection
165 from Configuration.Eras.Modifier_fastSim_cff import fastSim
166 fastSim.toModify(DQMOffline_Ele15_HT600,conversionCollection=cms.InputTag(''))
167 fastSim.toModify(DQMOffline_Ele15_HT450,conversionCollection=cms.InputTag(''))
168 fastSim.toModify(DQMOffline_Ele50_HT450,conversionCollection=cms.InputTag(''))
169 fastSim.toModify(DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350,conversionCollection=cms.InputTag(''))
170 fastSim.toModify(DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ,conversionCollection=cms.InputTag(''))
171 
172 
173 
174 DQMOffline_LepHT_POSTPROCESSING = DQMEDHarvester("DQMGenericClient",
175  subDirs = cms.untracked.vstring('HLT/SUSY/LepHT/*'),
176  efficiency = cms.vstring(
177  "lepPtTurnOn_eff ';Offline lepton p_{T} [GeV];#epsilon' lepPtTurnOn_num lepPtTurnOn_den",
178  "lepEtaTurnOn_eff ';Offline lepton #eta;#epsilon' lepEtaTurnOn_num lepEtaTurnOn_den",
179  "lepPhiTurnOn_eff ';Offline lepton #phi;#epsilon' lepPhiTurnOn_num lepPhiTurnOn_den",
180  "lepEtaPhiTurnOn_eff ';Offline lepton #eta;Offline lepton #phi;#epsilon' lepEtaPhiTurnOn_num lepEtaPhiTurnOn_den",
181  "pfHTTurnOn_eff ';Offline PF H_{T} [GeV];#epsilon' pfHTTurnOn_num pfHTTurnOn_den",
182  "NPVTurnOn_eff ';Offline N_{PV} ;#epsilon' NPVTurnOn_num NPVTurnOn_den"
183  ),
184  resolution = cms.vstring('')
185  )
186 
187 
188 
189 from DQMOffline.Trigger.HLTEGTnPMonitor_cfi import egmGsfElectronIDsForDQM
190 
191 LepHTMonitor = cms.Sequence(
192  DQMOffline_Ele15_HT600
193  + DQMOffline_Ele15_HT450
194  + DQMOffline_Ele50_HT450
195  + DQMOffline_Mu15_HT600
196  + DQMOffline_Mu15_HT450
197  + DQMOffline_Mu50_HT450
198  + DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350
199  + DQMOffline_DoubleMu4_Mass8_DZ_PFHT350
200  + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ
201  + DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350
202  + DQMOffline_DoubleMu4_Mass8_PFHT350
203  + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350,
204  cms.Task(egmGsfElectronIDsForDQM) # Use of electron VID requires this module being executed first
205 )
206 
207 LepHTClient = cms.Sequence( DQMOffline_LepHT_POSTPROCESSING )