1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.simpleSingletonCandidateFlatTableProducer_cfi
import simpleSingletonCandidateFlatTableProducer
6 metTable = simpleSingletonCandidateFlatTableProducer.clone(
7 src = cms.InputTag(
"slimmedMETs"),
8 name = cms.string(
"MET"),
9 doc = cms.string(
"slimmedMET, type-1 corrected PF MET"),
10 variables = cms.PSet(PTVars,
11 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
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 sumPtUnclustered =
Var(
"metSumPtUnclustered()", float, doc=
"sumPt used for MET significance",precision=10),
17 MetUnclustEnUpDeltaX =
Var(
"shiftedPx('UnclusteredEnUp')-px()", float, doc=
"Delta (METx_mod-METx) Unclustered Energy Up",precision=10),
18 MetUnclustEnUpDeltaY =
Var(
"shiftedPy('UnclusteredEnUp')-py()", float, doc=
"Delta (METy_mod-METy) Unclustered Energy Up",precision=10),
24 rawMetTable = simpleSingletonCandidateFlatTableProducer.clone(
26 name = cms.string(
"RawMET"),
27 doc = cms.string(
"raw PF MET"),
29 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
30 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
31 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
36 caloMetTable = simpleSingletonCandidateFlatTableProducer.clone(
38 name = cms.string(
"CaloMET"),
39 doc = cms.string(
"Offline CaloMET (muon corrected)"),
41 pt =
Var(
"caloMETPt", float, doc=
"pt", precision=10),
42 phi =
Var(
"caloMETPhi", float, doc=
"phi", precision=10),
43 sumEt =
Var(
"caloMETSumEt", float, doc=
"scalar sum of Et", precision=10),
47 puppiMetTable = simpleSingletonCandidateFlatTableProducer.clone(
48 src = cms.InputTag(
"slimmedMETsPuppi"),
49 name = cms.string(
"PuppiMET"),
50 doc = cms.string(
"PUPPI MET"),
51 variables = cms.PSet(PTVars,
52 sumEt =
Var(
"sumEt()", float, doc=
"scalar sum of Et",precision=10),
53 ptJERUp =
Var(
"shiftedPt('JetResUp')", float, doc=
"JER up pt",precision=10),
54 ptJERDown =
Var(
"shiftedPt('JetResDown')", float, doc=
"JER down pt",precision=10),
55 phiJERUp =
Var(
"shiftedPhi('JetResUp')", float, doc=
"JER up phi",precision=10),
56 phiJERDown =
Var(
"shiftedPhi('JetResDown')", float, doc=
"JER down phi",precision=10),
57 ptJESUp =
Var(
"shiftedPt('JetEnUp')", float, doc=
"JES up pt",precision=10),
58 ptJESDown =
Var(
"shiftedPt('JetEnDown')", float, doc=
"JES down pt",precision=10),
59 phiJESUp =
Var(
"shiftedPhi('JetEnUp')", float, doc=
"JES up phi",precision=10),
60 phiJESDown =
Var(
"shiftedPhi('JetEnDown')", float, doc=
"JES down phi",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),
68 rawPuppiMetTable = simpleSingletonCandidateFlatTableProducer.clone(
69 src = puppiMetTable.src,
70 name = cms.string(
"RawPuppiMET"),
71 doc = cms.string(
"raw Puppi MET"),
73 pt =
Var(
"uncorPt", float, doc=
"pt", precision=10),
74 phi =
Var(
"uncorPhi", float, doc=
"phi", precision=10),
75 sumEt =
Var(
"uncorSumEt", float, doc=
"scalar sum of Et", precision=10),
79 tkMetTable = simpleSingletonCandidateFlatTableProducer.clone(
81 name = cms.string(
"TkMET"),
82 doc = cms.string(
"Track MET computed with tracks from PV0 ( pvAssociationQuality()>=4 ) "),
84 pt =
Var(
"corPt('RawTrk')", float, doc=
"raw track MET pt",precision=10),
85 phi =
Var(
"corPhi('RawTrk')", float, doc=
"raw track MET phi",precision=10),
86 sumEt =
Var(
"corSumEt('RawTrk')", float, doc=
"raw track scalar sum of Et",precision=10),
90 chsMetTable = simpleSingletonCandidateFlatTableProducer.clone(
92 name = cms.string(
"ChsMET"),
93 doc = cms.string(
"PF MET computed with CHS PF candidates"),
95 pt =
Var(
"corPt('RawChs')", float, doc=
"raw chs PF MET pt",precision=10),
96 phi =
Var(
"corPhi('RawChs')", float, doc=
"raw chs PF MET phi",precision=10),
97 sumEt =
Var(
"corSumEt('RawChs')", float, doc=
"raw chs PF scalar sum of Et",precision=10),
101 deepMetResolutionTuneTable = simpleSingletonCandidateFlatTableProducer.clone(
105 name = cms.string(
"DeepMETResolutionTune"),
106 doc = cms.string(
"Deep MET trained with resolution tune"),
107 variables = cms.PSet(
108 pt =
Var(
"corPt('RawDeepResolutionTune')", float, doc=
"DeepMET ResolutionTune pt",precision=-1),
109 phi =
Var(
"corPhi('RawDeepResolutionTune')", float, doc=
"DeepmET ResolutionTune phi",precision=12),
113 deepMetResponseTuneTable = simpleSingletonCandidateFlatTableProducer.clone(
115 name = cms.string(
"DeepMETResponseTune"),
116 doc = cms.string(
"Deep MET trained with extra response tune"),
117 variables = cms.PSet(
118 pt =
Var(
"corPt('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune pt",precision=-1),
119 phi =
Var(
"corPhi('RawDeepResponseTune')", float, doc=
"DeepMET ResponseTune phi",precision=12),
123 metMCTable = simpleSingletonCandidateFlatTableProducer.clone(
125 name = cms.string(
"GenMET"),
126 doc = cms.string(
"Gen MET"),
127 variables = cms.PSet(
128 pt =
Var(
"genMET.pt", float, doc=
"pt", precision=10),
129 phi =
Var(
"genMET.phi", float, doc=
"phi", precision=10),
134 metTablesTask = cms.Task( metTable, rawMetTable, caloMetTable, puppiMetTable, rawPuppiMetTable, tkMetTable, chsMetTable, deepMetResolutionTuneTable, deepMetResponseTuneTable )
135 metMCTask = cms.Task( metMCTable )
def Var(expr, valtype, doc=None, precision=-1)