CMS 3D CMS Logo

pfNoPUchsMET_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 pfNoPUchsMEtSequence = cms.Sequence()
4 
6 pfNoPUchsMEtSequence += ak4PFchsJetsSequence
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 ak4PFJetSequenceForPFNoPUchsMEt = cms.Sequence(calibratedAK4PFchsJetsForPFNoPUchsMEt)
14 pfNoPUchsMEtSequence += ak4PFJetSequenceForPFNoPUchsMEt
15 
17 puJetIdForPFNoPUchsMEt = pileupJetId.clone(
18  algos = cms.VPSet(
19  full_53x_chs,
20  cutbased
21  ),
22  label = cms.string("fullId"),
23  produceJetIds = cms.bool(True),
24  runMvas = cms.bool(True),
25  jets = cms.InputTag("calibratedAK4PFchsJetsForPFNoPUchsMEt"),
26  applyJec = cms.bool(False),
27  inputIsCorrected = cms.bool(True),
28 )
29 pfNoPUchsMEtSequence += puJetIdForPFNoPUchsMEt
30 
32 pfNoPUchsMEtSequence += type0PFMEtCorrection
33 pfCandidateToVertexAssociationForPFNoPUchsMEt = pfCandidateToVertexAssociation.clone(
34  MaxNumberOfAssociations = cms.int32(1),
35  doReassociation = cms.bool(False),
36  FinalAssociation = cms.untracked.int32(1),
37  nTrackWeight = cms.double(0.)
38 )
39 pfNoPUchsMEtSequence += pfCandidateToVertexAssociationForPFNoPUchsMEt
40 pfMETcorrType0ForPFNoPUchsMEt = pfMETcorrType0.clone(
41  srcPFCandidateToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUchsMEt')
42 )
43 pfNoPUchsMEtSequence += pfMETcorrType0ForPFNoPUchsMEt
44 
45 ##from CommonTools.RecoUtils.pfcand_assomap_cfi import PFCandAssoMap
46 ##pfPileUpToVertexAssociation = PFCandAssoMap.clone(
47 ## VertexTrackAssociationMap = cms.InputTag('trackToVertexAssociation'),
48 ## PFCandidateCollection = cms.InputTag('pfPileUpForAK4PFchsJets')
49 ##)
50 ##pfNoPUchsMEtSequence += pfPileUpToVertexAssociation
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 pfNoPUchsMEtSequence += 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  ##srcPFCandidates = cms.InputTag('pfPileUpForAK4PFchsJets'),
75  ##srcPFCandToVertexAssociations = cms.InputTag('pfPileUpToVertexAssociation'),
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 pfNoPUchsMEtSequence += 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 pfNoPUchsMEtSequence += pfNoPUchsMEt