[Gate-users] Setting accolinearity with back to back source

David Sarrut David.Sarrut at creatis.insa-lyon.fr
Tue Nov 17 07:57:21 CET 2020

Hi !

thanks for reporting on that. Could you please add a summary of your
findings as an issued in the github, please? (you can copy parts of the
emails of course). It helps us a lot to keep track and correct issues.

We run a monthly meeting to discuss issues, maintenance and new features.
Hopefully, someone will look at this soon.

thanks again for reporting,

---------- Forwarded message ---------
From: Maxime Toussaint <Maxime.Toussaint at usherbrooke.ca>
Date: Tue, Nov 10, 2020 at 5:57 PM
Subject: Re: [Gate-users] Setting accolinearity with back to back source
To: Gate-users at lists.opengatecollaboration.org <
Gate-users at lists.opengatecollaboration.org>


First, my apologies Zhengzhi for the late response. The NssMic conference
took most of my time!

Now about acolinearity. From my limited testing, my current conclusion is
that the acolinearity feature of back-to-back source should not be used
since its behavior seems wrong. Since the current Gate documentation does
not describe how to use this feature, it is fair to suspect that it is not
currently officialy supported. If this is confirmed by the Gate developers,
I will suggest a modification to the current Gate documentation to
highlight this since it was a feature described in the past.

About your results, I suspect that the non-zero angles are due to numerical
error. Back-to-back source are not affected, by default, by acolinearity in
Gate. The source of the error is due, I believe, to using the
hits/coincidence file. If memory serves me right, some of the floats
precision is lost when converted for these files. Also, it might be better
to reconsider neglecting the effect of acolinearity due to the presence of
scatter. While you might be right in a given system, I expect that it is
not always the case.

Thank you Zhengzhi for taking the time to consider the problem I presented
in my first mail.

Maxime Toussaint

*De :* Gate-users <gate-users-bounces at lists.opengatecollaboration.org> de
la part de Albert Grace Lieu <albertnew2018 at gmail.com>
*Envoyé :* 27 octobre 2020 20:24
*À :* Gate-users at lists.opengatecollaboration.org <
Gate-users at lists.opengatecollaboration.org>
*Cc :* Peter Olcott <polcott at reflexion.com>
*Objet :* Re: [Gate-users] Setting accolinearity with back to back source

Dear Gate users,

I apologize for my earlier false result regarding the accolinearity of the
back-to-back gamma generator. Maxime's finding is correct that
back-to-back gamma source default is linear and accolinearity is not
enabled by default.

The reason why I came to the wrong conclusion is that I used a real PET
system in GATE to conduct the simulation which involving much scattering.
Now I updated my simulation with an ideal PET system to repeat the
simulation, the result is shown below:
[image: back-to-back angle distribution.PNG]

My understanding is that whether to simulate the accolinearity of
annihilation gammas or not is not a big deal in simulation as it can easily
be counteracted by scattering, which always happens in a real system. Just
in case someone would be interested in this, I shared my personal finding
and understanding here as well.

Thanks, Maxime.


On Mon, Oct 26, 2020 at 3:22 PM Albert Grace Lieu <albertnew2018 at gmail.com>

Hi Maxime,

I did a simple simulation to verify whether a back-to-back gamma generator
creates colinear or accolinear gamma pairs. I used a point source with a
single emission direction to generate back to back gammas in a cylindrical
PET system (in GATE 8.2). Then I collected hits file and coincidences file.
I used valid coincidence event IDs to find its first hit position
registered by the PET system (ideal resolution). Please note that I did not
use any following commands:

    /gate/source/NAME/setAccolinearityFlag true
    /gate/source/NAME/setAccoValue 0.5 deg

Here is what I found:
It looks back-to-back gamma source has accolinearity enabled by default.
The mean is 5.5 degrees with and a standard deviation of 4.2.
[image: Screenshot from 2020-10-26 14-58-32.png]

