[Gate-users] Defining a cold source - Forbid command

kaiyang li kaiyangli39 at gmail.com
Thu Sep 12 02:45:50 CEST 2013


Hi Ottavia,

Keep in mind that your phantom is the daughter of the world and your cold
area is the daughter of your phantom.
Thus,  you have to attach phantomSD to both cold area and cylinder phantom .

Here are some codes tested successfully and used by my previous project,
hope it will help you.

In this code, there are two cold areas inside a water phantom.

#=====================================================
#                    P H A N T O M
#=====================================================

/gate/world/daughters/name phantom
/gate/world/daughters/insert cylinder
/gate/phantom/setMaterial Water
/gate/phantom/vis/setColor grey
/gate/phantom/geometry/setRmin   0. mm
/gate/phantom/geometry/setRmax   6. mm
/gate/phantom/geometry/setHeight 0.3 mm
/gate/phantom/attachPhantomSD

/gate/world/daughters/name cold_area
/gate/world/daughters/insert cylinder
/gate/cold_area/vis/forceWireframe
/gate/cold_area/vis/setColor green
/gate/cold_area/geometry/setRmax 1.0 mm
/gate/cold_area/geometry/setRmin 0.0 mm
/gate/cold_area/geometry/setHeight 0.3 mm
/gate/cold_area/placement/setTranslation -1.0 0.0 0.0 mm
/gate/cold_area/setMaterial Water
/gate/cold_area/attachPhantomSD

/gate/world/daughters/name cold_area_a
/gate/world/daughters/insert cylinder
/gate/cold_area_a/vis/forceWireframe
/gate/cold_area_a/vis/setColor green
/gate/cold_area_a/geometry/setRmax 0.5 mm
/gate/cold_area_a/geometry/setRmin 0.0 mm
/gate/cold_area_a/geometry/setHeight 0.3 mm
/gate/cold_area_a/placement/setTranslation 1.4 0.0 0.0 mm
/gate/cold_area_a/setMaterial Water
/gate/cold_area_a/attachPhantomSD


#=====================================================
#  P A R T I C L E   S O U R C E
#=====================================================
/gate/source/addSource number1
/gate/source/number1/setActivity 37000000. becquerel
/gate/source/number1/gps/particle e+
/gate/source/number1/gps/energytype                            Fluor18
/gate/source/number1/setForcedUnstableFlag                     true
/gate/source/number1/setForcedHalfLife                6586 s
/gate/source/number1/gps/type Volume
/gate/source/number1/gps/shape Cylinder
/gate/source/number1/gps/radius 2. mm
/gate/source/number1/gps/halfz 0.15 mm
/gate/source/number1/gps/centre 0. 0. 0. mm
/gate/source/number1/visualize 2000 red 3
/gate/source/number1/gps/angtype iso
/gate/source/number1/gps/Forbid cold_area
/gate/source/number1/gps/Forbid cold_area_a
/gate/source/number1/dump 2

/gate/source/list




Also, VERY important, you need to run /gate/run/initialize before the
PARTICLE SOURCE part.


Cheers,
Kaiyang Li

Centre for Medical Radiation Physics
University of Wollongong
Australia





2013/9/11 Ottavia Bertolli <ottavia.bertolli at gmail.com>

> Dear Gate users,
>
> I would like to define a Volume source that has the shape of an annular
> cylinder.
> From the Users Guide it seems impossible to do this just defining the
> shape, since "annulus" is a Plane source, thus I thought about exploiting
> the Forbid command, to define a cold (i.e. with no activity) volume in a
> phantom, that in my case should be a smaller cylinder (filled with water)
> to be located within the bigger cylinder source.
>
> This is my code:
>
> ===============================================================
>
> #   COLD AREA
>
> /gate/world/daughters/name                        cold_area
> /gate/world/daughters/insert                        cylinder
> /gate/cold_area/placement/setTranslation    0.0 0.0 0.0 mm
> /gate/cold_area/geometry/setRmax             0.5 cm
> /gate/cold_area/geometry/setRmin              0.0 cm
> /gate/cold_area/geometry/setHeight            4.0 cm
> /gate/cold_area/setMaterial                        Water
> #/gate/cold_area/vis/forceWireframe
> /gate/cold_area/vis/forceSolid
> /gate/cold_area/vis/setColor                      green
>
>
> #    S O U R C E
> /gate/source/addSource oxy15
> /gate/source/oxy15/setActivity 3700000 becquerel
> /gate/source/oxy15/gps/particle ion
> /gate/source/oxy15/gps/ion 8 15 0 0
> /gate/source/oxy15/gps/energytype Mono
> /gate/source/oxy15/gps/monoenergy 0. MeV
> /gate/source/oxy15/gps/angtype iso
> /gate/source/oxy15/gps/number 1
> /gate/source/oxy15/gps/centre 0. 0. 0. cm
> /gate/source/oxy15/gps/type Volume
> /gate/source/oxy15/gps/shape Cylinder
> /gate/source/oxy15/gps/radius 1 cm
> /gate/source/oxy15/gps/halfz  2 cm
> /gate/source/oxy15/gps/Forbid cold_area
> /gate/source/oxy15/dump 1
>
> /gate/source/list
>
> ==================================================================
>
> When I enable the "/gate/source/oxy15/gps/Forbid cold_area" line command,
> I get this error:
>
> *** Break *** segmentation violation
> Attaching to program: /proc/2223/exe, process 2223
> [Thread debugging using libthread_db enabled]
> 0x0054d422 in __kernel_vsyscall ()
> error detected on stdin
> A debugging session is active.
>
>     Inferior 1 [process 2223] will be detached.
>
> What is it that I do wrong? Does anybody know the right way to define a
> cold region inside a bigger source?
>
> Thanks in advance!
>
> Ottavia Bertolli
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20130912/9e0ac7f2/attachment.html>


More information about the Gate-users mailing list