[Gate-users] system choice for energy centroid

Devin VanElburg vanelbud at tbh.net
Fri Jun 12 15:45:17 CEST 2015


Thank you Simon!

Your suggestion worked, but only when I use the adder for "normal" gamma
ray detection. It still breaks when I switch to the optical adder and
use scintillating material. 

Cheers,
Devin Van Elburg
------------------------
Physics w/ c/ Biomedical Physics
Lakehead University
>>> Simon Stute  06/12/15 9:06 AM >>>
Hi all,


Indeed, this is brand-new code that has not been tested thoroughly...


The problem is that GATE was not initially thought nor designed AT ALL
to be able to simulate PMT-like blocks with light-sharing...

Thus it makes the coding of such a readout strategy quite difficult, and
it needs several workarounds to get to it !


Nevertheless, thank you for testing this functionality and finding a
fresh bug ;-)

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...



The problem is that in the GATE code, there are no direct correspondence
between the volumeID and the outputVolumeID, 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 volumeID...

For you, just define a useless volume between your crystalboard and your
crystals, identical to the crystalboard and it will work. It will
"compensate" for the lack of submodule in the cylindricalPET.

Also it is normal it does not work with the PETscanner as it has no
"crystal" level defined. It will try to solve that too.


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.


By the way, sorry for the long delay, I was out of GATE stuff for a
while.


Cheers

Simon







On Fri, Jun 5, 2015 at 10:03 PM, Devin VanElburg <vanelbud at tbh.net>
wrote:
Ok. It is sort of working for me now...

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."

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?

Devin Van Elburg

------------------------
Physics w/ c/ Biomedical Physics
Lakehead University

>>> Marc Chamberland  06/05/15 12:03 PM >>>
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. 

Marc



On Jun 5, 2015, at 11:44, Devin VanElburg <vanelbud at tbh.net> wrote:

Hmm, interesting.

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.

Devin Van Elburg

------------------------
Physics w/ c/ Biomedical Physics
Lakehead University


>>> Marc Chamberland 06/05/15 9:47 AM >>>
Hi Devin,

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 pooccur 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.

Marc



__________________________

Marc Chamberland, PhD
Department of Physics
Carleton University
Ottawa (ON) 

On Jun 3, 2015, at 16:43, Devin VanElburg <vanelbud at tbh.net> wrote:

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.

Regards,
Devin Van Elburg

------------------------
Physics w/ c/ Biomedical Physics
Lakehead University



>>> Marc Chamberland 06/03/15 3:21 PM >>>
Hmm, everything looks fine.


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!).


Marc



On Jun 3, 2015, at 14:52, Devin VanElburg <vanelbud at tbh.net> wrote:

Here is what I get with the describe command:

Idle> /gate/systems/cylindricalPET/describe                             
   

GATE object:        'systems/cylindricalPET'
Components:    

GATE object:        'systems/cylindricalPET/base'
Attached to volume: cylindricalPET
Nb of children:       1

    GATE object:        'systems/cylindricalPET/rsector'
    Attached to volume: headblock
    Nb of children:       1

        GATE object:        'systems/cylindricalPET/module'
        Attached to volume: crystalboard
        Nb of children:       1

            GATE object:        'systems/cylindricalPET/submodule'
            Attached to volume: ---
            Nb of children:       1

                GATE object:        'systems/cylindricalPET/crystal'
                Attached to volume: crystal
                Nb of children:       4

                    GATE object:        'systems/cylindricalPET/layer0'
                    Attached to volume: lyso
                    Nb of children:       0

                    GATE object:        'systems/cylindricalPET/layer1'
                    Attached to volume: ---
                    Nb of children:       0

                    GATE object:        'systems/cylindricalPET/layer2'
                    Attached to volume: ---
                    Nb of children:       0

                    GATE object:        'systems/cylindricalPET/layer3'
                    Attached to volume: ---
                    Nb of children:       0
geometrical design type: 1
ring diameter: 8.014 cm 
rsector axial pitch: 0 fm 
rsector azimuthal pitch: 180 degree
rsector tangential size: 5.766 cm 
rsector axial size: 5.766 cm 
module axial size: 5.766 cm 
module tangential size: 5.766 cm 
module axial pitch: 0 fm 
module tangential pitch: 0 fm 
submodule axial size: 5.766 cm 
submodule tangential size: 5.766 cm 
submodule axial pitch: 0 fm 
submodule tangential pitch: 0 fm 
crystal radial size: 1.3 cm 
crystal axial size: 2.32 mm 
crystal tangential size: 2.32 mm 
crystal axial pitch: 2.4 mm 
crystal tangential pitch: 2.4 mm 
layer0 radial size: 1.3 cm 
in layer0 interaction length: 6.5 mm 
Axial nb of rsectors: 1
Azimuthal nb of rsectors: 2
Axial nb of modules: 1
Tangential nb of modules: 1
Axial nb of submodules: 1
Tangential nb of submodules: 1
Axial nb of crystals: 24
Tangential nb of crystals: 24
Radial nb of layers: 1
Idle> 


