### Example of pythia configuration file to generate events pythiafile = "Generation/data/Pythia_standard.cmd" # Example of pythia configuration file to read LH event file #pythiafile="options/Pythia_LHEinput.cmd" from Configurables import FCCDataSvc #### Data service podioevent = FCCDataSvc("EventDataSvc") from Configurables import ConstPileUp, HepMCFileReader, GaussSmearVertex smeartool = GaussSmearVertex(xVertexMean=0. * units.mm, xVertexSigma=0.5 * units.mm, yVertexMean=0 * units.mm, yVertexSigma=0.5 * units.mm, zVertexMean=0 * units.mm, zVertexSigma=70 * units.mm, tVertexMean=0 * units.picosecond, tVertexSigma=30 * units.picosecond) pileuptool = ConstPileUp(numPileUpEvents=2) pileupreader = HepMCFileReader( Filename="/eos/project/f/fccsw-web/testsamples/FCC_minbias_100TeV.dat") from Configurables import PythiaInterface, GenAlg ### PYTHIA algorithm pythia8gentool = PythiaInterface("Pythia8Interface", Filename=pythiafile) pythia8gen = GenAlg("Pythia8", SignalProvider=pythia8gentool, PileUpProvider=pileupreader, VertexSmearingTool=smeartool)
from Configurables import ApplicationMgr main = ApplicationMgr() main.EvtSel = 'NONE' main.EvtMax = 10 main.TopAlg = [] main.ExtSvc = [] # PODIO algorithm from Configurables import FCCDataSvc podioevent = FCCDataSvc("EventDataSvc") main.ExtSvc += [podioevent] ### Generation ################################################# 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 ConstPtParticleGun pgun_tool = ConstPtParticleGun() pgun_tool.PdgCodes = [13] pgun_tool.PhiMin = 0.0 pgun_tool.PhiMax = constants.twopi from Configurables import GenAlg genalg_pgun = GenAlg() genalg_pgun.SignalProvider = ConstPtParticleGun('ToolSvc.ConstPtParticleGun') genalg_pgun.VertexSmearingTool = smeartool
savehisttool = SimG4SaveParticleHistory("saveHistory") savehisttool.mcParticles.Path = "SimParticles" savehisttool.genVertices.Path = "SimVertices" savetrackertool = SimG4SaveTrackerHits("saveTrackerHits", readoutNames = ["TrackerBarrelReadout", "TrackerEndcapReadout"]) savetrackertool.positionedTrackHits.Path = "TrackerPositionedHits" savetrackertool.trackHits.Path = "TrackerHits" savetrackertool.digiTrackHits.Path = "TrackerDigiPostPoint" outputHitsTools += [ "SimG4SaveTrackerHits/saveTrackerHits"] outputHitsTools += [ "SimG4SaveParticleHistory/saveHistory"] geantsim = SimG4Alg("SimG4Alg", outputs = outputHitsTools) from Configurables import FlatSmearVertex, ConstPtParticleGun, GenAlg, GaussSmearVertex smeartool = GaussSmearVertex("GaussSmearVertex") if not simargs.noVertexSmearTool: smeartool.xVertexSigma = 0.5*units.mm smeartool.yVertexSigma = 0.5*units.mm smeartool.zVertexSigma = 40*units.mm smeartool.tVertexSigma = 180*units.picosecond elif simargs.displacedVertex: smeartool.xVertexMin = 0*units.mm smeartool.xVertexMax = 600*units.mm if simargs.singlePart: pgun_tool = ConstPtParticleGun(PdgCodes=[pdg], PhiMin=phiMin, PhiMax=phiMax, EtaMin=etaMin, EtaMax=etaMax, PtList=ptList, PtMin=simargs.ptMin, PtMax=simargs.ptMax, logSpacedPt=logSpacedPt ) genalg= GenAlg("Pythia8", SignalProvider=pgun_tool, VertexSmearingTool=smeartool) genalg.hepmc.Path = "hepmc" else: