[Gate-users] Dynamic source dose scoring problem

Musajoya Joya musajoyajoya at gmail.com
Tue Dec 28 11:37:23 CET 2021


Dear Gate users,
I hope everyone is doing well.
I faced a problem since long time ago regarding dose absorption by actors
using a dynamic applicator (moving source for creating a uniform pattern)
in barcytherapy. As I tried different approaches, the actors do not score
any dose and the dose value is always zero.
I added my code along with this email.
I kindly ask any professional GATE users to please have a look at this code
and find out the problem. I really need help in this regard and lost plenty
of time but with little luck.
Thank you in advance.

################# VISULIZATION   ##############
/control/execute   data/vis.mac
# MATERIALS
#=====================================================
#Define Materials Database
/gate/geometry/setMaterialDatabase     data/GateMaterials.db

# World
/gate/world/geometry/setXLength    80 cm
/gate/world/geometry/setYLength    80 cm
/gate/world/geometry/setZLength    80 cm
/gate/world/setMaterial             Air
/gate/world/vis/setColor            blue
/gate/world/vis/setVisible          1
/gate/world/vis/forceSolid
/gate/world/vis/forceWireframe
/gate/geometry/rebuild

# ******phantom ********

/gate/world/daughters/name           phantom
/gate/world/daughters/insert         box
/gate/phantom/placement/setTranslation           0.0 0.0 0.0 cm
/gate/phantom/geometry/setXLength                30  cm
/gate/phantom/geometry/setYLength                22 cm
/gate/phantom/geometry/setZLength                30 cm
/gate/phantom/setMaterial                        Water
/gate/phantom/vis/setColor                       green
/gate/phantom/vis/forceWireframe
#/gate/phantom/vis/forceSolid
/gate/phantom/vis/setVisible                    1
/gate/phantom/attachPhantomSD

## vagina
/gate/phantom/daughters/name                 vagina
/gate/phantom/daughters/insert               cylinder
/gate/vagina/geometry/setRmin                1.7 cm
/gate/vagina/geometry/setRmax                2.0 cm
/gate/vagina/geometry/setHeight              8 cm
/gate/vagina/placement/setTranslation        0.0 0 11 cm
/gate/vagina/placement/setRotationAxis       0 0 1
/gate/vagina/setMaterial                     Body
/gate/vagina/vis/setVisible
/gate/vagina/vis/setColor                    green
/gate/vagina/vis/forceWireframe
/gate/vagina/vis/setVisible                  1
#/gate/vagina/vis/forceSolid
/gate/vagina/attachPhantomSD
/gate/geometry/rebuild
##################################################
########## target definition #####################
##################################################

/gate/phantom/daughters/name                      vaginatarget
/gate/phantom/daughters/insert                    box
/gate/vaginatarget/geometry/setXLength              0.8 cm
/gate/vaginatarget/geometry/setYLength              2.5 cm
/gate/vaginatarget/geometry/setZLength              1.5 cm
/gate/vaginatarget/placement/setTranslation         -2.4 0 11 cm
/gate/vaginatarget/setMaterial                      Body
/gate/vaginatarget/vis/setVisible
/gate/vaginatarget/vis/setColor                     white
/gate/vaginatarget/vis/forceWireframe
/gate/vaginatarget/vis/setVisible                   1
/gate/vaginatarget/vis/forceSolid
/gate/vaginatarget/attachPhantomSD
#/gate/geometry/rebuild
##### starting of rectum detector placement

# rectum diameter 2.5 cm

/gate/phantom/daughters/name                 rectum
/gate/phantom/daughters/insert               cylinder
/gate/rectum/geometry/setRmin                1.05 cm
/gate/rectum/geometry/setRmax                1.25 cm
/gate/rectum/geometry/setHeight              10 cm
/gate/rectum/placement/setTranslation        0.0 -4.25 10 cm
/gate/rectum/placement/setRotationAxis       0 0 1
/gate/rectum/setMaterial                     Body
/gate/rectum/vis/setVisible
/gate/rectum/vis/setColor                    red
/gate/rectum/vis/forceWireframe
/gate/rectum/vis/setVisible                  1
/gate/rectum/vis/forceSolid
/gate/rectum/attachPhantomSD
/gate/geometry/rebuild

