CMS 3D CMS Logo

mvaPFMET_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #from RecoMET.METProducers.PFMET_cfi import pfMet
5 
11 
12 calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('CorrectedPFJetProducer',
13  src = cms.InputTag('ak4PFJets'),
14  correctors = cms.VInputTag("ak4PFL1FastL2L3Corrector") # NOTE: use "ak4PFL1FastL2L3Corrector" for MC / "ak4PFL1FastL2L3ResidualCorrector" for Data
15 )
17 from RecoJets.JetProducers.PileupJetID_cfi import pileupJetIdEvaluator as _pileupJetIdEvaluator
18 from RecoJets.JetProducers.PileupJetIDParams_cfi import JetIdParams
19 puJetIdForPFMVAMEt = _pileupJetIdEvaluator.clone(
20  algos = cms.VPSet(
21  cms.PSet(
22  tmvaVariables = cms.vstring(
23  "nvtx",
24  "jetPt",
25  "jetEta",
26  "jetPhi",
27  "dZ",
28  "beta",
29  "betaStar",
30  "nCharged",
31  "nNeutrals",
32  "dR2Mean",
33  "ptD",
34  "frac01",
35  "frac02",
36  "frac03",
37  "frac04",
38  "frac05"
39  ),
40  etaBinnedWeights = cms.bool(False),
41  tmvaWeights = cms.string("RecoJets/JetProducers/data/TMVAClassificationCategory_JetID_MET_53X_Dec2012.weights.xml.gz"),
42  tmvaMethod = cms.string("JetID"),
43  tmvaSpectators = cms.vstring(),
44  JetIdParams = JetIdParams,
45  impactParTkThreshold = cms.double(0.),
46  version = cms.int32(-1),
47  cutBased = cms.bool(False),
48  label = cms.string("full")
49  )
50  ),
51  produceJetIds = True,
52  runMvas = True,
53  jets = "calibratedAK4PFJetsForPFMVAMEt",#calibratedAK4PFJetsForPFMVAMEt
54  applyJec = True,
55  inputIsCorrected = True,
56  jec = "AK4PF",
57 )
58 
59 
60 
61 
62 pfMVAMEt = cms.EDProducer("PFMETProducerMVA",
63  srcCorrJets = cms.InputTag('calibratedAK4PFJetsForPFMVAMEt'),
64  srcUncorrJets = cms.InputTag('ak4PFJets'),
65  srcMVAPileupJetId = cms.InputTag('puJetIdForPFMVAMEt','fullDiscriminant'),
66  srcPFCandidates = cms.InputTag('particleFlow'),
67  srcVertices = cms.InputTag('offlinePrimaryVertices'),
68  srcLeptons = cms.VInputTag(),#"isomuons","isoelectrons","isotaus") # NOTE: you need to set this to collections of electrons, muons and tau-jets
69  # passing the lepton reconstruction & identification criteria applied in your analysis
70  minNumLeptons = cms.int32(0),
71  globalThreshold = cms.double(-1.),#pfMet.globalThreshold,
72  minCorrJetPt = cms.double(-1.),
73  inputFileNames = cms.PSet(
74  U = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru_7_4_X_miniAOD_25NS_July2015.root'),
75  DPhi = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrphi_7_4_X_miniAOD_25NS_July2015.root'),
76  CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_7_4_X_miniAOD_25NS_July2015.root'),
77  CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_7_4_X_miniAOD_25NS_July2015.root') ),
78  inputRecords = cms.PSet(
79  U = cms.string("RecoilCor"),
80  DPhi = cms.string("PhiCor"),
81  CovU1 = cms.string("CovU1"),
82  CovU2 = cms.string("CovU2")
83  ),
84  loadMVAfromDB = cms.bool(False),
85 
86  corrector = cms.InputTag("ak4PFL1FastjetCorrector"),
87  useType1 = cms.bool(True),
88  dZcut = cms.double(0.1),
89 
90  verbosity = cms.int32(0)
91 )
92 
93 pfMVAMEtTask = cms.Task(
94  #(isomuonseq+isotauseq+isoelectronseq)*
95  jetCorrectorsTask,
96  calibratedAK4PFJetsForPFMVAMEt,
97  puJetIdForPFMVAMEt,
98  pfMVAMEt
99 )
100 pfMVAMEtSequence = cms.Sequence(pfMVAMEtTask)
JetCorrectionServices_cff
PileupJetIDParams_cfi
JetCorrectors_cff
PileupJetID_cfi