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