<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This policy « TakeEnergyWinner » works on the crystal level component.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">For details, you can check the code :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Source/digits_hist/src/GateReadout.cc<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Line 64 -> 103<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Seb<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Gate-users <gate-users-bounces@lists.opengatecollaboration.org>
<b>De la part de</b> Kutalmis Akpinar<br>
<b>Envoyé :</b> lundi 18 février 2019 03:59<br>
<b>À :</b> gate-users@lists.opengatecollaboration.org<br>
<b>Objet :</b> [Gate-users] SetDepth on TakeEnergyCentroid<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Calibri",sans-serif;color:black">Dear Gate users;<br>
<br>
I am simulating a PET system. I am trying to use "TakeEnergyCentroid" policy on digitizers. I am having difficulty to set the depth since the program crashes.<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">In manuel, it says: “If the energy centroid policy is used, the depth is forced to be at the level just above the crystal level, whatever the system used.”<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">This is how my levels are (Please see the "describe" output as below.):<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">cylindricalPET (level 0)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">rsector (level 1)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">submodule (level 3)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">crystal (level 4)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">lyso (level 5)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">I also intend to use level 3, submodule, which is just above the crystal level. According to document, this should be by default. This should happen when I remove the line:<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">/gate/digitizer/Singles/readout/setDepth 3
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">However, it crashes if I remove setDepth. (Please see the "Crash Report" as below)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">If I put the line and set it to 3, it also crashes the same way.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">It does work when I set it to 4 or 5 though, but this is not what is intended. I also found this similar case from 2015, they mentioned as possible bug:
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><a href="http://lists.opengatecollaboration.org/pipermail/gate-users/2015-June/008490.html" target="_blank" id="LPlnk375465">http://lists.opengatecollaboration.org/pipermail/gate-users/2015-June/008490.html</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">The way that TakeEnergyCentroid works with setDepths is inconsistent with the document. I don't know the cause of the crash. When I simulate it with setDepth 4 or 5, is it performing
 what document describes? If it bypasses setDepth as described, why it does not work with setDepth=3, which should be the level that it is working?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Is this a known problem? Is there a solution to it? If there is a bug, I can help you debug or re-create it as well. I am using Gate 8.1.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Thank you,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Kutalmis Akpinar<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">University of Central Florida, Computer Science, PhD candidate<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">*********************** This is my describe output **********************************<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">==========================<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">GATE object:        'systems/cylindricalPET'<br>
Components:<br>
<br>
GATE object:        'systems/cylindricalPET/base'<br>
Attached to volume: cylindricalPET<br>
Nb of children:       1<br>
<br>
    GATE object:        'systems/cylindricalPET/rsector'<br>
    Attached to volume: cpi_module<br>
    Nb of children:       1<br>
<br>
        GATE object:        'systems/cylindricalPET/module'<br>
        Attached to volume: ---<br>
        Nb of children:       1<br>
<br>
            GATE object:        'systems/cylindricalPET/submodule'<br>
            Attached to volume: cpi_block<br>
            Nb of children:       1<br>
<br>
                GATE object:        'systems/cylindricalPET/crystal'<br>
                Attached to volume: cpi_crystal<br>
                Nb of children:       4<br>
<br>
                    GATE object:        'systems/cylindricalPET/layer0'<br>
                    Attached to volume: cpi_lyso<br>
                    Nb of children:       0<br>
<br>
                    GATE object:        'systems/cylindricalPET/layer1'<br>
                    Attached to volume: ---<br>
                    Nb of children:       0<br>
<br>
                    GATE object:        'systems/cylindricalPET/layer2'<br>
                    Attached to volume: ---<br>
                    Nb of children:       0<br>
<br>
                    GATE object:        'systems/cylindricalPET/layer3'<br>
                    Attached to volume: ---<br>
                    Nb of children:       0<br>
