# Reads an example file from the IAEA phase space database.
# https://www-nds.iaea.org/phsp/phsp.htmlx
#
# To run this example:
# Download the header and phase space files that have the name:
# ELEKTA_PRECISE_10mv_part1
# Rename the .IAEAheader file to be .header
# Rename the .IAEAphsp file to be .phsp
#
# To make this example run faster, it is set to
# turn off the PreCheck function
# and reads only the first 5 histories from the file.

b:Ge/World/Invisible = "TRUE"

s:Ge/VacFilm/Type     = "TsBox"
s:Ge/VacFilm/Parent   = "World"
s:Ge/VacFilm/Material = "G4_WATER"
d:Ge/VacFilm/HLX      = 50.0 cm
d:Ge/VacFilm/HLY      = 50.0 cm
d:Ge/VacFilm/HLZ      = 1.0 cm
d:Ge/VacFilm/TransX   = 0. cm
d:Ge/VacFilm/TransY   = 0. cm
d:Ge/VacFilm/TransZ   = 0. cm
d:Ge/VacFilm/RotX     = 0. deg
d:Ge/VacFilm/RotY     = 0. deg
d:Ge/VacFilm/RotZ     = 0. deg
s:Ge/VacFilm/Color    = "skyblue"

s:So/Example/Type                            = "PhaseSpace"
s:So/Example/PhaseSpaceFileName              = "ELEKTA_PRECISE_10mv_part1"
s:So/Example/Component                       = "World"
#b:So/Example/LimitedAssumeFirstParticleIsNewHistory = "true"
#b:So/Example/LimitedAssumeEveryParticleIsNewHistory = "true"
#b:So/Example/LimitedAssumePhotonIsNewHistory = "true"
i:So/Example/PhaseSpaceMultipleUse = 0
i:So/Example/NumberOfHistoriesInRun = 5
i:So/Example/PreCheckShowParticleCountAtInterval = 100000
b:So/Example/PhaseSpacePreCheck = "False"


# Graphics
s:Gr/ViewA/Type             = "OpenGL"
i:Gr/ViewA/WindowSizeX      = 900
i:Gr/ViewA/WindowSizeY      = 900
d:Gr/ViewA/Theta            = 55 deg
d:Gr/ViewA/Phi              = 20 deg
s:Gr/ViewA/Projection       = "Perspective"
d:Gr/ViewA/PerspectiveAngle = 30 deg
u:Gr/ViewA/Zoom             = 1.3
b:Gr/ViewA/HiddenLineRemovalForTrajectories = "True"

i:Ts/ShowHistoryCountAtInterval = 10
b:Ts/PauseBeforeQuit = "True"
