CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pfNoPUchsMET_cff.py
Go to the documentation of this file.
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 
16 from RecoJets.JetProducers.pileupjetidproducer_cfi import pileupJetIdEvaluator
17 from RecoJets.JetProducers.puJetIDAlgo_cff import full_53x_chs,cutbased
18 puJetIdForPFNoPUchsMEt = pileupJetIdEvaluator.clone(
19  algos = cms.VPSet(
20  full_53x_chs,
21  cutbased
22  ),
23  label = cms.string("fullId"),
24  produceJetIds = cms.bool(True),
25  runMvas = cms.bool(True),
26  jets = cms.InputTag("calibratedAK4PFchsJetsForPFNoPUchsMEt"),
27  applyJec = cms.bool(False),
28  inputIsCorrected = cms.bool(True),
29 )
30 pfNoPUchsMEtSequence += puJetIdForPFNoPUchsMEt
31 
33 pfNoPUchsMEtSequence += type0PFMEtCorrection
34 pfCandidateToVertexAssociationForPFNoPUchsMEt = pfCandidateToVertexAssociation.clone(
35  MaxNumberOfAssociations = cms.int32(1),
36  doReassociation = cms.bool(False),
37  FinalAssociation = cms.untracked.int32(1),
38  nTrackWeight = cms.double(0.)
39 )
40 pfNoPUchsMEtSequence += pfCandidateToVertexAssociationForPFNoPUchsMEt
41 pfMETcorrType0ForPFNoPUchsMEt = pfMETcorrType0.clone(
42  srcPFCandidateToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUchsMEt')
43 )
44 pfNoPUchsMEtSequence += pfMETcorrType0ForPFNoPUchsMEt
45 
46 ##from CommonTools.RecoUtils.pfcand_assomap_cfi import PFCandAssoMap
47 ##pfPileUpToVertexAssociation = PFCandAssoMap.clone(
48 ## VertexTrackAssociationMap = cms.InputTag('trackToVertexAssociation'),
49 ## PFCandidateCollection = cms.InputTag('pfPileUpForAK4PFchsJets')
50 ##)
51 ##pfNoPUchsMEtSequence += pfPileUpToVertexAssociation
52 
53 jvfJetIdForPFNoPUchsMEt = cms.EDProducer("JVFJetIdProducer",
54  srcJets = cms.InputTag('calibratedAK4PFchsJetsForPFNoPUchsMEt'),
55  srcPFCandidates = cms.InputTag('particleFlow'),
56  srcPFCandToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUchsMEt'),
57  srcHardScatterVertex = cms.InputTag('selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0'),
58  minTrackPt = cms.double(1.),
59  dZcut = cms.double(0.2), # cm
60  JVFcut = cms.double(0.75),
61  neutralJetOption = cms.string("noPU")
62 )
63 pfNoPUchsMEtSequence += jvfJetIdForPFNoPUchsMEt
64 
65 import RecoMET.METProducers.METSigParams_cfi as met_config
66 pfNoPUchsMEtData = cms.EDProducer("PFNoPUMEtDataProducer",
67  srcJets = cms.InputTag('calibratedAK4PFchsJetsForPFNoPUchsMEt'),
68  srcJetIds = cms.InputTag('puJetIdForPFNoPUchsMEt', 'fullId'),
69  #srcJetIds = cms.InputTag('jvcJetIdForPFNoPUchsMEt', 'Id'),
70  minJetPt = cms.double(30.0),
71  jetIdSelection = cms.string('loose'),
72  jetEnOffsetCorrLabel = cms.string("ak4PFchsL1Fastjet"),
73  srcPFCandidates = cms.InputTag('particleFlow'),
74  srcPFCandToVertexAssociations = cms.InputTag('pfCandidateToVertexAssociationForPFNoPUchsMEt'),
75  ##srcPFCandidates = cms.InputTag('pfPileUpForAK4PFchsJets'),
76  ##srcPFCandToVertexAssociations = cms.InputTag('pfPileUpToVertexAssociation'),
77  srcJetsForMEtCov = cms.InputTag('ak4PFchsJets'),
78  minJetPtForMEtCov = cms.double(10.),
79  srcHardScatterVertex = cms.InputTag('selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0'),
80  dZcut = cms.double(0.2), # cm
81  resolution = met_config.METSignificance_params,
82  verbosity = cms.int32(0)
83 )
84 pfNoPUchsMEtSequence += pfNoPUchsMEtData
85 
86 pfNoPUchsMEt = cms.EDProducer("PFNoPUMEtProducer",
87  srcMEt = cms.InputTag('pfMet'),
88  srcMEtCov = cms.InputTag(''), # NOTE: leave empty to take MET covariance matrix from reco::PFMET object
89  srcMVAMEtData = cms.InputTag('pfNoPUchsMEtData'),
90  srcLeptons = cms.VInputTag(), # NOTE: you need to set this to collections of electrons, muons and tau-jets
91  # passing the lepton reconstruction & identification criteria applied in your analysis
92  srcMVAMEtDataLeptonMatch = cms.InputTag('pfNoPUchsMEtData'),
93  srcType0Correction = cms.InputTag('pfMETcorrType0ForPFNoPUchsMEt'),
94  sfNoPUjets = cms.double(1.0),
95  sfNoPUjetOffsetEnCorr = cms.double(0.0),
96  sfPUjets = cms.double(1.0),
97  sfNoPUunclChargedCands = cms.double(1.0),
98  sfPUunclChargedCands = cms.double(1.0),
99  sfUnclNeutralCands = cms.double(0.6),
100  sfType0Correction = cms.double(1.0),
101  sfLeptonIsoCones = cms.double(0.6),
102  resolution = met_config.METSignificance_params,
103  sfMEtCovMin = cms.double(0.6),
104  sfMEtCovMax = cms.double(1.0),
105  saveInputs = cms.bool(True),
106  verbosity = cms.int32(0)
107 )
108 pfNoPUchsMEtSequence += pfNoPUchsMEt
____________________________________________________________________________||