CMS 3D CMS Logo

metDQMConfig_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
6 
7 #jet corrector defined in jetMETDQMOfflineSource python file
8 
9 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
10 caloMetDQMAnalyzer = DQMEDAnalyzer('METAnalyzer',
11  METType=cms.untracked.string('calo'),
12  srcPFlow = cms.InputTag('particleFlow', ''),
13  l1algoname = cms.string("L1Tech_BPTX_plus_AND_minus.v0"),
14  METCollectionLabel = cms.InputTag("caloMet"),
15  JetCollectionLabel = cms.InputTag("ak4CaloJets"),
16  JetCorrections = cms.InputTag("dqmAk4PFL1FastL2L3ResidualCorrector"),
17  muonsrc = cms.InputTag("muons"),
18 
19  ptMinCand = cms.double(1.),
20  hcalMin =cms.double(1.),
21 
22  InputJetIDValueMap = cms.InputTag("ak4JetID"),
23  ptThreshold =cms.double(30),
24 
25  FolderName = cms.untracked.string("JetMET/MET/"),
26 
27  fillMetHighLevel = cms.bool(True),#fills lumi overview plots
28 
29  fillCandidateMaps = cms.bool(False),
30 
31  CleaningParameters = cleaningParameters.clone(
32  bypassAllPVChecks = True, #needed for 0T running
33  ),
34  METDiagonisticsParameters = multPhiCorr_METDiagnostics,
35 
36  TriggerResultsLabel = cms.InputTag("TriggerResults::HLT"),
37  FilterResultsLabelMiniAOD = cms.InputTag("TriggerResults::RECO"),
38  FilterResultsLabelMiniAOD2 = cms.InputTag("TriggerResults::reRECO"),
39 
40  onlyCleaned = cms.untracked.bool(True),
41  runcosmics = cms.untracked.bool(False),
42 
43  LSBegin = cms.int32(0),
44  LSEnd = cms.int32(-1),
45 
46 # HLTPathsJetMB = cms.vstring(),
47 # When it is empty, it accepts all the triggers
48 
49  triggerSelectedSubFolders = cms.VPSet(
50  cms.PSet( label = cms.string('highPtJet'),
51  andOr = cms.bool( False ), #True -> OR #Comment this line to turn OFF
52  dbLabel = cms.string("JetMETDQMTrigger"),
53  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
54 # hltDBKey = cms.string( 'jetmet_highptjet' ), #overrides hltPaths!
55  hltPaths = cms.vstring( 'HLT_PFJet450_v*' ),
56  andOrHlt = cms.bool( True ),
57  errorReplyHlt = cms.bool( False ),
58  stage2 = cms.bool(False),
59  l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
60  l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
61  ReadPrescalesFromFile = cms.bool(False),
62  ),
63  cms.PSet(label = cms.string('lowPtJet'),
64  andOr = cms.bool( False ), #True -> OR #Comment this line to turn OFF
65  dbLabel = cms.string("JetMETDQMTrigger"),
66  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
67 # hltDBKey = cms.string( 'jetmet_lowptjet' ),#overrides hltPaths!
68  hltPaths = cms.vstring( 'HLT_PFJet80_v*' ),
69  andOrHlt = cms.bool( True ),
70  errorReplyHlt = cms.bool( True ),
71  stage2 = cms.bool(False),
72  l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
73  l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
74  ReadPrescalesFromFile = cms.bool(False),
75  ),
76  cms.PSet(label = cms.string('zeroBias'),
77  andOr = cms.bool( False ), #True -> OR #Comment this line to turn OFF
78  dbLabel = cms.string("JetMETDQMTrigger"),
79  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
80  #hltDBKey = cms.string( 'jetmet_minbias' ),#overrides hltPaths!
81  hltPaths = cms.vstring( 'HLT_ZeroBias_v*' ),
82  andOrHlt = cms.bool( True ),
83  errorReplyHlt = cms.bool( False ),
84  stage2 = cms.bool(False),
85  l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
86  l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
87  ReadPrescalesFromFile = cms.bool(False),
88  ),
89  cms.PSet(label = cms.string('highMET'),
90  andOr = cms.bool( False ), #True -> OR #Comment this line to turn OFF
91  dbLabel = cms.string("JetMETDQMTrigger"),
92  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
93 # hltDBKey = cms.string( 'jetmet_highmet' ),#overrides hltPaths!
94  hltPaths = cms.vstring( 'HLT_MET250_v*' ),
95  andOrHlt = cms.bool( True ),
96  errorReplyHlt = cms.bool( False ),
97  stage2 = cms.bool(False),
98  l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
99  l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
100  ReadPrescalesFromFile = cms.bool(False),
101  ),
102  #cms.PSet(label = cms.string('singleEle'),
103  # andOr = cms.bool( False ), #True -> OR #Comment this line to turn OFF
104  # dbLabel = cms.string("JetMETDQMTrigger"),
105  # hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
106 # hltDBKey = cms.string( 'jetmet_ele' ),#overrides hltPaths!
107  # hltPaths = cms.vstring('HLT_Ele27_WP80_v*' ),
108  # andOrHlt = cms.bool( True ),
109  # errorReplyHlt = cms.bool( False ),
110  #),
111  cms.PSet(label = cms.string('singleMu'),
112  andOr = cms.bool( False ), #True -> OR #Comment this line to turn OFF
113  dbLabel = cms.string("JetMETDQMTrigger"),
114  hltInputTag = cms.InputTag( "TriggerResults::HLT" ),
115 # hltDBKey = cms.string( 'jetmet_muon' ),#overrides hltPaths!
116  hltPaths = cms.vstring( 'HLT_IsoMu24_eta2p1_v*', 'HLT_IsoMu27_v*'),
117  andOrHlt = cms.bool( True ),
118  errorReplyHlt = cms.bool( False ),
119  stage2 = cms.bool(False),
120  l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
121  l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
122  ReadPrescalesFromFile = cms.bool(False),
123  )
124  ),
125 
126  HBHENoiseLabelMiniAOD = cms.string("Flag_HBHENoiseFilter"),
127  HBHEIsoNoiseLabelMiniAOD = cms.string("Flag_HBHEIsoNoiseFilter"),
128 
129  HcalNoiseRBXCollection = cms.InputTag("hcalnoise"),
130  HBHENoiseFilterResultLabel = cms.InputTag("HBHENoiseFilterResultProducer", "HBHENoiseFilterResult"),
131  HBHENoiseIsoFilterResultLabel = cms.InputTag("HBHENoiseFilterResultProducer", "HBHEIsoNoiseFilterResult"),
132  CSCHaloResultLabel = cms.InputTag("CSCTightHaloFilterDQM"),
133  CSCHalo2015ResultLabel = cms.InputTag("CSCTightHalo2015FilterDQM"),
134  EcalDeadCellTriggerPrimitiveFilterLabel = cms.InputTag("EcalDeadCellTriggerPrimitiveFilterDQM"),
135  EcalDeadCellBoundaryEnergyFilterLabel = cms.InputTag("EcalDeadCellBoundaryEnergyFilterDQM"),
136  eeBadScFilterLabel = cms.InputTag("eeBadScFilterDQM"),
137  HcalStripHaloFilterLabel = cms.InputTag("HcalStripHaloFilterDQM"),
138 
139  #if changed here, change certification module input in same manner and injetDQMconfig
140  pVBin = cms.int32(100),
141  pVMax = cms.double(100.0),
142  pVMin = cms.double(0.0),
143 
144  verbose = cms.int32(0),
145 
146 # etThreshold = cms.double(2.),
147 
148  DCSFilter = cms.PSet(
149  DetectorTypes = cms.untracked.string("ecal:hbhe:hf"),
150  #DebugOn = cms.untracked.bool(True),
151  Filter = cms.untracked.bool(True)
152  ),
153 )
154 
155 #
156 # Make changes if using the Stage 2 trigger
157 #
158 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
159 stage2L1Trigger.toModify(caloMetDQMAnalyzer,
160  triggerSelectedSubFolders = {i: dict(stage2 = True,
161  l1tAlgBlkInputTag = "gtStage2Digis",
162  l1tExtBlkInputTag = "gtStage2Digis",
163  ReadPrescalesFromFile = True) for i in range(0, len(caloMetDQMAnalyzer.triggerSelectedSubFolders))})
164 
165 pfMetDQMAnalyzer = caloMetDQMAnalyzer.clone(
166  METType = 'pf',
167  METCollectionLabel = "pfMet",
168  srcPFlow = 'particleFlow',
169  JetCollectionLabel = "ak4PFJets",
170  JetCorrections = "dqmAk4PFL1FastL2L3ResidualCorrector",
171  CleaningParameters = cleaningParameters.clone(
172  bypassAllPVChecks = False,
173  ),
174  fillMetHighLevel = False,
175  fillCandidateMaps = True,
176  # if this flag is changed, the METTypeRECOUncleaned flag in dataCertificationJetMET_cfi.py
177  #has to be updated (by a string not pointing to an existing directory)
178  onlyCleaned = False,
179  DCSFilter = cms.PSet(
180  DetectorTypes = cms.untracked.string("ecal:hbhe:hf:pixel:sistrip:es:muon"),
181  #DebugOn = cms.untracked.bool(True),
182  Filter = cms.untracked.bool(True)
183  ),
184 )
185 pfChMetDQMAnalyzer = pfMetDQMAnalyzer.clone(
186  METCollectionLabel = "pfChMet",
187  fillCandidateMaps = False,
188  onlyCleaned = True
189  )
190 
191 
192 
193 #both CaloMET and type1 MET only cleaned plots are filled
194 pfMetT1DQMAnalyzer = caloMetDQMAnalyzer.clone(
195  METType = 'pf',
196  METCollectionLabel = "pfMETT1",
197  srcPFlow = 'particleFlow',
198  JetCollectionLabel = "ak4PFJetsCHS",
199  JetCorrections = "dqmAk4PFCHSL1FastL2L3ResidualCorrector",
200  CleaningParameters = cleaningParameters.clone(
201  bypassAllPVChecks = False,
202  ),
203  fillMetHighLevel = False,
204  fillCandidateMaps = False,
205  DCSFilter = dict(
206  DetectorTypes = "ecal:hbhe:hf:pixel:sistrip:es:muon",
207  Filter = True
208  ),
209 )
210 pfMetDQMAnalyzerMiniAOD = pfMetDQMAnalyzer.clone(
211  fillMetHighLevel = True,#fills only lumisec plots
212  fillCandidateMaps = False,
213  srcPFlow = 'packedPFCandidates',
214  METDiagonisticsParameters = multPhiCorr_METDiagnosticsMiniAOD,
215  CleaningParameters = cleaningParameters.clone(
216  vertexCollection = "goodOfflinePrimaryVerticesDQMforMiniAOD",
217  ),
218  METType = 'miniaod',
219  METCollectionLabel = "slimmedMETs",
220  JetCollectionLabel = "slimmedJets",
221  JetCorrections = "" #not called, since corrected by default
222 )
223 pfPuppiMetDQMAnalyzerMiniAOD = pfMetDQMAnalyzerMiniAOD.clone(
224  fillMetHighLevel = False,#fills only lumisec plots
225  fillCandidateMaps = True,
226  METType = 'miniaod',
227  METCollectionLabel = "slimmedMETsPuppi",
228  JetCollectionLabel = "slimmedJetsPuppi",
229  JetCorrections = "" #not called, since corrected by default
230 )