Ejemplo n.º 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
Ejemplo n.º 2
0
def readhepmc(hepmcfile):
    proxy = ifstream_proxy(hepmcfile)

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

    for e in events(g):
        yield e
Ejemplo n.º 3
0
def readhepmc(hepmcfile):
    proxy = ifstream_proxy(hepmcfile)

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

    for e in events(g):
        yield e
Ejemplo n.º 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))
Ejemplo n.º 5
0
def fromfile(filename):
    proxy = ifstream_proxy(filename)
    g = hepmc.IO_GenEvent(proxy.stream())
    for e in events(g):
        yield e
Ejemplo n.º 6
0
def fromfile(filename):
    proxy = ifstream_proxy(filename)
    g = hepmc.IO_GenEvent(proxy.stream())
    for e in events(g):
        yield e