geometrical design type: 1<br>
ring diameter: 83.2 cm <br>
rsector axial pitch: 0 fm <br>
rsector azimuthal pitch: 8.18182 degree<br>
rsector tangential size: 5.674 cm <br>
rsector axial size: 17.114 cm <br>
module axial size: 17.114 cm <br>
module tangential size: 5.674 cm <br>
module axial pitch: 0 fm <br>
module tangential pitch: 0 fm <br>
submodule axial size: 5.674 cm <br>
submodule tangential size: 5.674 cm <br>
submodule axial pitch: 5.72 cm <br>
submodule tangential pitch: 0 fm <br>
crystal radial size: 1.5 cm <br>
crystal axial size: 4 mm <br>
crystal tangential size: 4 mm <br>
crystal axial pitch: 4.05692 mm <br>
crystal tangential pitch: 4.05692 mm <br>
layer0 radial size: 1.5 cm <br>
in layer0 interaction length: 7.5 mm <br>
Axial nb of rsectors: 1<br>
Azimuthal nb of rsectors: 44<br>
Axial nb of modules: 1<br>
Tangential nb of modules: 1<br>
Axial nb of submodules: 3<br>
Tangential nb of submodules: 1<br>
Axial nb of crystals: 14<br>
Tangential nb of crystals: 14<br>
Radial nb of layers: 1<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">==================================<br>
<br>
<br>
<br>
************************************Crash Report:***********************************<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><br>
 *** Break *** segmentation violation<br>
