dumper = HepMCDumper("Dumper") dumper.hepmc.Path = "hepmc" from Configurables import HepMCFileWriter writer = HepMCFileWriter("MyHepMCFileWriter") writer.hepmc.Path = "hepmc" particlePropertySvc = Gaudi__ParticlePropertySvc( "ParticlePropertySvc", ParticlePropertiesFile='Generation/data/ParticleTable.txt') guntool = MomentumRangeParticleGun("SignalProvider", PdgCodes=[-211]) guntool2 = MomentumRangeParticleGun("PileUpProvider", PdgCodes=[11]) smeartool = FlatSmearVertex("smeartoolname") smeartool.xVertexMin = -10 * units.mm smeartool.xVertexMax = 10 * units.mm smeartool.yVertexMin = -10 * units.mm smeartool.yVertexMax = 10 * units.mm smeartool.zVertexMin = -30 * units.mm smeartool.zVertexMax = 30 * units.mm pileuptool = ConstPileUp("MyPileUpConfig", numPileUpEvents=1) from Configurables import GenAlg gun = GenAlg() gun.hepmc.Path = "hepmc" from Configurables import HepMCToEDMConverter hepmc_converter = HepMCToEDMConverter("Converter") hepmc_converter.hepmc.Path = "hepmc"
from GaudiKernel import SystemOfUnits as units from Configurables import ApplicationMgr, THistSvc, Gaudi__ParticlePropertySvc from Configurables import HepMCDumper, ParticleGunAlg, MomentumRangeParticleGun, HepMCHistograms, FlatSmearVertex dumper = HepMCDumper("Dumper") dumper.DataInputs.hepmc.Path="hepmc" particlePropertySvc = Gaudi__ParticlePropertySvc("ParticlePropertySvc", ParticlePropertiesFile='Generation/data/ParticleTable.txt') guntool = MomentumRangeParticleGun(PdgCodes=[-211, 211, -11, -13, 13, 11 ]) smeartool = FlatSmearVertex("smeartoolname") smeartool.xVertexMin = -10*units.mm smeartool.xVertexMax = 10*units.mm smeartool.yVertexMin = -10*units.mm smeartool.yVertexMax = 10*units.mm smeartool.zVertexMin = -30*units.mm smeartool.zVertexMax = 30*units.mm gun = ParticleGunAlg("gun", ParticleGunTool = guntool, VertexSmearingToolPGun=smeartool) gun.DataOutputs.hepmc.Path = "hepmc" from Configurables import HepMCConverter hepmc_converter = HepMCConverter("Converter") hepmc_converter.DataInputs.hepmc.Path="hepmc"
from Gaudi.Configuration import * from Configurables import ApplicationMgr, THistSvc, Gaudi__ParticlePropertySvc from Configurables import HepMCDumper, ParticleGunAlg, MomentumRangeParticleGun, HepMCHistograms, FlatSmearVertex dumper = HepMCDumper("Dumper") dumper.DataInputs.hepmc.Path="hepmc" particlePropertySvc = Gaudi__ParticlePropertySvc("ParticlePropertySvc", ParticlePropertiesFile='Generation/data/ParticleTable.txt') guntool = MomentumRangeParticleGun(PdgCodes=[-211, 211, -11, -13, 13, 11 ]) smeartool = FlatSmearVertex("smeartoolname") # FCCSW standard unit of length: [mm] smeartool.xVertexMin = -10 smeartool.xVertexMax = 10 smeartool.yVertexMin = -10 smeartool.yVertexMax = 10 smeartool.zVertexMin = -30 smeartool.zVertexMax = 30 gun = ParticleGunAlg("gun", ParticleGunTool = guntool, VertexSmearingToolPGun=smeartool) gun.DataOutputs.hepmc.Path = "hepmc" from Configurables import HepMCConverter hepmc_converter = HepMCConverter("Converter") hepmc_converter.DataInputs.hepmc.Path="hepmc"
from Gaudi.Configuration import * # Data service from Configurables import FCCDataSvc podioevent = FCCDataSvc("EventDataSvc") from Configurables import MomentumRangeParticleGun from GaudiKernel import PhysicalConstants as constants guntool = MomentumRangeParticleGun() guntool.ThetaMin = 0 guntool.ThetaMax = 2 * constants.pi guntool.PdgCodes = [11] from Configurables import FlatSmearVertex vertexsmeartool = FlatSmearVertex() vertexsmeartool.xVertexMin = -25. vertexsmeartool.xVertexMax = 25. vertexsmeartool.yVertexMin = -25. vertexsmeartool.yVertexMax = 25. vertexsmeartool.zVertexMin = -25. vertexsmeartool.zVertexMax = 25. from Configurables import GenAlg gen = GenAlg() gen.SignalProvider = guntool gen.VertexSmearingTool = vertexsmeartool gen.hepmc.Path = "hepmc" # reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles from Configurables import HepMCToEDMConverter hepmc_converter = HepMCToEDMConverter("Converter") hepmc_converter.hepmc.Path = "hepmc" hepmc_converter.genparticles.Path = "allGenParticles"
from Gaudi.Configuration import * from Configurables import ApplicationMgr, THistSvc, Gaudi__ParticlePropertySvc from Configurables import HepMCDumper, ParticleGunAlg, MomentumRangeParticleGun, HepMCHistograms, FlatSmearVertex dumper = HepMCDumper("Dumper") dumper.DataInputs.hepmc.Path = "hepmc" particlePropertySvc = Gaudi__ParticlePropertySvc( "ParticlePropertySvc", ParticlePropertiesFile='Generation/data/ParticleTable.txt') guntool = MomentumRangeParticleGun(PdgCodes=[-211, 211, -11, -13, 13, 11]) smeartool = FlatSmearVertex("smeartoolname") # FCCSW standard unit of length: [mm] smeartool.xVertexMin = -10 smeartool.xVertexMax = 10 smeartool.yVertexMin = -10 smeartool.yVertexMax = 10 smeartool.zVertexMin = -30 smeartool.zVertexMax = 30 gun = ParticleGunAlg("gun", ParticleGunTool=guntool, VertexSmearingToolPGun=smeartool) gun.DataOutputs.hepmc.Path = "hepmc" from Configurables import HepMCConverter hepmc_converter = HepMCConverter("Converter") hepmc_converter.DataInputs.hepmc.Path = "hepmc" hepmc_converter.DataOutputs.genparticles.Path = "allGenParticles" hepmc_converter.DataOutputs.genvertices.Path = "allGenVertices"