#=====================================================
# VERBOSE
#=====================================================
##control/execute mac/verbose.mac
#=====================================
# VISUALIZATION
#=====================================
/vis/disable
/vis/open OGLIX
/vis/viewer/set/viewpointThetaPhi 60 60
/vis/viewer/zoom 1.0
/vis/drawVolume
/tracking/storeTrajectory 1
/vis/scene/add/trajectories 
/vis/scene/endOfEventAction accumulate
#=====================================================
# GEOMETRY
#=====================================================
/gate/geometry/setMaterialDatabase data/GateMaterials.db
/gate/world/setMaterial Body
/gate/world/geometry/setXLength 300. cm
/gate/world/geometry/setYLength 300. cm
/gate/world/geometry/setZLength 300. cm
/gate/world/vis/setColor white
/gate/world/attachPhantomSD
/gate/world/daughters/name phantom
/gate/world/daughters/insert sphere
/gate/phantom/setMaterial Body
/gate/phantom/vis/setColor red
/gate/phantom/geometry/setRmin 150. cm
/gate/phantom/geometry/setRmax 151. cm
#=====================================================
# ACTORS
#=====================================================
# STATISTICS ACTOR
/gate/actor/addActor SimulationStatisticActor stat
/gate/actor/stat/saveEveryNSeconds 20
/gate/actor/stat/save output/stat.txt
# DOSE ACTOR
/gate/actor/addActor DoseActor dose
/gate/actor/dose/attachTo world
/gate/actor/dose/setPosition 0. 0. 0. mm
/gate/actor/dose/setSize 200. 200. 200.
/gate/actor/dose/setVoxelSize 10. 10. 10. mm
/gate/actor/dose/enableDose true
/gate/actor/dose/enableEdep true
/gate/actor/dose/enableUncertaintyDose true
/gate/actor/dose/save output/output.hdr
/gate/actor/dose/saveEveryNSeconds 10
#===================================================     
# PHYSICS-LIST
#===================================================
/gate/physics/addProcess PhotoElectric
/gate/physics/processes/PhotoElectric/setModel StandardModel
/gate/physics/addProcess Compton
/gate/physics/processes/Compton/setModel StandardModel
/gate/physics/addProcess RayleighScattering
/gate/physics/processes/RayleighScattering/setModel PenelopeModel
/gate/physics/addProcess ElectronIonisation
/gate/physics/processes/ElectronIonisation/setModel StandardModel e-
/gate/physics/processes/ElectronIonisation/setModel StandardModel e+
/gate/physics/addProcess Bremsstrahlung
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e-
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e+
/gate/physics/addProcess PositronAnnihilation
/gate/physics/addProcess MultipleScattering e+
/gate/physics/addProcess MultipleScattering e-
/gate/physics/processList Enabled
/gate/physics/processList Initialized
#=====================================
# SOURCE
#=====================================
/gate/source/addSource twogamma
/gate/source/twogamma/attachTo phantom
/gate/source/twogamma/setActivity  10000 becquerel
/gate/source/twogamma/setType backtoback
/gate/source/twogamma/gps/centre -100. -100. -100. mm
/gate/source/twogamma/gps/particle gamma
/gate/source/twogamma/gps/energytype Mono
/gate/source/twogamma/gps/monoenergy 0.511 MeV
/gate/source/twogamma/gps/type Volume
/gate/source/twogamma/gps/shape Sphere
/gate/source/twogamma/gps/radius 0.5 mm
/gate/source/twogamma/gps/halfz 25 mm
/gate/source/twogamma/gps/angtype iso
#=====================================
# RUN
#=====================================
/gate/run/initialize
/gate/application/setTotalNumberOfPrimaries 10000000
/gate/application/setTimeSlice 1. s
/gate/application/setTimeStart 0. s
/gate/application/setTimeStop 1. s
/gate/application/startDAQ
/gate/application/describe


