<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Xinjie,<div class=""><br class=""></div><div class="">Thank you very much for reply!</div><div class=""><br class=""></div><div class="">I didn't think the rest of macro file was important, but maybe I am missing something. I any case I am pasting it here at the bottom of the email (*).</div><div class=""><br class=""></div><div class="">Here is the part of the manual that talks about the levels. It is part of the chapter called "Defining a system" (<a href="https://opengate.readthedocs.io/en/latest/defining_a_system_scanner_ct_pet_spect_optical.html" class="">https://opengate.readthedocs.io/en/latest/defining_a_system_scanner_ct_pet_spect_optical.html</a>)</div><div class="">---------------------</div><div class=""><div class="section" id="geometry-constraints"><p style="-webkit-hyphens: auto; line-height: 1.4em;" class="">Each <em class="">level</em> has to be assigned to a physical volume of the geometry. A level volume has to be fully enclosed in the upper level volume. The number of levels has to be set and must conform to the specifications listed in <a class="internal reference" href="https://opengate.readthedocs.io/en/latest/defining_a_system_scanner_ct_pet_spect_optical.html#system-tab" style="color: rgb(0, 75, 107); text-decoration: none; border-bottom-style: none;">Table 1.1</a>. The numbering of different sensitive volumes is completely set by the choice of the system and conforms to a specific output format. The maximum number of components in each level depends on the output format since it can be limited by the number of bits used for the numbering of the crystals. See <a class="internal reference" href="https://opengate.readthedocs.io/en/latest/data_output_management.html#data-output-label" style="color: rgb(0, 75, 107); text-decoration: none; border-bottom-style: none;">Data output</a> for further details.</p></div><div class="section" id="constraints-related-to-the-simulation-of-the-daq-electronics"></div>
<div>--------------------------</div><div>I think what the passage above wants to say is: If you have a level2 then you should have a level1 to contain it, but not vice versa.  However, I am not sure that my interpretation is correct. </div><div><br class=""></div><div>Anyway, I am more concerned with the multiple volumeIDs that I get in my output. I have no idea what they signify and a search of the Manual doesn't lead to anything useful.</div><div><br class=""></div><div>I am happy to provide more information or clarification to my questions if needed.  </div><div><br class=""></div><div>Cheers,</div><div><br class=""></div><div>Dmitry</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><blockquote type="cite" class=""><div class="">On 4 Mar 2021, at 17:42, Xinjie Cao <<a href="mailto:xinjie.cao@stonybrook.edu" class="">xinjie.cao@stonybrook.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Dmitry,<div class=""><br class=""></div><div class="">Could you share your full geometry configuration and physics list setting? That will be easier for all Gaters to see what they could do to help.</div><div class=""><br class=""></div><div class="">And for your following questions, for example, question 5. It would be better to snapshot the part of the GATE manual you described in your question so we could know what exactly you talked about and help you.</div><div class=""><br class=""></div><div class="">Hope this helps!</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Xinjie</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at 8:41 AM Dmitry Hits <<a href="mailto:dmitry.hits@phys.ethz.ch" class="">dmitry.hits@phys.ethz.ch</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">Dear Gate Users,<div class=""><br class=""></div><div class="">I am trying to understand the content of the ROOT file. </div><div class="">I have the following lines that are meant to specify what will be stored in it.</div><div class=""><br class=""></div><div class=""><pre style="background-color:rgb(255,255,255);color:rgb(74,92,110);font-family:"JetBrains Mono",monospace;font-size:9.8pt" class="">#==================================================<br class=""># OUTPUT<br class="">#==================================================<br class="">/gate/output/root/enable<br class="">/gate/output/root/setFileName TrackerHits<br class="">/gate/output/root/setRootHitFlag            1<br class="">/gate/output/root/setRootSinglesFlag        0<br class="">#/gate/output/root/setRootCoincidencesFlag   0<br class="">/gate/output/root/setRootNtupleFlag         0<br class="">/gate/output/root/setRootOpticalFlag        0<br class=""></pre><div class="">I commented out the CoincidencesFlag because it gives me an error.</div></div><div class=""><br class=""></div><div class="">My goal is to store "Hits" produced in a silicon sensor (see definition below).</div><div class=""><br class=""></div><div class=""><pre style="background-color:rgb(255,255,255);color:rgb(74,92,110);font-family:"JetBrains Mono",monospace;font-size:9.8pt" class=""><pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt" class="">#system<br class="">/gate/world/daughters/name              scanner<br class="">/gate/world/daughters/insert            box<br class="">/gate/scanner/geometry/setXLength      20 cm<br class="">/gate/scanner/geometry/setYLength      1 mm<br class="">/gate/scanner/geometry/setZLength      20 cm<br class="">/gate/scanner/placement/setTranslation 0.0 0.0 0.0 cm<br class="">/gate/scanner/setMaterial Air</pre></pre><pre style="background-color:rgb(255,255,255);color:rgb(74,92,110);font-family:"JetBrains Mono",monospace;font-size:9.8pt" class="">#sensor<br class="">/gate/scanner/daughters/name sensor1<br class="">/gate/scanner/daughters/insert box<br class="">/gate/sensor1/geometry/setXLength      20 cm<br class="">/gate/sensor1/geometry/setYLength      0.174 mm<br class="">/gate/sensor1/geometry/setZLength      20 cm<br class="">/gate/sensor1/setMaterial Silicon<br class="">/gate/sensor1/placement/setTranslation 0.0 0.0 0.0 cm<br class="">/gate/systems/scanner/level1/attach sensor1<br class="">/gate/sensor1/attachCrystalSD</pre><div class="">When I open my file with uproot I see the following objects inside:</div></div><div class=""><pre class="">['Hits;12',
 'Hits;11',
 'latest_event_ID;1',
 'total_nb_primaries;1',
 'pet_data;1',
 'OpticalData;1']</pre><div class="">Here are my questions:</div></div><div class=""><div class=""><span style="" class="">1. In the "Hits" tree, for each entry (event), I get 10 subentries (</span><font class="">sub-events) (see below). Each subentry has identical info with exception of the volumeID. The volumeID have values 0, 3 and -1.</font></div><div class=""><font class="">Does someone know:</font></div><div class=""><font class=""><span style="white-space:pre-wrap" class="">    </span>- Why  there are so many subentries? </font></div><div class=""><font class=""><span style="white-space:pre-wrap" class="">   </span>- What  is the meaning of the volumeID? I have only one sensor, shouldn't that mean only one volume?</font></div></div><div class="">2. Why is there two "Hits" trees? Comparing  them tells  me that  they are identical.</div><div class="">3. Why the cycle numbers of the trees have such high numbers? (12 and  11)  Are they re-written  many times? What determines the cycle numbers?</div><div class="">4. Even though I set <span style="color:rgb(74,92,110);font-family:"JetBrains Mono",monospace;font-size:9.8pt;background-color:rgb(255,255,255)" class="">setRootOpticalFlag        0</span><span style="" class=""> </span><span style="" class="">I</span><span style="" class=""> still get OpticalData tree, why is that?</span></div><div class=""><font class="">5. One more thing I failed to understand after reading the manual. What is the meaning of the "level" in relation to the sensor? I randomly used "level1" but I am not sure if that was a correct choice. </font></div><div class=""><font class=""><br class=""></font></div><div class=""><table border="1" class=""><thead class=""><tr style="text-align:right" class=""><th class=""></th>
      <th class=""></th>
      <th class="">PDGEncoding</th>
      <th class="">trackID</th>
      <th class="">parentID</th>
      <th class="">trackLocalTime</th>
      <th class="">time</th>
      <th class="">edep</th>
      <th class="">stepLength</th>
      <th class="">trackLength</th>
      <th class="">posX</th>
      <th class="">posY</th>
      <th class="">...</th>
      <th class="">axialPos</th>
      <th class="">rotationAngle</th>
      <th class="">volumeID</th>
      <th class="">processName</th>
      <th class="">comptVolName</th>
      <th class="">RayleighVolName</th>
      <th class="">septalNb</th>
      <th class="">sourceType</th>
      <th class="">decayType</th>
      <th class="">gammaType</th>
    </tr>
    <tr class="">
      <th class="">entry</th>
      <th class="">subentry</th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
      <th class=""></th>
    </tr>
  </thead>
  <tbody class="">
    <tr class="">
      <th rowspan="5" valign="top" class="">0</th>
      <th class="">0</th>
      <td class="">2212</td>
      <td class="">1</td>
      <td class="">0</td>
      <td class="">8.399597e-10</td>
      <td class="">8.399597e-10</td>
      <td class="">0.0655</td>
      <td class="">0.174008</td>
      <td class="">250.097992</td>
      <td class="">-3.211607</td>
      <td class="">-0.087</td>
      <td class="">...</td>
      <td class="">0.0</td>
      <td class="">0.0</td>
      <td class="">0</td>
      <td class="">Transportation</td>
      <td class="">NULL</td>
      <td class="">NULL</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
    </tr>
    <tr class="">
      <th class="">1</th>
      <td class="">2212</td>
      <td class="">1</td>
      <td class="">0</td>
      <td class="">8.399597e-10</td>
      <td class="">8.399597e-10</td>
      <td class="">0.0655</td>
      <td class="">0.174008</td>
      <td class="">250.097992</td>
      <td class="">-3.211607</td>
      <td class="">-0.087</td>
      <td class="">...</td>
      <td class="">0.0</td>
      <td class="">0.0</td>
      <td class="">3</td>
      <td class="">Transportation</td>
      <td class="">NULL</td>
      <td class="">NULL</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
    </tr>
    <tr class="">
      <th class="">2</th>
      <td class="">2212</td>
      <td class="">1</td>
      <td class="">0</td>
      <td class="">8.399597e-10</td>
      <td class="">8.399597e-10</td>
      <td class="">0.0655</td>
      <td class="">0.174008</td>
      <td class="">250.097992</td>
      <td class="">-3.211607</td>
      <td class="">-0.087</td>
      <td class="">...</td>
      <td class="">0.0</td>
      <td class="">0.0</td>
      <td class="">0</td>
      <td class="">Transportation</td>
      <td class="">NULL</td>
      <td class="">NULL</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
    </tr>
    <tr class="">
      <th class="">3</th>
      <td class="">2212</td>
      <td class="">1</td>
      <td class="">0</td>
      <td class="">8.399597e-10</td>
      <td class="">8.399597e-10</td>
      <td class="">0.0655</td>
      <td class="">0.174008</td>
      <td class="">250.097992</td>
      <td class="">-3.211607</td>
      <td class="">-0.087</td>
      <td class="">...</td>
      <td class="">0.0</td>
      <td class="">0.0</td>
      <td class="">-1</td>
      <td class="">Transportation</td>
      <td class="">NULL</td>
      <td class="">NULL</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
    </tr>
    <tr class="">
      <th class="">4</th>
      <td class="">2212</td>
      <td class="">1</td>
      <td class="">0</td>
      <td class="">8.399597e-10</td>
      <td class="">8.399597e-10</td>
      <td class="">0.0655</td>
      <td class="">0.174008</td>
      <td class="">250.097992</td>
      <td class="">-3.211607</td>
      <td class="">-0.087</td>
      <td class="">...</td>
      <td class="">0.0</td>
      <td class="">0.0</td>
      <td class="">-1</td>
      <td class="">Transportation</td>
      <td class="">NULL</td>
      <td class="">NULL</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td>
      <td class="">0</td></tr></tbody></table><div class=""><br class=""></div></div><div class=""><br class=""></div><div class="">Sorry for the long email.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Dmitry</div><div class=""><br class=""></div></div><br class=""></blockquote></div>
