Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-26 03:37:04

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #from RecoMET.METProducers.PFMET_cfi import pfMet
0004 from JetMETCorrections.Configuration.JetCorrectors_cff import *
0005 ##from RecoMET.METPUSubtraction.mvaPFMET_leptons_cfi import *
0006 ## CV: importing mvaPFMET_leptons_cfi breaks produceAndDiscriminateHPSPFTaus sequence
0007 ##    (hpsPFTauDiscriminationByDecayModeFinding module gets overwritten by None,
0008 ##     in case RecoTauTag/Configuration/python/RecoPFTauTag_cff.py is loaded by
0009 ##     by top-level cfg.py file before RecoMET/METPUSubtraction/python/mvaPFMET_cff.py gets loaded)
0010 ##from RecoJets.JetProducers.PileupJetIDCutParams_cfi import full_53x_wp
0011 
0012 calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('CorrectedPFJetProducer',
0013     src = cms.InputTag('ak4PFJets'),
0014     correctors = cms.VInputTag("ak4PFL1FastL2L3Corrector") # NOTE: use "ak4PFL1FastL2L3Corrector" for MC / "ak4PFL1FastL2L3ResidualCorrector" for Data
0015 )
0016 from JetMETCorrections.Configuration.JetCorrectionServices_cff import ak4PFL1Fastjet
0017 from RecoJets.JetProducers.PileupJetID_cfi import pileupJetIdEvaluator as _pileupJetIdEvaluator
0018 from RecoJets.JetProducers.PileupJetIDParams_cfi import JetIdParams
0019 puJetIdForPFMVAMEt = _pileupJetIdEvaluator.clone(
0020     algos = cms.VPSet(
0021         cms.PSet(
0022         tmvaVariables = cms.vstring(
0023             "nvtx",
0024             "jetPt",
0025             "jetEta",
0026             "jetPhi",
0027             "dZ",
0028             "beta",
0029             "betaStar",
0030             "nCharged",
0031             "nNeutrals",
0032             "dR2Mean",
0033             "ptD",
0034             "frac01",
0035             "frac02",
0036             "frac03",
0037             "frac04",
0038             "frac05"
0039             ),
0040         etaBinnedWeights = cms.bool(False),
0041         tmvaWeights = cms.string("RecoJets/JetProducers/data/TMVAClassificationCategory_JetID_MET_53X_Dec2012.weights.xml.gz"),
0042         tmvaMethod = cms.string("JetID"),
0043         tmvaSpectators = cms.vstring(),
0044         JetIdParams = JetIdParams,                  
0045         impactParTkThreshold = cms.double(0.),
0046         version = cms.int32(-1),
0047         cutBased = cms.bool(False), 
0048         label = cms.string("full")
0049         )
0050         ),
0051     produceJetIds    = True,
0052     runMvas          = True,
0053     jets             = "calibratedAK4PFJetsForPFMVAMEt",#calibratedAK4PFJetsForPFMVAMEt
0054     applyJec         = True,
0055     inputIsCorrected = True,
0056     jec              = "AK4PF",
0057 )
0058 
0059 
0060 
0061 
0062 pfMVAMEt = cms.EDProducer("PFMETProducerMVA",
0063     srcCorrJets = cms.InputTag('calibratedAK4PFJetsForPFMVAMEt'),
0064     srcUncorrJets = cms.InputTag('ak4PFJets'),
0065     srcMVAPileupJetId = cms.InputTag('puJetIdForPFMVAMEt','fullDiscriminant'),
0066     srcPFCandidates = cms.InputTag('particleFlow'),
0067     srcVertices = cms.InputTag('offlinePrimaryVertices'),
0068     srcLeptons = cms.VInputTag(),#"isomuons","isoelectrons","isotaus") # NOTE: you need to set this to collections of electrons, muons and tau-jets
0069                                  #                                             passing the lepton reconstruction & identification criteria applied in your analysis
0070     minNumLeptons = cms.int32(0),                     
0071     globalThreshold = cms.double(-1.),#pfMet.globalThreshold,
0072     minCorrJetPt = cms.double(-1.),
0073     inputFileNames = cms.PSet(
0074         U     = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru_7_4_X_miniAOD_25NS_July2015.root'),
0075         DPhi  = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrphi_7_4_X_miniAOD_25NS_July2015.root'),
0076         CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_7_4_X_miniAOD_25NS_July2015.root'),
0077         CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_7_4_X_miniAOD_25NS_July2015.root') ),
0078     inputRecords = cms.PSet(
0079         U     = cms.string("RecoilCor"),
0080         DPhi  = cms.string("PhiCor"), 
0081         CovU1 = cms.string("CovU1"),
0082         CovU2 = cms.string("CovU2")
0083     ),
0084     loadMVAfromDB = cms.bool(False),                             
0085 
0086     corrector = cms.InputTag("ak4PFL1FastjetCorrector"),
0087     useType1  = cms.bool(True), 
0088     dZcut     = cms.double(0.1),
0089        
0090     verbosity = cms.int32(0)
0091 )
0092 
0093 pfMVAMEtTask  = cms.Task(
0094     #isomuonTask,isotauTask,isoelectronTask,
0095     jetCorrectorsTask,
0096     calibratedAK4PFJetsForPFMVAMEt,
0097     puJetIdForPFMVAMEt,
0098     pfMVAMEt
0099 )
0100 pfMVAMEtSequence  = cms.Sequence(pfMVAMEtTask)