[Gate-users] Gate-users Digest, Vol 187, Issue 23

Konstantinos P. Chatzipapas konhat88 at yahoo.gr
Tue Dec 28 11:07:23 CET 2021


Hello there,There is a problem with the visualization of the source. Could you please share the new mac file?
Regards,Konstantinos
----------------------------------------------------- Konstantinos Chatzipapas
    Medical Physicist, Ph.D.
        University of Patras


    Στις Κυριακή, 26 Δεκεμβρίου 2021, 08:40:02 π.μ. EET, ο χρήστης Anes Mohammed <anes.m.s.q at gmail.com> έγραψε:  
 
 Dear Mr.Konstantinos thank you so much for your help. I solved some of these problems, but now I have a new error in my code. the error in attached image. Do you know any idea about it?
On Thu, 23 Dec 2021, 13:29 , <gate-users-request at lists.opengatecollaboration.org> wrote:

Send Gate-users mailing list submissions to
        gate-users at lists.opengatecollaboration.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
or, via email, send a message with subject or body 'help' to
        gate-users-request at lists.opengatecollaboration.org

You can reach the person managing the list at
        gate-users-owner at lists.opengatecollaboration.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gate-users digest..."


Today's Topics:

   1. addsource (Anes Mohammed)
   2. Re: addsource (Konstantinos P. Chatzipapas)


----------------------------------------------------------------------

Message: 1
Date: Wed, 22 Dec 2021 21:37:51 +0300
From: Anes Mohammed <anes.m.s.q at gmail.com>
To: gate-users <gate-users at lists.opengatecollaboration.org>
Subject: [Gate-users] addsource
Message-ID:
        <CAPNYzOZNntNxVv+Necq+QKkObUktPQoJ-TH4uVpaTGM+-B5B2g at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear Gate User's
when I  implementation of the attached cod
#==============================================================================================
# Visualization
#==============================================================================================
/vis/open                             OGLSQt
/vis/viewer/set/background black
/vis/drawVolume
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 60 30
/vis/viewer/zoom 10
/tracking/storeTrajectory             1
/vis/scene/add/trajectories
/vis/scene/endOfEventAction           accumulate -1
/vis/scene/add/axes
/gate/verbose Physic    0
/gate/verbose Cuts      0
/gate/verbose SD        0
/gate/verbose Actions   0
/gate/verbose Actor     0
/gate/verbose Step      0
/gate/verbose Error     1
/gate/verbose Warning   0
/gate/verbose Output    0
/gate/verbose Beam      0
/gate/verbose Volume    0
/gate/verbose Image     0
/gate/verbose Geometry  0
/gate/verbose Core      0

/run/verbose 0
/event/verbose 0
/tracking/verbose 0


#==============================================================================================
# Materials
#==============================================================================================

/gate/geometry/setMaterialDatabase    data/GateMaterials.db

#==============================================================================================
# Geometry (world)
#==============================================================================================
# G E O M E T R Y
#####

# World

/gate/world/geometry/setXLength 100 cm
/gate/world/geometry/setYLength 100 cm
/gate/world/geometry/setZLength 100 cm
/gate/world/vis/setColor red
/gate/world/vis/forceWireframe
/gate/world/describe
# Scanner Head
/gate/world/daughters/name SPECThead
/gate/world/daughters/insert box
/gate/SPECThead/geometry/setXLength  7. cm
/gate/SPECThead/geometry/setYLength 21. cm
/gate/SPECThead/geometry/setZLength 30. cm
#Distance bettween SPECThead box##
/gate/SPECThead/placement/setTranslation  22.0 0. 0. cm
/gate/SPECThead/setMaterial Air

/gate/SPECThead/placement/setRotationAxis 0 0 1
/gate/SPECThead/placement/setRotationAngle 180 deg
/gate/SPECThead/vis/forceWireframe


