<div dir="ltr"><div><div><div><div><div><div><div><div>Hi all,<br><br></div>Indeed, this is brand-new code that has not been tested thoroughly...<br></div><div><br>The problem is that GATE was not initially thought nor designed AT ALL to be able to simulate <span tabindex="-1" id=":26i.1" style class="">PMT</span>-like blocks with light-sharing...<br></div>Thus it makes the coding of such a readout strategy quite difficult, and it needs several workarounds to get to it !<br><br></div>Nevertheless, thank you for testing this functionality and finding a fresh bug ;-)<br></div>I found a quick way in your macro to make it working properly, but not yet a way to fix it in the source code... found why but not yet how... would need another workaround...<br><br></div></div>The problem is that in the GATE code, there are no direct correspondence between the <span tabindex="-1" id=":26i.4" style class="">volumeID</span> and the <span tabindex="-1" id=":26i.5" style class="">outputVolumeID</span>, which both need to be updated while moving the interacting crystal to a new value. And when all the levels of the system are not represented by actual volumes defined by the user, there are no easy way to get access to the crystal level in the <span tabindex="-1" id=":26i.6" style class="">volumeID</span>...<br><br>For you, just define a useless volume between your <span tabindex="-1" id=":26i.7" style class="">crystalboard</span> and your crystals, identical to the <span tabindex="-1" id=":26i.8" style class="">crystalboard</span> and it will work. It will "compensate" for the lack of <span tabindex="-1" id=":26i.9" style class="">submodule</span> in the <span tabindex="-1" id=":26i.10" style class="">cylindricalPET</span>.<br></div>Also it is normal it does not work with the <span tabindex="-1" id=":26i.11" style class="">PETscanner</span> as it has no "crystal" level defined. It will try to solve that too.<br><br></div>Last, the depth command is ignored only if it is placed before the macro command specifying that you choose the centroid method. If it is placed after this command, it will corrupt everything... Will solve that too.<br><div><div><div><div><div><br></div><div>By the way, sorry for the long delay, I was out of GATE stuff for a while.<br><br></div><div>Cheers<br></div><div>Simon<br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 5, 2015 at 10:03 PM, Devin VanElburg <span dir="ltr"><<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:Tahoma,sans-serif;font-size:13px">Ok. It is sort of working for me now...<br><br>The wiki says the following: "Using the energy-centroid policy, the depth of the grouping is forced to
occur at the 'crystal' level whatever the system used, so the depth
variable is ignored."<br><br>So in my code, I have the setDepth hashed out. When I set the depth to 4, voila, the simulation runs! But, only for a limited number of particles... When I set my number of primaries to 10 000, it runs and generates around 200 Singles for me. But when I set it to 100 000+, it crashes as it did all along. So to me this still seems buggy, but I suppose the wiki is then incorrect about setting the digitizer depth for the energy centroid policy?<span class=""><br><br>Devin Van Elburg<br>
<br>
------------------------<br>
Physics w/ c/ Biomedical Physics<br>
Lakehead University<br><br></span>>>> Marc Chamberland <u></u> 06/05/15 12:03 PM >>><br>
I actually removed every reference to the optical system from your macro, just so I can test specifically the centroid policy. And yes, it fails after starting the DAQ with the cylindricalPET system and the centroid policy.
<div><br>
</div>
<div>Marc
<div><div class="h5"><div><br>
<br>
<br>
</div>
<div>
<blockquote type="cite">
<div>On Jun 5, 2015, at 11:44, Devin VanElburg <<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>> wrote:</div>
<br>
<div>
<div style="font-family:Tahoma,sans-serif;font-size:13px">Hmm, interesting.<br>
<br>
Should the TakeEnergyCentroid option work for an OpticalSystem also? I have the same issues in this case, where I get a break and it says that it cannot find an array repeated 'crystal' volume. This occurs despite attaching 'crystal' volume to a cubicArray
repeated volume, and 'pixel' to my CrystalSD volume (as the wiki suggests). However, this occurs before I even start the simulation. With a cylindricalPET system, it fails after I start the DAQ.<br>
<br>
Devin Van Elburg<br>
<br>
------------------------<br>
Physics w/ c/ Biomedical Physics<br>
Lakehead University<br>
<br>
<br>
>>> Marc Chamberland <u></u>06/05/15 9:47 AM >>><br>
Hi Devin,
<div><br>
</div>
<div>I think you may have uncovered a bug there. I couldn’t reproduce the error message you get (about failing to find the component corresponding to the crystal array), but using the energy centroid policy does cause a segmentation fault on my system
with your macro. The crash seems to occur in the code related to the new centroid policy. I’ll try to debug it a bit more if I have time (so I can submit a bug report to the Gate group), but you’ll have to work around it for now.</div>
<div><br>
<div>Marc<br>
<br>
<br>
<br>
__________________________<br>
<br>
Marc Chamberland, PhD<br>
Department of Physics<br>
Carleton University<br>
Ottawa (ON) </div>
<br>
<div>
<blockquote type="cite">
<div>On Jun 3, 2015, at 16:43, Devin VanElburg <<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>> wrote:</div>
<br>
<div><span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">I
have attached it. I have been tinkering with it a lot since inquiring about this earlier, so I tried to go back and change back to what I had before (I am working on generating and detecting optical photons with this, but I have a lot more to do before I achieve
that). I also changed some materials to ones that are in the GateMaterials.db, as I have defined and used many of my own. I'm sorry for the very unorganized code, I've been hashing things in and out all day.</span><br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Regards,</span><br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Devin
Van Elburg</span><br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">------------------------</span><br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Physics
w/ c/ Biomedical Physics</span><br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Lakehead
University</span><br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">>>>
Marc Chamberland<span> </span></span><u></u>06/03/15
3:21 PM >>><br>
<div>Hmm, everything looks fine.</div>
<div><br>
</div>
<div>
<div>If you’re willing to share, send me a macro I can run to reproduce the crash. I can’t promise I’ll have time to look that deeply into it, but I’m always curious when a command that should work causes a crash (and the
official Gate developers can always use some help to debug!).</div>
<div><br>
</div>
<div>Marc<br>
<br>
<br>
</div>
<div>
<blockquote type="cite">
<div>On Jun 3, 2015, at 14:52, Devin VanElburg <<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>> wrote:</div>
<br>
<div>
<div style="font-family:Tahoma,sans-serif;font-size:13px">Here is what I get with the describe command:<br>
<br>
Idle> /gate/systems/cylindricalPET/describe <span> </span><br>
<br>
GATE object: 'systems/cylindricalPET'<br>
Components: <span> </span><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: headblock<br>
Nb of children: 1<br>
<br>
GATE object: 'systems/cylindricalPET/module'<br>
Attached to volume: crystalboard<br>
Nb of children: 1<br>
<br>
GATE object: 'systems/cylindricalPET/submodule'<br>
Attached to volume: ---<br>
Nb of children: 1<br>
<br>
GATE object: 'systems/cylindricalPET/crystal'<br>
Attached to volume: crystal<br>
Nb of children: 4<br>
<br>
GATE object: 'systems/cylindricalPET/layer0'<br>
Attached to volume: 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: 8.014 cm<span> </span><br>
rsector axial pitch: 0 fm<span> </span><br>
rsector azimuthal pitch: 180 degree<br>
rsector tangential size: 5.766 cm<span> </span><br>
rsector axial size: 5.766 cm<span> </span><br>
module axial size: 5.766 cm<span> </span><br>
module tangential size: 5.766 cm<span> </span><br>
module axial pitch: 0 fm<span> </span><br>
module tangential pitch: 0 fm<span> </span><br>
submodule axial size: 5.766 cm<span> </span><br>
submodule tangential size: 5.766 cm<span> </span><br>
submodule axial pitch: 0 fm<span> </span><br>
submodule tangential pitch: 0 fm<span> </span><br>
crystal radial size: 1.3 cm<span> </span><br>
crystal axial size: 2.32 mm<span> </span><br>
crystal tangential size: 2.32 mm<span> </span><br>
crystal axial pitch: 2.4 mm<span> </span><br>
crystal tangential pitch: 2.4 mm<span> </span><br>
layer0 radial size: 1.3 cm<span> </span><br>
in layer0 interaction length: 6.5 mm<span> </span><br>
Axial nb of rsectors: 1<br>
Azimuthal nb of rsectors: 2<br>
Axial nb of modules: 1<br>
Tangential nb of modules: 1<br>
Axial nb of submodules: 1<br>
Tangential nb of submodules: 1<br>
Axial nb of crystals: 24<br>
Tangential nb of crystals: 24<br>
Radial nb of layers: 1<br>
Idle><span> </span><br>
<br>
<br>
Regards,<br>
Devin Van Elburg<br>
<br>
------------------------<br>
Physics w/ c/ Biomedical Physics<br>
Lakehead University<br>
<br>
<br>
>>> Marc Chamberland <<a href="mailto:MarcChamberland@cmail.carleton.ca" target="_blank">MarcChamberland@cmail.carleton.ca</a>> 06/03/15 11:46 AM >>><br>
I had a quick look at the source code and can’t see anything obvious. However, it was recently re-written, so there might still be bugs in it. From my limited experience and knowledge, I’d stick with the cylindrical PET system for now. Also, can you post what
you get when you do:<br>
<br>
/gate/systems/cylindricalPET/describe<br>
<br>
after you’ve defined your entire system? No idea if it’ll be of any help, but when I run into bugs like this, I throw everything at the wall and see what sticks, so to speak.<br>
<br>
Marc<br>
<br>
<br>
<br>
> On Jun 3, 2015, at 11:14, Devin VanElburg <<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>> wrote:<br>
><span> </span><br>
> Thanks for your input Marc!<br>
><span> </span><br>
> I'm not particularly comfortable with C++, so I don't want to be poking around at the code. There must be something I'm missing. I'll keep plugging away, and hopefully I find out what's causing my issue.<br>
><span> </span><br>
> Devin Van Elburg<br>
><span> </span><br>
> ------------------------<br>
> Physics w/ c/ Biomedical Physics<br>
> Lakehead University<br>
><span> </span><br>
><span> </span><br>
> >>> Marc Chamberland 06/03/15 10:16 AM >>><br>
> Thanks, Devin. That’s much more clear.<br>
><span> </span><br>
> I’ve never used anything but the default policy. However at first sight, it looks like you’re doing everything right. Maybe someone with more experience can chime in, but it’s also possible this is a bug. If you’re comfortable with C++, I’d suggest you take
a quick look at the area of the code where the error message is produced and see if anything jumps at you.<br>
><span> </span><br>
> Marc<br>
><span> </span><br>
><span> </span><br>
>> On Jun 3, 2015, at 10:04, Devin VanElburg <<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>> wrote:<br>
>><span> </span><br>
>> Hello Marc,<span> </span><br>
>><span> </span><br>
>> I'll try and explain a little better what I'm trying to do. I have defined my system as a PETscanner and attached the daughter volumes as follows:<br>
>><span> </span><br>
>> /gate/systems/PETscanner/level1/attach headblock<br>
>> /gate/systems/PETscanner/level2/attach crystalboard<br>
>> /gate/systems/PETscanner/level3/attach crystal<br>
>> /gate/systems/PETscanner/layer0/attach lyso<br>
>> /gate/lyso/attachCrystalSD<br>
>><span> </span><br>
>> where 'crystal' is repeated as a cubicArray (24x24) and 'headblock' is repeated twice with a ring repeater. I now have two opposing lyso crystals with the attached CrystalSD. When using the default readout policy:<br>
>><span> </span><br>
>> /gate/digitizer/Singles/readout/setPolicy TakeEnergyWinner<br>
>><span> </span><br>
>> My simulation runs fine, and the root output I receive is expected (511keV peak as I am using a Na-22 source for positron annihilation) for both Singles and Coincidences. However, when I try:<br>
>><span> </span><br>
>> /gate/digitizer/Singles/readout/setPolicy TakeEnergyCentroid<br>
>><span> </span><br>
>> I get a break with the following message:<br>
>><span> </span><br>
>> [systems/PETscanner::FindComponent]:<br>
>> Could not find the request system component 'crystal'!<br>
>><span> </span><br>
>> -------- EEEE ------- G4Exception-START -------- EEEE -------<br>
>> *** G4Exception : ProcessPulseList<br>
>> issued by : GateReadout::ProcessPulseList<br>
>> Failed to get the array component corresponding to the crystal. Abort.<br>
>><span> </span><br>
>> *** Fatal Exception *** core dump ***<br>
>> -------- EEEE -------- G4Exception-END --------- EEEE -------<br>
>><span> </span><br>
>><span> </span><br>
>> *** G4Exception: Aborting execution ***<br>
>> Aborted (core dumped)<br>
>><span> </span><br>
>><span> </span><br>
>> What I take from this is that I need to use a system that I can attach a volume to a so-called 'crystal' level. I've been playing with cylindricalPET and redefined my system as follows:<br>
>><span> </span><br>
>> /gate/systems/cylindricalPET/rsector/attach headblock<br>
>> /gate/systems/cylindricalPET/module/attach crystalboard<br>
>> /gate/systems/cylindricalPET/crystal/attach crystal<br>
>> /gate/systems/cylindricalPET/layer0/attach lyso<br>
>> /gate/lyso/attachCrystalSD<br>
>><span> </span><br>
>> that way, I have attached my 'crystal' volume to a 'crystal' level in the system hierarchy as I assume the error message suggested. Even still, I get the break segmentation violation. I also get the same error when switching to TakeEnergyCentroid for the
cylindricalPET example that GATE supplies. The wiki says to ensure the Depth is taken just above the crystal, which I did. In fact I tried running it with the depth at all levels and they all failed. I'm at a loss, I can't seem to get the TakeEnergyCentroid
policy to work despite my best efforts!<br>
>><span> </span><br>
>> By the way, ignore my comment with my previous email concerning the number of plates with a ring repeater. That was a readout depth issue and it's working now.<br>
>><span> </span><br>
>> I'd appreciate any help I can get here!<br>
>><span> </span><br>
>> Regards,<br>
>> Devin Van Elburg<br>
>><span> </span><br>
>> ------------------------<br>
>> Physics w/ c/ Biomedical Physics<br>
>> Lakehead University<br>
>><span> </span><br>
>><span> </span><br>
>><span> </span><br>
>><span> </span><br>
>> >>> Marc Chamberland 06/02/15 5:00 PM >>><br>
>> Hi Devin,<br>
>><span> </span><br>
>> I’m not sure I understand what you’re trying to do and what failed to work. Can you provide more details?<br>
>><span> </span><br>
>> Also, did you attach a crystalSD to your plates, as outlined here:<span> </span><a href="http://wiki.opengatecollaboration.org/index.php/Users_Guide_V7.1:Attaching_the_sensitive_detectors#The_crystalSD" target="_blank">http://wiki.opengatecollaboration.org/index.php/Users_Guide_V7.1:Attaching_the_sensitive_detectors#The_crystalSD</a><br>
>><span> </span><br>
>> Cheers,<br>
>> Marc<br>
>><span> </span><br>
>><span> </span><br>
>><span> </span><br>
>> __________________________<br>
>><span> </span><br>
>> Marc Chamberland, PhD<br>
>> Department of Physics<br>
>> Carleton University<br>
>> Ottawa (ON)<br>
>><span> </span><br>
>>> On Jun 2, 2015, at 16:49, Devin VanElburg <<a href="mailto:vanelbud@tbh.net" target="_blank">vanelbud@tbh.net</a>> wrote:<br>
>>><span> </span><br>
>>> Hello gate users,<br>
>>><span> </span><br>
>>> I am simulating a PET system with two plates. I would like to use the takeEnergyCentroid option for the digitizer's readout. However, I need to attach a volume to a 'crystal' of a system (according to the error message I keep getting). Thus a PETscanner
system cannot work since it uses level1-4 and layers for system attachment. The I tried a cylindricalPET system with a ring repeater of 2, and that also didn't work. Interestingly, cylindricalPET works for a 4+ plate ring system, but no singles or coincidences
in the output for 2-3 plates (with only the ring repeat number changed). Can anyone offer any insight as to what I should do?<br>
>>><span> </span><br>
>>> Regards,<br>
>>> Devin Van Elburg<br>
>>><span> </span><br>
>>> ------------------------<br>
>>> Physics w/ c/ Biomedical Physics<br>
>>> Lakehead University<br>
>>> _______________________________________________<br>
>>> Gate-users mailing list<br>
>>><span> </span><a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
>>><span> </span><a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
>><span> </span><br>
><span> </span><br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<u></u><span style="font-family:Tahoma,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"></span><span><fhb></span></div>
</blockquote>
</div>
<br>
</div>
<u></u></div>
</div>
</blockquote>
</div>
<br>
</div></div></div>
<u></u></div>
<br>_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br></blockquote></div><br></div>