</div></blockquote><div><br class=""></div>(*)<br class=""><pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'JetBrains Mono',monospace;font-size:9.8pt;" class="">#=====================================================<br class=""># GEOMETRY<br class="">#=====================================================<br class=""><br class="">/gate/geometry/setMaterialDatabase data/GateMaterials.db<br class=""><br class=""># World<br class="">/gate/world/geometry/setXLength 50 cm<br class="">/gate/world/geometry/setYLength 50 cm<br class="">/gate/world/geometry/setZLength 50 cm<br class="">/gate/world/setMaterial Air<br class=""><br class=""><br class=""># Boxes<br class="">/gate/world/daughters/name              box0<br class="">/gate/world/daughters/insert            box<br class="">/gate/box0/geometry/setXLength      20 cm<br class="">/gate/box0/geometry/setYLength      2 cm<br class="">/gate/box0/geometry/setZLength      20 cm<br class="">/gate/box0/placement/setTranslation 0.0 10.0 0.0 cm<br class="">/gate/box0/setMaterial Air<br class="">/gate/box0/vis/setVisible 1<br class="">/gate/box0/vis/setColor cyan<br class=""><br class="">/gate/world/daughters/name              box1<br class="">/gate/world/daughters/insert            box<br class="">/gate/box1/geometry/setXLength      20 cm<br class="">/gate/box1/geometry/setYLength      2 cm<br class="">/gate/box1/geometry/setZLength      20 cm<br class="">/gate/box1/placement/setTranslation 0.0 8.0 0.0 cm<br class="">/gate/box1/setMaterial Air<br class="">/gate/box1/vis/setVisible 1<br class="">/gate/box1/vis/setColor red<br class=""><br class="">/gate/world/daughters/name              box2<br class="">/gate/world/daughters/insert            box<br class="">/gate/box2/geometry/setXLength      20 cm<br class="">/gate/box2/geometry/setYLength      2 cm<br class="">/gate/box2/geometry/setZLength      20 cm<br class="">/gate/box2/placement/setTranslation 0.0 6.0 0.0 cm<br class="">/gate/box2/setMaterial Air<br class="">/gate/box2/vis/setVisible 1<br class="">/gate/box2/vis/setColor blue<br class=""><br class="">#system<br class="">/gate/world/daughters/name              scanner<br class="">/gate/world/daughters/insert            box<br class="">/gate/scanner/geometry/setXLength      20 cm<br class="">/gate/scanner/geometry/setYLength      1 mm<br class="">/gate/scanner/geometry/setZLength      20 cm<br class="">/gate/scanner/placement/setTranslation 0.0 0.0 0.0 cm<br class="">/gate/scanner/setMaterial Air<br class="">/gate/scanner/vis/setVisible 1<br class="">/gate/scanner/vis/setColor cyan<br class=""><br class="">#sensor<br class="">/gate/scanner/daughters/name sensor1<br class="">/gate/scanner/daughters/insert box<br class="">/gate/sensor1/geometry/setXLength      20 cm<br class="">/gate/sensor1/geometry/setYLength      0.174 mm<br class="">/gate/sensor1/geometry/setZLength      20 cm<br class="">/gate/sensor1/setMaterial Silicon<br class="">/gate/sensor1/placement/setTranslation 0.0 0.0 0.0 cm<br class="">/gate/sensor1/vis/setVisible 1<br class="">/gate/sensor1/vis/setColor yellow<br class="">/gate/systems/scanner/level1/attach sensor1<br class="">/gate/sensor1/attachCrystalSD<br class=""><br class=""><br class=""><br class=""># /gate/geometry/setIonisationPotential Water 75 eV<br class=""># /gate/geometry/setIonisationPotential Air 85.7 eV<br class=""><br class=""><br class=""><br class="">#=====================================================<br class=""># PHYSICS<br class="">#=====================================================<br class=""><br class="">/gate/physics/addPhysicsList QGSP_BERT_EMV<br class=""><br class="">/gate/physics/Gamma/SetCutInRegion      world 1 mm<br class="">/gate/physics/Electron/SetCutInRegion   world 1 mm<br class="">/gate/physics/Positron/SetCutInRegion   world 1 mm<br class=""><br class="">/gate/physics/Gamma/SetCutInRegion      box0 0.1 mm<br class="">/gate/physics/Electron/SetCutInRegion   box0 0.1 mm<br class="">/gate/physics/Positron/SetCutInRegion   box0 0.1 mm<br class=""><br class="">/gate/physics/Gamma/SetCutInRegion      box1 0.1 mm<br class="">/gate/physics/Electron/SetCutInRegion   box1 0.1 mm<br class="">/gate/physics/Positron/SetCutInRegion   box1 0.1 mm<br class=""><br class="">/gate/physics/Gamma/SetCutInRegion      box2 0.1 mm<br class="">/gate/physics/Electron/SetCutInRegion   box2 0.1 mm<br class="">/gate/physics/Positron/SetCutInRegion   box2 0.1 mm<br class=""><br class="">/gate/physics/Gamma/SetCutInRegion      scanner 0.1 mm<br class="">/gate/physics/Electron/SetCutInRegion   scanner 0.1 mm<br class="">/gate/physics/Positron/SetCutInRegion   scanner 0.1 mm<br class=""><br class="">/gate/physics/SetMaxStepSizeInRegion world 1 mm<br class="">/gate/physics/ActivateStepLimiter proton<br class="">/gate/physics/ActivateStepLimiter deuteron<br class="">/gate/physics/ActivateStepLimiter triton<br class="">/gate/physics/ActivateStepLimiter alpha<br class="">/gate/physics/ActivateStepLimiter GenericIon<br class=""><br class="">/gate/physics/displayCuts<br class=""><br class="">#/gate/physics/addProcess LowEnergyHadronIonisation<br class="">/gate/physics/addProcess HadronIonisation proton<br class=""><br class="">#================================================================<br class="">#     ACTORS<br class="">#================================================================<br class=""><br class=""><br class="">/gate/actor/addActor ProtonNuclearInformationActor myNuclearInfoActor<br class="">/gate/actor/myNuclearInfoActor/attachTo            world<br class=""><br class="">/gate/actor/addActor PhaseSpaceActor         tracker0<br class="">/gate/actor/tracker0/save                     tracker0.root<br class="">/gate/actor/tracker0/attachTo                 box0<br class="">/gate/actor/tracker0/enableProductionProcess  false<br class="">#/gate/actor/tracker0/useVolumeFrame           true<br class="">/gate/actor/tracker0/storeOutgoingParticles true<br class="">/gate/actor/tracker0/enableNuclearFlag          true<br class=""><br class="">/gate/actor/addActor PhaseSpaceActor         tracker1<br class="">/gate/actor/tracker1/save                     tracker1.root<br class="">/gate/actor/tracker1/attachTo                 box1<br class="">/gate/actor/tracker1/enableNuclearFlag          true<br class="">/gate/actor/tracker1/enableProductionProcess  false<br class="">#/gate/actor/tracker1/useVolumeFrame           true<br class="">/gate/actor/tracker1/storeOutgoingParticles true<br class=""><br class=""><br class="">/gate/actor/addActor PhaseSpaceActor         tracker2<br class="">/gate/actor/tracker2/save                     tracker2.root<br class="">/gate/actor/tracker2/attachTo                 box2<br class="">/gate/actor/tracker2/enableNuclearFlag          true<br class="">/gate/actor/tracker2/enableProductionProcess  false<br class="">#/gate/actor/tracker2/useVolumeFrame           true<br class="">/gate/actor/tracker2/storeOutgoingParticles true<br class=""><br class="">/gate/actor/addActor PhaseSpaceActor         tracker3<br class="">/gate/actor/tracker3/save                     tracker3.root<br class="">/gate/actor/tracker3/attachTo                 sensor1<br class="">/gate/actor/tracker3/enableNuclearFlag          true<br class="">/gate/actor/tracker3/enableProductionProcess  false<br class="">#/gate/actor/tracker3/useVolumeFrame           true<br class="">/gate/actor/tracker3/storeOutgoingParticles true<br class="">#==================================================<br class=""># OUTPUT<br class="">#==================================================<br class="">/gate/output/root/enable<br class="">/gate/output/root/setFileName TrackerHits<br class="">/gate/output/root/setRootHitFlag            1<br class="">/gate/output/root/setRootSinglesFlag        0<br class="">#/gate/output/root/setRootCoincidencesFlag   0<br class="">/gate/output/root/setRootNtupleFlag         0<br class="">/gate/output/root/setRootOpticalFlag        0<br class=""><br class="">#=====================================================<br class=""># INITIALISATION<br class="">#=====================================================<br class=""><br class="">/gate/run/initialize<br class=""># Enable the following lines to display available and enabled processes<br class=""># /gate/physics/processList Available<br class=""># /gate/physics/processList Enabled<br class=""><br class="">#=====================================================<br class=""># BEAMS<br class="">#=====================================================<br class="">/gate/source/addSource PBS PencilBeam<br class="">/gate/source/PBS/setParticleType proton<br class="">/gate/source/PBS/setEnergy 7116 MeV<br class="">/gate/source/PBS/setSigmaEnergy 1.0 MeV<br class="">/gate/source/PBS/setPosition 0 250 0 mm<br class="">/gate/source/PBS/setSigmaX 2 mm<br class="">/gate/source/PBS/setSigmaY 2 mm<br class="">/gate/source/PBS/setSigmaTheta 3 mrad<br class="">/gate/source/PBS/setSigmaPhi 3 mrad<br class="">/gate/source/PBS/setEllipseXThetaEmittance 15 mm*mrad<br class="">#/gate/source/PBS/setEllipseXThetaRotationNorm negative<br class="">/gate/source/PBS/setEllipseYPhiEmittance 15 mm*mrad<br class="">/gate/source/PBS/setEllipseYPhiRotationNorm negative<br class="">/gate/source/PBS/setRotationAxis 1 0 0<br class="">/gate/source/PBS/setRotationAngle 90 deg<br class="">/gate/application/setTotalNumberOfPrimaries 10000<br class=""><br class="">#=====================================================<br class=""># VISUALISATION<br class="">#=====================================================<br class=""><br class="">/control/execute mac/visu.mac<br class=""><br class="">#=====================================================<br class=""># START BEAMS<br class="">#=====================================================<br class=""><br class=""># JamesRandom Ranlux64 MersenneTwister<br class="">/gate/random/setEngineName MersenneTwister<br class="">/gate/random/setEngineSeed 123456<br class=""><br class=""># /gate/random/verbose 1<br class=""># /gate/source/verbose 0<br class=""><br class=""># to check Steplimiter<br class="">#/tracking/verbose 1<br class=""><br class="">#/gate/application/noGlobalOutput<br class="">#/gate/application/setTotalNumberOfPrimaries 200<br class="">#===============================================<br class=""># OUTPUT SETTINGS<br class="">#===============================================<br class=""><br class=""><br class=""><br class=""><br class="">/gate/application/start<br class=""><br class="">exit</pre><div class=""><br class=""></div></div><br class=""></div></body></html>