CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pfMETCorrections_cff.py
Go to the documentation of this file.
2 
3 # load jet energy correction parameters
5 
6 #--------------------------------------------------------------------------------
7 # select PFCandidates ("unclustered energy") not within jets
8 # for Type 2 MET correction
10 pfCandsNotInJet = pfNoJet.clone(
11  topCollection = cms.InputTag('ak5PFJets'),
12  bottomCollection = cms.InputTag('particleFlow')
13 )
14 #--------------------------------------------------------------------------------
15 
16 #--------------------------------------------------------------------------------
17 # produce Type 1 + 2 MET corrections for PFJets
18 pfJetMETcorr = cms.EDProducer("PFJetMETcorrInputProducer",
19  src = cms.InputTag('ak5PFJets'),
20  offsetCorrLabel = cms.string("ak5PFL1Fastjet"),
21  jetCorrLabel = cms.string("ak5PFL1FastL2L3"), # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data
22  jetCorrEtaMax = cms.double(9.9),
23  type1JetPtThreshold = cms.double(10.0),
24  skipEM = cms.bool(True),
25  skipEMfractionThreshold = cms.double(0.90),
26  skipMuons = cms.bool(True),
27  skipMuonSelection = cms.string("isGlobalMuon | isStandAloneMuon")
28 )
29 #--------------------------------------------------------------------------------
30 
31 #--------------------------------------------------------------------------------
32 # produce Type 2 MET corrections for selected PFCandidates
33 pfCandMETcorr = cms.EDProducer("PFCandMETcorrInputProducer",
34  src = cms.InputTag('pfCandsNotInJet')
35 )
36 #--------------------------------------------------------------------------------
37 
38 #--------------------------------------------------------------------------------
39 # produce Type 0 MET corrections for selected vertices
40 pfchsMETcorr = cms.EDProducer("PFchsMETcorrInputProducer",
41  src = cms.InputTag('offlinePrimaryVertices'),
42  goodVtxNdof = cms.uint32(4),
43  goodVtxZ = cms.double(24)
44 )
45 #--------------------------------------------------------------------------------
46 
47 #--------------------------------------------------------------------------------
48 # use MET corrections to produce Type 1 / Type 1 + 2 corrected PFMET objects
49 pfType1CorrectedMet = cms.EDProducer("CorrectedPFMETProducer",
50  src = cms.InputTag('pfMet'),
51  applyType0Corrections = cms.bool(False),
52  srcCHSSums = cms.VInputTag(
53  cms.InputTag('pfchsMETcorr', 'type0')
54  ),
55  type0Rsoft = cms.double(0.6),
56  applyType1Corrections = cms.bool(True),
57  srcType1Corrections = cms.VInputTag(
58  cms.InputTag('pfJetMETcorr', 'type1')
59  ),
60  applyType2Corrections = cms.bool(False)
61 )
62 
63 pfType1p2CorrectedMet = cms.EDProducer("CorrectedPFMETProducer",
64  src = cms.InputTag('pfMet'),
65  applyType0Corrections = cms.bool(False),
66  srcCHSSums = cms.VInputTag(
67  cms.InputTag('pfchsMETcorr', 'type0')
68  ),
69  type0Rsoft = cms.double(0.6),
70  applyType1Corrections = cms.bool(True),
71  srcType1Corrections = cms.VInputTag(
72  cms.InputTag('pfJetMETcorr', 'type1')
73  ),
74  applyType2Corrections = cms.bool(True),
75  srcUnclEnergySums = cms.VInputTag(
76  cms.InputTag('pfJetMETcorr', 'type2'),
77  cms.InputTag('pfJetMETcorr', 'offset'),
78  cms.InputTag('pfCandMETcorr')
79  ),
80  type2CorrFormula = cms.string("A"),
81  type2CorrParameter = cms.PSet(
82  A = cms.double(1.4)
83  )
84 )
85 #--------------------------------------------------------------------------------
86 
87 #--------------------------------------------------------------------------------
88 # define sequence to run all modules
89 producePFMETCorrections = cms.Sequence(
90  pfCandsNotInJet
91  * pfJetMETcorr
92  * pfCandMETcorr
93  * pfchsMETcorr
94  * pfType1CorrectedMet
95  * pfType1p2CorrectedMet
96 )
97 #--------------------------------------------------------------------------------