Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-24 05:59:21

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from DQMOffline.JetMET.jetMETDQMCleanup_cff import *
0004 from DQMOffline.JetMET.metDiagnosticParameterSet_cfi import *
0005 from DQMOffline.JetMET.metDiagnosticParameterSetMiniAOD_cfi import *
0006 
0007 #jet corrector defined in jetMETDQMOfflineSource python file
0008 
0009 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0010 caloMetDQMAnalyzer = DQMEDAnalyzer('METAnalyzer',  
0011     METType=cms.untracked.string('calo'),
0012     srcPFlow = cms.InputTag('particleFlow', ''),
0013     l1algoname = cms.string("L1Tech_BPTX_plus_AND_minus.v0"),
0014     METCollectionLabel     = cms.InputTag("caloMet"),
0015     JetCollectionLabel  = cms.InputTag("ak4CaloJets"),
0016     JetCorrections = cms.InputTag("dqmAk4PFL1FastL2L3ResidualCorrector"),
0017     muonsrc = cms.InputTag("muons"),
0018 
0019     ptMinCand      = cms.double(1.),
0020     hcalMin      =cms.double(1.),
0021 
0022     InputJetIDValueMap         = cms.InputTag("ak4JetID"), 
0023     ptThreshold                =cms.double(30),
0024     
0025     FolderName = cms.untracked.string("JetMET/MET/"),
0026 
0027     fillMetHighLevel = cms.bool(True),#fills lumi overview plots
0028 
0029     fillCandidateMaps = cms.bool(False),
0030 
0031     CleaningParameters = cleaningParameters.clone(       
0032         bypassAllPVChecks = True, #needed for 0T running
0033         ),
0034     METDiagonisticsParameters = multPhiCorr_METDiagnostics,
0035 
0036     TriggerResultsLabel  = cms.InputTag("TriggerResults::HLT"),
0037     FilterResultsLabelMiniAOD  = cms.InputTag("TriggerResults::RECO"),
0038     FilterResultsLabelMiniAOD2  = cms.InputTag("TriggerResults::reRECO"),
0039 
0040     onlyCleaned                = cms.untracked.bool(True),
0041     runcosmics                 = cms.untracked.bool(False),  
0042 
0043     LSBegin = cms.int32(0),
0044     LSEnd   = cms.int32(-1),      
0045 
0046 #    HLTPathsJetMB = cms.vstring(),
0047 #    When it is empty, it accepts all the triggers
0048 
0049     triggerSelectedSubFolders = cms.VPSet(
0050     cms.PSet( label = cms.string('highPtJet'),
0051         andOr         = cms.bool( False ),    #True -> OR #Comment this line to turn OFF
0052         dbLabel        = cms.string("JetMETDQMTrigger"),
0053         hltInputTag    = cms.InputTag( "TriggerResults::HLT" ),
0054 #        hltDBKey       = cms.string( 'jetmet_highptjet' ), #overrides hltPaths!
0055         hltPaths       = cms.vstring( 'HLT_PFJet450_v*' ), 
0056         andOrHlt       = cms.bool( True ),
0057         errorReplyHlt  = cms.bool( False ),
0058         stage2 = cms.bool(False),
0059         l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
0060         l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
0061         ReadPrescalesFromFile = cms.bool(False),
0062     ),
0063     cms.PSet(label = cms.string('lowPtJet'),
0064         andOr         = cms.bool( False ),     #True -> OR #Comment this line to turn OFF
0065         dbLabel        = cms.string("JetMETDQMTrigger"),
0066         hltInputTag    = cms.InputTag( "TriggerResults::HLT" ),
0067 #        hltDBKey       = cms.string( 'jetmet_lowptjet' ),#overrides hltPaths!
0068         hltPaths       = cms.vstring( 'HLT_PFJet80_v*' ), 
0069         andOrHlt       = cms.bool( True ),
0070         errorReplyHlt  = cms.bool( True ),
0071         stage2 = cms.bool(False),
0072         l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
0073         l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
0074         ReadPrescalesFromFile = cms.bool(False),
0075     ),
0076     cms.PSet(label = cms.string('zeroBias'),
0077         andOr         = cms.bool( False ),     #True -> OR #Comment this line to turn OFF
0078         dbLabel        = cms.string("JetMETDQMTrigger"),
0079         hltInputTag    = cms.InputTag( "TriggerResults::HLT" ),
0080         #hltDBKey       = cms.string( 'jetmet_minbias' ),#overrides hltPaths!
0081         hltPaths       = cms.vstring( 'HLT_ZeroBias_v*' ), 
0082         andOrHlt       = cms.bool( True ),
0083         errorReplyHlt  = cms.bool( False ),
0084         stage2 = cms.bool(False),
0085         l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
0086         l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
0087         ReadPrescalesFromFile = cms.bool(False),
0088     ),
0089     cms.PSet(label = cms.string('highMET'),
0090         andOr         = cms.bool( False ),     #True -> OR #Comment this line to turn OFF
0091         dbLabel        = cms.string("JetMETDQMTrigger"),
0092         hltInputTag    = cms.InputTag( "TriggerResults::HLT" ),
0093 #        hltDBKey       = cms.string( 'jetmet_highmet' ),#overrides hltPaths!
0094         hltPaths       = cms.vstring( 'HLT_MET250_v*' ), 
0095         andOrHlt       = cms.bool( True ),
0096         errorReplyHlt  = cms.bool( False ),
0097         stage2 = cms.bool(False),
0098         l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
0099         l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
0100         ReadPrescalesFromFile = cms.bool(False),
0101     ),
0102     #cms.PSet(label = cms.string('singleEle'),
0103     #    andOr         = cms.bool( False ),     #True -> OR #Comment this line to turn OFF
0104     #    dbLabel        = cms.string("JetMETDQMTrigger"),
0105     #    hltInputTag    = cms.InputTag( "TriggerResults::HLT" ),
0106 #        hltDBKey       = cms.string( 'jetmet_ele' ),#overrides hltPaths!
0107     #    hltPaths       = cms.vstring('HLT_Ele27_WP80_v*' ), 
0108     #    andOrHlt       = cms.bool( True ),
0109     #    errorReplyHlt  = cms.bool( False ),
0110     #),
0111     cms.PSet(label = cms.string('singleMu'),
0112         andOr         = cms.bool( False ),     #True -> OR #Comment this line to turn OFF
0113         dbLabel        = cms.string("JetMETDQMTrigger"),
0114         hltInputTag    = cms.InputTag( "TriggerResults::HLT" ),
0115 #        hltDBKey       = cms.string( 'jetmet_muon' ),#overrides hltPaths!
0116         hltPaths       = cms.vstring( 'HLT_IsoMu24_eta2p1_v*', 'HLT_IsoMu27_v*'), 
0117         andOrHlt       = cms.bool( True ),
0118         errorReplyHlt  = cms.bool( False ),
0119         stage2 = cms.bool(False),
0120         l1tAlgBlkInputTag = cms.InputTag("gtStage2Digis"),
0121         l1tExtBlkInputTag = cms.InputTag("gtStage2Digis"),
0122         ReadPrescalesFromFile = cms.bool(False),
0123     ) 
0124     ),
0125  
0126     HBHENoiseLabelMiniAOD = cms.string("Flag_HBHENoiseFilter"),
0127     HBHEIsoNoiseLabelMiniAOD = cms.string("Flag_HBHEIsoNoiseFilter"),
0128 
0129     HcalNoiseRBXCollection     = cms.InputTag("hcalnoise"), 
0130     HBHENoiseFilterResultLabel = cms.InputTag("HBHENoiseFilterResultProducer", "HBHENoiseFilterResult"),
0131     HBHENoiseIsoFilterResultLabel = cms.InputTag("HBHENoiseFilterResultProducer", "HBHEIsoNoiseFilterResult"),
0132     CSCHaloResultLabel = cms.InputTag("CSCTightHaloFilterDQM"), 
0133     CSCHalo2015ResultLabel = cms.InputTag("CSCTightHalo2015FilterDQM"), 
0134     EcalDeadCellTriggerPrimitiveFilterLabel = cms.InputTag("EcalDeadCellTriggerPrimitiveFilterDQM"), 
0135     EcalDeadCellBoundaryEnergyFilterLabel = cms.InputTag("EcalDeadCellBoundaryEnergyFilterDQM"), 
0136     eeBadScFilterLabel = cms.InputTag("eeBadScFilterDQM"), 
0137     HcalStripHaloFilterLabel = cms.InputTag("HcalStripHaloFilterDQM"),
0138 
0139     #if changed here, change certification module input in same manner and injetDQMconfig
0140     pVBin       = cms.int32(100),
0141     pVMax       = cms.double(100.0),
0142     pVMin       = cms.double(0.0),
0143 
0144     verbose     = cms.int32(0),
0145 
0146 #    etThreshold  = cms.double(2.),
0147 
0148     DCSFilter = cms.PSet(
0149       DetectorTypes = cms.untracked.string("ecal:hbhe:hf"),
0150       #DebugOn = cms.untracked.bool(True),
0151       Filter = cms.untracked.bool(True)
0152     ),
0153 )
0154 
0155 #
0156 # Make changes if using the Stage 2 trigger
0157 #
0158 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
0159 stage2L1Trigger.toModify(caloMetDQMAnalyzer,
0160                          triggerSelectedSubFolders = {i: dict(stage2 = True,
0161                                                               l1tAlgBlkInputTag = "gtStage2Digis",
0162                                                               l1tExtBlkInputTag = "gtStage2Digis",
0163                                                               ReadPrescalesFromFile = True) for i in range(0, len(caloMetDQMAnalyzer.triggerSelectedSubFolders))})
0164 
0165 pfMetDQMAnalyzer = caloMetDQMAnalyzer.clone(
0166     METType = 'pf',
0167     METCollectionLabel     = "pfMet",
0168     srcPFlow = 'particleFlow',
0169     JetCollectionLabel  = "ak4PFJets",
0170     JetCorrections = "dqmAk4PFL1FastL2L3ResidualCorrector",
0171     CleaningParameters = cleaningParameters.clone(       
0172         bypassAllPVChecks = False,
0173         ),
0174     fillMetHighLevel = False,
0175     fillCandidateMaps = True,
0176     # if this flag is changed, the METTypeRECOUncleaned flag in dataCertificationJetMET_cfi.py
0177     #has to be updated (by a string not pointing to an existing directory)
0178     onlyCleaned       = False,
0179     DCSFilter = cms.PSet(
0180         DetectorTypes = cms.untracked.string("ecal:hbhe:hf:pixel:sistrip:es:muon"),
0181         #DebugOn = cms.untracked.bool(True),
0182         Filter = cms.untracked.bool(True)
0183         ),
0184 )
0185 pfChMetDQMAnalyzer = pfMetDQMAnalyzer.clone(
0186      METCollectionLabel     = "pfChMet",
0187      fillCandidateMaps = False,
0188      onlyCleaned   = True
0189  )
0190 
0191 
0192 
0193 #both CaloMET and type1 MET only cleaned plots are filled
0194 pfMetT1DQMAnalyzer = caloMetDQMAnalyzer.clone(
0195     METType = 'pf',
0196     METCollectionLabel     = "pfMETT1",
0197     srcPFlow = 'particleFlow',
0198     JetCollectionLabel  = "ak4PFJetsCHS",
0199     JetCorrections = "dqmAk4PFCHSL1FastL2L3ResidualCorrector",
0200     CleaningParameters = cleaningParameters.clone(       
0201         bypassAllPVChecks = False,
0202         ),
0203     fillMetHighLevel = False,
0204     fillCandidateMaps = False,
0205     DCSFilter = dict(
0206         DetectorTypes = "ecal:hbhe:hf:pixel:sistrip:es:muon",
0207         Filter = True
0208         ),
0209 )
0210 pfMetDQMAnalyzerMiniAOD = pfMetDQMAnalyzer.clone(
0211     fillMetHighLevel = True,#fills only lumisec plots
0212     fillCandidateMaps = False,
0213     srcPFlow = 'packedPFCandidates',
0214     METDiagonisticsParameters = multPhiCorr_METDiagnosticsMiniAOD,
0215     CleaningParameters = cleaningParameters.clone(
0216         vertexCollection    =  "goodOfflinePrimaryVerticesDQMforMiniAOD",
0217         ),
0218     METType = 'miniaod',
0219     METCollectionLabel  = "slimmedMETs",
0220     JetCollectionLabel  = "slimmedJets",
0221     JetCorrections = "" #not called, since corrected by default
0222 )
0223 pfPuppiMetDQMAnalyzerMiniAOD = pfMetDQMAnalyzerMiniAOD.clone(
0224     fillMetHighLevel = False,#fills only lumisec plots
0225     fillCandidateMaps = True,
0226     METType = 'miniaod',
0227     METCollectionLabel  = "slimmedMETsPuppi",
0228     JetCollectionLabel  = "slimmedJetsPuppi",
0229     JetCorrections = "" #not called, since corrected by default
0230 )