1 import FWCore.ParameterSet.Config
as cms
4 rhoTable = cms.EDProducer(
"GlobalVariablesTableProducer",
6 fixedGridRhoFastjetAll =
ExtVar( cms.InputTag(
"fixedGridRhoFastjetAll"),
"double", doc =
"rho from all PF Candidates, used e.g. for JECs" ),
7 fixedGridRhoFastjetCentralNeutral =
ExtVar( cms.InputTag(
"fixedGridRhoFastjetCentralNeutral"),
"double", doc =
"rho from neutral PF Candidates with |eta| < 2.5, used e.g. for rho corrections of some lepton isolations" ),
8 fixedGridRhoFastjetCentralCalo =
ExtVar( cms.InputTag(
"fixedGridRhoFastjetCentralCalo"),
"double", doc =
"rho from calo towers with |eta| < 2.5, used e.g. egamma PFCluster isolation" ),
12 puTable = cms.EDProducer(
"NPUTablesProducer",
13 src = cms.InputTag(
"slimmedAddPileupInfo"),
16 genTable = cms.EDProducer(
"SimpleGenEventFlatTableProducer",
17 src = cms.InputTag(
"generator"),
19 name= cms.string(
"Generator"),
20 doc = cms.string(
"Generator information"),
21 singleton = cms.bool(
True),
22 extension = cms.bool(
False),
24 x1 =
Var(
"?hasPDF?pdf().x.first:-1", float, doc=
"x1 fraction of proton momentum carried by the first parton",precision=14 ),
25 x2 =
Var(
"?hasPDF?pdf().x.second:-1", float, doc=
"x2 fraction of proton momentum carried by the second parton",precision=14 ),
26 xpdf1 =
Var(
"?hasPDF?pdf().xPDF.first:-1", float, doc=
"x*pdf(x) for the first parton", precision=14 ),
27 xpdf2 =
Var(
"?hasPDF?pdf().xPDF.second:-1", float, doc=
"x*pdf(x) for the second parton", precision=14 ),
28 id1 =
Var(
"?hasPDF?pdf().id.first:-1", int, doc=
"id of first parton", precision=6 ),
29 id2 =
Var(
"?hasPDF?pdf().id.second:-1", int, doc=
"id of second parton", precision=6 ),
30 scalePDF =
Var(
"?hasPDF?pdf().scalePDF:-1", float, doc=
"Q2 scale for PDF", precision=14 ),
31 binvar =
Var(
"?hasBinningValues()?binningValues()[0]:-1", float, doc=
"MC generation binning value", precision=14),
32 weight =
Var(
"weight()", float,doc=
"MC generator weight", precision=14),
36 globalTables = cms.Sequence(rhoTable)
37 globalTablesMC = cms.Sequence(puTable+genTable)
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)