topSequence += makeGenEvents( genName = GENERATOR, genProcess = PROCESS, cfgGenName = "EvGen" ) #################### # Dump the event into an ASCII file for reference comparison ################### if 'DUMP' not in dir(): DUMP = False pass if DUMP: from McParticleTools.McParticleToolsConf import HepMcFloatWriterTool from McParticleAlgs.McParticleAlgsConf import GenEventAsciiWriter topSequence += GenEventAsciiWriter( McWriter = HepMcFloatWriterTool( McEvents = "GEN_EVENT", Output = "mc.event.txt" ), OutputLevel = INFO ) if 'DUMPTUPLE' not in dir(): DUMPTUPLE = False pass if DUMPTUPLE: if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() theApp.CreateSvc += [ svcMgr.THistSvc.getFullName() ] if not 'TUPLEFILENAME' in dir(): TUPLEFILENAME = 'mc.event.root' pass from McParticleTools.McParticleToolsConf import HepMcTupleWriterTool from McParticleAlgs.McParticleAlgsConf import GenEventTupleWriter
from AthenaCommon.AppMgr import ServiceMgr import AthenaPoolCnvSvc.ReadAthenaPool ServiceMgr.EventSelector.InputCollections = ["evgen.pool.root"] from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from McParticleTools.McParticleToolsConf import HepMcWriterTool from McParticleAlgs.McParticleAlgsConf import GenEventAsciiWriter McWriter = HepMcWriterTool(McEvents="GEN_EVENT", Output="events.hepmc") job += GenEventAsciiWriter(McWriter=McWriter, OutputLevel=INFO) theApp.EvtMax = 10
# if not 'MCEVENTKEY' in dir(): MCEVENTKEY = "GEN_EVENT" pass if 'DUMP' in dir(): from TruthExamples.TruthExamplesConf import DumpMC topSequence += DumpMC("ReadGenEvent", McEventKey=MCEVENTKEY) ######## # Dump the McEventCollection into a dumb ASCII file # if not 'OUTPUT' in dir(): OUTPUT = "hepmc.ascii" pass from McParticleTools.McParticleToolsConf import HepMcWriterTool from McParticleAlgs.McParticleAlgsConf import GenEventAsciiWriter topSequence += GenEventAsciiWriter( McWriter=HepMcWriterTool(Output=OUTPUT, McEvents=MCEVENTKEY)) #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) #-------------------------------------------------------------- #svcMgr.MessageSvc.OutputLevel = DEBUG #============================================================== # # End of job options file # ###############################################################