Example #1
0
def main():
  proxy = ifstream_proxy('./input.hepmc')

  g = hepmc.IO_GenEvent(proxy.stream())
  for i,e in enumerate(events(g)):
    print 'event #{}: number of particles in event:{}'.format(i,len(e.particles()))
    print e
Example #2
0
def readhepmc(hepmcfile):
    proxy = ifstream_proxy(hepmcfile)

    g = hepmc.IO_GenEvent(proxy.stream())

    for e in events(g):
        yield e
Example #3
0
def readhepmc(hepmcfile):
    proxy = ifstream_proxy(hepmcfile)

    g = hepmc.IO_GenEvent(proxy.stream())

    for e in events(g):
        yield e
Example #4
0
def main():
  proxy = ifstream_proxy(args.file)

  g = hepmc.IO_GenEvent(proxy.stream())
  for i,e in enumerate(events(g)):
    print '----------------'
    finalstate = [p for p in e.particles() if p.status()==1]
    print 'event #{0}: number of particles in event: {1}'.format(i,len(finalstate))