1 import FWCore.ParameterSet.Config
as cms
7 metTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
8 src = cms.InputTag(
"slimmedMETs"),
9 name = cms.string(
"MET"),
10 doc = cms.string(
"slimmedMET, type-1 corrected PF MET"),
11 singleton = cms.bool(
True),
12 extension = cms.bool(
False),
13 variables = cms.PSet(PTVars,
14 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
15 covXX =
Var(
"getSignificanceMatrix().At(0,0)",float,doc=
"xx element of met covariance matrix", precision=8),
16 covXY =
Var(
"getSignificanceMatrix().At(0,1)",float,doc=
"xy element of met covariance matrix", precision=8),
17 covYY =
Var(
"getSignificanceMatrix().At(1,1)",float,doc=
"yy element of met covariance matrix", precision=8),
18 significance =
Var(
"metSignificance()", float, doc=
"MET significance",precision=10),
19 sumPtUnclustered =
Var(
"metSumPtUnclustered()", float, doc=
"sumPt used for MET significance",precision=10),
20 MetUnclustEnUpDeltaX =
Var(
"shiftedPx('UnclusteredEnUp')-px()", float, doc=
"Delta (METx_mod-METx) Unclustered Energy Up",precision=10),
21 MetUnclustEnUpDeltaY =
Var(
"shiftedPy('UnclusteredEnUp')-py()", float, doc=
"Delta (METy_mod-METy) Unclustered Energy Up",precision=10),
27 rawMetTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
29 name = cms.string(
"RawMET"),
30 doc = cms.string(
"raw PF MET"),
31 singleton = cms.bool(
True),
32 extension = cms.bool(
False),
34 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
35 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
36 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
41 caloMetTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
43 name = cms.string(
"CaloMET"),
44 doc = cms.string(
"Offline CaloMET (muon corrected)"),
45 singleton = cms.bool(
True),
46 extension = cms.bool(
False),
48 pt =
Var(
"caloMETPt", float, doc=
"pt", precision=10),
49 phi =
Var(
"caloMETPhi", float, doc=
"phi", precision=10),
50 sumEt =
Var(
"caloMETSumEt", float, doc=
"scalar sum of Et", precision=10),
54 puppiMetTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
55 src = cms.InputTag(
"slimmedMETsPuppi"),
56 name = cms.string(
"PuppiMET"),
57 doc = cms.string(
"PUPPI MET"),
58 singleton = cms.bool(
True),
59 extension = cms.bool(
False),
60 variables = cms.PSet(PTVars,
61 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
62 ptJERUp =
Var(
"shiftedPt('JetResUp')", float, doc=
"JER up pt",precision=10),
63 ptJERDown =
Var(
"shiftedPt('JetResDown')", float, doc=
"JER down pt",precision=10),
64 phiJERUp =
Var(
"shiftedPhi('JetResUp')", float, doc=
"JER up phi",precision=10),
65 phiJERDown =
Var(
"shiftedPhi('JetResDown')", float, doc=
"JER down phi",precision=10),
66 ptJESUp =
Var(
"shiftedPt('JetEnUp')", float, doc=
"JES up pt",precision=10),
67 ptJESDown =
Var(
"shiftedPt('JetEnDown')", float, doc=
"JES down pt",precision=10),
68 phiJESUp =
Var(
"shiftedPhi('JetEnUp')", float, doc=
"JES up phi",precision=10),
69 phiJESDown =
Var(
"shiftedPhi('JetEnDown')", float, doc=
"JES down phi",precision=10),
70 ptUnclusteredUp =
Var(
"shiftedPt('UnclusteredEnUp')", float, doc=
"Unclustered up pt",precision=10),
71 ptUnclusteredDown =
Var(
"shiftedPt('UnclusteredEnDown')", float, doc=
"Unclustered down pt",precision=10),
72 phiUnclusteredUp =
Var(
"shiftedPhi('UnclusteredEnUp')", float, doc=
"Unclustered up phi",precision=10),
73 phiUnclusteredDown =
Var(
"shiftedPhi('UnclusteredEnDown')", float, doc=
"Unclustered down phi",precision=10),
77 rawPuppiMetTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
78 src = puppiMetTable.src,
79 name = cms.string(
"RawPuppiMET"),
80 doc = cms.string(
"raw Puppi MET"),
81 singleton = cms.bool(
True),
82 extension = cms.bool(
False),
84 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
85 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
86 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
90 tkMetTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
92 name = cms.string(
"TkMET"),
93 doc = cms.string(
"Track MET computed with tracks from PV0 ( pvAssociationQuality()>=4 ) "),
94 singleton = cms.bool(
True),
95 extension = cms.bool(
False),
97 pt =
Var(
"corPt('RawTrk')", float, doc=
"raw track MET pt",precision=10),
98 phi =
Var(
"corPhi('RawTrk')", float, doc=
"raw track MET phi",precision=10),
99 sumEt =
Var(
"corSumEt('RawTrk')", float, doc=
"raw track scalar sum of Et",precision=10),
103 chsMetTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
105 name = cms.string(
"ChsMET"),
106 doc = cms.string(
"PF MET computed with CHS PF candidates"),
107 singleton = cms.bool(
True),
108 extension = cms.bool(
False),
109 variables = cms.PSet(
110 pt =
Var(
"corPt('RawChs')", float, doc=
"raw chs PF MET pt",precision=10),
111 phi =
Var(
"corPhi('RawChs')", float, doc=
"raw chs PF MET phi",precision=10),
112 sumEt =
Var(
"corSumEt('RawChs')", float, doc=
"raw chs PF scalar sum of Et",precision=10),
116 deepMetResolutionTuneTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
120 name = cms.string(
"DeepMETResolutionTune"),
121 doc = cms.string(
"Deep MET trained with resolution tune"),
122 singleton = cms.bool(
True),
123 extension = cms.bool(
False),
124 variables = cms.PSet(
125 pt =
Var(
"corPt('RawDeepResolutionTune')", float, doc=
"DeepMET ResolutionTune pt",precision=-1),
126 phi =
Var(
"corPhi('RawDeepResolutionTune')", float, doc=
"DeepmET ResolutionTune phi",precision=12),
130 deepMetResponseTuneTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
132 name = cms.string(
"DeepMETResponseTune"),
133 doc = cms.string(
"Deep MET trained with extra response tune"),
134 singleton = cms.bool(
True),
135 extension = cms.bool(
False),
136 variables = cms.PSet(
137 pt =
Var(
"corPt('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune pt",precision=-1),
138 phi =
Var(
"corPhi('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune phi",precision=12),
142 metFixEE2017Table = metTable.clone(
143 src = cms.InputTag(
"slimmedMETsFixEE2017"),
144 name = cms.string(
"METFixEE2017"),
145 doc = cms.string(
"Type-1 corrected PF MET, with fixEE2017 definition"),
148 metMCTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
150 name = cms.string(
"GenMET"),
151 doc = cms.string(
"Gen MET"),
152 singleton = cms.bool(
True),
153 extension = cms.bool(
False),
154 variables = cms.PSet(
155 pt =
Var(
"genMET.pt", float, doc=
"pt", precision=10),
156 phi =
Var(
"genMET.phi", float, doc=
"phi", precision=10),
161 metTablesTask = cms.Task( metTable, rawMetTable, caloMetTable, puppiMetTable, rawPuppiMetTable, tkMetTable, chsMetTable, deepMetResolutionTuneTable, deepMetResponseTuneTable )
162 _withFixEE2017_task = cms.Task(metTablesTask.copy(), metFixEE2017Table)
163 for modifier
in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
164 modifier.toReplaceWith(metTablesTask,_withFixEE2017_task)
165 metMCTask = cms.Task( metMCTable )
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)