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 from RecoJets.JetProducers.PileupJetIDParams_cfi import JetIdParams
13 
14 from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
15 kt6PFJets = kt4PFJets.clone(rParam = cms.double(0.6), doRhoFastjet = True )
16 
17 ##from RecoMET.METPUSubtraction.mvaPFMET_db_cfi import mvaPFMEtGBRForestsFromDB
18 
19 calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('PFJetCorrectionProducer',
20  src = cms.InputTag('ak4PFJets'),
21  correctors = cms.vstring("ak4PFL1FastL2L3") # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data
22 )
23 
24 pfMVAMEt = cms.EDProducer("PFMETProducerMVA",
25  srcCorrJets = cms.InputTag('calibratedAK4PFJetsForPFMVAMEt'),
26  srcUncorrJets = cms.InputTag('ak4PFJets'),
27  srcPFCandidates = cms.InputTag('particleFlow'),
28  srcVertices = cms.InputTag('offlinePrimaryVertices'),
29  srcLeptons = cms.VInputTag(),#"isomuons","isoelectrons","isotaus") # NOTE: you need to set this to collections of electrons, muons and tau-jets
30  # passing the lepton reconstruction & identification criteria applied in your analysis
31  minNumLeptons = cms.int32(0),
32  srcRho = cms.InputTag('kt6PFJets','rho'),
33  globalThreshold = cms.double(-1.),#pfMet.globalThreshold,
34  minCorrJetPt = cms.double(-1.),
35  inputFileNames = cms.PSet(
36  U = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmet_53_June2013_type1.root'),
37  DPhi = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmetphi_53_June2013_type1.root'),
38  CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_53_Dec2012.root'),
39  CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_53_Dec2012.root')
40  ),
41  loadMVAfromDB = cms.bool(False),
42  ## inputRecords = cms.PSet(
43  ## U = cms.string('mvaPFMET_53_Dec2012_U'),
44  ## DPhi = cms.string('mvaPFMET_53_Dec2012_DPhi'),
45  ## CovU1 = cms.string('mvaPFMET_53_Dec2012_CovU1'),
46  ## CovU2 = cms.string('mvaPFMET_53_Dec2012_CovU2')
47  ## ),
48  ## loadMVAfromDB = cms.bool(False),
49  is42 = cms.bool(False), # CV: set this flag to true if you are running mvaPFMET in CMSSW_4_2_x
50  corrector = cms.string("ak4PFL1Fastjet"),
51  useType1 = cms.bool(True),
52  useOld42 = cms.bool(False),
53  dZcut = cms.double(0.1),
54  impactParTkThreshold = cms.double(0.),
55  tmvaWeights = cms.string("RecoJets/JetProducers/data/TMVAClassificationCategory_JetID_MET_53X_Dec2012.weights.xml.gz"),
56  tmvaMethod = cms.string("JetID"),
57  version = cms.int32(-1),
58  cutBased = cms.bool(False),
59  tmvaVariables = cms.vstring(
60  "nvtx",
61  "jetPt",
62  "jetEta",
63  "jetPhi",
64  "dZ",
65  "beta",
66  "betaStar",
67  "nCharged",
68  "nNeutrals",
69  "dR2Mean",
70  "ptD",
71  "frac01",
72  "frac02",
73  "frac03",
74  "frac04",
75  "frac05"
76  ),
77  tmvaSpectators = cms.vstring(),
78  ##JetIdParams = full_53x_wp,
79  JetIdParams = JetIdParams,
80  verbosity = cms.int32(0)
81 )
82 
83 
84 
85 pfMVAMEtSequence = cms.Sequence(
86  #(isomuonseq+isotauseq+isoelectronseq)*
87  kt6PFJets*
88  calibratedAK4PFJetsForPFMVAMEt*
89  pfMVAMEt
90 )