CMS 3D CMS Logo

met_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 
4 
5 
6 ##################### User floats producers, selectors ##########################
7 ## this can be merged with chsFor soft activity if we keep the same selection
8 chsForTkMet = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string('charge()!=0 && pvAssociationQuality()>=5 && vertexRef().key()==0'))
9 tkMet = cms.EDProducer("PFMETProducer",
10  src = cms.InputTag("chsForTkMet"),
11  alias = cms.string('tkMet'),
12  globalThreshold = cms.double(0.0),
13  calculateSignificance = cms.bool(False),
14 )
15 
16 
17 
18 ##################### Tables for final output and docs ##########################
19 metTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
20  src = cms.InputTag("slimmedMETs"),
21  name = cms.string("MET"),
22  doc = cms.string("slimmedMET, type-1 corrected PF MET"),
23  singleton = cms.bool(True), # there's always exactly one MET per event
24  extension = cms.bool(False), # this is the main table for the MET
25  variables = cms.PSet(PTVars,
26  sumEt = Var("sumEt()", float, doc="scalar sum of Et",precision=10),
27  covXX = Var("getSignificanceMatrix().At(0,0)",float,doc="xx element of met covariance matrix", precision=8),
28  covXY = Var("getSignificanceMatrix().At(0,1)",float,doc="xy element of met covariance matrix", precision=8),
29  covYY = Var("getSignificanceMatrix().At(1,1)",float,doc="yy element of met covariance matrix", precision=8),
30  significance = Var("metSignificance()", float, doc="MET significance",precision=10),
31  MetUnclustEnUpDeltaX = Var("shiftedPx('UnclusteredEnUp')-px()", float, doc="Delta (METx_mod-METx) Unclustered Energy Up",precision=10),
32  MetUnclustEnUpDeltaY = Var("shiftedPy('UnclusteredEnUp')-py()", float, doc="Delta (METy_mod-METy) Unclustered Energy Up",precision=10),
33 
34  ),
35 )
36 
37 
38 rawMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
39  src = metTable.src,
40  name = cms.string("RawMET"),
41  doc = cms.string("raw PF MET"),
42  singleton = cms.bool(True), # there's always exactly one MET per event
43  extension = cms.bool(False), # this is the main table for the MET
44  variables = cms.PSet(#NOTA BENE: we don't copy PTVars here!
45  pt = Var("uncorPt", float, doc="pt", precision=10),
46  phi = Var("uncorPhi", float, doc="phi", precision=10),
47  sumEt = Var("uncorSumEt", float, doc="scalar sum of Et", precision=10),
48  ),
49 )
50 
51 
52 caloMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
53  src = metTable.src,
54  name = cms.string("CaloMET"),
55  doc = cms.string("CaloMET"),
56  singleton = cms.bool(True), # there's always exactly one MET per event
57  extension = cms.bool(False), # this is the main table for the MET
58  variables = cms.PSet(#NOTA BENE: we don't copy PTVars here!
59  pt = Var("caloMETPt", float, doc="pt", precision=10),
60  phi = Var("caloMETPhi", float, doc="phi", precision=10),
61  sumEt = Var("caloMETSumEt", float, doc="scalar sum of Et", precision=10),
62  ),
63 )
64 
65 puppiMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
66  src = cms.InputTag("slimmedMETsPuppi"),
67  name = cms.string("PuppiMET"),
68  doc = cms.string("PUPPI MET"),
69  singleton = cms.bool(True), # there's always exactly one MET per event
70  extension = cms.bool(False), # this is the main table for the MET
71  variables = cms.PSet(PTVars,
72  sumEt = Var("sumEt()", float, doc="scalar sum of Et",precision=10),
73  ),
74 )
75 
76 tkMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
77  src = cms.InputTag("tkMet"),
78  name = cms.string("TkMET"),
79  doc = cms.string("Track MET computed with tracks from PV0 ( pvAssociationQuality()>=5 ) "),
80  singleton = cms.bool(True), # there's always exactly one MET per event
81  extension = cms.bool(False), # this is the main table for the TkMET
82  variables = cms.PSet(PTVars,
83  sumEt = Var("sumEt()", float, doc="scalar sum of Et",precision=10),
84  ),
85 )
86 
87 
88 metMCTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
89  src = metTable.src,
90  name = cms.string("GenMET"),
91  doc = cms.string("Gen MET"),
92  singleton = cms.bool(True),
93  extension = cms.bool(False),
94  variables = cms.PSet(
95  pt = Var("genMET.pt", float, doc="pt", precision=10),
96  phi = Var("genMET.phi", float, doc="phi", precision=10),
97  ),
98 )
99 
100 
101 
102 metSequence = cms.Sequence(chsForTkMet+tkMet)
103 metTables = cms.Sequence( metTable + rawMetTable + caloMetTable + puppiMetTable + tkMetTable)
104 metMC = cms.Sequence( metMCTable )
105 
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20