<div dir="ltr">Hello Irene and Salvatore, <div><br></div><div style>the enhanced phase space actor is in the develop part of the current gate repository and you will be able to access to this current development version (without guarantee) in some times, but we still need to setup correctly the system, so please be patient. In the meantime, you can look at the code and try to modify the classes <span style="font-family:arial,sans-serif;font-size:13px">GatePhaseSpaceActor. </span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Sincerely, </span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">David</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 29, 2013 at 9:08 PM, Irene Torres <span dir="ltr"><<a href="mailto:ireneta@ific.uv.es" target="_blank">ireneta@ific.uv.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000">
Hello David,<br>
<br>
Thank you for your help!<br>
<br>
I have tried the last option you suggested and I got an error during
GATE compilation:<br>
<br>
./tmp/Linux-g++/Gate/libGate.so: undefined reference to
`GatePhaseSpaceActor::GatePhaseSpaceActor(G4String, int)'<br>
collect2: ld returned 1 exit status<br>
make: *** [bin/Linux-g++/Gate] Error 1<br>
<a href="mailto:root@cormorant:/opt/OpenGate6/gate_v6.1#" target="_blank">root@cormorant:/opt/OpenGate6/gate_v6.1#</a> exit<br>
<br>
Any idea where I should start searching??<br>
Thanks again!<br>
<br>
Cheers,<br>
<br>
Irene<div><div class="h5"><br>
<br>
On 04/29/2013 08:00 AM, David Sarrut wrote:
<blockquote type="cite">
<div dir="ltr">Hello Salvatore,
<div><br>
</div>
<div>I haven't got the time to look at in detail, but
this is true that phase-space dose not store runID, eventID,
and that, in that case, the time is no taken into account with
the source. </div>
<div><br>
</div>
<div>I think the best solution for your problem is to
write a new type of source. That should not be too difficult
(even if it requires some times), starting from a new class
inheriting from GateVSource. You will need also to slightly
modify GateSourceMgr (in function AddSource) to enable your
new source type. Maybe instead of a new source type, you can
alternatively add timing option to the GPS source type. I am
convinced that it could be useful to other too. </div>
<div><br>
</div>
<div>Another alternative option, simpler but maybe not
as useful, could be to add RunID and EvenID branch in the
phase space. I attached to this mail a new version of the
PhaseSpaceActor that store eventID and runID. You can try it
(without any guarantee) by adding the files in the src/include
folders of the digits_hits folder. </div>
<div><br>
</div>
<div>Sincerely, </div>
<div>David</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Apr 22, 2013 at 5:58 PM,
Salvatore Di Guida <span dir="ltr"><<a href="mailto:salvatore.di.guida@cern.ch" target="_blank">salvatore.di.guida@cern.ch</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear GATE users and developers,<br>
since I have been using the framework for few weeks, I
apologize for my misunderstandings and mistakes.<br>
I have simulated the detector I am working on as two water
boxes (equivalent to gas detectors), two plastic
scintillator boxes plus a scanner system made up of 30
plastic scintillators. I have attached one phase space to
each water box (in order to describe the incoming particles
from the source and from the first box, respectively), to
the air box between the water boxes (in order to look at the
particles outgoing the first water box) and to the air box
between the second water fox and the first scintillator (in
order to look at the particles outgoing the second water
box). Moreover, I have defined a proton pencil beam source:
I have implemented it both via G4 GeneralParticleSource and
using the PencilBeam template in GATE.<br>
If you like, you can check the geometry and the sources in
details in the archive I am attaching to this mail: there
you can find the macros I am using. I am working with GATE
6.1 on vGATE 2.0.<br>
The output I want to retrieve is, for each proton, the x and
y position in each water box, and the energy deposition in
each level of the scanner system.<br>
In my first attempt, I simply created the geometry, the
source, and the digitizer system, and launched the
simulation with 1000 primaries, producing ROOT files as
output. My idea was to distinguish the incoming protons by
the (runID, eventID) pair: unfortunately, the phase space
does not store this piece of information [1].<br>
Then, since both the phase space and the scanner keep time
information, my next attempt was to calculate the
coincidences of each proton in the water boxes and in the
first scintillator: in this way, I could mark the protons
propagating outside the scanner with the same (runID,
eventID) pair established inside it. Unfortunately, both
sources generate all the protons at t = 0, so it is
impossible to get an adequate result via coincidence
computations [2].<br>
Next, I tried to overcome this issue using time slices in
Data Acquisition: I defined 1000 time slices, where each
slice has a time duration larger than the time of flight of
the proton, so that I had one primary per slice, and the
association between data in water and data in the scanner
could be quite easy. Unfortunately, when the second time
slice starts, GATE crashes with a segmentation violation
with both the PencilBeam source and with GPS source (even
when I tried to set GeneralParticleSource::number or
setActivity in GATE). Debugging with gdb did not help.<br>
<br>
My question is: is there a way in GATE to produce a beam
source where a given number of protons are grouped in
bunches spaced by a given time interval (say: 100
protons-per-bunch, bunches spaced by 100 ms).<br>
<br>
Thanks in advance for your help!<br>
<br>
Salvatore<br>
<br>
[1]<br>
$ root -l<br>
root [] TFile* gem0RootFile =
TFile::Open("GEM0PHS_1000primaries_perfectPBS.root")<br>
root [] TTree* gem0PhaseSpaceTree = (TTree*)
gem0RootFile->Get( "PhaseSpace" )<br>
root [] phaseSpaceTree->Print()<br>
<br>
[2] the source is 0.05 mm far from the phase space, which is
at the origin of the world; so, all protons enter the water
box associated to the phase space at t > 0:<br>
root [] TFile* gem0RootFile =
TFile::Open("GEM0PHS_1000primaries_perfectPBS.root")<br>
root [] TTree* gem0PhaseSpaceTree = (TTree*)
gem0RootFile->Get( "PhaseSpace" )<br>
root [] gem0PhaseSpaceTree->Scan(
"ParticleName:Time:X:Y:Z:dX:dY:dZ:Ekine" )<br>
************************************************************************************************************************<br>
* Row * ParticleN * Time * X * Y *
Z * dX * dY * dZ * Ekine *<br>
************************************************************************************************************************<br>
* 0 * proton * 0.0003519 * 0 * 0 *
0 * -2.63e-08 * 2.610e-08 * 1 * 100 *<br>
* 1 * proton * 0.0003519 * 0 * 0 *
0 * 2.421e-08 * 9.183e-11 * 1 * 100 *<br>
* 2 * proton * 0.0003519 * 0 * 0 *
0 * 1.011e-09 * 2.843e-09 * 1 * 100 *<br>
* 3 * proton * 0.0003519 * 0 * 0 *
0 * -5.11e-09 * 7.478e-10 * 1 * 100 *<br>
* 4 * proton * 0.0003519 * 0 * 0 *
0 * 2.031e-08 * -2.61e-08 * 1 * 100 *<br>
* 5 * proton * 0.0003519 * 0 * 0 *
0 * 2.153e-08 * 9.473e-09 * 1 * 100 *<br>
...<br>
And here it is how the ROOT file for the phase space between
the two water boxes look like: there is a very slight
difference in timing between protons...<br>
root [] TFile* gemSpacingRootFile =
TFile::Open("GEMSpacingPHS_1000primaries_perfectPBS.root")<br>
root [] TTree* gemSpacingPhaseSpaceTree = (TTree*)
gemSpacingRootFile->Get( "PhaseSpace" )<br>
root [] gemSpacingPhaseSpaceTree->Scan(
"ParticleName:Time:X:Y:Z:dX:dY:dZ:Ekine" )<br>
************************************************************************************************************************<br>
* Row * ParticleN * Time * X * Y *
Z * dX * dY * dZ * Ekine *<br>
************************************************************************************************************************<br>
* 0 * proton * 0.0194233 * 0.0030443 * -0.001321 *
2.7000000 * 0.0042755 * -0.001657 * 0.9999895 * 98.147529 *<br>
* 1 * proton * 0.0194286 * -0.002575 * 0.0078605 *
2.7000000 * -0.002732 * 0.0060394 * 0.9999780 * 97.927230 *<br>
* 2 * proton * 0.0194189 * 0.0081350 * -0.003375 *
2.7000000 * 0.0061967 * -0.000981 * 0.9999803 * 98.123619 *<br>
* 3 * proton * 0.0194209 * 0.0102742 * -0.006316 *
2.7000000 * -0.002067 * -0.004013 * 0.9999898 * 97.984443 *<br>
* 4 * proton * 0.0194191 * -0.007278 * 0.0019697 *
2.7000000 * -0.005616 * 0.0024906 * 0.9999811 * 98.163551 *<br>
...<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">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>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">David Sarrut, Phd<br>
Chargé de recherche CNRS<br>
CREATIS, UMR CNRS 5220, Inserm U 1044
<div>Centre de lutte contre le cancer Léon Bérard<br>
28 rue Laënnec, 69373 Lyon cedex 08<br>
Tel : 04 78 78 51 51 / 06 74 72 05 42<br>
<a href="http://www.creatis.insa-lyon.fr/%7Edsarrut" target="_blank">http://www.creatis.insa-lyon.fr/~dsarrut</a><br>
_________________________________</div>
<div> "2 + 2 = 5, for extremely large values of 2"<br>
_________________________________</div>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Gate-users mailing list
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></pre>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">David Sarrut, Phd<br>Chargé de recherche CNRS<br>CREATIS, UMR CNRS 5220, Inserm U 1044<div>Centre de lutte contre le cancer Léon Bérard<br>28 rue Laënnec, 69373 Lyon cedex 08<br>
Tel : 04 78 78 51 51 / 06 74 72 05 42<br><a href="http://www.creatis.insa-lyon.fr/~dsarrut" target="_blank">http://www.creatis.insa-lyon.fr/~dsarrut</a><br>_________________________________</div><div> "2 + 2 = 5, for extremely large values of 2"<br>
_________________________________</div></div>
</div>