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