CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ##from RecoMET.METPUSubtraction.mvaPFMET_leptons_cfi import *
6 ## CV: importing mvaPFMET_leptons_cfi breaks produceAndDiscriminateHPSPFTaus sequence
7 ## (hpsPFTauDiscriminationByDecayModeFinding module gets overwritten by None,
8 ## in case RecoTauTag/Configuration/python/RecoPFTauTag_cff.py is loaded by
9 ## by top-level cfg.py file before RecoMET/METPUSubtraction/python/mvaPFMET_cff.py gets loaded)
10 ##from RecoJets.JetProducers.PileupJetIDCutParams_cfi import full_53x_wp
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
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 = cms.bool(True),
52  runMvas = cms.bool(True),
53  jets = cms.InputTag("calibratedAK4PFJetsForPFMVAMEt"),#calibratedAK4PFJetsForPFMVAMEt
54  applyJec = cms.bool(True),
55  inputIsCorrected = cms.bool(True),
56  jec = cms.string("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 
94 
95 pfMVAMEtSequence = cms.Sequence(
96  #(isomuonseq+isotauseq+isoelectronseq)*
97  calibratedAK4PFJetsForPFMVAMEt*
98  puJetIdForPFMVAMEt*
99  pfMVAMEt
100 )