package hepevt
import "go-hep.org/x/hep/hepevt"
Package hepevt provides access to the HEPEVT event format record from FORTRAN-77.
Index ¶
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes ASCII files in the HEPEVT format.
func NewDecoder ¶
NewDecoder creates a new Decoder, reading from the provided io.Reader.
func (*Decoder) Decode ¶
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 ¶
NewEncoder create a new Encoder, writing to the provided io.Writer.
func (*Encoder) Encode ¶
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.
Source Files ¶
ascii_io.go hepevt.go
- Version
- v0.37.1 (latest)
- Published
- Jun 3, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 14 minutes ago –
Tools for package owners.