1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.simpleSingletonCandidateFlatTableProducer_cfi
import simpleSingletonCandidateFlatTableProducer
6 pfmetTable = simpleSingletonCandidateFlatTableProducer.clone(
7 src = cms.InputTag(
"slimmedMETs"),
8 name = cms.string(
"PFMET"),
9 doc = cms.string(
"slimmedMET, type-1 corrected PF MET"),
10 variables = cms.PSet(PTVars,
12 covXX =
Var(
"getSignificanceMatrix().At(0,0)",float,doc=
"xx element of met covariance matrix", precision=8),
13 covXY =
Var(
"getSignificanceMatrix().At(0,1)",float,doc=
"xy element of met covariance matrix", precision=8),
14 covYY =
Var(
"getSignificanceMatrix().At(1,1)",float,doc=
"yy element of met covariance matrix", precision=8),
15 significance =
Var(
"metSignificance()", float, doc=
"MET significance",precision=10),
16 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
17 sumPtUnclustered =
Var(
"metSumPtUnclustered()", float, doc=
"sumPt used for MET significance",precision=10),
18 ptUnclusteredUp =
Var(
"shiftedPt('UnclusteredEnUp')", float, doc=
"Unclustered up pt",precision=10),
19 ptUnclusteredDown =
Var(
"shiftedPt('UnclusteredEnDown')", float, doc=
"Unclustered down pt",precision=10),
20 phiUnclusteredUp =
Var(
"shiftedPhi('UnclusteredEnUp')", float, doc=
"Unclustered up phi",precision=10),
21 phiUnclusteredDown =
Var(
"shiftedPhi('UnclusteredEnDown')", float, doc=
"Unclustered down phi",precision=10),
27 rawMetTable = simpleSingletonCandidateFlatTableProducer.clone(
29 name = cms.string(
"RawPFMET"),
30 doc = cms.string(
"raw PF MET"),
32 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
33 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
34 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
39 caloMetTable = simpleSingletonCandidateFlatTableProducer.clone(
41 name = cms.string(
"CaloMET"),
42 doc = cms.string(
"Offline CaloMET (muon corrected)"),
44 pt =
Var(
"caloMETPt", float, doc=
"pt", precision=10),
45 phi =
Var(
"caloMETPhi", float, doc=
"phi", precision=10),
46 sumEt =
Var(
"caloMETSumEt", float, doc=
"scalar sum of Et", precision=10),
50 puppiMetTable = simpleSingletonCandidateFlatTableProducer.clone(
51 src = cms.InputTag(
"slimmedMETsPuppi"),
52 name = cms.string(
"PuppiMET"),
53 doc = cms.string(
"PUPPI MET"),
54 variables = cms.PSet(PTVars,
55 covXX =
Var(
"getSignificanceMatrix().At(0,0)",float,doc=
"xx element of met covariance matrix", precision=8),
56 covXY =
Var(
"getSignificanceMatrix().At(0,1)",float,doc=
"xy element of met covariance matrix", precision=8),
57 covYY =
Var(
"getSignificanceMatrix().At(1,1)",float,doc=
"yy element of met covariance matrix", precision=8),
58 significance =
Var(
"metSignificance()", float, doc=
"MET significance",precision=10),
59 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
60 sumPtUnclustered =
Var(
"metSumPtUnclustered()", float, doc=
"sumPt used for MET significance",precision=10),
61 ptUnclusteredUp =
Var(
"shiftedPt('UnclusteredEnUp')", float, doc=
"Unclustered up pt",precision=10),
62 ptUnclusteredDown =
Var(
"shiftedPt('UnclusteredEnDown')", float, doc=
"Unclustered down pt",precision=10),
63 phiUnclusteredUp =
Var(
"shiftedPhi('UnclusteredEnUp')", float, doc=
"Unclustered up phi",precision=10),
64 phiUnclusteredDown =
Var(
"shiftedPhi('UnclusteredEnDown')", float, doc=
"Unclustered down phi",precision=10),
69 rawPuppiMetTable = simpleSingletonCandidateFlatTableProducer.clone(
70 src = puppiMetTable.src,
71 name = cms.string(
"RawPuppiMET"),
72 doc = cms.string(
"raw Puppi MET"),
74 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
75 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
76 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
80 trkMetTable = simpleSingletonCandidateFlatTableProducer.clone(
82 name = cms.string(
"TrkMET"),
83 doc = cms.string(
"Track MET computed with tracks from PV0 ( pvAssociationQuality()>=4 ) "),
85 pt =
Var(
"corPt('RawTrk')", float, doc=
"raw track MET pt",precision=10),
86 phi =
Var(
"corPhi('RawTrk')", float, doc=
"raw track MET phi",precision=10),
87 sumEt =
Var(
"corSumEt('RawTrk')", float, doc=
"raw track scalar sum of Et",precision=10),
92 deepMetResolutionTuneTable = simpleSingletonCandidateFlatTableProducer.clone(
96 name = cms.string(
"DeepMETResolutionTune"),
97 doc = cms.string(
"Deep MET trained with resolution tune"),
99 pt =
Var(
"corPt('RawDeepResolutionTune')", float, doc=
"DeepMET ResolutionTune pt",precision=-1),
100 phi =
Var(
"corPhi('RawDeepResolutionTune')", float, doc=
"DeepmET ResolutionTune phi",precision=12),
104 deepMetResponseTuneTable = simpleSingletonCandidateFlatTableProducer.clone(
105 src = pfmetTable.src,
106 name = cms.string(
"DeepMETResponseTune"),
107 doc = cms.string(
"Deep MET trained with extra response tune"),
108 variables = cms.PSet(
109 pt =
Var(
"corPt('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune pt",precision=-1),
110 phi =
Var(
"corPhi('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune phi",precision=12),
114 metMCTable = simpleSingletonCandidateFlatTableProducer.clone(
115 src = pfmetTable.src,
116 name = cms.string(
"GenMET"),
117 doc = cms.string(
"Gen MET"),
118 variables = cms.PSet(
119 pt =
Var(
"genMET.pt", float, doc=
"pt", precision=10),
120 phi =
Var(
"genMET.phi", float, doc=
"phi", precision=10),
125 metTablesTask = cms.Task(pfmetTable, rawMetTable, caloMetTable, puppiMetTable, rawPuppiMetTable, trkMetTable,
126 deepMetResolutionTuneTable, deepMetResponseTuneTable )
127 metMCTask = cms.Task( metMCTable )
def Var(expr, valtype, doc=None, precision=-1)