hep: go-hep.org/x/hep/hepevt Index | Files

package hepevt

import "go-hep.org/x/hep/hepevt"

Package hepevt provides access to the HEPEVT event format record from FORTRAN-77.


Package Files

ascii_io.go hepevt.go

type Decoder Uses

type Decoder struct {
    // contains filtered or unexported fields

Decoder decodes ASCII files in the HEPEVT format.

func NewDecoder Uses

func NewDecoder(r io.Reader) *Decoder

NewDecoder creates a new Decoder, reading from the provided io.Reader.

func (*Decoder) Decode Uses

func (dec *Decoder) Decode(evt *Event) error

Decode decodes a full HEPEVT event from the underlying reader.

type Encoder Uses

type Encoder struct {
    // contains filtered or unexported fields

Encoder encodes ASCII files in the HEPEVT format.

func NewEncoder Uses

func NewEncoder(w io.Writer) *Encoder

NewEncoder create a new Encoder, writing to the provided io.Writer.

func (*Encoder) Encode Uses

func (enc *Encoder) Encode(evt *Event) error

Encode encodes a full HEPEVT event to the underlying writer.

type Event Uses

type Event struct {
    Nevhep int          // event number (or some special meaning, see doc for details)
    Nhep   int          // actual number of entries in current event
    Isthep []int        // status code for n'th entry
    Idhep  []int        // particle identifier according to PDG
    Jmohep [][2]int     // index of 1st and 2nd mother
    Jdahep [][2]int     // index of 1st and 2nd daughter
    Phep   [][5]float64 // particle 5-vector (px,py,pz,e,m)
    Vhep   [][4]float64 // vertex 4-vector (x,y,z,t)

Event is the Go representation of the FORTRAN-77 HEPEVT common block:


type Particle Uses

type Particle struct {
    Status    int32      // status code (see hepevt doc)
    Id        int32      // barcode
    Mothers   [2]int32   // indices of 1st and 2nd mothers
    Daughters [2]int32   // indices of 1st and 2nd mothers
    P         [5]float64 // (px,py,pz,e,m)
    V         [4]float64 // vertex position (x,y,z,t)

Particle holds informations about a MC-truth particle, in the HEPEVT format.

Package hepevt imports 3 packages (graph). Updated 2019-05-31. Refresh now. Tools for package owners.