# rectum air inside cylinder

/gate/phantom/daughters/name                      rectumair
/gate/phantom/daughters/insert                    cylinder
/gate/rectumair/geometry/setRmin                  0.0 cm
/gate/rectumair/geometry/setRmax                  1.05 cm
/gate/rectumair/geometry/setHeight                10 cm
/gate/rectumair/placement/setTranslation          0.0 -4.25 10 cm
/gate/rectumair/placement/setRotationAxis         0 0 1
/gate/rectumair/setMaterial                       Air
/gate/rectumair/vis/setVisible
/gate/rectumair/vis/setColor                      white
/gate/rectumair/vis/forceWireframe
/gate/rectumair/vis/setVisible                    1
/gate/rectumair/vis/forceSolid
/gate/rectumair/attachPhantomSD
/gate/geometry/rebuild

##### starting of bladder detector placement

##### bladder

/gate/phantom/daughters/name                       bladder
/gate/phantom/daughters/insert                     sphere
/gate/bladder/geometry/setRmin                     0 cm
/gate/bladder/geometry/setRmax                     3.5 cm
/gate/bladder/placement/setTranslation             0.0 5.5 11 cm
/gate/bladder/setMaterial                          Body
/gate/bladder/vis/setVisible
/gate/bladder/vis/setColor                         red
#/gate/bladder/vis/forceWireframe
#/gate/bladder/vis/forceSolid
/gate/bladder/vis/setVisible                      1
/gate/bladder/attachPhantomSD
#/gate/geometry/rebuild


####################
# aplicator


/gate/phantom/daughters/name                     outerlayer
/gate/phantom/daughters/insert                   cylinder
/gate/outerlayer/geometry/setRmin                1.0 cm
/gate/outerlayer/geometry/setRmax                1.50 cm
/gate/outerlayer/geometry/setHeight              6.3 cm
/gate/outerlayer/placement/setTranslation        0.0 0 11 cm
/gate/outerlayer/placement/setRotationAxis       0 0 1
/gate/outerlayer/setMaterial                     Plexiglass
/gate/outerlayer/vis/setVisible
/gate/outerlayer/vis/setColor                    red
/gate/outerlayer/vis/forceWireframe
/gate/outerlayer/vis/setVisible                  1
#/gate/outerlayer/vis/forceSolid
/gate/outerlayer/attachPhantomSD
/gate/geometry/rebuild

##### central steel rod 8mm diamter

/gate/outerlayer/daughters/name                  centralrod
/gate/outerlayer/daughters/insert                cylinder
/gate/centralrod/geometry/setRmin                0  cm
/gate/centralrod/geometry/setRmax                1.0 cm
/gate/centralrod/geometry/setHeight              6.3 cm
/gate/centralrod/placement/setTranslation        0.0 0 0 cm
/gate/centralrod/placement/setRotationAxis       0 0 1
/gate/centralrod/setMaterial                     316L
/gate/centralrod/vis/setVisible
/gate/centralrod/vis/setColor                    blue
/gate/centralrod/vis/forceWireframe
/gate/centralrod/vis/setVisible                  1
#/gate/centralrod/vis/forceSolid
/gate/centralrod/attachPhantomSD
/gate/geometry/rebuild

##############air cylynders #########################################3

/gate/outerlayer/daughters/name                     airbox
/gate/outerlayer/daughters/insert                   box
/gate/airbox/geometry/setXLength                   0.6 cm
/gate/airbox/geometry/setYLength                   0.3 cm
/gate/airbox/geometry/setZLength                   6.3 cm
/gate/airbox/placement/setTranslation              1.25 0.0 0 cm
#/gate/airbox/placement/setRotationAxis            0 0 1
/gate/airbox/setMaterial                           Air
/gate/airbox/vis/setVisible
/gate/airbox/vis/setColor                          green
/gate/airbox/vis/forceWireframe
/gate/airbox/vis/setVisible                        1
#/gate/airbox/vis/forceSolid
/gate/airbox/attachPhantomSD
#/gate/geometry/rebuild

