[Gate-users] Help with gate 6.2 optical simulation
Leo Read
leoread at gmail.com
Tue Nov 12 04:46:58 CET 2013
Hello all,
I'm having trouble getting what should be a straightforward optical
simulation working in Gate v6.2. I would greatly appreciate some assistance
in debugging this!
I'm trying to simulate a beam of 511 keV gammas incident on a 8x3 array of
4x4x30 mm^3 LSO crystals that are coupled to a 16x6 array of 2x2 mm^2 APDs.
I'm also looking for the following information from my simulation:
1. the position and energy of all gamma interactions within the block.
2. the position of optical photons generated by each gamma photon incident
on the block so I can generate a map of optical photons.
I have pasted my macro, my version of Materials.xml and Surfaces.xml below.
When I run the macro, my ascii files OUTAhits.dat and OUTASingles.dat are
empty and these trees in the root file are also empty. I can't seem to
figure out why and I bet it is something really that my eyes keep glazing
over. Anybody have any ideas?
Thank you very much for your time!
Best wishes,
Leo
============================
##################################################################################################
#VISUALIZATION
/vis/disable
#/control/execute visualization.mac
##################################################################################################
#VERBOSITY
/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 0
/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
##################################################################################################
/gate/geometry/setMaterialDatabase GateMaterials.db
/gate/world/geometry/setXLength 200. mm
/gate/world/geometry/setYLength 200. mm
/gate/world/geometry/setZLength 200. mm
##################################################################################################
#GEOMETRY
/gate/world/daughters/name OpticalSystem
/gate/world/daughters/insert box
/gate/OpticalSystem/geometry/setXLength 50 mm
/gate/OpticalSystem/geometry/setYLength 30 mm
/gate/OpticalSystem/geometry/setZLength 50 mm
/gate/OpticalSystem/placement/setTranslation 0 0 0 mm
/gate/OpticalSystem/setMaterial Air
/gate/OpticalSystem/vis/forceWireframe
/gate/OpticalSystem/vis/setColor white
/gate/OpticalSystem/vis/setVisible 1
# === block===
/gate/OpticalSystem/daughters/name myblock
/gate/OpticalSystem/daughters/insert box
/gate/myblock/geometry/setXLength 32 mm
/gate/myblock/geometry/setYLength 12 mm
/gate/myblock/geometry/setZLength 30.5 mm
/gate/myblock/placement/setTranslation 0 0 0 mm
/gate/myblock/setMaterial Air
/gate/myblock/vis/setColor green
/gate/myblock/vis/forceWireframe
#LYSO array
/gate/myblock/daughters/name myLSOcrystal
/gate/myblock/daughters/insert box
/gate/myLSOcrystal/geometry/setXLength 4 mm
/gate/myLSOcrystal/geometry/setYLength 4 mm
/gate/myLSOcrystal/geometry/setZLength 30 mm
/gate/myLSOcrystal/setMaterial LSO
/gate/myLSOcrystal/vis/forceWireframe
/gate/myLSOcrystal/vis/setColor yellow
/gate/myLSOcrystal/placement/setTranslation 0 0 -0.25 mm
/gate/myLSOcrystal/repeaters/insert cubicArray
/gate/myLSOcrystal/cubicArray/setRepeatNumberX 8
/gate/myLSOcrystal/cubicArray/setRepeatNumberY 3
/gate/myLSOcrystal/cubicArray/setRepeatNumberZ 1
/gate/myLSOcrystal/cubicArray/setRepeatVector 4 4 0 mm
/gate/myLSOcrystal/attachPhantomSD
/gate/systems/OpticalSystem/crystal/attach myLSOcrystal
# === APDs ===
/gate/myblock/daughters/name myapd
/gate/myblock/daughters/insert box
/gate/myapd/geometry/setXLength 2 mm
/gate/myapd/geometry/setYLength 2 mm
/gate/myapd/geometry/setZLength 0.5 mm
/gate/myapd/setMaterial Air
/gate/myapd/placement/setTranslation 0 0 15 mm
/gate/myapd/vis/setColor red
/gate/myapd/repeaters/insert cubicArray
/gate/myapd/cubicArray/setRepeatNumberX 16
/gate/myapd/cubicArray/setRepeatNumberY 6
/gate/myapd/cubicArray/setRepeatNumberZ 1
/gate/myapd/cubicArray/setRepeatVector 2 2 0 mm
/gate/myapd/vis/forceWireframe
/gate/myapd/attachCrystalSD
/gate/systems/OpticalSystem/pixel/attach myapd
#===============================================================
# Optical photons Detection Surface should be DIELECTRIC-METAL
#===============================================================
/gate/myLSOcrystal/surfaces/name Detection1
/gate/myLSOcrystal/surfaces/insert myapd
/gate/myLSOcrystal/surfaces/Detection1/setSurface perfect_apd
/gate/myapd/surfaces/name Detection2
/gate/myapd/surfaces/insert myLSOcrystal
/gate/myapd/surfaces/Detection2/setSurface perfect_apd
##################################################################################################
#PHYSICS
/gate/physics/addProcess PhotoElectric
/gate/physics/processes/PhotoElectric/setModel PenelopeModel
/gate/physics/addProcess Compton
/gate/physics/processes/Compton/setModel PenelopeModel
/gate/physics/addProcess RayleighScattering gamma
/gate/physics/processes/RayleighScattering/setModel PenelopeModel
/gate/physics/addProcess Scintillation
/gate/physics/addProcess OpticalAbsorption
/gate/physics/addProcess OpticalRayleigh
/gate/physics/addProcess OpticalMie
/gate/physics/addProcess OpticalWLS
/gate/physics/addProcess OpticalBoundary
/gate/physics/processList Enabled
/gate/physics/processList Initialized
##################################################################################################
/gate/run/initialize
##################################################################################################
#DIGITIZER
/gate/digitizer/Singles/enable
/gate/digitizer/Singles/insert opticaladder
/gate/digitizer/Singles/insert readout
/gate/digitizer/Singles/readout/setDepth 2
##################################################################################################
#SOURCE
/gate/source/addSource mysource gps
/gate/source/mysource/setActivity 100. becquerel
/gate/source/mysource/gps/particle gamma
/gate/source/mysource/gps/energytype Mono
/gate/source/mysource/gps/monoenergy 511 keV
/gate/source/mysource/gps/angtype iso
/gate/source/mysource/gps/type Point
/gate/source/mysource/gps/direction 0. 0. 1.
/gate/source/mysource/gps/centre 0. 0. -15. cm
/gate/source/mysource/visualize 2000 white 3
/gate/source/list
##################################################################################################
#DATA OUTPUT
/gate/output/root/enable
/gate/output/root/setFileName OUTR
/gate/output/root/setRootHitFlag 1
/gate/output/root/setRootSinglesFlag 1
/gate/output/root/setRootOpticalFlag 1
/gate/output/ascii/enable
/gate/output/ascii/setFileName OUTA
/gate/output/ascii/setOutFileHitsFlag 1
/gate/output/ascii/setOutFileSinglesFlag 1
/gate/output/analysis/disable
/gate/output/fastanalysis/enable
##################################################################################################
#RANDOM SEED
# Choose between: JamesRandom Ranlux64 MersenneTwister
/gate/random/setEngineName MersenneTwister
#/gate/random/setEngineSeed default
#/gate/random/setEngineSeed auto
/gate/random/setEngineSeed 123456789
/gate/random/verbose 0
###################################################################################################
#MEASUREMENT SETTINGS
/gate/systems/OpticalSystem/describe
# A C Q U I S I T I O N
#/gate/application/noGlobalOutput
#/gate/output/allowNoOutput
# If using DAQ: setActivity is needed in the Source
/gate/application/setTimeSlice 5 s
/gate/application/setTimeStart 0 s
/gate/application/setTimeStop 5 s
/gate/application/startDAQ
################################
#Surfaces.xml
<?xml version="1.0"?>
<surfaces>
<surface name="polished_teflon_wrapped" type="dielectric_dielectric"
sigmaalpha="0.1" finish="groundbackpainted">
<propertiestable>
<propertyvector name="SPECULARLOBECONSTANT" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="SPECULARSPIKECONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="BACKSCATTERCONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="REFLECTIVITY" energyunit="eV">
<ve energy="1.84" value="0.95"/>
<ve energy="4.08" value="0.95"/>
</propertyvector>
<propertyvector name="EFFICIENCY" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
</propertiestable>
</surface>
<surface name="rough_teflon_wrapped" type="dielectric_dielectric"
sigmaalpha="6.0" finish="groundbackpainted">
<propertiestable>
<propertyvector name="SPECULARLOBECONSTANT" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="SPECULARSPIKECONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="BACKSCATTERCONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="REFLECTIVITY" energyunit="eV">
<ve energy="1.84" value="0.95"/>
<ve energy="4.08" value="0.95"/>
</propertyvector>
<propertyvector name="EFFICIENCY" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
</propertiestable>
</surface>
<surface name="perfect_apd" type="dielectric_metal" sigmaalpha="0.0"
finish="ground">
<propertiestable>
<propertyvector name="SPECULARLOBECONSTANT" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="SPECULARSPIKECONSTANT" energyunit="eV">
<ve energy="1.84" value="0.0"/>
<ve energy="4.08" value="0.0"/>
</propertyvector>
<propertyvector name="BACKSCATTERCONSTANT" energyunit="eV">
<ve energy="1.84" value="0.0"/>
<ve energy="4.08" value="0.0"/>
</propertyvector>
<propertyvector name="REFLECTIVITY" energyunit="eV">
<ve energy="1.84" value="0.0"/>
<ve energy="4.08" value="0.0"/>
</propertyvector>
<propertyvector name="EFFICIENCY" energyunit="eV">
<ve energy="1.84" value="1.0"/>
<ve energy="4.08" value="1.0"/>
</propertyvector>
</propertiestable>
</surface>
<surface name="smooth" type="dielectric_dielectric" sigmaalpha="0.1"
finish="ground">
<propertiestable>
<propertyvector name="SPECULARLOBECONSTANT" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="SPECULARSPIKECONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="BACKSCATTERCONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
</propertiestable>
</surface>
<surface name="rough" type="dielectric_dielectric" sigmaalpha="6.0"
finish="ground">
<propertiestable>
<propertyvector name="SPECULARLOBECONSTANT" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="SPECULARSPIKECONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="BACKSCATTERCONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
</propertiestable>
</surface>
<surface name="black" type="dielectric_metal" sigmaalpha="0.0"
finish="ground">
<propertiestable>
<propertyvector name="SPECULARLOBECONSTANT" energyunit="eV">
<ve energy="1.84" value="1"/>
<ve energy="4.08" value="1"/>
</propertyvector>
<propertyvector name="SPECULARSPIKECONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="BACKSCATTERCONSTANT" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="REFLECTIVITY" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
<propertyvector name="EFFICIENCY" energyunit="eV">
<ve energy="1.84" value="0"/>
<ve energy="4.08" value="0"/>
</propertyvector>
</propertiestable>
</surface>
</surfaces>
==============================
#Materials.xml
<?xml version="1.0"?>
<materials>
<material name="LSO">
<propertiestable>
<property name="SCINTILLATIONYIELD" value="2600" unit="1/MeV"/>
<property name="RESOLUTIONSCALE" value="4.41"/>
<property name="FASTTIMECONSTANT" value="40" unit="ns"/>
<property name="YIELDRATIO" value="1"/>
<propertyvector name="FASTCOMPONENT" energyunit="eV">
<ve energy="2.95167" value="1"/>
</propertyvector>
<propertyvector name="ABSLENGTH" unit="m" energyunit="eV">
<ve energy="1.84" value="50"/>
<ve energy="4.08" value="50"/>
</propertyvector>
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="1.84" value="1.82"/>
<ve energy="4.08" value="1.82"/>
</propertyvector>
</propertiestable>
</material>
<material name="Air">
<propertiestable>
<propertyvector name="ABSLENGTH" unit="m" energyunit="eV">
<ve energy="1.84" value="50"/>
<ve energy="4.08" value="50"/>
</propertyvector>
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="1.84" value="1.000277"/>
<ve energy="4.08" value="1.000277"/>
</propertyvector>
</propertiestable>
</material>
<material name="Epoxy">
<propertiestable>
<propertyvector name="ABSLENGTH" unit="m" energyunit="eV">
<ve energy="1.84" value="50"/>
<ve energy="4.08" value="50"/>
</propertyvector>
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="1.84" value="1.5"/>
<ve energy="4.08" value="1.5"/>
</propertyvector>
</propertiestable>
</material>
</materials>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20131111/3a8f08b0/attachment-0001.html>
More information about the Gate-users
mailing list