[Gate-users] Radiotherapy and physics lists question
Lana Beck
lana.beck at bristol.ac.uk
Thu Jan 30 14:33:58 CET 2020
Dear David,
Thanks for your response.
Printing the processes used in emstandard_opt3 gives:
* e-
- msc
- eIoni
- eBrem
- ePairProd
* gamma
- phot
- compt
- conv
- Rayl
Hence where eBrem has been used before with setSecBiasing, compt should instead be used to enhance the production of contamination electrons from the linac. So in the file main-write-PhS.mac if I add
/process/em/setSecBiasing compt linac 100 100 MeV (*)
this should produce 100 times the electrons as it does for gammas and eBrem.
However it does not. Using the deprecated command does work:
/gate/physics/addProcess Compton
/gate/physics/processes/Compton/setModel StandardModel gamma
/gate/physics/processes/Compton/activateSplitting gamma 100
/gate/physics/processes/Compton/addFilter volumeFilter secondaries
/gate/physics/processes/Compton/secondaries/volumeFilter/addVolume linac
(I am just using the full linac volume for this example).
I've attached the full code at the end just incase of confusion.
Many thanks,
Lana
On Tue, Jan 28, 2020 at 7:27 PM Lana Beck <lana.beck at bristol.ac.uk> wrote:
> Dear Dr Sarrut,
>
> I have a question about the example in your gitbook:
> https://dsarrut.gitbooks.io/gate-exercises/content/exercise4-linac.html
> and the associated code here:
>
> https://gitlab.in2p3.fr/davidsarrut/gate-exercices/blob/master/linac/mac/main-write-PhS.mac
>
the gitbook link is no more maintained, please use:
https://davidsarrut.pages.in2p3.fr/gate-exercices-site/ (for the moment it
is essentially the same).
> If you prefer I can send my question to the gate-users list but as it
> pertained to your gitbook particularly I thought I should email you first.
>
yes I prefer to copy the gate-user list please.
> I was wondering about the line (110) in the example:
> /process/em/setSecBiasing eBrem target 100 100 MeV
>
> However, in the Section 5.2.1.1 in the gate manual it says to use:
> /gate/physics/processes/Bremsstrahlung/activateSplitting e- 100
>
> https://opengate.readthedocs.io/en/latest/cut_and_variance_reduction_technics.html
> and then I guess filters could be used for volume and energy.
>
> Is there a difference in these two methods? Of course the latter one
> requires using:
> /gate/physics/addProcess Bremsstrahlung
> /gate/physics/processes/Bremsstrahlung/setModel StandardModel e-
> /gate/physics/processes/Bremsstrahlung/setModel StandardModel e+
> in order for activateSplitting to work. However I'm not really sure what
> happens when adding the Bremsstrahlung process since eBrem is already
> included in the initialised methods of emstandard_opt3.
>
>
the opengate doc is wrong here and should be updated. Please use the first
macro "setSecBiasing". The second sets of macros are now deprecated and
should not be used.
> I am interested in the electron contamination from the linac head and I
> need a large sample. Hence, I wanted to do something similar for Compton
> Scattering and I'm not sure which method to use.
>
For Compton Scattering, use the same setSecBiasing command but with the
Compton process name. You should find the name of the Compton somewhere in
the Geant4 document, sorry, dont know where ...
David
>
> Any advice would be greatly appreciated.
>
> Kind regards,
> Lana
#=====================================================
# VERBOSITY
#=====================================================
/control/execute mac/verbose.mac
#=====================================================
# VISUALISATION
#=====================================================
/control/execute mac/visu.mac
# =====================================================
# GEOMETRY
# =====================================================
/gate/geometry/setMaterialDatabase data/GateMaterials.db
# WORLD
/gate/world/setMaterial Air
/gate/world/geometry/setXLength 1.0 m
/gate/world/geometry/setYLength 1.0 m
/gate/world/geometry/setZLength 1.0 m
/gate/world/vis/setVisible 1
# LINAC HEAD
# World origin is in the center of the beam e- source (not the real
# isocenter of the gantry room)
/gate/geometry/setMaterialDatabase data/LinacMaterials.db
/control/execute mac/linac_head.mac
# VIRTUAL PLANE FOR PHASE SPACE
/gate/linac/daughters/name PhS_Plane
/gate/linac/daughters/insert cylinder
/gate/PhS_Plane/setMaterial Vacuum
/gate/PhS_Plane/geometry/setRmin 0 mm
/gate/PhS_Plane/geometry/setRmax 40 mm
/gate/PhS_Plane/geometry/setHeight 1 nm
/gate/PhS_Plane/placement/setTranslation 0.0 0.0 -297 mm
/gate/PhS_Plane/vis/setColor white
/gate/PhS_Plane/vis/setVisible 1
# =====================================================
# PHYSICS
# =====================================================
/gate/physics/addPhysicsList emstandard_opt3
/gate/physics/Gamma/SetCutInRegion world 1 mm
/gate/physics/Electron/SetCutInRegion world 1 mm
/gate/physics/Positron/SetCutInRegion world 1 mm
# /gate/physics/addProcess Compton
# /gate/physics/processes/Compton/setModel StandardModel gamma
# /gate/physics/processes/Compton/activateSplitting gamma 100
# /gate/physics/processes/Compton/addFilter volumeFilter secondaries
# /gate/physics/processes/Compton/secondaries/volumeFilter/addVolume linac
#=====================================================
# DETECTORS
#=====================================================
# ----------------------------------------------------
# Kill actor to stop particles when they go inside a region
/gate/actor/addActor KillActor killer0
/gate/actor/killer0/attachTo kill_box_top
/gate/actor/addActor KillActor killer1
/gate/actor/killer1/attachTo kill_box_bottom
/gate/actor/addActor KillActor killer2
/gate/actor/killer2/attachTo kill_box_bottom2
# ----------------------------------------------------
# the following actor regularly store the current number of
# event/track/step in a file
/gate/actor/addActor SimulationStatisticActor stat
/gate/actor/stat/save output/output-writePhS-stat.txt
/gate/actor/stat/saveEveryNSeconds 20
# ----------------------------------------------------
# Phase space storage (a PhS for gamma, another for e-)
/gate/actor/addActor PhaseSpaceActor PhS_g
/gate/actor/PhS_g/attachTo PhS_Plane
/gate/actor/PhS_g/save output/output-PhS-g.root
/gate/actor/PhS_g/enableParticleName false
/gate/actor/PhS_g/enableProductionVolume false
/gate/actor/PhS_g/enableProductionProcess false
/gate/actor/PhS_g/useVolumeFrame true
/gate/actor/PhS_g/addFilter particleFilter
/gate/actor/PhS_g/particleFilter/addParticle gamma
/gate/actor/PhS_g/enableZPosition true
#/gate/actor/PhS_g/saveEveryNSeconds 20
# /gate/actor/addActor PhaseSpaceActor PhS_e
# /gate/actor/PhS_e/attachTo PhS_Plane
# /gate/actor/PhS_e/save output/output-PhS-e.root
# /gate/actor/PhS_e/enableParticleName false
# /gate/actor/PhS_e/enableProductionVolume false
# /gate/actor/PhS_e/enableProductionProcess false
# /gate/actor/PhS_e/useVolumeFrame true
# /gate/actor/PhS_e/addFilter particleFilter
# /gate/actor/PhS_e/particleFilter/addParticle e-
# /gate/actor/PhS_e/enableZPosition false
# /gate/actor/PhS_e/saveEveryNSeconds 20
#=====================================================
# INITIALISATION
#=====================================================
/gate/run/initialize
# Bremsstrahlung splitting : generate 100 photon (if below 100 MeV) with weight 1/100
/process/em/setSecBiasing eBrem target 100 100 MeV
/process/em/setSecBiasing compt linac 100 100 MeV
#=====================================================
# BEAMS
#=====================================================
/gate/source/addSource mybeam gps
/gate/source/mybeam/gps/particle e-
/gate/source/mybeam/gps/pos/type Beam
/gate/source/mybeam/gps/pos/rot1 0 1 0
/gate/source/mybeam/gps/pos/rot2 1 0 0
/gate/source/mybeam/gps/pos/shape Circle
/gate/source/mybeam/gps/pos/centre 0. 0. 0.6 mm
/gate/source/mybeam/gps/pos/sigma_x 1.274 mm
/gate/source/mybeam/gps/pos/sigma_y 1.274 mm
/gate/source/mybeam/gps/ang/rot1 1 0 0
/gate/source/mybeam/gps/ang/rot2 0 1 0
/gate/source/mybeam/gps/ang/type beam1d
/gate/source/mybeam/gps/ang/sigma_r 0 deg
/gate/source/mybeam/gps/ene/type Gauss
/gate/source/mybeam/gps/ene/mono 6.7 MeV
/gate/source/mybeam/gps/ene/sigma 0.077 MeV
/gate/source/mybeam/gps/direction 0 0 -1
#=====================================================
# START BEAMS
#=====================================================
/gate/random/setEngineName MersenneTwister
# /gate/random/setEngineSeed auto
/gate/random/setEngineSeed 123456
/gate/application/noGlobalOutput
#/tracking/verbose 2
/gate/application/setTotalNumberOfPrimaries 10
/gate/application/start
/gate/physics/processList Enabled
/gate/physics/processList Initialized
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200130/4985c5a7/attachment-0001.html>
More information about the Gate-users
mailing list