Help us shape the future of Go! Take the 2026 Go Developer Survey

beam

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2018 License: GPL-3.0, GPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Overview

Package beam implement beam model.

Index

Constants

This section is empty.

Variables

View Source
var Default = Beam{
	Direction: Direction{
		Phi: 0, Theta: 0, Position: common.Point{X: 0, Y: 0, Z: 0},
	},
	Divergence: Divergence{
		SigmaX:       0,
		SigmaY:       0,
		Distribution: common.GaussianDistribution,
	},
	ParticleType:       common.PredefinedParticle("proton"),
	InitialBaseEnergy:  100,
	InitialEnergySigma: 0,
}

Default represents default beam configuration.

Functions

This section is empty.

Types

type Beam

type Beam struct {
	// Direction ...
	// SHIELD doc: BEAMDIR, BEAMPOS
	Direction Direction `json:"direction"`
	// Divergance ...
	// SHIELD doc: BEAMDIV
	Divergence Divergence `json:"divergence"`

	// ParticleType ...
	// SHIELD doc: HIPROJ, JPART0
	ParticleType common.Particle `json:"particleType"`

	// InitialBaseEnergy ...
	// SHIELD doc: TMAX0
	InitialBaseEnergy float64 `json:"initialBaseEnergy"`
	// InitialEnergySigma ...
	// SHIELD doc: TMAX0
	InitialEnergySigma float64 `json:"initialEnergySigma"`
}

Beam ...

func (*Beam) UnmarshalJSON

func (d *Beam) UnmarshalJSON(b []byte) error

UnmarshalJSON custom Unmarshal function.

type Direction

type Direction struct {
	// Phi is angle between positive x axis and direction after cast on xy plane.
	Phi float64 `json:"phi"`
	// Theta is angle between z axis and direction.
	Theta    float64      `json:"theta"`
	Position common.Point `json:"position"`
}

Direction ...

type Divergence

type Divergence struct {
	SigmaX       float64             `json:"sigmaX"`
	SigmaY       float64             `json:"sigmaY"`
	Distribution common.Distribution `json:"distribution"`
}

Divergence ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL