[Gate-users] Error - Energy spectrum
DEGRELLE, Deborah
deborah.degrelle at veolia.com
Mon Jul 6 16:41:49 CEST 2020
Dear Gate users,
I am a beginner in Gate use and I have a problem (probably a
beginner problem) for making a gamma spectrum simulation with Gate. I work
with vGate9.0.
My simulation is the following : a water gamma source at 20 cm to a
germanium detector. The source emits gamma photons of 152Eu. I would like
to obtain a simply gamma spectrum (number of counts as a function of
energy).
I have the possibility to check my geometry and the homogeneity emission of
the source by running my macro with qt (Gate -- qt mac/filename.mac). But
when I leave the qt visualization, I have this following error :
*** Break *** segmentation violation
============================
There was a crash.
This is the entire stack trace of all threads:
============================
Thread 6 ...
...
WARNING - Attempt to delete the physical volume store while geometry closed
!
WARNING - Attempt to delete the logical volume store while geometry closed !
WARNING - Attempt to delete the solid store while geometry closed !
WARNING - Attempt to delete the region store while geometry closed !
When I run the macro without visualization, I have the same thing. It
probably comes from my macro, because I succeeded to run Gate example
before.
Maybe could you help me to see my mistakes ? Thank you in advance.
Déborah
Here is my macro :
# **********************************************
# ** GEANT4 par Gate 9.0
# ** Test : detecteur germanium et source gamma
# ** Par D. Degrelle
# ** 03/07/2020
# **********************************************
# **********************************************
# ** VERBOSITY VISUALISATION
# **********************************************
/control/execute mac/verbose.mac
/control/execute mac/visu.mac
# **********************************************
# ** GEOMETRIE
# **********************************************
/gate/geometry/setMaterialDatabase data/GateMaterials.db
# ** Le monde 1x1x1 m
/gate/world/geometry/setXLength 0.5 m
/gate/world/geometry/setYLength 0.5 m
/gate/world/geometry/setZLength 0.5 m
/gate/world/setMaterial Air
# ** Detecteur germanium
/gate/world/daughters/name detecteurGe
/gate/world/daughters/insert cylinder
/gate/detecteurGe/geometry/setRmax 1 cm
/gate/detecteurGe/geometry/setRmin 0 cm
/gate/detecteurGe/geometry/setHeight 2 cm
/gate/detecteurGe/setMaterial Germanium
/gate/detecteurGe/vis/setColor magenta
/gate/detecteurGe/vis/setVisible 1
/gate/detecteurGe/placement/setTranslation 0 0 0 m
# ** Cap
/gate/world/daughters/name Cap
/gate/world/daughters/insert cylinder
/gate/Cap/geometry/setRmax 1.7 cm
/gate/Cap/geometry/setRmin 1.5 cm
/gate/Cap/geometry/setHeight 8 cm
/gate/Cap/setMaterial Aluminium
/gate/Cap/vis/setColor grey
/gate/Cap/vis/setVisible 1
/gate/Cap/placement/setTranslation 0 0 -2.5 cm
# ** Endcap
/gate/world/daughters/name Endcap
/gate/world/daughters/insert cylinder
/gate/Endcap/geometry/setRmax 1.7 cm
/gate/Endcap/geometry/setRmin 0 cm
/gate/Endcap/geometry/setHeight 1 mm
/gate/Endcap/setMaterial Aluminium
/gate/Endcap/vis/setColor grey
/gate/Endcap/vis/setVisible 1
/gate/Endcap/placement/setTranslation 0 0 1.55 cm
# ** BottomCap
/gate/world/daughters/name BottomCap
/gate/world/daughters/insert cylinder
/gate/BottomCap/geometry/setRmax 1.7 cm
/gate/BottomCap/geometry/setRmin 0 cm
/gate/BottomCap/geometry/setHeight 1 mm
/gate/BottomCap/setMaterial Aluminium
/gate/BottomCap/vis/setColor grey
/gate/BottomCap/vis/setVisible 1
/gate/BottomCap/placement/setTranslation 0 0 -6.55 cm
# ** Holder
/gate/world/daughters/name Holder
/gate/world/daughters/insert cylinder
/gate/Holder/geometry/setRmax 1.3 cm
/gate/Holder/geometry/setRmin 1.1 cm
/gate/Holder/geometry/setHeight 4 cm
/gate/Holder/setMaterial Copper
/gate/Holder/vis/setColor yellow
/gate/Holder/vis/setVisible 1
/gate/Holder/placement/setTranslation 0 0 -1 cm
# ** Echantillon
/gate/world/daughters/name echantillon
/gate/world/daughters/insert box
/gate/echantillon/geometry/setXLength 2 cm
/gate/echantillon/geometry/setYLength 2 cm
/gate/echantillon/geometry/setZLength 2 cm
/gate/echantillon/placement/setTranslation 0 0 20 cm
/gate/echantillon/setMaterial Water
/gate/echantillon/vis/setVisible 1
/gate/echantillon/vis/setColor blue
# ***********************************************
# ** PHYSIQUE
# ***********************************************
/gate/physics/addPhysicsList emstandard
/gate/physics/Gamma/SetCutInRegion world 10 mm
/gate/physics/Electron/SetCutInRegion world 10 mm
/gate/physics/Positron/SetCutInRegion world 10 mm
/gate/physics/Gamma/SetCutInRegion echantillon 0.1 mm
/gate/physics/Electron/SetCutInRegion echantillon 0.1 mm
/gate/physics/Positron/SetCutInRegion echantillon 0.1 mm
/gate/physics/displayCuts
/gate/physics/addProcess PhotoElectric gamma
/gate/physics/processes/PhotoElectric/setModel StandardModel
/gate/physics/addProcess Compton gamma
/gate/physics/processes/Compton/setModel StandardModel
/gate/physics/addProcess GammaConversion
/gate/physics/processes/GammaConversion/setModel StandardModel
# ***********************************************
# ** ACTOR
# ***********************************************
/gate/actor/addActor EnergySpectrumActor Spectre
/gate/actor/Spectre/save output/Spectre.txt
/gate/actor/Spectre/attachTo detecteurGe
/gate/actor/Spectre/energySpectrum/setEmin 0 eV
/gate/actor/Spectre/energySpectrum/setEmax 1500 keV
/gate/actor/Spectre/energySpectrum/setNumberOfBins 1500
/gate/actor/Spectre/saveEveryNSeconds 60
/gate/actor/addActor SimulationStatisticActor stat
/gate/actor/stat/attachTo detecteurGe
/gate/actor/stat/save output/gamma-stat.txt
/gate/actor/stat/saveEveryNSeconds 60
# ***********************************************
# ** INITIALISATION
# ***********************************************
/gate/run/initialize
# ***********************************************
# ** SOURCE
# ***********************************************
/gate/source/addSource 152Eu
/gate/source/152Eu/gps/particle gamma
/gate/source/152Eu/setActivity 1000000 becquerel
/gate/source/152Eu/gps/energytype UserSpectrum
/gate/source/152Eu/gps/setSpectrumFile data/152EuSpectre.txt
/gate/source/152Eu/setIntensity 1
# emission isotrope
/gate/source/152Eu/gps/ang/type iso
/gate/source/152Eu/gps/ang/mintheta 0 deg
/gate/source/152Eu/gps/ang/maxtheta 180 deg
/gate/source/152Eu/gps/ang/minphi 0. deg
/gate/source/152Eu/gps/ang/maxphi 360. deg
/gate/source/152Eu/gps/pos/type Volume
/gate/source/152Eu/gps/pos/shape Para
/gate/source/152Eu/gps/pos/halfx 1 cm
/gate/source/152Eu/gps/pos/halfy 1 cm
/gate/source/152Eu/gps/pos/halfz 1 cm
/gate/source/152Eu/attachTo echantillon
/gate/source/152Eu/gps/pos/centre 0 0 0 cm
# /gate/source/152Eu/visualize 20 red 10
# ***********************************************
# ** START BEAMS
# ***********************************************
# JamesRandom Ranlux64 MersenneTwister
/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto
#/tracking/verbose 1
/gate/application/noGlobalOutput
/gate/application/setTotalNumberOfPrimaries 50
/gate/application/start
--
The information in this email and any associated files is confidential to
Veolia Water Technologies (SASU) and/or any affiliate thereof and may be
legally privileged. For the herein purposes, “affiliate” means any legal
entity, partnership, joint venture, equity, company, including in
particular any and all subsidiary which, directly or indirectly, controls
Veolia Water Technologies (SASU) and/or is under the control thereof and/or
is under the control of the ultimate parent company thereof, and “control”
means the ability to directly or indirectly, direct the affairs of a third
party by means of ownership, contract or otherwise. It may also contain
information that is subject to copyright or constitutes a trade secret. It
is intended solely for the named recipient. Access to this email by anyone
else is unauthorized.
If you are not the intended recipient, please note
that any use, disclosure, copying, distribution of this email or any action
taken or omitted to be taken in reliance on its prohibited.
Warning:
Although this email and any attachment thereto are believed to be free from
viruses, it is the responsibility of the recipient to ensure that they are
virus free. No responsibility whatsoever is accepted by Veolia for any loss
or damage arising from their receipt or opening.
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200706/52879bf6/attachment.html>
More information about the Gate-users
mailing list