1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.simplePATMETFlatTableProducer_cfi
import simplePATMETFlatTableProducer
5 simpleSingletonPATMETFlatTableProducer = simplePATMETFlatTableProducer.clone(
6 singleton = cms.bool(
True),
12 pfmetTable = simpleSingletonPATMETFlatTableProducer.clone(
13 src = cms.InputTag(
"slimmedMETs"),
14 name = cms.string(
"PFMET"),
15 doc = cms.string(
"slimmedMET, type-1 corrected PF MET"),
16 variables = cms.PSet(PTVars,
17 covXX =
Var(
"getSignificanceMatrix().At(0,0)",float,doc=
"xx element of met covariance matrix", precision=8),
18 covXY =
Var(
"getSignificanceMatrix().At(0,1)",float,doc=
"xy element of met covariance matrix", precision=8),
19 covYY =
Var(
"getSignificanceMatrix().At(1,1)",float,doc=
"yy element of met covariance matrix", precision=8),
20 significance =
Var(
"metSignificance()", float, doc=
"MET significance",precision=10),
21 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
22 sumPtUnclustered =
Var(
"metSumPtUnclustered()", float, doc=
"sumPt used for MET significance",precision=10),
23 ptUnclusteredUp =
Var(
"shiftedPt('UnclusteredEnUp')", float, doc=
"Unclustered up pt",precision=10),
24 ptUnclusteredDown =
Var(
"shiftedPt('UnclusteredEnDown')", float, doc=
"Unclustered down pt",precision=10),
25 phiUnclusteredUp =
Var(
"shiftedPhi('UnclusteredEnUp')", float, doc=
"Unclustered up phi",precision=10),
26 phiUnclusteredDown =
Var(
"shiftedPhi('UnclusteredEnDown')", float, doc=
"Unclustered down phi",precision=10),
31 rawMetTable = simpleSingletonPATMETFlatTableProducer.clone(
33 name = cms.string(
"RawPFMET"),
34 doc = cms.string(
"raw PF MET"),
36 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
37 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
38 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
43 caloMetTable = simpleSingletonPATMETFlatTableProducer.clone(
45 name = cms.string(
"CaloMET"),
46 doc = cms.string(
"Offline CaloMET (muon corrected)"),
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 = simpleSingletonPATMETFlatTableProducer.clone(
55 src = cms.InputTag(
"slimmedMETsPuppi"),
56 name = cms.string(
"PuppiMET"),
57 doc = cms.string(
"PUPPI MET"),
58 variables = cms.PSet(PTVars,
59 covXX =
Var(
"getSignificanceMatrix().At(0,0)",float,doc=
"xx element of met covariance matrix", precision=8),
60 covXY =
Var(
"getSignificanceMatrix().At(0,1)",float,doc=
"xy element of met covariance matrix", precision=8),
61 covYY =
Var(
"getSignificanceMatrix().At(1,1)",float,doc=
"yy element of met covariance matrix", precision=8),
62 significance =
Var(
"metSignificance()", float, doc=
"MET significance",precision=10),
63 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
64 sumPtUnclustered =
Var(
"metSumPtUnclustered()", float, doc=
"sumPt used for MET significance",precision=10),
65 ptUnclusteredUp =
Var(
"shiftedPt('UnclusteredEnUp')", float, doc=
"Unclustered up pt",precision=10),
66 ptUnclusteredDown =
Var(
"shiftedPt('UnclusteredEnDown')", float, doc=
"Unclustered down pt",precision=10),
67 phiUnclusteredUp =
Var(
"shiftedPhi('UnclusteredEnUp')", float, doc=
"Unclustered up phi",precision=10),
68 phiUnclusteredDown =
Var(
"shiftedPhi('UnclusteredEnDown')", float, doc=
"Unclustered down phi",precision=10),
72 rawPuppiMetTable = simpleSingletonPATMETFlatTableProducer.clone(
73 src = puppiMetTable.src,
74 name = cms.string(
"RawPuppiMET"),
75 doc = cms.string(
"raw Puppi MET"),
77 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
78 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
79 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
83 trkMetTable = simpleSingletonPATMETFlatTableProducer.clone(
85 name = cms.string(
"TrkMET"),
86 doc = cms.string(
"Track MET computed with tracks from PV0 ( pvAssociationQuality()>=4 ) "),
88 pt =
Var(
"corPt('RawTrk')", float, doc=
"raw track MET pt",precision=10),
89 phi =
Var(
"corPhi('RawTrk')", float, doc=
"raw track MET phi",precision=10),
90 sumEt =
Var(
"corSumEt('RawTrk')", float, doc=
"raw track scalar sum of Et",precision=10),
94 deepMetResolutionTuneTable = simpleSingletonPATMETFlatTableProducer.clone(
98 name = cms.string(
"DeepMETResolutionTune"),
99 doc = cms.string(
"Deep MET trained with resolution tune"),
100 variables = cms.PSet(
101 pt =
Var(
"corPt('RawDeepResolutionTune')", float, doc=
"DeepMET ResolutionTune pt",precision=-1),
102 phi =
Var(
"corPhi('RawDeepResolutionTune')", float, doc=
"DeepmET ResolutionTune phi",precision=12),
106 deepMetResponseTuneTable = simpleSingletonPATMETFlatTableProducer.clone(
107 src = pfmetTable.src,
108 name = cms.string(
"DeepMETResponseTune"),
109 doc = cms.string(
"Deep MET trained with extra response tune"),
110 variables = cms.PSet(
111 pt =
Var(
"corPt('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune pt",precision=-1),
112 phi =
Var(
"corPhi('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune phi",precision=12),
116 metMCTable = simpleSingletonPATMETFlatTableProducer.clone(
117 src = pfmetTable.src,
118 name = cms.string(
"GenMET"),
119 doc = cms.string(
"Gen MET"),
120 variables = cms.PSet(
121 pt =
Var(
"genMET.pt", float, doc=
"pt", precision=10),
122 phi =
Var(
"genMET.phi", float, doc=
"phi", precision=10),
127 metTablesTask = cms.Task(pfmetTable, rawMetTable, caloMetTable, puppiMetTable, rawPuppiMetTable, trkMetTable,
128 deepMetResolutionTuneTable, deepMetResponseTuneTable )
129 metMCTask = cms.Task( metMCTable )
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)