/gate/airbox/repeaters/insert          ring
/gate/airbox/ring/setRepeatNumber      1
/gate/airbox/ring/setFirstAngle            140 deg
#/gate/airbox/ring/setAngularSpan         180 deg


### sources definition
###########################
###################################################### Source Capsule
####################################
/gate/airbox/daughters/name               sc2
/gate/airbox/daughters/insert            cylinder
/gate/sc2/geometry/setRmin                   0 mm
/gate/sc2/geometry/setRmax                  0.5 mm
/gate/sc2/geometry/setHeight                0.75 mm
/gate/sc2/placement/setTranslation          -0.25  0 -0.2125 cm
/gate/sc2/setMaterial                       316L
/gate/sc2/vis/setColor                      red
/gate/sc2/vis/forceSolid                    1
/gate/sc2/geometry/setPhiStart              0 deg
/gate/sc2/geometry/setDeltaPhi              360 deg
/gate/sc2/attachPhantomSD
/gate/sc2/vis/setVisible                     1
#/gate/geometry/rebuild


/gate/airbox/daughters/name                  sc4 #core cover
/gate/airbox/daughters/insert                cylinder
/gate/sc4/geometry/setRmin                  0.35 mm
/gate/sc4/geometry/setRmax                  0.5 mm
/gate/sc4/geometry/setHeight                3.5 mm
/gate/sc4/placement/setTranslation          -0.25  0 0 cm
/gate/sc4/setMaterial                        316L
/gate/sc4/vis/setColor                       red
/gate/sc4/vis/forceSolid
/gate/sc4/geometry/setPhiStart              0 deg
/gate/sc4/geometry/setDeltaPhi              360 deg
/gate/sc4/attachPhantomSD
/gate/sc4/vis/setVisible                    1
#/gate/geometry/rebuild

/gate/airbox/daughters/name                 sc5 #airlayer
/gate/airbox/daughters/insert               cylinder
/gate/sc5/geometry/setRmin                  0.25 mm
/gate/sc5/geometry/setRmax                   0.35 mm
/gate/sc5/geometry/setHeight                 3.5 mm
/gate/sc5/placement/setTranslation          -0.25  0 0 cm
/gate/sc5/setMaterial                        Air
/gate/sc5/vis/setColor                       white
/gate/sc5/geometry/setPhiStart              0 deg
/gate/sc5/geometry/setDeltaPhi              360 deg
/gate/sc5/vis/forceSolid
/gate/sc5/attachPhantomSD
/gate/sc5/vis/setVisible                     1
#/gate/geometry/rebuild

/gate/airbox/daughters/name              sc6 #left cylinder
/gate/airbox/daughters/insert            cylinder
/gate/sc6/geometry/setRmin               0 mm
/gate/sc6/geometry/setRmax               0.5 mm
/gate/sc6/geometry/setHeight             0.75 mm
/gate/sc6/placement/setTranslation       -0.25  0 0.2125 cm
/gate/sc6/setMaterial                    316L
/gate/sc6/vis/setColor                   green
/gate/sc6/vis/forceSolid
/gate/sc6/geometry/setPhiStart           0 deg
/gate/sc6/geometry/setDeltaPhi          360 deg
/gate/sc6/attachPhantomSD
/gate/sc6/vis/setVisible                 1
#/gate/geometry/rebuild


/gate/airbox/daughters/name              wire #2mm cable
/gate/airbox/daughters/insert            cylinder
/gate/wire/geometry/setRmin             0 mm
/gate/wire/geometry/setRmax             0.45 mm
/gate/wire/geometry/setHeight           2 mm
/gate/wire/placement/setTranslation     -0.25  0 0.35 cm
/gate/wire/setMaterial                   304
/gate/wire/vis/setColor                  blue
/gate/wire/geometry/setPhiStart         0 deg
/gate/wire/geometry/setDeltaPhi         360 deg
/gate/wire/attachPhantomSD
/gate/wire/vis/setVisible                1
/gate/wire/vis/forceSolid
#/gate/geometry/rebuild

########################### source seed #####################