[Acquisition-0]   <br>
[Acquisition-0] ============= Source initialization =============<br>
[Acquisition-0]   <br>
[Acquisition-0] ============= Acquisition starts! =============<br>
[Acquisition-0] Simulation start time = 0 sec<br>
[Acquisition-0] Simulation end time   = 250 sec<br>
[Acquisition-0] Simulation will have  = 1 run(s)<br>
[Acquisition-0] Slice 0 from 0 to 250 s [slice=250 s]<br>
<br>
<br>
<br>
===========================================================<br>
There was a crash.<br>
This is the entire stack trace of all threads:<br>
===========================================================<br>
#0  0x00007ff778b3307a in __GI___waitpid (pid=32153, stat_loc=stat_loc<br>
entry=0x7ffd9872e9c0, options=options<br>
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29<br>
#1  0x00007ff778aabfbb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148<br>
#2  0x00007ff77fd790d2 in TUnixSystem::StackTrace() () from /home/cpi/Installations/ROOT/root_v6.14.06/lib/libCore.so<br>
#3  0x00007ff77fd7b9a3 in TUnixSystem::DispatchSignals(ESignals) () from /home/cpi/Installations/ROOT/root_v6.14.06/lib/libCore.so<br>
#4  <signal handler called><br>
#5  0x0000000000b33fd1 in GateObjectStore::FindVolumeCreator(G4VPhysicalVolume*) ()<br>
#6  0x00000000006a1b03 in GateVolumeSelector::GateVolumeSelector(G4VPhysicalVolume*) ()<br>
#7  0x000000000086cf10 in GatePulse::ChangeVolumeIDAndOutputVolumeIDValue(unsigned long, int) ()<br>
#8  0x0000000000999bcb in GateReadout::ProcessPulseList(GatePulseList const*) ()<br>
#9  0x0000000000a68edb in GatePulseProcessorChain::ProcessPulseList() ()<br>
#10 0x00000000008226f4 in GateDigitizer::Digitize() ()<br>
#11 0x000000000096fff7 in GateOutputMgr::RecordEndOfEvent(G4Event const*) ()<br>
#12 0x00000000009f8299 in GateEventAction::EndOfEventAction(G4Event const*) ()<br>
#13 0x00007ff77cef8dd7 in G4EventManager::DoProcessing(G4Event*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4event.so<br>
#14 0x00007ff77d1932a5 in G4RunManager::ProcessOneEvent(int) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4run.so<br>
#15 0x00007ff77d1912d3 in G4RunManager::DoEventLoop(int, char const*, int) [clone .localalias.94] () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4run.so<br>
#16 0x00007ff77d19150b in G4RunManager::BeamOn(int, char const*, int) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4run.so<br>
#17 0x0000000000bc8d7c in GateApplicationMgr::StartDAQ() ()<br>
#18 0x0000000000b6f720 in GateApplicationMgrMessenger::SetNewValue(G4UIcommand*, G4String) ()<br>
#19 0x00007ff779e03fac in G4UIcommand::DoIt(G4String) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#20 0x00007ff779e20261 in G4UImanager::ApplyCommand(char const*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#21 0x00007ff779deddd7 in G4UIbatch::ExecCommand(G4String const&) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#22 0x00007ff779defbae in G4UIbatch::SessionStart() () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#23 0x00007ff779e21242 in G4UImanager::ExecuteMacroFile(char const*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#24 0x00007ff779e0e689 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#25 0x00007ff779e03fac in G4UIcommand::DoIt(G4String) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#26 0x00007ff779e20261 in G4UImanager::ApplyCommand(char const*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#27 0x0000000000632365 in main ()<br>
===========================================================<br>
<br>
<br>
The lines below might hint at the cause of the crash.<br>
You may get help by asking at the ROOT forum <a href="http://root.cern.ch/forum" target="_blank" id="LPlnk359530">
http://root.cern.ch/forum</a><br>
Only if you are really convinced it is a bug in ROOT then please submit a<br>
report at <a href="http://root.cern.ch/bugs" target="_blank" id="LPlnk851884">http://root.cern.ch/bugs</a> Please post the ENTIRE stack trace<br>
from above as an attachment in addition to anything else<br>
that might help us fixing this issue.<br>
===========================================================<br>
#5  0x0000000000b33fd1 in GateObjectStore::FindVolumeCreator(G4VPhysicalVolume*) ()<br>
#6  0x00000000006a1b03 in GateVolumeSelector::GateVolumeSelector(G4VPhysicalVolume*) ()<br>
#7  0x000000000086cf10 in GatePulse::ChangeVolumeIDAndOutputVolumeIDValue(unsigned long, int) ()<br>
#8  0x0000000000999bcb in GateReadout::ProcessPulseList(GatePulseList const*) ()<br>
#9  0x0000000000a68edb in GatePulseProcessorChain::ProcessPulseList() ()<br>
#10 0x00000000008226f4 in GateDigitizer::Digitize() ()<br>
#11 0x000000000096fff7 in GateOutputMgr::RecordEndOfEvent(G4Event const*) ()<br>
#12 0x00000000009f8299 in GateEventAction::EndOfEventAction(G4Event const*) ()<br>
#13 0x00007ff77cef8dd7 in G4EventManager::DoProcessing(G4Event*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4event.so<br>
#14 0x00007ff77d1932a5 in G4RunManager::ProcessOneEvent(int) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4run.so<br>
#15 0x00007ff77d1912d3 in G4RunManager::DoEventLoop(int, char const*, int) [clone .localalias.94] () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4run.so<br>
#16 0x00007ff77d19150b in G4RunManager::BeamOn(int, char const*, int) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4run.so<br>
#17 0x0000000000bc8d7c in GateApplicationMgr::StartDAQ() ()<br>
#18 0x0000000000b6f720 in GateApplicationMgrMessenger::SetNewValue(G4UIcommand*, G4String) ()<br>
#19 0x00007ff779e03fac in G4UIcommand::DoIt(G4String) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#20 0x00007ff779e20261 in G4UImanager::ApplyCommand(char const*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#21 0x00007ff779deddd7 in G4UIbatch::ExecCommand(G4String const&) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#22 0x00007ff779defbae in G4UIbatch::SessionStart() () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#23 0x00007ff779e21242 in G4UImanager::ExecuteMacroFile(char const*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#24 0x00007ff779e0e689 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#25 0x00007ff779e03fac in G4UIcommand::DoIt(G4String) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#26 0x00007ff779e20261 in G4UImanager::ApplyCommand(char const*) () from /home/cpi/Installations/GEANT4/geant4.10.04.p02-install/lib/libG4intercoms.so<br>
#27 0x0000000000632365 in main ()<br>
===========================================================<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>