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.
2 
3 #from RecoMET.METProducers.PFMET_cfi import pfMet
6 ##from RecoMET.METPUSubtraction.mvaPFMET_leptons_cfi import *
7 ## CV: importing mvaPFMET_leptons_cfi breaks produceAndDiscriminateHPSPFTaus sequence
8 ## (hpsPFTauDiscriminationByDecayModeFinding module gets overwritten by None,
9 ## in case RecoTauTag/Configuration/python/RecoPFTauTag_cff.py is loaded by
10 ## by top-level cfg.py file before RecoMET/METPUSubtraction/python/mvaPFMET_cff.py gets loaded)
11 ##from RecoJets.JetProducers.PileupJetIDCutParams_cfi import full_53x_wp
12 
13 calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('PFJetCorrectionProducer',
14  src = cms.InputTag('ak4PFJets'),
15  correctors = cms.vstring("ak4PFL1FastL2L3") # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data
16 )
17 
18 from RecoJets.JetProducers.pileupjetidproducer_cfi import pileupJetIdEvaluator
19 from RecoJets.JetProducers.PileupJetIDParams_cfi import JetIdParams
20 puJetIdForPFMVAMEt = pileupJetIdEvaluator.clone(
21  algos = cms.VPSet(
22  cms.PSet(
23  tmvaVariables = cms.vstring(
24  "nvtx",
25  "jetPt",
26  "jetEta",
27  "jetPhi",
28  "dZ",
29  "beta",
30  "betaStar",
31  "nCharged",
32  "nNeutrals",
33  "dR2Mean",
34  "ptD",
35  "frac01",
36  "frac02",
37  "frac03",
38  "frac04",
39  "frac05"
40  ),
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  srcRho = cms.InputTag('fixedGridRhoFastjetAll'),
72  globalThreshold = cms.double(-1.),#pfMet.globalThreshold,
73  minCorrJetPt = cms.double(-1.),
74  inputFileNames = cms.PSet(
75  U = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmet_53_Sep2013_type1.root'),
76  DPhi = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmetphi_53_June2013_type1.root'),
77  CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_53_Dec2012.root'),
78  CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_53_Dec2012.root')
79  ),
80  loadMVAfromDB = cms.bool(False),
81 
82  corrector = cms.string("ak4PFL1Fastjet"),
83  useType1 = cms.bool(True),
84  dZcut = cms.double(0.1),
85 
86  verbosity = cms.int32(0)
87 )
88 
89 
90 
91 pfMVAMEtSequence = cms.Sequence(
92  #(isomuonseq+isotauseq+isoelectronseq)*
93  calibratedAK4PFJetsForPFMVAMEt*
94  puJetIdForPFMVAMEt*
95  pfMVAMEt
96 )