CMS 3D CMS Logo

patCaloMETCorrections_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
5 # load modules for producing Type 1 / Type 1 + 2 corrections for reco::PFMET objects
6 
7 #--------------------------------------------------------------------------------
8 # produce "raw" (uncorrected) pat::MET of calo-type
10 patCaloMet = patMETs.clone(
11  metSource = cms.InputTag('caloMetM'),
12  addMuonCorrections = cms.bool(False),
13  genMETSource = cms.InputTag('genMetTrue')
14 )
15 #--------------------------------------------------------------------------------
16 
17 patCaloMetType1Corr = cms.EDProducer(
18  "CaloJetMETcorrInputProducer",
19  src = cms.InputTag('ak4CaloJets'),
20  jetCorrLabel = cms.InputTag("ak4CaloL2L3Corrector"), # NOTE: use "ak4CaloL2L3Corrector" for MC / "ak4CaloL2L3ResidualCorrector" for Data
21  jetCorrEtaMax = cms.double(9.9),
22  type1JetPtThreshold = cms.double(20.0),
23  skipEM = cms.bool(True),
24  skipEMfractionThreshold = cms.double(0.90),
25  srcMET = cms.InputTag('caloMetM')
26 )
27 
28 ##____________________________________________________________________________||
29 patCaloMetMuCorr = cms.EDProducer("MuonMETcorrInputProducer",
30  src = cms.InputTag('muons'),
31  srcMuonCorrections = cms.InputTag('muonMETValueMapProducer', 'muCorrData')
32 )
33 
34 ##____________________________________________________________________________||
35 patCaloMetType2Corr = cms.EDProducer(
36  "Type2CorrectionProducer",
37  srcUnclEnergySums = cms.VInputTag(
38  cms.InputTag('patCaloMetType1Corr', 'type2'),
39  cms.InputTag('patCaloMetMuCorr') # NOTE: use this for 'corMetGlobalMuons', do **not** use it for 'met' !!
40  ),
41  type2CorrFormula = cms.string("A + B*exp(-C*x)"),
42  type2CorrParameter = cms.PSet(
43  A = cms.double(2.0),
44  B = cms.double(1.3),
45  C = cms.double(0.1)
46  )
47  )
48 
49 
50 
51 #--------------------------------------------------------------------------------
52 # use MET corrections to produce Type 1 / Type 1 + 2 corrected PFMET objects
53 patCaloMetT1 = cms.EDProducer("CorrectedPATMETProducer",
54  src = cms.InputTag('patCaloMet'),
55  applyType1Corrections = cms.bool(True),
56  srcType1Corrections = cms.VInputTag(
57  cms.InputTag('patCaloMetType1Corr', 'type1'),
58  ),
59  applyType2Corrections = cms.bool(False)
60 )
61 
62 patCaloMetT1T2 = cms.EDProducer("CorrectedPATMETProducer",
63  src = cms.InputTag('patCaloMet'),
64  applyType1Corrections = cms.bool(True),
65  srcType1Corrections = cms.VInputTag(
66  cms.InputTag('patCaloMetType1Corr', 'type1'),
67  ),
68  applyType2Corrections = cms.bool(True),
69  srcUnclEnergySums = cms.VInputTag(
70  cms.InputTag('patCaloMetType1Corr', 'type2' ),
71  ),
72  type2CorrFormula = cms.string("A + B*exp(-C*x)"),
73  type2CorrParameter = cms.PSet(
74  A = cms.double(2.0),
75  B = cms.double(1.3),
76  C = cms.double(0.1)
77  )
78 )
79 
80 
81 ##____________________________________________________________________________||
82 producePatCaloMETCorrectionsUnc = cms.Sequence(
83  patCaloMet +
84  ak4CaloL2L3CorrectorChain + # NOTE: use "ak4CaloL2L3CorrectorChain" for MC / "ak4CaloL2L3ResidualCorrectorChain" for Data
85  patCaloMetType1Corr +
86  patCaloMetMuCorr +
87  patCaloMetType2Corr
88  )
89 
90 ##____________________________________________________________________________||