CMS 3D CMS Logo

globals_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 
4 rhoTable = cms.EDProducer("GlobalVariablesTableProducer",
5  variables = cms.PSet(
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" ),
9  )
10 )
11 
12 puTable = cms.EDProducer("NPUTablesProducer",
13  src = cms.InputTag("slimmedAddPileupInfo"),
14 )
15 
16 genTable = cms.EDProducer("SimpleGenEventFlatTableProducer",
17  src = cms.InputTag("generator"),
18  cut = cms.string(""),
19  name= cms.string("Generator"),
20  doc = cms.string("Generator information"),
21  singleton = cms.bool(True),
22  extension = cms.bool(False),
23  variables = cms.PSet(
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),
33  ),
34 )
35 
36 globalTables = cms.Sequence(rhoTable)
37 globalTablesMC = cms.Sequence(puTable+genTable)
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:31
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20