<html><head></head><body><div class="ydp5da6b72byahoo-style-wrap" style="font-family:courier new, courier, monaco, monospace, sans-serif;font-size:13px;"><div><div dir="ltr" data-setdir="false">Hello Anes,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">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: <div><div># Source 1</div><div>/gate/source/addSource mySource_1</div></div><div><div><br></div></div></div><div><br></div><div dir="ltr" data-setdir="false">Regards,</div><div dir="ltr" data-setdir="false">Konstantinos</div><div class="ydp5da6b72bsignature"><div style="font-family:courier, monaco, monospace, sans-serif;font-size:13px;"><div style="color:rgb(0, 0, 0);font-family:Arial;font-size:16px;font-style:normal;font-weight:normal;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><span style="font-style:italic;">-----------------------------------------------------</span></div><span style="color:rgb(0, 0, 0);font-family:Arial;font-size:16px;font-weight:normal;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-style:italic;"> Konstantinos Chatzipapas<br> Medical Physicist, Ph.D.</span><span style="color:rgb(0, 0, 0);font-family:Arial;font-size:16px;font-weight:normal;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-style:italic;"><br></span><div style="color:rgb(0, 0, 0);font-family:Arial;font-size:16px;font-style:normal;font-weight:normal;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><div><span style="font-style:italic;"> <span style="font-weight:bold;">University of Patras</span></span></div><div><span style="font-style:italic;"><span style="font-weight:bold;"><br></span></span></div><div dir="ltr"><br></div></div></div></div></div><div><br></div>
</div><div id="yahoo_quoted_1241552928" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
Στις Τετάρτη, 22 Δεκεμβρίου 2021, 08:43:15 μ.μ. EET, ο χρήστης Anes Mohammed <anes.m.s.q@gmail.com> έγραψε:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv4962548900"><div dir="ltr">Dear Gate User's<br><div>when I
implementation of the attached cod</div><div><div>#==============================================================================================<br># Visualization<br>#==============================================================================================<br>/vis/open OGLSQt<br>/vis/viewer/set/background black<br>/vis/drawVolume<br>/vis/viewer/flush<br>/vis/viewer/set/viewpointThetaPhi 60 30<br>/vis/viewer/zoom 10<br>/tracking/storeTrajectory 1<br>/vis/scene/add/trajectories<br>/vis/scene/endOfEventAction accumulate -1<br>/vis/scene/add/axes<br>/gate/verbose Physic 0<br>/gate/verbose Cuts 0<br>/gate/verbose SD 0<br>/gate/verbose Actions 0<br>/gate/verbose Actor 0<br>/gate/verbose Step 0<br>/gate/verbose Error 1<br>/gate/verbose Warning 0<br>/gate/verbose Output 0<br>/gate/verbose Beam 0<br>/gate/verbose Volume 0<br>/gate/verbose Image 0<br>/gate/verbose Geometry 0<br>/gate/verbose Core 0<br><br>/run/verbose 0<br>/event/verbose 0<br>/tracking/verbose 0 <br><br><br>#==============================================================================================<br># Materials<br>#==============================================================================================<br><br>/gate/geometry/setMaterialDatabase data/GateMaterials.db<br><br>#==============================================================================================<br># Geometry (world)<br>#==============================================================================================<br># G E O M E T R Y<br>#####<br><br># World<br><br>/gate/world/geometry/setXLength 100 cm<br>/gate/world/geometry/setYLength 100 cm<br>/gate/world/geometry/setZLength 100 cm<br>/gate/world/vis/setColor red<br>/gate/world/vis/forceWireframe<br>/gate/world/describe<br># Scanner Head<br>/gate/world/daughters/name SPECThead<br>/gate/world/daughters/insert box<br>/gate/SPECThead/geometry/setXLength 7. cm<br>/gate/SPECThead/geometry/setYLength 21. cm<br>/gate/SPECThead/geometry/setZLength 30. cm<br>#Distance bettween SPECThead box##<br>/gate/SPECThead/placement/setTranslation 22.0 0. 0. cm<br>/gate/SPECThead/setMaterial Air<br><br>/gate/SPECThead/placement/setRotationAxis 0 0 1<br>/gate/SPECThead/placement/setRotationAngle 180 deg<br>/gate/SPECThead/vis/forceWireframe<br><br><br># Shielding<br>/gate/SPECThead/daughters/name shielding<br>/gate/SPECThead/daughters/insert box<br>/gate/shielding/geometry/setXLength 7. cm<br>/gate/shielding/geometry/setYLength 21. cm<br>/gate/shielding/geometry/setZLength 30. cm<br>/gate/shielding/placement/setTranslation 0. 0. 0. cm<br>/gate/shielding/setMaterial Lead<br>/gate/shielding/vis/setColor grey<br>/gate/shielding/vis/forceSolid<br># Collimator<br>/gate/SPECThead/daughters/name collimator<br>/gate/SPECThead/daughters/insert box<br>/gate/collimator/geometry/setXLength 3. cm<br>/gate/collimator/geometry/setYLength 19. cm<br>/gate/collimator/geometry/setZLength 28. cm<br>#the loction of collimator relative to y-axes##<br>/gate/collimator/placement/setTranslation -2. 0. 0. cm<br>/gate/collimator/setMaterial Lead<br>/gate/collimator/vis/setColor red<br>/gate/collimator/vis/forceWireframe<br>/gate/collimator/describe<br>/gate/collimator/daughters/name hole<br>/gate/collimator/daughters/insert hexagone<br>/gate/hole/geometry/setHeight 3. cm<br>/gate/hole/geometry/setRadius .01 cm<br>/gate/hole/placement/setRotationAxis 0 0 1<br>/gate/hole/placement/setRotationAngle 90 deg<br>/gate/hole/setMaterial Air<br>#<br># Repeat the hole in an array<br>##<br>/gate/hole/repeaters/insert cubicArray<br>/gate/hole/cubicArray/setRepeatNumberX 1<br>/gate/hole/cubicArray/setRepeatNumberY 52<br>/gate/hole/cubicArray/setRepeatNumberZ 44<br>/gate/hole/cubicArray/setRepeatVector 0. 0.36 0.624 cm<br>#<br># Repeat these holes in a linear<br>##<br>/gate/hole/repeaters/insert linear<br>/gate/hole/linear/setRepeatNumber 2<br>/gate/hole/linear/setRepeatVector 0. 0.18 0.312 cm<br><br><br># CRYSTAL<br>/gate/SPECThead/daughters/name crystal<br>/gate/SPECThead/daughters/insert box<br>/gate/crystal/geometry/setXLength 1. cm<br>/gate/crystal/geometry/setYLength 19. cm<br>/gate/crystal/geometry/setZLength 28. cm<br>/gate/crystal/placement/setTranslation 0. 0. 0. cm<br>/gate/crystal/setMaterial NaI<br>/gate/crystal/vis/setColor yellow<br><br># BACK-COMPARTMENT<br>/gate/SPECThead/daughters/name compartment<br>/gate/SPECThead/daughters/insert box<br>/gate/compartment/geometry/setXLength 2.5 cm<br>/gate/compartment/geometry/setYLength 19. cm<br>/gate/compartment/geometry/setZLength 28. cm<br>/gate/compartment/placement/setTranslation 1.75 0. 0. cm<br>/gate/compartment/setMaterial Glass<br>/gate/compartment/vis/setColor grey<br><br># TABLE<br>/gate/world/daughters/name table<br>/gate/world/daughters/insert box<br>/gate/table/geometry/setXLength 40 cm<br>/gate/table/geometry/setYLength 4. cm<br>/gate/table/geometry/setZLength 40. cm<br>/gate/table/placement/setRotationAxis 0 1 0<br>/gate/table/placement/setRotationAngle 90 deg<br>/gate/table/placement/setTranslation 0. -14.9 0. cm<br>/gate/table/setMaterial Polystyrene<br>/gate/table/vis/setColor white<br>/gate/table/vis/forceSolid<br><br># PHANTOM<br>/gate/world/daughters/name Phantom<br>/gate/world/daughters/insert box<br>/gate/Phantom/geometry/setXLength 30. cm<br>/gate/Phantom/geometry/setYLength 30. cm<br>/gate/Phantom/geometry/setZLength 30. cm<br>/gate/Phantom/placement/setTranslation 0. 0. 0. cm<br>/gate/Phantom/setMaterial Water<br>/gate/Phantom/vis/setColor blue<br>/gate/Phantom/vis/forceWireframe<br># S Y S T E M<br>######<br>/gate/systems/SPECThead/crystal/attach crystal<br>/gate/systems/SPECThead/describe<br># S E N S I T I V E D E T E C T O R S<br>/gate/crystal/attachCrystalSD<br><br># Phantom SD<br>/gate/Phantom/attachPhantomSD<br>/gate/table/attachPhantomSD<br>/gate/compartment/attachPhantomSD<br>/gate/shielding/attachPhantomSD<br>/gate/SPECThead/attachPhantomSD<br>/gate/collimator/attachPhantomSD<br><br># P H Y S I C S<br>#####<br>/gate/physics/addProcess PhotoElectric<br>/gate/physics/processes/PhotoElectric/setModel StandardModel<br><br>/gate/physics/addProcess Compton<br>/gate/physics/processes/Compton/setModel PenelopeModel<br><br>/gate/physics/addProcess RayleighScattering<br>/gate/physics/processes/RayleighScattering/setModel PenelopeModel<br><br>/gate/physics/addProcess ElectronIonisation<br>/gate/physics/processes/ElectronIonisation/setModel StandardModel e-<br><br>/gate/physics/addProcess Bremsstrahlung<br>/gate/physics/processes/Bremsstrahlung/setModel StandardModel e-<br><br>/gate/physics/addProcess MultipleScattering e-<br><br>/gate/physics/processList Enabled<br>/gate/physics/processList Initialized<br><br># C U T S<br>#####<br>/gate/physics/Gamma/SetCutInRegion SPECThead 0.1 cm<br>/gate/physics/Electron/SetCutInRegion SPECThead 1.0 cm<br># Source 1<br>/gate/source/addSource mySource_1<br>/gate/source/mySource_1/gps/type Volume<br>/gate/source/mySource_1/gps/shape Cylinder<br>/gate/source/mySource_1/gps/radius 0.5 mm<br>/gate/source/mySource_1/gps/halfz 100 mm<br>/gate/source/mySource_1/gps/centre 0. 0. 0. cm<br>/gate/source/mySource_1/gps/particle gamma<br>/gate/source/mySource_1/gps/energy 140. keV<br><br># 1 MBq<br>#/gate/source/mySource_1/setActivity 1000000 Bq<br>/gate/source/mySource_1/setActivity 1 Bq<br># Emission angle: isotropic<br>/gate/source/mySource_1/gps/angtype iso<br>/gate/source/list<br>#====================================================<br>#DATA OUTPUT<br>#===================================================<br>/gate/output/allowNoOutput<br><br><br>#=====================================================<br># START BEAMS<br>#=====================================================<br><br><br>/gate/random/setEngineName MersenneTwister<br>/gate/random/setEngineSeed auto<br>#/gate/application/setTotalNumberOfPrimaries 100000<br>/gate/application/start<br><br><br><br><br>#==============================================================================================<br># Initialisation<br>#==============================================================================================<br><br>/gate/run/initialize<br>#==============================================================================================<br># Main program<br>#==============================================================================================<br><br>#/gate/output/allowNoOutput<br><br>/gate/application/setTotalNumberOfPrimaries 1<br>/gate/application/start</div><div><br></div><div>This error appear for me<br>***** Illegal application state </gate/source/addSource mySource_1> *****<br>***** Batch is interrupted!! *****</div></div><div><br></div><div>thanks for your help<br></div></div>
</div>_______________________________________________<br>Gate-users mailing list<br><a ymailto="mailto:Gate-users@lists.opengatecollaboration.org" href="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.opengatecollaboration.org</a><br><a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></div>
</div>
</div></body></html>