CMS 3D CMS Logo

pfNoPUchsMET_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 pfNoPUchsMEtTask = cms.Task()
4 
6 pfNoPUchsMEtTask.add(ak4PFchsJetsTask)
7 
9 calibratedAK4PFchsJetsForPFNoPUchsMEt = cms.EDProducer('PFJetCorrectionProducer',
10  src = cms.InputTag('ak4PFchsJets'),
11  correctors = cms.vstring('ak4PFchsL1FastL2L3Residual') # NOTE: use "ak4PFchsL1FastL2L3" for MC / "ak4PFchsL1FastL2L3Residual" for Data
12 )
13 ak4PFJetTaskForPFNoPUchsMEt = cms.Task(calibratedAK4PFchsJetsForPFNoPUchsMEt)
14 pfNoPUchsMEtTask.add(ak4PFJetTaskForPFNoPUchsMEt)
15 
17 puJetIdForPFNoPUchsMEt = pileupJetId.clone(
18  algos = cms.VPSet(
19  full_53x_chs,
20  cutbased
21  ),
22  label = "fullId",
23  produceJetIds = True,
24  runMvas = True,
25  jets = "calibratedAK4PFchsJetsForPFNoPUchsMEt",
26  applyJec = False,
27  inputIsCorrected = True,
28 )
29 pfNoPUchsMEtTask.add(puJetIdForPFNoPUchsMEt)
30 
32 pfNoPUchsMEtTask.add(type0PFMEtCorrection)
33 pfCandidateToVertexAssociationForPFNoPUchsMEt = pfCandidateToVertexAssociation.clone(
34  MaxNumberOfAssociations = 1,
35  doReassociation = False,
36  FinalAssociation = 1,
37  nTrackWeight = 0.
38 )
39 pfNoPUchsMEtTask.add(pfCandidateToVertexAssociationForPFNoPUchsMEt)
40 pfMETcorrType0ForPFNoPUchsMEt = pfMETcorrType0.clone(
41  srcPFCandidateToVertexAssociations = 'pfCandidateToVertexAssociationForPFNoPUchsMEt'
42 )
43 pfNoPUchsMEtTask.add(pfMETcorrType0ForPFNoPUchsMEt)
44 
45 
51 
52 jvfJetIdForPFNoPUchsMEt = cms.EDProducer("JVFJetIdProducer",
53  srcJets = cms.InputTag('calibratedAK4PFchsJetsForPFNoPUchsMEt'),
54  srcPFCandidates = cms.InputTag('particleFlow'),
55  srcPFCandToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUchsMEt'),
56  srcHardScatterVertex = cms.InputTag('selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0'),
57  minTrackPt = cms.double(1.),
58  dZcut = cms.double(0.2), # cm
59  JVFcut = cms.double(0.75),
60  neutralJetOption = cms.string("noPU")
61 )
62 pfNoPUchsMEtTask.add(jvfJetIdForPFNoPUchsMEt)
63 
64 import RecoMET.METProducers.METSigParams_cfi as met_config
65 pfNoPUchsMEtData = cms.EDProducer("PFNoPUMEtDataProducer",
66  srcJets = cms.InputTag('calibratedAK4PFchsJetsForPFNoPUchsMEt'),
67  srcJetIds = cms.InputTag('puJetIdForPFNoPUchsMEt', 'fullId'),
68  #srcJetIds = cms.InputTag('jvcJetIdForPFNoPUchsMEt', 'Id'),
69  minJetPt = cms.double(30.0),
70  jetIdSelection = cms.string('loose'),
71  jetEnOffsetCorrLabel = cms.string("ak4PFchsL1Fastjet"),
72  srcPFCandidates = cms.InputTag('particleFlow'),
73  srcPFCandToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUchsMEt'),
74 
76  srcJetsForMEtCov = cms.InputTag('ak4PFchsJets'),
77  minJetPtForMEtCov = cms.double(10.),
78  srcHardScatterVertex = cms.InputTag('selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0'),
79  dZcut = cms.double(0.2), # cm
80  resolution = met_config.METSignificance_params,
81  verbosity = cms.int32(0)
82 )
83 pfNoPUchsMEtTask.add(pfNoPUchsMEtData)
84 
85 pfNoPUchsMEt = cms.EDProducer("PFNoPUMEtProducer",
86  srcMEt = cms.InputTag('pfMet'),
87  srcMEtCov = cms.InputTag(''), # NOTE: leave empty to take MET covariance matrix from reco::PFMET object
88  srcMVAMEtData = cms.InputTag('pfNoPUchsMEtData'),
89  srcLeptons = cms.VInputTag(), # NOTE: you need to set this to collections of electrons, muons and tau-jets
90  # passing the lepton reconstruction & identification criteria applied in your analysis
91  srcMVAMEtDataLeptonMatch = cms.InputTag('pfNoPUchsMEtData'),
92  srcType0Correction = cms.InputTag('pfMETcorrType0ForPFNoPUchsMEt'),
93  sfNoPUjets = cms.double(1.0),
94  sfNoPUjetOffsetEnCorr = cms.double(0.0),
95  sfPUjets = cms.double(1.0),
96  sfNoPUunclChargedCands = cms.double(1.0),
97  sfPUunclChargedCands = cms.double(1.0),
98  sfUnclNeutralCands = cms.double(0.6),
99  sfType0Correction = cms.double(1.0),
100  sfLeptonIsoCones = cms.double(0.6),
101  resolution = met_config.METSignificance_params,
102  sfMEtCovMin = cms.double(0.6),
103  sfMEtCovMax = cms.double(1.0),
104  saveInputs = cms.bool(True),
105  verbosity = cms.int32(0)
106 )
107 pfNoPUchsMEtTask.add(pfNoPUchsMEt)
108 pfNoPUchsMEtSequence = cms.Sequence(pfNoPUchsMEtTask)