/gate/airbox/daughters/name              sourceSeed
/gate/airbox/daughters/insert            cylinder
/gate/sourceSeed/geometry/setRmin           0 mm
/gate/sourceSeed/geometry/setRmax           0.25 mm
/gate/sourceSeed/geometry/setHeight         3.5 mm
/gate/sourceSeed/placement/setTranslation  -0.25 0 0 cm
/gate/sourceSeed/setMaterial                Cobalt
/gate/sourceSeed/vis/setColor               blue
/gate/sourceSeed/vis/setVisible             1
/gate/sourceSeed/vis/forceSolid
#=====================================================
# PHYSICS
#=====================================================

/gate/physics/addPhysicsList emstandard_opt3
/gate/physics/Gamma/SetCutInRegion      phantom 10 mm
/gate/physics/Electron/SetCutInRegion   phantom 10 mm
/gate/physics/Positron/SetCutInRegion   phantom 10 mm

#/gate/physics/Gamma/SetCutInRegion      sc4 0.1 mm
#/gate/physics/Electron/SetCutInRegion   sc4 1 m

/gate/physics/displayCuts

#=====================================================
# DETECTORS
#=====================================================
### Target ##############
/gate/actor/addActor                               DoseActor  targetdose
/gate/actor/targetdose/attachTo                    vaginatarget
/gate/actor/targetdose/stepHitType                 random
/gate/actor/targetdose/setVoxelSize               0.2  0.2  0.2 cm
/gate/actor/targetdose/save
output/target/targetdose.mhd
/gate/actor/targetdose/saveEveryNSeconds          60
/gate/actor/targetdose/enableDose                 true
/gate/actor/targetdose/enableUncertaintyDose      true
/gate/actor/targetdose/enableSquaredDose          true

# filter
/gate/actor/targetdose/addFilter energyFilter
/gate/actor/targetdose/energyFilter/setEmin  0.01 MeV
/gate/actor/targetdose/energyFilter/setEmax  2.5 MeV

#=====================================================
# INITIALISATION
#=====================================================
/gate/run/initialize

#=====================================================
# BEAMS
#=====================================================

#Description of co-60 source

/gate/source/addSource      co60s           gps
/gate/source/co60s/gps/particle             gamma
/gate/source/co60s/gps/energytype           UserSpectrum
/gate/source/co60s/gps/setSpectrumFile      data/co60spectrum.txt
/gate/source/co60s/gps/hist/type             energy
/gate/source/co60s/attachTo                  sourceSeed
/gate/source/co60s/gps/type                 Volume
/gate/source/co60s/gps/shape                Cylinder
/gate/source/co60s/gps/radius               0.025 cm
/gate/source/co60s/gps/halfz                0.175 cm
/gate/source/co60s/gps/ang/type             iso
/gate/source/co60s/visualize        10000      red   5
/gate/source/list

#=====================================================
# START ROTATION
#=====================================================
/gate/outerlayer/moves/insert         rotation
/gate/outerlayer/rotation/setSpeed     1 deg/s
/gate/outerlayer/rotation/setAxis      0 0  1
#/gate/outerlayer/placement/setRotationAngle       80 deg
#/gate/outerlayer/orbiting/setPoint1            0  1 0 cm
#/gate/outerlayer/orbiting/setPoint2            -1  0 0 cm


/gate/application/setTimeSlice     1 s
/gate/application/setTimeStart     0.  s
/gate/application/setTimeStop      80.  s
/gate/application/startDAQ

#=====================================================
# START BEAMS
#=====================================================

#/gate/application/noGlobalOutput
#/gate/run/enableGlobalOutput  true

#/gate/random/setEngineSeed default
#/gate/random/setEngineSeed auto
#/gate/random/setEngineSeed 123456789

/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto
/gate/application/setTotalNumberOfPrimaries 30000000
/gate/application/start

*Kind Regards*

*Musa Joya*

*Ph.D. candidate in Medical Physics *

*Tehran University of Medical Sciences*

*Tehran, Iran &*

*Lecturer of Medical Physics *

*Kabul University of Medical Sciences*

*Kabul, Afghanistan*

*Mobile and Telegram & WhatsApp: +989381560693*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20211228/a191ba29/attachment-0001.html>


More information about the Gate-users mailing list