# Shielding
/gate/SPECThead/daughters/name shielding
/gate/SPECThead/daughters/insert box
/gate/shielding/geometry/setXLength  7. cm
/gate/shielding/geometry/setYLength 21. cm
/gate/shielding/geometry/setZLength 30. cm
/gate/shielding/placement/setTranslation  0. 0. 0. cm
/gate/shielding/setMaterial Lead
/gate/shielding/vis/setColor grey
/gate/shielding/vis/forceSolid
# Collimator
/gate/SPECThead/daughters/name collimator
/gate/SPECThead/daughters/insert box
/gate/collimator/geometry/setXLength 3. cm
/gate/collimator/geometry/setYLength 19. cm
/gate/collimator/geometry/setZLength 28. cm
#the loction of collimator relative to y-axes##
/gate/collimator/placement/setTranslation  -2. 0. 0. cm
/gate/collimator/setMaterial Lead
/gate/collimator/vis/setColor red
/gate/collimator/vis/forceWireframe
/gate/collimator/describe
/gate/collimator/daughters/name hole
/gate/collimator/daughters/insert hexagone
/gate/hole/geometry/setHeight 3. cm
/gate/hole/geometry/setRadius .01 cm
/gate/hole/placement/setRotationAxis 0  0  1
/gate/hole/placement/setRotationAngle 90 deg
/gate/hole/setMaterial Air
#
# Repeat the hole in an array
##
/gate/hole/repeaters/insert cubicArray
/gate/hole/cubicArray/setRepeatNumberX 1
/gate/hole/cubicArray/setRepeatNumberY 52
/gate/hole/cubicArray/setRepeatNumberZ 44
/gate/hole/cubicArray/setRepeatVector 0. 0.36  0.624 cm
#
# Repeat these holes in a linear
##
/gate/hole/repeaters/insert linear
/gate/hole/linear/setRepeatNumber 2
/gate/hole/linear/setRepeatVector 0. 0.18 0.312 cm


# CRYSTAL
/gate/SPECThead/daughters/name crystal
/gate/SPECThead/daughters/insert box
/gate/crystal/geometry/setXLength 1. cm
/gate/crystal/geometry/setYLength  19. cm
/gate/crystal/geometry/setZLength  28. cm
/gate/crystal/placement/setTranslation  0. 0. 0. cm
/gate/crystal/setMaterial NaI
/gate/crystal/vis/setColor yellow

# BACK-COMPARTMENT
/gate/SPECThead/daughters/name compartment
/gate/SPECThead/daughters/insert box
/gate/compartment/geometry/setXLength 2.5 cm
/gate/compartment/geometry/setYLength 19. cm
/gate/compartment/geometry/setZLength 28. cm
/gate/compartment/placement/setTranslation   1.75 0. 0. cm
/gate/compartment/setMaterial Glass
/gate/compartment/vis/setColor grey

# TABLE
/gate/world/daughters/name table
/gate/world/daughters/insert box
/gate/table/geometry/setXLength 40 cm
/gate/table/geometry/setYLength 4. cm
/gate/table/geometry/setZLength 40. cm
/gate/table/placement/setRotationAxis 0 1 0
/gate/table/placement/setRotationAngle 90 deg
/gate/table/placement/setTranslation  0. -14.9 0. cm
/gate/table/setMaterial  Polystyrene
/gate/table/vis/setColor white
/gate/table/vis/forceSolid

# PHANTOM
/gate/world/daughters/name Phantom
/gate/world/daughters/insert box
/gate/Phantom/geometry/setXLength 30.  cm
/gate/Phantom/geometry/setYLength 30. cm
/gate/Phantom/geometry/setZLength 30. cm
/gate/Phantom/placement/setTranslation 0. 0. 0. cm
/gate/Phantom/setMaterial Water
/gate/Phantom/vis/setColor blue
/gate/Phantom/vis/forceWireframe
# S Y S T E M
######
/gate/systems/SPECThead/crystal/attach crystal
/gate/systems/SPECThead/describe
# S E N S I T I V E   D E T E C T O R S
/gate/crystal/attachCrystalSD

# Phantom SD
/gate/Phantom/attachPhantomSD
/gate/table/attachPhantomSD
/gate/compartment/attachPhantomSD
/gate/shielding/attachPhantomSD
/gate/SPECThead/attachPhantomSD
/gate/collimator/attachPhantomSD