My question is whether back-to-back gamma source has accolinearity enabled
by default? Maybe I shall have looked into GateBackToBack.cc, however,
source code might have compiled with other flags which I don't know of.

Thanks for your precious time answering.


On Mon, Oct 26, 2020 at 10:59 AM Albert Grace Lieu <albertnew2018 at gmail.com>

Hi Maxime,

Thanks for sharing your findings regarding this accolineraity feature
associated with the back-to-back gamma source. I did not see
"setAccolinearityFlag" command in the GATE 8 and 9 manual either and am
skeptical about its validity. May I know your conclusion on the usage of
accolineraity feature in GATE? Is it still supported or dead? How can one
still possibly use it correctly?

Thanks a lot.

Sincere wishes,


On Wed, Jul 1, 2020 at 11:39 AM Maxime Toussaint <
Maxime.Toussaint at usherbrooke.ca> wrote:


If one looks into the mailing list or in the Gate code, one can find that
there is an option to simulate accolinearity from back to back source. The
commands to use are as follow:
    /gate/source/NAME/setAccolinearityFlag true
    /gate/source/NAME/setAccoValue 0.5 deg

In short, is this feature validated and still supported?

In the following, I detail what I found from my search on that feature.

This feature is not mentioned in the current openGate wiki (or at least, it
was not found with the wiki search tool). I did a quick "cntrl+f" search of
"setAccolinearityFlag" for the userguides available from v6.0 to the last
available and I did not found a single mention of that keyword. However, if
we look at the mailing list, we can find the following:

   - A possible bug was found in 2011 for which the resulting thread does
   not provide a clear conclusion about if the bug was corrected or if it was
   a real bug [1].
   - Around two years later, the feature was proposed to a user [4].
   - This feature seems to be still used currently [2, 3]. In [3], the user
   asked for some tips on the feature which were not answered.
   - From Gate v5.0 to v6.0, a bug was found and corrected [5, 6, 7].

I did try to look into the available release note of Gate and the Gate
github but I did not find a mention about that feature.

Currently, the option to test Gate with accolinearity validation does not
work out-of-the-box with that feature. When I tried to activate the
accollinearity error graph creation, the resulting graph indicated pure
back-to-back events. I have built some tests by hand[*] and it showed that
a Gaussian angular error was indeed simulated which is good. However, when
I compared the accolinearity error resulting from that feature to when
using a positron source[**], the profile were clearly different. The latter
being Gaussian-like, as expected. It would seems that something unexpected
happens when the angular error is applied to the gamma pairs momentum with
that feature. While I did try to make sense of the code in the method
"GenerateVertex" of GateBacktoBack.cc, I must admit I fail to comprehend
all the steps it does.

Thus, it seems that this feature might have some problems or that it is not
completely supported. If it is indeed the case, I will propose a
modification to the wiki such that it mention the existence of that feature
but warns the users that it might not work as intended. If it should work,
I will try to make a MWE of my tests and ask for validation.

Maxime Toussaint


[*] Outputting the "dev" variable from the file GateBacktoBack.cc
[**] Outputting the momentum from the file GateBacktoBack.cc and
GatePositronAnnihilation.cc, and extracting the photon pairs accolinearity.

Gate-users mailing list
Gate-users at lists.opengatecollaboration.org

Gate-users mailing list
Gate-users at lists.opengatecollaboration.org

David Sarrut, Phd
Directeur de recherche CNRS
CREATIS, UMR CNRS 5220, Inserm U1206
Centre de lutte contre le cancer Léon Bérard
28 rue Laënnec, 69373 Lyon cedex 08
Tel : 04 78 78 51 51 / 06 74 72 05 42
 "2 + 2 = 5,  for extremely large values of 2"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20201117/0330493d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2020-10-26 14-58-32.png
Type: image/png
Size: 35163 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20201117/0330493d/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: back-to-back angle distribution.PNG
Type: image/png
Size: 22002 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20201117/0330493d/attachment-0003.png>

More information about the Gate-users mailing list