10 if not hasattr(process,
"VtxSmeared"):
11 "WARNING: no vtx smearing applied (ok for steps other than SIM)"
14 vertexGenerator = process.VtxSmeared
15 vertexGeneratorParameterNames = vertexGenerator.parameterNames_()
16 vertexGeneratorType = vertexGenerator.type_()
19 vertexParameters = cms.PSet()
20 for name
in vertexGeneratorParameterNames:
21 exec(
"vertexParameters.{0} = {1}".
format(name,getattr(vertexGenerator,name).
dumpPython()))
23 if vertexGeneratorType.find(
"Betafunc") == 0:
24 vertexParameters.type = cms.string(
"BetaFunc")
25 elif vertexGeneratorType.find(
"Flat") == 0:
26 vertexParameters.type = cms.string(
"Flat")
27 elif vertexGeneratorType.find(
"Gauss"):
28 vertexParameters.type = cms.string(
"Gaussian")
30 raise Error(
"WARNING: given vertex generator type for vertex smearing is not supported")
33 process.famosPileUp.VertexGenerator = vertexParameters
def setVertexGeneratorPileUpProducer