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  fixedGridRhoFastjetCentral = ExtVar( cms.InputTag("fixedGridRhoFastjetCentral"), "double", doc = "rho from all PF Candidates for central region, used e.g. for JECs" ),
10  fixedGridRhoFastjetCentralChargedPileUp = ExtVar( cms.InputTag("fixedGridRhoFastjetCentralChargedPileUp"), "double", doc = "rho from charged PF Candidates for central region, used e.g. for JECs" ),
11  )
12 )
13 
14 puTable = cms.EDProducer("NPUTablesProducer",
15  src = cms.InputTag("slimmedAddPileupInfo"),
16  pvsrc = cms.InputTag("offlineSlimmedPrimaryVertices"),
17  zbins = cms.vdouble( [0.0,1.7,2.6,3.0,3.5,4.2,5.2,6.0,7.5,9.0,12.0] )
18 )
19 
20 genTable = cms.EDProducer("SimpleGenEventFlatTableProducer",
21  src = cms.InputTag("generator"),
22  cut = cms.string(""),
23  name= cms.string("Generator"),
24  doc = cms.string("Generator information"),
25  singleton = cms.bool(True),
26  extension = cms.bool(False),
27  variables = cms.PSet(
28  x1 = Var( "?hasPDF?pdf().x.first:-1", float, doc="x1 fraction of proton momentum carried by the first parton",precision=14 ),
29  x2 = Var( "?hasPDF?pdf().x.second:-1", float, doc="x2 fraction of proton momentum carried by the second parton",precision=14 ),
30  xpdf1 = Var( "?hasPDF?pdf().xPDF.first:-1", float, doc="x*pdf(x) for the first parton", precision=14 ),
31  xpdf2 = Var( "?hasPDF?pdf().xPDF.second:-1", float, doc="x*pdf(x) for the second parton", precision=14 ),
32  id1 = Var( "?hasPDF?pdf().id.first:-1", int, doc="id of first parton", precision=6 ),
33  id2 = Var( "?hasPDF?pdf().id.second:-1", int, doc="id of second parton", precision=6 ),
34  scalePDF = Var( "?hasPDF?pdf().scalePDF:-1", float, doc="Q2 scale for PDF", precision=14 ),
35  binvar = Var("?hasBinningValues()?binningValues()[0]:-1", float, doc="MC generation binning value", precision=14),
36  weight = Var("weight()", float,doc="MC generator weight", precision=14),
37  ),
38 )
39 
40 globalTables = cms.Sequence(rhoTable)
41 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