Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:48

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 calibratedAK5PFJetsForPFMEtMVA = cms.EDProducer('PFJetCorrectionProducer',
0011     src = cms.InputTag('ak5PFJets'),
0012     correctors = cms.vstring("ak5PFL1FastL2L3Residual") # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data
0013 )
0014 
0015 pfMEtMVA = cms.EDProducer("PFMETProducerMVA",
0016     srcCorrJets = cms.InputTag('calibratedAK5PFJetsForPFMEtMVA'),
0017     srcUncorrJets = cms.InputTag('ak5PFJets'),
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     srcRho = cms.InputTag('kt6PFJets','rho'),
0023     globalThreshold = cms.double(-1.),#pfMet.globalThreshold,
0024     minCorrJetPt = cms.double(-1.),
0025     inputFileNames = cms.PSet(
0026         U     = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmet_53_Dec2012.root'),
0027         DPhi  = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmetphi_53_Dec2012.root'),
0028         CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_53_Dec2012.root'),
0029         CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_53_Dec2012.root')
0030     ),
0031     corrector = cms.string("ak5PFL1Fastjet"),
0032     useType1  = cms.bool(True), 
0033     useOld42  = cms.bool(False),
0034     dZcut     = cms.double(0.1),
0035     impactParTkThreshold = cms.double(0.),
0036     tmvaWeights = cms.string("RecoJets/JetProducers/data/TMVAClassificationCategory_JetID_MET_53X_Dec2012.weights.xml.gz"),
0037     tmvaMethod = cms.string("JetID"),
0038     version = cms.int32(-1),
0039     cutBased = cms.bool(False),                      
0040     tmvaVariables = cms.vstring(
0041         "nvtx",
0042         "jetPt",
0043         "jetEta",
0044         "jetPhi",
0045         "dZ",
0046         "beta",
0047         "betaStar",
0048         "nCharged",
0049         "nNeutrals",
0050         "dR2Mean",
0051         "ptD",
0052         "frac01",
0053         "frac02",
0054         "frac03",
0055         "frac04",
0056         "frac05",
0057     ),
0058     tmvaSpectators = cms.vstring(),
0059     JetIdParams = JetIdParams,
0060     label = cms.string("53XMet"),
0061     verbosity = cms.int32(0)
0062 )
0063 
0064 pfMEtMVATask  = cms.Task(
0065     #isomuonTask, isotauTask, isoelectronTask,
0066     calibratedAK4PFJetsForPFMEtMVA,
0067     pfMEtMVA
0068 )
0069 pfMEtMVAsequence  = cms.Sequence(pfMEtMVATask)