1 import FWCore.ParameterSet.Config
as cms
2 import Validation.RecoParticleFlow.defaults_cfi
as default
3 from DQMServices.Core.DQMEDAnalyzer
import DQMEDAnalyzer
4 from DQMServices.Core.DQMEDHarvester
import DQMEDHarvester
6 def plotPSet(name, title, dir, nx, x0, x1, ny=0, y0=0, y1=0, vx=[0], vy=[0]):
8 name = cms.string(name),
9 title = cms.string(title),
10 dir = cms.string(dir),
23 murange =
range( default.muLowOffset, default.muHighOffset )
24 npvrange =
range( default.npvLowOffset, default.npvHighOffset )
26 for pftype
in default.candidateType :
28 name = default.offset_name(
"mu", mu, pftype )
31 name+
";#eta;<Offset Energy_{T}> [GeV]",
32 "{0}muPlots/mu{1}".
format(default.offsetDir, mu),
34 0, 0, 0, default.eBinsOffset, default.eLowOffset, default.eHighOffset,
39 name = default.offset_name(
"npv", npv, pftype )
42 name+
";#eta;<Offset Energy_{T}> [GeV]",
43 "{0}npvPlots/npv{1}".
format(default.offsetDir, npv),
45 0, 0, 0, default.eBinsOffset, default.eLowOffset, default.eHighOffset,
53 toplot = ( (
"mu",
"#mu", 0, default.muHighOffset), (
"npv",
"N_{PV}", 0, default.npvHighOffset),
54 (
"pv_z",
"z_{PV}", -default.pvzHighOffset, default.pvzHighOffset))
56 for hname, title, xmin, xmax
in toplot :
67 pvTag = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
68 muTag = cms.InputTag(
'slimmedAddPileupInfo'),
69 pfTag = cms.InputTag(
'packedPFCandidates'),
71 pdgKeys = cms.vuint32( default.candidateDict.keys() ),
72 pdgStrs = cms.vstring( default.candidateDict.values() ),
74 offsetPlotBaseName = cms.string(default.offsetPlotBaseName),
78 pftypes = cms.vstring( default.candidateType ),
79 etabins = cms.vdouble( default.etaBinsOffset ),
80 muHigh = cms.untracked.int32( default.muHighOffset ),
81 npvHigh = cms.untracked.int32( default.npvHighOffset )
87 offsetPlotBaseName = cms.string( default.offsetPlotBaseName ),
88 offsetDir = cms.string( default.offsetDir ),
89 offsetVariableTypes = cms.vstring( default.offsetVariableType ),
90 offsetR = cms.untracked.double( default.offsetR ),
91 pftypes = cms.vstring( default.candidateType ),
92 muHigh = cms.untracked.int32( default.muHighOffset ),
93 npvHigh = cms.untracked.int32( default.npvHighOffset )
def plotPSet(name, title, dir, nx, x0, x1, ny=0, y0=0, y1=0, vx=[0], vy=[0])