#  P H Y S I C S
#####
/gate/physics/addProcess PhotoElectric
/gate/physics/processes/PhotoElectric/setModel StandardModel

/gate/physics/addProcess Compton
/gate/physics/processes/Compton/setModel PenelopeModel

/gate/physics/addProcess RayleighScattering
/gate/physics/processes/RayleighScattering/setModel PenelopeModel

/gate/physics/addProcess ElectronIonisation
/gate/physics/processes/ElectronIonisation/setModel StandardModel e-

/gate/physics/addProcess Bremsstrahlung
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e-

/gate/physics/addProcess MultipleScattering e-

/gate/physics/processList Enabled
/gate/physics/processList Initialized

#  C U T S
#####
/gate/physics/Gamma/SetCutInRegion      SPECThead 0.1 cm
/gate/physics/Electron/SetCutInRegion   SPECThead 1.0 cm
# Source 1
/gate/source/addSource mySource_1
/gate/source/mySource_1/gps/type Volume
/gate/source/mySource_1/gps/shape Cylinder
/gate/source/mySource_1/gps/radius 0.5 mm
/gate/source/mySource_1/gps/halfz 100 mm
/gate/source/mySource_1/gps/centre 0. 0. 0. cm
/gate/source/mySource_1/gps/particle gamma
/gate/source/mySource_1/gps/energy 140. keV

#  1 MBq
#/gate/source/mySource_1/setActivity 1000000 Bq
/gate/source/mySource_1/setActivity 1 Bq
# Emission angle: isotropic
/gate/source/mySource_1/gps/angtype iso
/gate/source/list
#====================================================
#DATA OUTPUT
#===================================================
/gate/output/allowNoOutput


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


/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto
#/gate/application/setTotalNumberOfPrimaries 100000
/gate/application/start




#==============================================================================================
# Initialisation
#==============================================================================================

/gate/run/initialize
#==============================================================================================
# Main program
#==============================================================================================

#/gate/output/allowNoOutput

/gate/application/setTotalNumberOfPrimaries 1
/gate/application/start

This error appear for me
***** Illegal application state </gate/source/addSource mySource_1> *****
***** Batch is interrupted!! *****

thanks for your help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20211222/404b6621/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 23 Dec 2021 10:20:27 +0000 (UTC)
From: "Konstantinos P. Chatzipapas" <konhat88 at yahoo.gr>
To: gate-users <gate-users at lists.opengatecollaboration.org>,  Anes
        Mohammed <anes.m.s.q at gmail.com>
Subject: Re: [Gate-users] addsource
Message-ID: <1003764488.1333227.1640254827686 at mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Hello Anes,
A first problem with your code is that /gate/run/initialize   should not be in the end. It must be before the source definition. To be accurate, before these lines: # Source 1/gate/source/addSource mySource_1

Regards,Konstantinos----------------------------------------------------- Konstantinos Chatzipapas
    Medical Physicist, Ph.D.
        University of Patras


    Στις Τετάρτη, 22 Δεκεμβρίου 2021, 08:43:15 μ.μ. EET, ο χρήστης Anes Mohammed <anes.m.s.q at gmail.com> έγραψε:  

 Dear Gate User's
when I implementation of the attached cod#==============================================================================================
# Visualization
#==============================================================================================
/vis/open                             OGLSQt
/vis/viewer/set/background black
/vis/drawVolume
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 60 30
/vis/viewer/zoom 10
/tracking/storeTrajectory             1
/vis/scene/add/trajectories
/vis/scene/endOfEventAction           accumulate -1
/vis/scene/add/axes
/gate/verbose Physic    0
/gate/verbose Cuts      0
/gate/verbose SD        0
/gate/verbose Actions   0
/gate/verbose Actor     0
/gate/verbose Step      0
/gate/verbose Error     1
/gate/verbose Warning   0
/gate/verbose Output    0
/gate/verbose Beam      0
/gate/verbose Volume    0
/gate/verbose Image     0
/gate/verbose Geometry  0
/gate/verbose Core      0

