<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
In case the attachment was automatically removed, here are the files:
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">MAIN.MAC:</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class=""><br class="">
</div>
<div class="">
<div class=""><font color="#669d34" class="">#<font face="Consolas" class=""><span style="font-style: normal;" class=""> MATERIAL DATABASE</span></font></font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/geometry/setMaterialDatabase ./GateMaterials.db</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># WORLD</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/geometry/setXLength 800. cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/geometry/setYLength 800. cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/geometry/setZLength 800. cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/setMaterial Vacuum</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/vis/forceWireframe</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># SYSTEM GEOMETRY</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># CT SCANNER</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/daughters/name CTscanner</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/daughters/insert box</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/placement/setTranslation 0.0 0.0 -230.5 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/geometry/setXLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/geometry/setYLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/geometry/setZLength 1.5 cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/setMaterial Vacuum</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># CT SCANNER -> MODULE</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/daughters/name module</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/CTscanner/daughters/insert box</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/module/geometry/setXLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/module/geometry/setYLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/module/geometry/setZLength 1.5 cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/module/setMaterial Vacuum</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># CT SCANNER -> MODULE -> CLUSTER</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/module/daughters/name cluster</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/module/daughters/insert box</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/cluster/geometry/setXLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/cluster/geometry/setYLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/cluster/geometry/setZLength 1.5 cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/cluster/setMaterial Vacuum</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># CT SCANNER -> MODULE -> CLUSTER -> PIXEL</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/cluster/daughters/name pixel</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/cluster/daughters/insert box</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/pixel/geometry/setXLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/pixel/geometry/setYLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/pixel/geometry/setZLength 1.5 cm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/pixel/setMaterial CsI</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># ATTACHING THE LEVELS TO THE SYSTEM</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/systems/CTscanner/module/attach module</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/systems/CTscanner/cluster_0/attach cluster</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/systems/CTscanner/pixel_0/attach pixel</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># Attach a sensitive detector:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/pixel/attachCrystalSD</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># PHASE SPACE ACTOR</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># First define its volume:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/daughters/name PhS_BeforePlane</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/daughters/insert box</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/PhS_BeforePlane/setMaterial Vacuum</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/PhS_BeforePlane/geometry/setXLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/PhS_BeforePlane/geometry/setYLength 400 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/PhS_BeforePlane/geometry/setZLength 1 nm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/PhS_BeforePlane/placement/setTranslation 0 0 -222 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># Add the phase space actor to the volume:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/actor/addActor PhaseSpaceActor PhS_b</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/actor/PhS_b/attachTo PhS_BeforePlane</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/actor/PhS_b/save
<span class="Apple-tab-span" style="white-space:pre"></span> ../output/detector.root</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># PHANTOM GEOMETRY</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/daughters/name testVolume</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/world/daughters/insert box</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/testVolume/geometry/setXLength 200 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/testVolume/geometry/setYLength 200 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/testVolume/geometry/setZLength 200 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/testVolume/setMaterial Water</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/testVolume/attachPhantomSD</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># PHYSICS</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/physics/addPhysicsList emstandard_opt4</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#/gate/physics/Gamma/SetCutInRegion pixel 10 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#/gate/physics/Electron/SetCutInRegion pixel 10 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#/gate/physics/Gamma/SetCutInRegion testVolume 0.001 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#/gate/physics/Electron/SetCutInRegion testVolume 0.001 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># INITIALISE SIMULATION</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/run/initialize</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># DETECTOR MODEL</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/digitizer/Singles/insert adder</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/digitizer/Singles/insert readout</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/digitizer/Singles/readout/setDepth 3</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># DEFINE SOURCE</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/addSource xraypoint</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/particle gamma</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/position 0. 0. 617 mm</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/ene/type Mono</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/ene/mono 120 keV</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/pos/type Point</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/ang/mintheta 0 deg</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/ang/maxtheta 0 deg</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/xraypoint/gps/ang/type iso</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/source/list</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/application/setTotalNumberOfPrimaries 100000</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># SPECIFY OUTPUT FORMAT</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/output/tree/enable</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/output/tree/addFileName ../output/0.root</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># Hits:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/output/tree/hits/enable</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># Singles:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/output/tree/addCollection Singles</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># Random engine</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/random/setEngineName MersenneTwister</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># Use a random seed:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/random/setEngineSeed 987654321</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># START ACQUISITION</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">#######################################################</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""># In case you want a parametrised macro:</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/application/setTimeSlice 1 s</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/application/setTimeStart 0 s</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/application/setTimeStop 1 s</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">/gate/application/startDAQ</font></div>
</div>
</blockquote>
<div class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">GATEMATERIALS.DB:</div>
<div class=""><br class="">
</div>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">[Elements]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">Hydrogen: S= H ; Z= 1. ; A= 1.01 g/mole</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">Oxygen: S= O ; Z= 8. ; A= 16.00 g/mole</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">Iodine:<span class="Apple-tab-span" style="white-space:pre">
</span> S= I ; Z= 53. ; A= 126.90 g/mole</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">Cesium: S= Cs ; Z= 55. ; A= 132.905 g/mole</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">[Materials]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">Vacuum: d=0.000001 mg/cm3 ; n=1</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>+el: name=Hydrogen ; n=1</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">Water: d=1.00 g/cm3; n=2 ; state=liquid</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>+el: name=Hydrogen ; n=2</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>+el: name=Oxygen; n=1</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class="">CsI: d=4.51 g/cm3 ; n=2 ; state=Solid</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>+el: name=Cesium ; n=1</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#669d34" face="Consolas" style="font-style: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>+el: name=Iodine ; n=1</font></div>
</div>
</div>
</blockquote>
<div class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">EVALUATION.PY</div>
<div class=""><br class="">
</div>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">import matplotlib.pyplot as plt</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">import numpy as np</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">import pandas</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">pandas.set_option('display.max_columns', None)</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">import uproot</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">import os</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># H I T S </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Load the hits registered by the crystalSD detector:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">rootfile = uproot.open("./Simulation/output/0.hits.root")</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">crystalSD = rootfile['tree'].arrays(filter_name=["*"], library='pd')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># For each particle, extract only the first interaction</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># with the crystalSD; this is done by checking when </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># the eventID changes in the array.</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># First, a boolean mask array is created...</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">temp = (crystalSD['eventID'][1:].to_numpy() - crystalSD['eventID'][:-1].to_numpy())>0</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">onlyFirstHitBoolean = np.zeros(temp.size + 1, dtype=bool)</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">onlyFirstHitBoolean[0] = 1</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">onlyFirstHitBoolean[1:] = temp</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># ...and then applied:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">crystalSD_onlyFirstHit = crystalSD.loc[onlyFirstHitBoolean,:]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">assert crystalSD_onlyFirstHit.shape[0] == len(set(crystalSD['eventID']))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Determine the number of photons hitting the detector:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfIncidentPhotons = len(set(crystalSD['eventID']))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Extract the number of events whose flags indicate that the </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># photon has undergone Compton or Rayleigh interaction or which </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># is a secondary:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfScatterAndSecondaries = np.sum( (crystalSD_onlyFirstHit['nPhantomCompton']>0) | (crystalSD_onlyFirstHit['nPhantomRayleigh']>0) | (crystalSD_onlyFirstHit['parentID']>0))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Extract the number of events which hit the detector off-centre:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfHitsOffCentre = crystalSD_onlyFirstHit[ (np.abs(crystalSD_onlyFirstHit['posX']) > 1E-4) | (np.abs(crystalSD_onlyFirstHit['posY']) > 1E-4) ].shape[0]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># P H A S E S P A C E A C T O R</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Load the result of the phase space actor in front of the </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># detector:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">rootfile = uproot.open("./Simulation/output/detector.root")</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">phs = rootfile['PhaseSpace'].arrays(filter_name="*", library='pd')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Extract only those photons that travel from the direction of </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># the source into the direciton of the detector; this way, </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># photons scattered in the detector and passing back through </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># the phase space actor in front of it are omitted:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">phs_posDir = phs[phs['dZ'] < 0]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Count the number of events that pass through the phase space </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># actor off-centre:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberPhaseSpaceOPffCentre = np.sum( ((np.abs(phs_posDir['X'])>1E-4) | (np.abs(phs_posDir['Y'])>1E-4)) )</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># P R I N T R E S U L T S</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">print("Number of photons incident on the detector: {:>6}".format(numberOfIncidentPhotons))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">print("Number of scattered particles and secondaries as registered by Gate: {:>6}".format(numberOfScatterAndSecondaries))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">print("Number of registered hits off-centre: {:>6}".format(numberOfHitsOffCentre))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">print("Number of events registered by the phase space actor off-centre: {:>6}".format(numberPhaseSpaceOPffCentre))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># PLOT RESULTS</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">##############################################################</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># The following sections hold the results obtained for </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># setting either a range cut for the detector pixels only</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># or for the water phantom only, and plots them.</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">#-----------------------#</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Range cut in detector</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">#-----------------------#</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">#Number of photons incident on the detector: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfIncidentPhotonsArray_DetectorRC = [13709, 13709, 13709, 13599, 13578, 13620]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of scattered particles and secondaries as registered by Gate: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfScatterAndSecondariesArray_DetectorRC = [9733, 9733, 9733, 2398, 2217, 2174]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of registered hits off-centre:</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfHitsOffCentreArray_DetectorRC = [9730, 9730, 9730, 9697, 9722, 9668]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of events registered by the phase space actor off-centre: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberPhaseSpaceOPffCentre_DetectorRC = [9788, 9788, 9788, 9750, 9773, 9733]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">### Plot</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">fig, ax = plt.subplots()</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">x = np.arange(len(numberOfIncidentPhotonsArray_DetectorRC))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberOfIncidentPhotonsArray_DetectorRC, marker='*', label='incident photons')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberOfScatterAndSecondariesArray_DetectorRC, marker='o', label='Gate: scatter & secondaries')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberOfHitsOffCentreArray_DetectorRC, marker='s', label='hits off-centre')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberPhaseSpaceOPffCentre_DetectorRC, marker='d', label='off-centre in phase-space')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.set_xlabel("Range cut [mm]")</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.set_ylabel("Number of events")</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.legend(loc='upper left', bbox_to_anchor=(1.0, 0.5))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">plt.xticks(x, rangeCutArray)</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># ax.set_ylim(13000, 14000)</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># plt.savefig("temp.png", dpi=300, bbox_inches='tight')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">plt.show()</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">#-----------------------#</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Range cut in phantom</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">#-----------------------#</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of photons incident on the detector: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfIncidentPhotonsArray_PhantomRC = [13709, 13709, 13709, 13550, 13503, 13568]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of scattered particles and secondaries as registered by Gate: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfScatterAndSecondariesArray_PhantomRC = [9733, 9733, 9733, 9689, 9426, 9482]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of registered hits off-centre: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberOfHitsOffCentreArray_PhantomRC = [9730, 9730, 9730, 9681, 9446, 9523]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># Number of events registered by the phase space actor off-centre: </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">numberPhaseSpaceOPffCentre_PhantomRC = [9788, 9788, 9788, 9742, 9504, 9595]</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">rangeCutArray = ['None', '10', '1', '0.1', '0.01', '0.001'] </font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">### Plot</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">fig, ax = plt.subplots()</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">x = np.arange(len(numberOfIncidentPhotonsArray_PhantomRC))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberOfIncidentPhotonsArray_PhantomRC, marker='*', label='incident photons')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberOfScatterAndSecondariesArray_PhantomRC, marker='o', label='Gate: scatter & secondaries')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberOfHitsOffCentreArray_PhantomRC, marker='s', label='hits off-centre')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.plot(x, numberPhaseSpaceOPffCentre_PhantomRC, marker='d', label='off-centre in phase-space')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.set_xlabel("Range cut [mm]")</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.set_ylabel("Number of events")</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">ax.legend(loc='upper left', bbox_to_anchor=(1.0, 0.5))</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">plt.xticks(x, rangeCutArray)</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># ax.set_ylim(9000, 10000)</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""># plt.savefig("temp.png", dpi=300, bbox_inches='tight')</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class=""><br class="">
</font></div>
</div>
</div>
<div class="">
<div class="">
<div class=""><font color="#4e7a27" face="Consolas" style="font-style: normal;" class="">plt.show()</font></div>
</div>
</div>
</blockquote>
<div class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Kind regards,</div>
<div class="">David Leibold</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 17 May2022, at 23:34, David Leibold <<a href="mailto:D.Leibold@tudelft.nl" class="">D.Leibold@tudelft.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<table border="1" class="">
<tbody class="">
<tr class="">
<td class="">*** E-MAIL SECURITY WARNING *** This e-mail contained one or several attachments which are not allowed as per the company's e-mail policies. Following files were removed: minimum_example.zip If you need these files, please arrange alternate means
of transfer with the sender. *** END OF SECURITY WARNING *** </td>
</tr>
</tbody>
</table>
</div>
<br class="">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">From:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">David Leibold <<a href="mailto:D.Leibold@tudelft.nl" class="">D.Leibold@tudelft.nl</a>><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">Subject:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">[Gate-users] Scatter dependent on range cut – bug?</b><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">Date:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">17 May 2022 at 23:34:06 CEST<br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">To:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">gate-users <<a href="mailto:gate-users@lists.opengatecollaboration.org" class="">gate-users@lists.opengatecollaboration.org</a>><br class="">
</span></div>
<br class="">
<br class="">
<div class="">
<div class="" style="word-wrap:break-word; line-break:after-white-space">Dear Gaters,
<div class=""><br class="">
</div>
<div class="">I am simulating a cone beam CT setup where I output the Hits / Singles registered in the detector, which I then split into primary and scatter contribution based on the
<font face="Consolas" class=""><span class="" style="font-style:normal">nPhantomCompton</span></font>,
<font face="Consolas" class=""><span class="" style="font-style:normal">nPhantomRayleigh</span></font> and
<font face="Consolas" class=""><span class="" style="font-style:normal">parentID</span></font> parameters. These indicate the number of Compton or Rayleigh scatter events in the phantom and whether a particle was created by the source or via creation of secondary
particles.</div>
<div class="">We noticed that the scatter-to-primary ratio in our simulation was far below the values reported in literature (more than a factor 10). I was able to show that for certain range cuts not every scattered photon exhibited a <font face="Consolas" class="">nPhantomCompton </font>or <font face="Consolas" class="">nPhantomRayleigh</font> value
that would have indicated that it was indeed scattered. In the following I will try to explain what I mean by that and which behaviour of the simulation I can’t explain. </div>
<div class=""><br class="">
</div>
<div class="">In the following figure you will see on the left the simulation setup:</div>
<div class="">
<ul class="">
<li class="">A monoenergetic source emitting a pencil beam of 120 keV photons,</li><li class="">A water cube serving as a phantom,</li><li class="">A phase space actor in front of a realistic (two-dimensional) detector,</li><li class="">And a CTdetector of a realistic material (CsI), to which a crystalSD detector is attached.</li></ul>
</div>
<div class=""><br class="">
</div>
<div class="">With the output of the crystalSD detector (Hits/Singles) and the phase space actor, one can simply plot the coordinates of the intersection point of the incident photons with the detector plane. Any photon that does not go through the centre axis
must then either have been scattered in the water phantom or be a secondary. (*)</div>
<div class="">Additionally, the crystalSD detector outputs the <font face="Consolas" class="">nPhantomCompton</font>, <font face="Consolas" class="">nPhantomRayleigh</font> and <font face="Consolas" class="">parentID</font> parameters, which I used initially
to separate primaries from scatter. </div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div class=""><span id="cid:9a7f76a7-3d0a-424c-8aa1-7949eb736772@tudelft.nl"><setup.png></span>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
<div class="">(*) Note: In the Hits dataset, I only evaluate the first entry for a given eventID, so scatter inside the detector does not influence this evaluation (I guess?). In the data of the phase space actor, only photons flying in the direction of the
detector are evaluated.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">In the following the range cut<b class=""> inside the detector</b> is now varied. I then evaluated:</div>
<div class="">
<ul class="">
<li class="">How many photons end up in the detector, which is evaluated by counting the number of unique eventIDs in the Hits dataset (label “incident photons”),</li><li class="">How many photons are flagged by Gate as scatter or as secondary particle, based on the <font face="Consolas" class="">nPhantomCompton</font>, <font face="Consolas" class="">nPhantomRayleigh</font> and <font face="Consolas" class="">parentID</font> parameters
(label “Gate: scatter&secondaries”),</li><li class="">How many photons are outside the centre axis, based on the their intersection with the phase space actor (label “off-centre in phase-space”), </li><li class="">and how many photons are outside the centre axis, based on their intersection with the realistic detector (i.e., using their coordinates as registered in the Hits output, label “hits off-centre").</li></ul>
<div class="">The following plot shows the results:</div>
</div>
<div class=""></div>
</div>
<div class=""><span id="cid:14b54afc-b31f-48fb-9659-a17b10f63102@tudelft.nl"><stp_d.png></span>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
<div class=""><br class="">
</div>
<div class="">As one can see, below a certain range cut the number of events flagged by Gate as scatter or secondaries (via the <font face="Consolas" class="">nPhantomCompton</font>, <font face="Consolas" class="">nPhantomRayleigh</font> and <font face="Consolas" class="">parentID</font> parameters)
drops considerably and deviates from the evaluation based on the number of photons that are off-centre. I have no explanation for this phenomenon.</div>
<div class=""><br class="">
</div>
<div class="">Now let’s zoom into the the number of incident photons: </div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div class=""><span id="cid:5501ee9b-b86a-4228-ab4e-09738f7a0c5c@tudelft.nl"><stp_d_ni.png></span>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
<div class="">Interestingly, the number of photons incident on the detector varies with the range cut, which to me is unexpected. Sure, the number of interactions inside the detector increases with decreasing range cut, but this should have no effect on the
number of incident photons.</div>
<div class=""><br class="">
</div>
<div class="">Here is a zoom into the number of off-axis photons:</div>
<div class=""></div>
</div>
<div class=""><span id="cid:23ee200c-e97d-46b5-9154-f3de77f74974@tudelft.nl"><stp_d_oa.png></span>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
<div class="">I don’t have an explanation why the phase space actor and the crystalSD have a slightly different number of off-axis photons, but this is at the moment not my main concern. Again, one can see that their number changes with decreasing range cut.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Last but not least, I kept the range cut in the detector at the default value and instead changed the range cut inside the phantom. Here is the result:</div>
<div class=""></div>
</div>
<div class=""><span id="cid:76e39550-b51b-4970-9e54-4ff33f64ac4e@tudelft.nl"><stp_p.png></span>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
<div class="">In this case, the three different ways to extract the number of scatter and primaries agree more or less. Again, one can clearly see a change in the number of total incident photons with smaller range cuts.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">So far, I am unable to explain the behaviour shown above, and I am not sure whether I did something wrong in my Gate simulation or whether this is a bug. Please find attached the Gate macros that I used to create this minimum example, and also
the Python script I used to evaluate the resulting data. FYI, I use Gate version 9.1, and I also observe this behaviour with Gate version 9.0.</div>
<div class="">Any help or suggestions would be greatly appreciated. If you think that this is a bug, then I am happy to submit a bug report on GitHub.</div>
<div class=""><br class="">
</div>
<div class="">Thanks a lot for your time in advance!</div>
<div class=""><br class="">
</div>
<div class="">Kind regards,</div>
<div class="">David Leibold</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
<div class=""><br class="">
</div>
</div>
</div>
_______________________________________________<br class="">
Gate-users mailing list<br class="">
<a href="mailto:Gate-users@lists.opengatecollaboration.org" class="">Gate-users@lists.opengatecollaboration.org</a><br class="">
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opengatecollaboration.org_mailman_listinfo_gate-2Dusers&d=DwIGaQ&c=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8&r=lfXR69GFfS7NT-Wp5HZqbtBDrbYoilDdmNEG7fKW7aM&m=u-88sQlFkb5QZWIFRFDGaf23kouGI_yHp1d_nyjk8ofTcTaowkzO2vXlFxwPJ6y1&s=goJiMnDgWKBlBQrrhCtVaHQH_jWiQXSi-qQI3yGY54M&e=
<br class="">
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>