[Gate-users] Dose actor

David Boersma david.boersma at acmit.at
Mon Feb 10 13:38:14 CET 2020

Hi Mohammed,

Please keep the conversation on the mailing list.

The next few days I'll be very busy and won't have time to answer myself. Maybe someone else can have a look at your macro and tell if it's fine for your purpose.

Good luck!


Von: Mohammed REZZOUG <nmedrezz at gmail.com>
Gesendet: Montag, 10. Februar 2020 10:39:25
An: David Boersma
Betreff: Re: [Gate-users] Dose actor

Hi david
thank you for your reply
i want to validate a phase space source ( condition DSP= 100 cm waterbox 40*40*40 cm)
in this order, I use this cod macro.

/gate/world/setMaterial            Air
/gate/world/geometry/setXLength    3.0 m
/gate/world/geometry/setYLength    3.0 m
/gate/world/geometry/setZLength    3.0 m
/gate/world/vis/setVisible 1


/gate/world/daughters/name              waterbox
/gate/world/daughters/insert            box
/gate/waterbox/setMaterial              Water
/gate/waterbox/placement/setTranslation 0 0 -200 mm
/gate/waterbox/geometry/setXLength      400 mm
/gate/waterbox/geometry/setYLength      400 mm
/gate/waterbox/geometry/setZLength      400 mm
/gate/waterbox/vis/setColor             blue

# It should be the same geometry than PhS generation Here we add a
# "gantry" rotation. To do that easily, we define two box, on for the
# rotation (according to the isocenter=world origin), then one another
# to translation the phase-space plane to the right distance

/gate/world/daughters/name                     linacGantry
/gate/world/daughters/insert                   box
/gate/linacGantry/setMaterial                  Air
/gate/linacGantry/geometry/setXLength          1.0 mm
/gate/linacGantry/geometry/setYLength          1.0 mm
/gate/linacGantry/geometry/setZLength          1.0 mm
/gate/linacGantry/placement/setRotationAxis    0 1 0
/gate/linacGantry/placement/setRotationAngle   0 deg
/gate/linacGantry/vis/setVisible               1

/gate/linacGantry/daughters/name         linac
/gate/linacGantry/daughters/insert       box
/gate/linac/setMaterial                  Air
/gate/linac/geometry/setXLength          1.0 mm
/gate/linac/geometry/setYLength          1.0 mm
/gate/linac/geometry/setZLength          1.0 mm
/gate/linac/placement/setTranslation     0 0 1000 mm
/gate/linac/vis/setVisible               1

# /gate/geometry/setMaterialDatabase data/PreciseMaterials.db
# /control/execute mac/linac_head.mac
/gate/linac/placement/setTranslation 0 0 1000 mm

/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         70 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

# =====================================================
# =====================================================

/gate/physics/addPhysicsList emstandard_opt1

/gate/physics/Gamma/SetCutInRegion      world 1 mm
/gate/physics/Electron/SetCutInRegion   world 1 mm
/gate/physics/Positron/SetCutInRegion   world 1 mm

/gate/physics/Gamma/SetCutInRegion      waterbox 0.5 mm
/gate/physics/Electron/SetCutInRegion   waterbox 0.5 mm
/gate/physics/Positron/SetCutInRegion   waterbox 0.5 mm

I have to calculate the profile dose at equal depth 1.5 cm

/gate/actor/addActor                          DoseActor  doseprofile
/gate/actor/doseprofile/save                  output/electron-profile.txt
/gate/actor/doseprofile/attachTo                waterbox
/gate/actor/doseprofile/stepHitType           random
/gate/actor/doseprofile/setPosition           0 0 18.5 cm
/gate/actor/doseprofile/setResolution         100 1 1
/gate/actor/doseprofile/setSize               40 40 40 cm
/gate/actor/doseprofile/saveEveryNSeconds     60
/gate/actor/doseprofile/enableEdep            true
/gate/actor/doseprofile/enableUncertaintyEdep true
/gate/actor/doseprofile/enableDose            false
/gate/actor/doseprofile/enableUncertaintyDose false
/gate/actor/doseprofile/enableNumberOfHits    false


This method is valid or not?(I have to calculate the profile dose at equal depth 1.5 cm)





# Read from Phase Space files. Here we indicate the type of particle
# (e-) because this information is not stored in the PhS to gain
# space. Moreover, we set 'useRandomSymmetry' to generate more
# particle than the number of particle in the PhS, using a Z axis
# symmetry.

/gate/source/addSource                         beam_g phaseSpace
/gate/source/beam_g/addPhaseSpaceFile          output/output-PhS-g.root
/gate/source/beam_g/setParticleType            e-
/gate/source/beam_g/attachTo                   PhS_Plane
/gate/source/beam_g/useRandomSymmetry          true


/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto

#/tracking/verbose 2

/gate/application/setTotalNumberOfPrimaries 5000

Thank  you for any help


Le lun. 10 févr. 2020 à 03:30, David Boersma <david.boersma at acmit.at<mailto:david.boersma at acmit.at>> a écrit :

Hi Mohammed,

Your question is a bit short and unspecific, we need more information in order to have a chance to give you a useful answer. Can you describe what you have tried so far to configure the dose actor in your simulation, and what are the problems you encountered? Which Gate release are you using?

The documentation of the dose actor is here:


Examples for how to use the dose actor can be found in the GateContrib project, for instance here:


Hope that helps,


Von: Gate-users <gate-users-bounces at lists.opengatecollaboration.org<mailto:gate-users-bounces at lists.opengatecollaboration.org>> im Auftrag von Mohammed REZZOUG <nmedrezz at gmail.com<mailto:nmedrezz at gmail.com>>
Gesendet: Sonntag, 9. Februar 2020 19:53:53
An: gate-users at lists.opengatecollaboration.org<mailto:gate-users at lists.opengatecollaboration.org>
Betreff: [Gate-users] Dose actor

I want to simulate the electron accelerator on Gate in order to calculate the pdd and the dose profile in a water tank, I want to know how to use the "Dose actor"
Thanks for any help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200210/941ba568/attachment-0001.html>

More information about the Gate-users mailing list