README

hepevt

GoDoc

Simple implementation of the FORTRAN-77 HEPEVT high energy event format in pure-Go.

Installation

$ go get go-hep.org/x/hep/hepevt

Documentation

Documentation is available on godoc

Documentation

Overview

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

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Decoder

    type Decoder struct {
    	// contains filtered or unexported fields
    }

      Decoder decodes ASCII files in the HEPEVT format.

      func NewDecoder

      func NewDecoder(r io.Reader) *Decoder

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

        func (*Decoder) Decode

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

          Decode decodes a full HEPEVT event from the underlying reader.

          type Encoder

          type Encoder struct {
          	// contains filtered or unexported fields
          }

            Encoder encodes ASCII files in the HEPEVT format.

            func NewEncoder

            func NewEncoder(w io.Writer) *Encoder

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

              func (*Encoder) Encode

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

                Encode encodes a full HEPEVT event to the underlying writer.

                type Event

                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:

                  PARAMETER (NMXHEP=2000)
                  COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
                  &       JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
                  

                  type Particle

                  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.