from GaudiKernel import PhysicalConstants as constants guntool = MomentumRangeParticleGun("Gun2") guntool.ThetaMin = 0 guntool.ThetaMax = 2 * constants.pi guntool.PdgCodes = [11] guntool2 = MomentumRangeParticleGun("Gun1") guntool2.ThetaMin = 0 guntool2.ThetaMax = 2 * constants.pi guntool2.PdgCodes = [11] from Configurables import ConstPileUp pileuptool = ConstPileUp() pileuptool.numPileUpEvents = 10 from Configurables import GenAlg gen = GenAlg() gen.SignalProvider = guntool gen.PileUpProvider = guntool2 gen.PileUpTool = pileuptool gen.hepmc.Path = "hepmc" from Configurables import HepMCToEDMConverter hepmc_converter = HepMCToEDMConverter("Converter") hepmc_converter.hepmc.Path = "hepmc" hepmc_converter.genparticles.Path = "allGenParticles" hepmc_converter.genvertices.Path = "allGenVertices" dumper = HepMCDumper("Dumper") dumper.hepmc.Path = "hepmc" from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc",
pgun2_pion.MomentumMin = 20 * GeV pgun2_pion.MomentumMax = 20 * GeV pgun2_pion.PhiMin = 0 pgun2_pion.PhiMax = 2 * _pi # corresponds to -0.17 < eta < 0.17 pgun2_pion.ThetaMin = 80 * _pi / 180. pgun2_pion.ThetaMax = 100 * _pi / 180. from Configurables import ConstPileUp pileuptool = ConstPileUp() pileuptool.numPileUpEvents = 1 from Configurables import GenAlg genalg_pgun = GenAlg() genalg_pgun.SignalProvider = pgun1_electron genalg_pgun.PileUpProvider = pgun2_pion genalg_pgun.hepmc.Path = "hepmc" genalg_pgun.PileUpTool = pileuptool from Configurables import HepMCToEDMConverter hepmc_converter = HepMCToEDMConverter() hepmc_converter.hepmc.Path = "hepmc" hepmc_converter.genparticles.Path = "GenParticles" hepmc_converter.genvertices.Path = "GenVertices" ###################################################### Simulation setup from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[