ApplicationMgr().ExtSvc += [podioevent] from Configurables import GaussSmearVertex smeartool = GaussSmearVertex() smeartool.xVertexSigma = 0.5 * units.mm smeartool.yVertexSigma = 0.5 * units.mm smeartool.zVertexSigma = 40.0 * units.mm smeartool.tVertexSigma = 180.0 * units.picosecond from Configurables import PythiaInterface pythia8gentool = PythiaInterface() ### Example of pythia configuration file to generate events # take from $K4GEN if defined, locally if not path_to_pythiafile = os.environ.get("K4GEN", "") pythiafilename = "Pythia_standard.cmd" pythia8gentool.pythiacard = os.path.join(path_to_pythiafile, pythiafilename) pythia8gentool.doEvtGenDecays = False pythia8gentool.printPythiaStatistics = True from Configurables import GenAlg pythia8gen = GenAlg("Pythia8") pythia8gen.SignalProvider = pythia8gentool pythia8gen.VertexSmearingTool = smeartool pythia8gen.hepmc.Path = "hepmc" ApplicationMgr().TopAlg += [pythia8gen] ### Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles from Configurables import HepMCToEDMConverter hepmc_converter = HepMCToEDMConverter() hepmc_converter.hepmc.Path = "hepmc" hepmc_converter.hepmcStatusList = [] # convert particles with all statuses
from Configurables import k4DataSvc podioevent = k4DataSvc("EventDataSvc") app.ExtSvc += [podioevent] from Configurables import PythiaInterface pythia8gentool = PythiaInterface() ### Example of pythia configuration file to generate events # take from $K4GEN if defined, locally if not path_to_pythiafile = os.environ.get("K4GEN", "") pythiafilename = "Pythia_standard.cmd" pythiafile = os.path.join(path_to_pythiafile, pythiafilename) # Example of pythia configuration file to read LH event file #pythiafile="options/Pythia_LHEinput.cmd" pythia8gentool.pythiacard = pythiafile pythia8gentool.doEvtGenDecays = False pythia8gentool.printPythiaStatistics = True from Configurables import GenAlg gun = GenAlg() gun.SignalProvider = pythia8gentool gun.hepmc.Path = "hepmc" ApplicationMgr().TopAlg += [gun] from Configurables import HepMCToEDMConverter hepmc_converter = HepMCToEDMConverter() hepmc_converter.hepmc.Path="hepmc" hepmc_converter.GenParticles.Path = "GenParticles" ApplicationMgr().TopAlg += [hepmc_converter]