Documentation
¶
Overview ¶
Package data provide conversion from model to structures, which are easily serialized by shield.serialize.
Index ¶
- Constants
- func MapParticleToShieldParticleID(particle common.Particle) (int64, error)
- type Body
- type CompoundMaterial
- type Construction
- type Data
- type Detector
- type Element
- type Geometry
- type IsotopeNUCLID
- type MaterialICRU
- type Materials
- type Operation
- type PredefinedMaterial
- type Sign
- type StateOfMatter
- type Zone
- type ZoneToMaterial
Constants ¶
const BlackholeMaterialID shield.MaterialID = 0
BlackholeMaterialID represent Blackhole material in shield input files.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompoundMaterial ¶
type CompoundMaterial struct {
ID shield.MaterialID
StateOfMatter StateOfMatter
Density float64
ExternalStoppingPowerFromMaterialICRU MaterialICRU
Elements []Element
// contains filtered or unexported fields
}
CompoundMaterial represent material.Compound.
func (*CompoundMaterial) SerializeExternalStoppingPower ¶
func (c *CompoundMaterial) SerializeExternalStoppingPower() bool
SerializeExternalStoppingPower eturn true, if ExternalStoppingPowerFromMaterialICRU should be serialized.
type Construction ¶
Construction represent steps to build zone by shield.
type Data ¶
type Data struct {
// Data needed for mat.dat file serialization.
Materials Materials
// Data needed for geo.dat file serialization.
Geometry Geometry
// Data needed for detect.dat file serialization.
Detectors []Detector
// Data needed for beam.dat file serialization.
Beam beam.Beam
// Data needed for beam.dat file serialization.
Options options.SimulationOptions
}
Data is input for shield Serialize function.
type Detector ¶
type Detector struct {
ScoringType string
// Argument can be int64, float64 or string.
Arguments []interface{}
}
Detector represent setup.Detector,
type Element ¶
type Element struct {
ID IsotopeNUCLID
RelativeStoichiometricFraction int64
AtomicMass float64
IValue float64
}
Element represent material.Element.
func (*Element) SerializeAtomicMass ¶
SerializeAtomicMass return true, if AtomicMass should be serialized.
func (*Element) SerializeIValue ¶
SerializeIValue return true, if IValue should be serialized.
type Geometry ¶
type Geometry struct {
Bodies []Body
Zones []Zone
ZoneToMaterialPairs []ZoneToMaterial
}
Geometry represent ready to serialize data for geo.dat file.
type IsotopeNUCLID ¶
type IsotopeNUCLID int64
IsotopeNUCLID is representation of element in shield mat.dat file.
type MaterialICRU ¶
type MaterialICRU int64
MaterialICRU is representation of predefined materials in shield mat.dat file.
type Materials ¶
type Materials struct {
Predefined []PredefinedMaterial
Compound []CompoundMaterial
}
Materials contains representation of setup.MaterialsMap, which is easily serializable in shield serializer.
type PredefinedMaterial ¶
type PredefinedMaterial struct {
ID shield.MaterialID
ICRUNumber MaterialICRU
StateOfMatter StateOfMatter
Density float64
LoadExternalStoppingPower bool
}
PredefinedMaterial represent material.Predefined.
func (*PredefinedMaterial) SerializeDensity ¶
func (p *PredefinedMaterial) SerializeDensity() bool
SerializeDensity return true, if Density should be serialized.
func (*PredefinedMaterial) SerializeStateOfMatter ¶
func (p *PredefinedMaterial) SerializeStateOfMatter() bool
SerializeStateOfMatter return true, if StateOfMatter should be serialized.
type Zone ¶
type Zone struct {
ID shield.ZoneID
Constructions []Construction
}
Zone represent zone in shield files.
type ZoneToMaterial ¶
type ZoneToMaterial struct {
ZoneID shield.ZoneID
MaterialID shield.MaterialID
}
ZoneToMaterial mapping.