Regards,
Devin Van Elburg

------------------------
Physics w/ c/ Biomedical Physics
Lakehead University


>>> Marc Chamberland <MarcChamberland at cmail.carleton.ca> 06/0However, 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:

/gate/systems/cylindricalPET/describe

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.

Marc



> On Jun 3, 2015, at 11:14, Devin VanElburg <vanelbud at tbh.net> wrote:
> 
> Thanks for your input Marc!
> 
> 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.
> 
> Devin Van Elburg
> 
> ------------------------
> Physics w/ c/ Biomedical Physics
> Lakehead University
> 
> 
> >>> Marc Chamberland 06/03/15 10:16 AM >>>
> Thanks, Devin. That’s much more clear.
> 
> 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.
> 
> Marc
> 
> 
>> On Jun 3, 2015, at 10:04, Devin VanElburg <vanelbud at tbh.net> wrote:
>> 
>> Hello Marc, 
>> 
>> 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:
>> 
>> /gate/systems/PETscanner/level1/attach headblock
>> /gate/systems/PETscanner/level2/attach crystalboard
>> /gate/systems/PETscanner/level3/attach crystal
>> /gate/systems/PETscanner/layer0/attach lyso
>> /gate/lyso/attachCrystalSD
>> 
>> 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:
>> 
>> /gate/digitizer/Singles/readout/setPolicy TakeEnergyWinner
>> 
>> 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:
>> 
>> /gate/digitizer/Singles/readout/setPolicy TakeEnergyCentroid
>> 
>> I get a break with the following message:
>> 
>> [systems/PETscanner::FindComponent]:
>> Could not find the request system component 'crystal'!
>> 
>> -------- EEEE ------- G4Exception-START -------- EEEE -------
>> *** G4Exception : ProcessPulseList
>> issued by : GateReadout::ProcessPulseList
>> Failed to get the array component corresponding to the crystal.
Abort.
>> 
>> *** Fatal Exception *** core dump ***
>> -------- EEEE -------- G4Exception-END --------- EEEE -------
>> 
>> 
>> *** G4Exception: Aborting execution ***
>> Aborted (core dumped)
>> 
>> 
>> 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:
>> 
>> /gate/systems/cylindricalPET/rsector/attach headblock
>> /gate/systems/cylindricalPET/module/attach crystalboard
>> /gate/systems/cylindricalPET/crystal/attach crystal
>> /gate/systems/cylindricalPET/layer0/attach lyso
>> /gate/lyso/attachCrystalSD
>> 
>> 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!
>> 
>> By the way, ignore my comment with my previous email concerning the
number of plates wit>> I'd appreciate any help I can get here!
>> 
>> Regards,
>> Devin Van Elburg
>> 
>> ------------------------
>> Physics w/ c/ Biomedical Physics
>> Lakehead University
>> 
>> 
>> 
>> 
>> >>> Marc Chamberland 06/02/15 5:00 PM >>>
>> Hi Devin,
>> 
>> I’m not sure I understand what you’re trying to do and what failed to
work. Can you provide more details?
>> 
>> Also, did you attach a crystalSD to your plates, as outlined here:
http://wiki.opengatecollaboration.org/index.php/Users_Guide_V7.1:Attaching_the_sensitive_detectors#The_crystalSD
>> 
>> Cheers,
>> Marc
>> 
>> 
>> 
>> __________________________
>> 
>> Marc Chamberland, PhD
>> Department of Physics
>> Carleton University
>> Ottawa (ON)
>> 
>>> On Jun 2, 2015, at 16:49, Devin VanElburg <vanelbud at tbh.net> wrote:
>>> 
>>> Hello gate users,
>>> 
>>> 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?
>>> 
>>> Regards,
>>> Devin Van Elburg
>>> 
>>> ------------------------
>>> Physics w/ c/ Biomedical Physics
>>> Lakehead University
>>> _______________________________________________
>>> Gate-users mailing list
>>> Gate-users at lists.opengatecollaboration.org
>>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>> 
> 



















_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20150612/7b149f10/attachment-0001.html>


More information about the Gate-users mailing list