コード例 #1
0
ファイル: test.py プロジェクト: aretha-hep/mprtect
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
コード例 #2
0
ファイル: __init__.py プロジェクト: sznajder/hepmcanalysis
def readhepmc(hepmcfile):
    proxy = ifstream_proxy(hepmcfile)

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

    for e in events(g):
        yield e
コード例 #3
0
ファイル: __init__.py プロジェクト: aretha-hep/mprtect
def readhepmc(hepmcfile):
    proxy = ifstream_proxy(hepmcfile)

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

    for e in events(g):
        yield e
コード例 #4
0
ファイル: readhepmc.py プロジェクト: lukasheinrich/threebody
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))
コード例 #5
0
ファイル: events.py プロジェクト: lukasheinrich/hepmcanalysis
def fromfile(filename):
    proxy = ifstream_proxy(filename)
    g = hepmc.IO_GenEvent(proxy.stream())
    for e in events(g):
        yield e
コード例 #6
0
def fromfile(filename):
    proxy = ifstream_proxy(filename)
    g = hepmc.IO_GenEvent(proxy.stream())
    for e in events(g):
        yield e