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