158 lines
4.9 KiB
Plaintext
158 lines
4.9 KiB
Plaintext
# G. Danielsen, A. Heikkinen, P. Kaitaniemi
|
|
#
|
|
# Macro file for IAEA geometry for a carbon beams in water.
|
|
|
|
/control/getEnv G4SYSTEM
|
|
|
|
#########################
|
|
# Set of the verboses
|
|
#
|
|
/control/verbose 1
|
|
/tracking/verbose 0
|
|
/run/verbose 1
|
|
/event/verbose 0
|
|
|
|
/analysis/setAnalysisFile IAEA.root
|
|
|
|
##########################
|
|
# Set of the physic models
|
|
#
|
|
/Physics/addPhysics emstandard_opt3 # Electromagnetic model
|
|
/Physics/addPhysics elastic # Hadronic elastic model
|
|
/Physics/addPhysics binary # Hadronic inelastic model
|
|
/Physics/addPhysics local_incl_ion_ion_inelastic # Hadronic inelastic model for ions (local Physic list)
|
|
/Physics/addPhysics radioactive_decay # Radioactive decay
|
|
|
|
##########################
|
|
# Geometry #
|
|
##########################
|
|
/geometrySetup/selectGeometry IAEA # Select the IAEA geometry
|
|
/iaea/waterPhantomThickness 27.9 cm #default is 27.9, zero will remove phantom
|
|
|
|
#############################
|
|
# Beam energy detection #
|
|
#############################
|
|
# define scoring mesh for energy deposits
|
|
# If attenuation measures are not needed this is redundant
|
|
# and time-consuming. Even pretty small runs give good attenuation graphs.
|
|
|
|
#/score/create/boxMesh boxMesh_1
|
|
|
|
#Box size is the radius of the box ie 20x20x20 gives 40x40x40 outer dimensions
|
|
#/score/mesh/boxSize 13.95 16. 16. cm # The box size and translation may require adjustement
|
|
|
|
#this translates the middle of the mesh-box.
|
|
#/score/mesh/translate/xyz 69 0.0 0.0 cm
|
|
#/score/mesh/nBin 400 1 1 # 400 bins in x-direction, 1 in y and z directions, changes require change in code
|
|
|
|
#
|
|
# define scorers and filters
|
|
# is not able to filter ions.
|
|
|
|
#/score/quantity/energyDeposit eDep
|
|
#/score/quantity/population eDep
|
|
#/score/quantity/nOfStep nOfStepGamma
|
|
#/score/filter/particle gammaFilter gamma
|
|
#/score/quantity/nOfStep nOfStepEMinus
|
|
#/score/filter/particle eMinusFilter e-
|
|
#/score/quantity/nOfStep nOfStepEPlus
|
|
#/score/filter/particle ePlusFilter e+
|
|
#/score/close
|
|
|
|
############################
|
|
# Initialisation procedure #
|
|
############################
|
|
/run/initialize
|
|
|
|
##########################
|
|
# Visualisation #
|
|
##########################
|
|
|
|
####### DAWNFILE ######
|
|
#/vis/scene/create
|
|
#/vis/open DAWNFILE
|
|
#/vis/viewer/flush
|
|
#/vis/viewer/set/viewpointThetaPhi 45 45 deg
|
|
#/vis/viewer/zoom 0
|
|
#/vis/viewer/pan 0 0 cm
|
|
#/vis/scene/add/trajectories
|
|
#/vis/scene/endOfEventAction accumulate
|
|
|
|
#/vis/viewer/update
|
|
#/vis/scene/add/trajectories
|
|
#/vis/modeling/trajectories/create/drawByCharge
|
|
#/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
|
#/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
|
#/vis/scene/endOfEventAction accumulate
|
|
|
|
####### OGL #######
|
|
#/vis/scene/create
|
|
#/vis/open OGL
|
|
##/vis/open OGL 600x600-100+0
|
|
##/vis/drawVolume
|
|
##/vis/viewer/set/viewpointThetaPhi 0 0 deg
|
|
#/vis/viewer/set/viewpointThetaPhi 45 45 deg
|
|
##/vis/viewer/zoom 1.0
|
|
#/vis/scene/add/trajectories
|
|
#/vis/modeling/trajectories/create/drawByCharge
|
|
#/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
|
#/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
|
|
|
|
|
# Draw only certain particles
|
|
#/vis/filtering/trajectories/create/particleFilter
|
|
# Now select filtered particles
|
|
#/vis/filtering/trajectories/particleFilter-0/add gamma
|
|
#/vis/filtering/trajectories/particleFilter-0/add electron
|
|
#/vis/filtering/trajectories/particleFilter-0/add neutron
|
|
#/vis/filtering/trajectories/particleFilter-0/add proton
|
|
#/vis/filtering/trajectories/particleFilter-0/invert true # charged particles only
|
|
#/vis/scene/add/trajectories
|
|
#/vis/scene/endOfEventAction accumulate
|
|
|
|
##########################
|
|
# Set here the cut and the step max for the tracking.
|
|
# Fixme, recommenadtions needed
|
|
#
|
|
/Physics/setCuts 0.8 cm
|
|
#/Physics/setCuts 0.4 cm
|
|
/Step/waterPhantomStepMax 0.5 cm
|
|
#/Step/waterPhantomStepMax 0.01 mm
|
|
|
|
#########################
|
|
# Set the primary particle type,
|
|
# energy and position along the X direction
|
|
#
|
|
/gun/particle ion
|
|
/gun/ion 6 12 6 # Carbon-12
|
|
|
|
/beam/energy/meanEnergy 4800 MeV # 400MeV/u * C12 = 4800
|
|
/beam/energy/sigmaEnergy 24 MeV # dE/E = 5e-3
|
|
/beam/position/Yposition/sigmaY 1.7 mm # 4mm * 2.35 ~ 1.7
|
|
/beam/position/Zposition/sigmaZ 1.7 mm
|
|
/beam/momentum/sigmaY 0.001
|
|
/beam/momentum/sigmaZ 0.001
|
|
|
|
#########################
|
|
# Start of the run
|
|
#
|
|
|
|
/beam/position/Xposition 0 cm
|
|
/beam/position/Yposition 0 cm
|
|
/beam/position/Zposition 0 cm
|
|
|
|
#/run/beamOn 100 # For test/visualization
|
|
/run/beamOn 200000 # Default value in release
|
|
#/run/beamOn 10000 # Good for basic physics run (takes few min)
|
|
#/run/beamOn 400000 # Accurate results with good statistics
|
|
|
|
|
|
#/score/dumpQuantityToFile boxMesh_1 eDep eDep.txt
|
|
|
|
# Example of running in loop
|
|
/control/alias initialValue 0
|
|
/control/alias finalValue 3
|
|
/control/alias stepSize 1
|
|
#/control/loop macro/iaea.loop counterName {initialValue} {finalValue} {stepSize}
|
|
#/control/unalias initialValue
|