Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 #from RecoMET.METProducers.PFMET_cfi import pfMet
0005 from JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff  import *
0006 from JetMETCorrections.Configuration.DefaultJEC_cff                     import *
0007 from RecoMET.METPUSubtraction.mvaPFMET_leptons_cfi                      import *
0008 from RecoJets.JetProducers.PileupJetIDParams_cfi                        import JetIdParams
0009 
0010 calibratedAK4PFJetsForPFMEtMVA = cms.EDProducer('PFJetCorrectionProducer',
0011     src = cms.InputTag('ak4PFJets'),
0012     correctors = cms.vstring("ak4PFL1FastL2L3") # NOTE: use "ak4PFL1FastL2L3" for MC / "ak4PFL1FastL2L3Residual" for Data
0013 )
0014 
0015 pfMEtMVA = cms.EDProducer("PFMETProducerMVA",
0016     srcCorrJets = cms.InputTag('calibratedAK4PFJetsForPFMEtMVA'),
0017     srcUncorrJets = cms.InputTag('ak4PFJets'),
0018     srcPFCandidates = cms.InputTag('particleFlow'),
0019     srcVertices = cms.InputTag('offlinePrimaryVertices'),
0020     srcLeptons = cms.VInputTag(),#"isomuons","isoelectrons","isotaus") # NOTE: you need to set this to collections of electrons, muons and tau-jets
0021                                  #                                             passing the lepton reconstruction & identification criteria applied in your analysis
0022     minNumLeptons = cms.int32(0),
0023     srcRho = cms.InputTag('kt6PFJets','rho'),
0024     globalThreshold = cms.double(-1.),#pfMet.globalThreshold,
0025     minCorrJetPt = cms.double(-1.),
0026     inputFileNames = cms.PSet(
0027         U     = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmet_53_June2013_type1.root'),
0028         DPhi  = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmetphi_53_June2013_type1.root'),
0029         CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_53_Dec2012.root'),
0030         CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_53_Dec2012.root')
0031     ),
0032     loadMVAfromDB = cms.bool(False),
0033     is42 = cms.bool(False), # CV: set this flag to true if you are running mvaPFMET in CMSSW_4_2_x                           
0034     corrector = cms.string("ak4PFL1Fastjet"),
0035     useType1  = cms.bool(True),
0036     useOld42  = cms.bool(False),
0037     dZcut     = cms.double(0.1),
0038     impactParTkThreshold = cms.double(0.),
0039     tmvaWeights = cms.string("RecoJets/JetProducers/data/TMVAClassificationCategory_JetID_MET_53X_Dec2012.weights.xml"),
0040     tmvaMethod = cms.string("JetID"),
0041     version = cms.int32(-1),
0042     cutBased = cms.bool(False),                      
0043     tmvaVariables = cms.vstring(
0044         "nvtx",
0045         "jetPt",
0046         "jetEta",
0047         "jetPhi",
0048         "dZ",
0049         "beta",
0050         "betaStar",
0051         "nCharged",
0052         "nNeutrals",
0053         "dR2Mean",
0054         "ptD",
0055         "frac01",
0056         "frac02",
0057         "frac03",
0058         "frac04",
0059         "frac05",
0060     ),
0061     tmvaSpectators = cms.vstring(),
0062     JetIdParams = JetIdParams,
0063     verbosity = cms.int32(0)
0064 )
0065 
0066 pfMEtMVATask  = cms.Task(
0067     isomuonTask,
0068     isotauTask,
0069     isoelectronTask,
0070     calibratedAK4PFJetsForPFMEtMVA,
0071     pfMEtMVA
0072     )
0073 pfMEtMVAsequence  = cms.Sequence(pfMEtMVATask)
0074