/run/verbose 0
/event/verbose 0
/tracking/verbose 0  


#==============================================================================================
# Materials
#==============================================================================================

/gate/geometry/setMaterialDatabase    data/GateMaterials.db

#==============================================================================================
# Geometry (world)
#==============================================================================================
# G E O M E T R Y
#####

# World

/gate/world/geometry/setXLength 100 cm
/gate/world/geometry/setYLength 100 cm
/gate/world/geometry/setZLength 100 cm
/gate/world/vis/setColor red
/gate/world/vis/forceWireframe
/gate/world/describe
# Scanner Head
/gate/world/daughters/name SPECThead
/gate/world/daughters/insert box
/gate/SPECThead/geometry/setXLength  7. cm
/gate/SPECThead/geometry/setYLength 21. cm
/gate/SPECThead/geometry/setZLength 30. cm
#Distance bettween SPECThead box##
/gate/SPECThead/placement/setTranslation  22.0 0. 0. cm
/gate/SPECThead/setMaterial Air

/gate/SPECThead/placement/setRotationAxis 0 0 1
/gate/SPECThead/placement/setRotationAngle 180 deg
/gate/SPECThead/vis/forceWireframe


# Shielding
/gate/SPECThead/daughters/name shielding
/gate/SPECThead/daughters/insert box
/gate/shielding/geometry/setXLength  7. cm
/gate/shielding/geometry/setYLength 21. cm
/gate/shielding/geometry/setZLength 30. cm
/gate/shielding/placement/setTranslation  0. 0. 0. cm
/gate/shielding/setMaterial Lead
/gate/shielding/vis/setColor grey
/gate/shielding/vis/forceSolid
# Collimator
/gate/SPECThead/daughters/name collimator
/gate/SPECThead/daughters/insert box
/gate/collimator/geometry/setXLength 3. cm
/gate/collimator/geometry/setYLength 19. cm
/gate/collimator/geometry/setZLength 28. cm
#the loction of collimator relative to y-axes##
/gate/collimator/placement/setTranslation  -2. 0. 0. cm
/gate/collimator/setMaterial Lead
/gate/collimator/vis/setColor red
/gate/collimator/vis/forceWireframe
/gate/collimator/describe
/gate/collimator/daughters/name hole
/gate/collimator/daughters/insert hexagone
/gate/hole/geometry/setHeight 3. cm
/gate/hole/geometry/setRadius .01 cm
/gate/hole/placement/setRotationAxis 0  0  1
/gate/hole/placement/setRotationAngle 90 deg
/gate/hole/setMaterial Air
#
# Repeat the hole in an array
##
/gate/hole/repeaters/insert cubicArray
/gate/hole/cubicArray/setRepeatNumberX 1
/gate/hole/cubicArray/setRepeatNumberY 52
/gate/hole/cubicArray/setRepeatNumberZ 44
/gate/hole/cubicArray/setRepeatVector 0. 0.36  0.624 cm
#
# Repeat these holes in a linear
##
/gate/hole/repeaters/insert linear
/gate/hole/linear/setRepeatNumber 2
/gate/hole/linear/setRepeatVector 0. 0.18 0.312 cm


# CRYSTAL
/gate/SPECThead/daughters/name crystal
/gate/SPECThead/daughters/insert box
/gate/crystal/geometry/setXLength 1. cm
/gate/crystal/geometry/setYLength  19. cm
/gate/crystal/geometry/setZLength  28. cm
/gate/crystal/placement/setTranslation  0. 0. 0. cm
/gate/crystal/setMaterial NaI
/gate/crystal/vis/setColor yellow

# BACK-COMPARTMENT
/gate/SPECThead/daughters/name compartment
/gate/SPECThead/daughters/insert box
/gate/compartment/geometry/setXLength 2.5 cm
/gate/compartment/geometry/setYLength 19. cm
/gate/compartment/geometry/setZLength 28. cm
/gate/compartment/placement/setTranslation   1.75 0. 0. cm
/gate/compartment/setMaterial Glass
/gate/compartment/vis/setColor grey

