CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pfNoPUMET_cff.py
Go to the documentation of this file.
2 
3 pfNoPUMEtSequence = cms.Sequence()
4 
6 calibratedAK4PFJetsForPFNoPUMEt = cms.EDProducer('PFJetCorrectionProducer',
7  src = cms.InputTag('ak4PFJets'),
8  correctors = cms.vstring('ak4PFL1FastL2L3') # NOTE: use "ak4PFL1FastL2L3" for MC / "ak4PFL1FastL2L3Residual" for Data
9 )
10 ak4PFJetSequenceForPFNoPUMEt = cms.Sequence(calibratedAK4PFJetsForPFNoPUMEt)
11 pfNoPUMEtSequence += ak4PFJetSequenceForPFNoPUMEt
12 
13 from RecoJets.JetProducers.pileupjetidproducer_cfi import pileupJetIdEvaluator
14 from RecoJets.JetProducers.puJetIDAlgo_cff import full_53x,cutbased,PhilV1
15 puJetIdForPFNoPUMEt = pileupJetIdEvaluator.clone(
16  algos = cms.VPSet(
17  full_53x,
18  cutbased,
19  PhilV1
20  ),
21 # label = cms.string("fullId"), #MM does not work for weird reasons, cannot be cloned properly
22  produceJetIds = cms.bool(True),
23  runMvas = cms.bool(True),
24  jets = cms.InputTag("calibratedAK4PFJetsForPFNoPUMEt"),
25  applyJec = cms.bool(False),
26  inputIsCorrected = cms.bool(True),
27  )
28 pfNoPUMEtSequence += puJetIdForPFNoPUMEt
29 
31 pfNoPUMEtSequence += type0PFMEtCorrection
32 pfCandidateToVertexAssociationForPFNoPUMEt = pfCandidateToVertexAssociation.clone(
33  MaxNumberOfAssociations = cms.int32(1),
34  doReassociation = cms.bool(False),
35  FinalAssociation = cms.untracked.int32(1),
36  nTrackWeight = cms.double(0.)
37 )
38 pfNoPUMEtSequence += pfCandidateToVertexAssociationForPFNoPUMEt
39 pfMETcorrType0ForPFNoPUMEt = pfMETcorrType0.clone(
40  srcPFCandidateToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUMEt')
41 )
42 pfNoPUMEtSequence += pfMETcorrType0ForPFNoPUMEt
43 
44 jvfJetIdForPFNoPUMEt = cms.EDProducer("JVFJetIdProducer",
45  srcJets = cms.InputTag('calibratedAK4PFJetsForPFNoPUMEt'),
46  srcPFCandidates = cms.InputTag('particleFlow'),
47  srcPFCandToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUMEt'),
48  srcHardScatterVertex = cms.InputTag('selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0'),
49  minTrackPt = cms.double(1.),
50  dZcut = cms.double(0.2), # cm
51  JVFcut = cms.double(0.75),
52  neutralJetOption = cms.string("noPU")
53 )
54 pfNoPUMEtSequence += jvfJetIdForPFNoPUMEt
55 
56 import RecoMET.METProducers.METSigParams_cfi as met_config
57 pfNoPUMEtData = cms.EDProducer("NoPileUpPFMEtDataProducer",
58  srcJets = cms.InputTag('calibratedAK4PFJetsForPFNoPUMEt'),
59  srcJetIds = cms.InputTag('puJetIdForPFNoPUMEt', 'full53xId'),
60  #srcJetIds = cms.InputTag('jvcJetIdForPFNoPUMEt', 'Id'),
61  minJetPt = cms.double(30.0),
62  jetIdSelection = cms.string('loose'),
63  jetEnOffsetCorrLabel = cms.string("ak4PFL1Fastjet"),
64  srcPFCandidates = cms.InputTag('particleFlow'),
65  srcPFCandToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUMEt'),
66  srcJetsForMEtCov = cms.InputTag('ak4PFJets'),
67  minJetPtForMEtCov = cms.double(10.),
68  # minJetPtForMEtCov = cms.double(8.), # FOR TESTING ONLY !!
69  srcHardScatterVertex = cms.InputTag('selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0'),
70  dZcut = cms.double(0.2), # cm
71  resolution = met_config.METSignificance_params,
72  verbosity = cms.int32(0)
73 )
74 pfNoPUMEtSequence += pfNoPUMEtData
75 
76 pfNoPUMEt = cms.EDProducer("NoPileUpPFMEtProducer",
77  srcMEt = cms.InputTag('pfMet'),
78  srcMEtCov = cms.InputTag(''), # NOTE: leave empty to take MET covariance matrix from reco::PFMET object //MM 08/29/14, bypass hardcoded as this variable has never been used so far
79  srcPUSubMETDataJet = cms.InputTag('pfNoPUMEtData','jetInfos'),
80  srcPUSubMETDataPFCands = cms.InputTag('pfNoPUMEtData','pfCandInfos'),
81  srcLeptons = cms.VInputTag(), # NOTE: you need to set this to collections of electrons, muons and tau-jets
82  # passing the lepton reconstruction & identification criteria applied in your analysis
83  srcPUSubMETDataJetLeptonMatch = cms.InputTag('pfNoPUMEtData','jetInfos'),
84  srcPUSubMETDataPFCandsLeptonMatch = cms.InputTag('pfNoPUMEtData','pfCandInfos'),
85  srcType0Correction = cms.InputTag('pfMETcorrType0ForPFNoPUMEt'),
86  sfNoPUjets = cms.double(1.0),
87  sfNoPUjetOffsetEnCorr = cms.double(0.0),
88  sfPUjets = cms.double(1.0),
89  sfNoPUunclChargedCands = cms.double(1.0),
90  sfPUunclChargedCands = cms.double(1.0),
91  sfUnclNeutralCands = cms.double(0.6),
92  sfType0Correction = cms.double(1.0),
93  sfLeptonIsoCones = cms.double(0.6),
94  resolution = met_config.METSignificance_params,
95  sfMEtCovMin = cms.double(0.6),
96  sfMEtCovMax = cms.double(1.0),
97  saveInputs = cms.bool(True),
98  verbosity = cms.int32(0)
99 )
100 pfNoPUMEtSequence += pfNoPUMEt
____________________________________________________________________________||