package slha
import "go-hep.org/x/hep/slha"
Package slha implements encoding and decoding of SUSY Les Houches Accords (SLHA) data format.
Index ¶
- func Encode(w io.Writer, data *SLHA) error
- type Block
- type Blocks
- type DataArray
- type DataItem
- type Decay
- type Decays
- type Index
- type Particle
- type Particles
- func (p Particles) Get(pdgid int) *Particle
- func (p Particles) Len() int
- func (p Particles) Less(i, j int) bool
- func (p Particles) Swap(i, j int)
- type SLHA
- type Value
Functions ¶
func Encode ¶
Encode writes the SLHA informations to w.
Types ¶
type Block ¶
Block represents a block in a SLHA file.
func (*Block) Get ¶
Get returns the Value at index args. Note that args are 1-based indices.
func (*Block) Set ¶
Set sets the Value at index args with v. Set creates a new empty Value if none exists at args. Note that args are 1-based indices.
type Blocks ¶
type Blocks []Block
Blocks is a list of Blocks.
func (Blocks) Get ¶
Get returns the block named name or nil.
func (Blocks) Keys ¶
Keys returns the names of the contained blocks.
type DataArray ¶
type DataArray []DataItem
DataArray is an ordered list of DataItems.
func (DataArray) Get ¶
Get returns the value at the n-dim index idx.
type DataItem ¶
DataItem is a pair of (Index,Value). Index is a n-dim index (1-based indices)
type Decay ¶
type Decay struct { Br float64 // Branching Ratio IDs []int // list of PDG IDs to which the decay occur Comment string // comment attached to this decay line - if any }
Decay is a decay line in an SLHA file.
type Decays ¶
type Decays []Decay
Decays is a list of decays in a Decay block.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is an n-dimensional index. Note that the indices are 1-based.
func NewIndex ¶
NewIndex creates a new n-dim index from args. Note that args are 1-based indices.
func (Index) Index ¶
Index returns the n-dim indices. Note that the indices are 1-based.
type Particle ¶
type Particle struct { PdgID int // PDG-ID code Width float64 // total width of that particle Mass float64 // mass of that particle Comment string Decays Decays }
Particle is the representation of a single, specific particle, decay block from a SLHA file.
type Particles ¶
type Particles []Particle
Particles is a block of particle's decays in an SLHA file.
func (Particles) Get ¶
Get returns the Particle with matching pdgid or nil.
func (Particles) Len ¶
func (Particles) Less ¶
func (Particles) Swap ¶
type SLHA ¶
SLHA holds informations about a SUSY Les Houches Accords file.
func Decode ¶
Decode reads SLHA informations from r and returns them as a *slha.SLHA.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value represents a value (string,int,float64) + comment in a SLHA line.
func (*Value) Comment ¶
Comment returns the comment string attached to this value
func (*Value) Float ¶
Float returns the value as a float64. Float panics if the underlying value isn't a float64.
func (*Value) Int ¶
Int returns the value as an int64. Int panics if the underlying value isn't an int64.
func (*Value) Interface ¶
Interface returns the value as an empty interface.
func (*Value) Kind ¶
Kind returns the kind of the value (reflect.String, reflect.Float64, reflect.Int)
Source Files ¶
decode.go encode.go slha.go
Directories ¶
Path | Synopsis |
---|---|
slha/example | |
slha/example/go-slha-basic |
- Version
- v0.37.0 (latest)
- Published
- May 20, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 hour ago –
Tools for package owners.