# TABLE
/gate/world/daughters/name table
/gate/world/daughters/insert box
/gate/table/geometry/setXLength 40 cm
/gate/table/geometry/setYLength 4. cm
/gate/table/geometry/setZLength 40. cm
/gate/table/placement/setRotationAxis 0 1 0
/gate/table/placement/setRotationAngle 90 deg
/gate/table/placement/setTranslation  0. -14.9 0. cm
/gate/table/setMaterial  Polystyrene
/gate/table/vis/setColor white
/gate/table/vis/forceSolid

# PHANTOM
/gate/world/daughters/name Phantom
/gate/world/daughters/insert box
/gate/Phantom/geometry/setXLength 30.  cm
/gate/Phantom/geometry/setYLength 30. cm
/gate/Phantom/geometry/setZLength 30. cm
/gate/Phantom/placement/setTranslation 0. 0. 0. cm
/gate/Phantom/setMaterial Water
/gate/Phantom/vis/setColor blue
/gate/Phantom/vis/forceWireframe
# S Y S T E M
######
/gate/systems/SPECThead/crystal/attach crystal
/gate/systems/SPECThead/describe
# S E N S I T I V E   D E T E C T O R S
/gate/crystal/attachCrystalSD

# Phantom SD
/gate/Phantom/attachPhantomSD
/gate/table/attachPhantomSD
/gate/compartment/attachPhantomSD
/gate/shielding/attachPhantomSD
/gate/SPECThead/attachPhantomSD
/gate/collimator/attachPhantomSD

#  P H Y S I C S
#####
/gate/physics/addProcess PhotoElectric
/gate/physics/processes/PhotoElectric/setModel StandardModel

/gate/physics/addProcess Compton
/gate/physics/processes/Compton/setModel PenelopeModel

/gate/physics/addProcess RayleighScattering
/gate/physics/processes/RayleighScattering/setModel PenelopeModel

/gate/physics/addProcess ElectronIonisation
/gate/physics/processes/ElectronIonisation/setModel StandardModel e-

/gate/physics/addProcess Bremsstrahlung
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e-

/gate/physics/addProcess MultipleScattering e-

/gate/physics/processList Enabled
/gate/physics/processList Initialized

#  C U T S
#####
/gate/physics/Gamma/SetCutInRegion      SPECThead 0.1 cm
/gate/physics/Electron/SetCutInRegion   SPECThead 1.0 cm
# Source 1
/gate/source/addSource mySource_1
/gate/source/mySource_1/gps/type Volume
/gate/source/mySource_1/gps/shape Cylinder
/gate/source/mySource_1/gps/radius 0.5 mm
/gate/source/mySource_1/gps/halfz 100 mm
/gate/source/mySource_1/gps/centre 0. 0. 0. cm
/gate/source/mySource_1/gps/particle gamma
/gate/source/mySource_1/gps/energy 140. keV

#  1 MBq
#/gate/source/mySource_1/setActivity 1000000 Bq
/gate/source/mySource_1/setActivity 1 Bq
# Emission angle: isotropic
/gate/source/mySource_1/gps/angtype iso
/gate/source/list
#====================================================
#DATA OUTPUT
#===================================================
/gate/output/allowNoOutput


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


/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto
#/gate/application/setTotalNumberOfPrimaries 100000
/gate/application/start




#==============================================================================================
# Initialisation
#==============================================================================================

/gate/run/initialize
#==============================================================================================
# Main program
#==============================================================================================

#/gate/output/allowNoOutput

/gate/application/setTotalNumberOfPrimaries 1
/gate/application/start
This error appear for me
***** Illegal application state </gate/source/addSource mySource_1> *****
***** Batch is interrupted!! *****
thanks for your help
_______________________________________________
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/pipermail/gate-users/attachments/20211223/1890fc5f/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

------------------------------

End of Gate-users Digest, Vol 187, Issue 23
*******************************************

_______________________________________________
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/pipermail/gate-users/attachments/20211228/06f336c0/attachment-0001.html>


More information about the Gate-users mailing list