<div dir="ltr"><div dir="ltr"><div><div><div><div>Hi,<br><br>David is right, there should not be overlapping volumes, but still I think we can predict what happens ;-)<br></div><br></div>The
first rule is that the particle will be in the first volume it crosses.
If it continues its way in this volume while passing through an
overlapping volume, it will ignore the overlapping volume until it exits
the first volume (because G4 uses DistanceToIn and DistanceToOut
strategies to compute the way in/out through the different volumes).<br>
<br></div>The second rule is (I don't know it but I deduce it from your
experiment), if it crosses 2 (or more) volumes at a same place while
being in another volume, it will enter the last declared volume, because
volumes in G4 are organised as a tree, and I can imagine that when
scanning the tree, the program always does it in the same way (so here
probably by starting with the last volume).<br>
<br></div>Still, be careful with overlapping volumes !<br><br>Cheers,<br>Simon<br></div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 5:06 PM, David Sarrut <span dir="ltr"><<a href="mailto:David.Sarrut@creatis.insa-lyon.fr" target="_blank">David.Sarrut@creatis.insa-lyon.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><font><span style="background-color:rgba(255,255,255,0)">Hello,</span></font></div><div><font><span style="background-color:rgba(255,255,255,0)"><br>
</span></font></div><div><font><span style="background-color:rgba(255,255,255,0)">In G4 (thus in gate), you could *not* have overlapping volumes. If some volumes overlap, the result is undefined. To my knowledge, you don't have the choice, you need to change your geometry.</span></font></div>
<div><font><span style="background-color:rgba(255,255,255,0)"><br></span></font></div><div><font><span style="background-color:rgba(255,255,255,0)">There is a feature in G4 to deal with overlapping volumes (called parallel world), but it is not available through gate.</span></font></div>
<div><font><span style="background-color:rgba(255,255,255,0)"><br></span></font></div><div><font><span style="background-color:rgba(255,255,255,0)">Sincerely,<br>David</span></font></div><br>Le jeudi 27 février 2014, MELISSAS Maximilien (SAFRAN) <<a href="mailto:maximilien.melissas-alten@safran.fr" target="_blank">maximilien.melissas-alten@safran.fr</a>> a écrit :<div class="HOEnZb">
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:x-small;font-family:Tahoma">
<div><a></a>Dear Gaters<a></a>, </div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma">A question related<a></a> to my<a></a> question from<a></a> yesterday<a></a>,
</font></div>
<div><font face="tahoma"><a></a><font face="tahoma">When</font> 2 brothers<a></a> volume are crossing<a></a>, what's<a></a> happening at<a></a> the crossing<a></a> point.
</font></div>
<div><font face="tahoma"><a></a><font face="tahoma">Here</font> is<a></a> a quick example<a></a> of what<a></a> I mean<a></a>, with<a></a> a mother<a></a> box having<a></a> 2 daughters<a></a> volume Castor and Pollux<a></a></font></div>
<div><font face="tahoma">
<div><font face="tahoma">/gate<a></a>/motherbox<a></a>/daughters<a></a>/name<a></a> Castor
</font></div>
<div><font face="tahoma">/gate<a></a>/motherbox<a></a>/daughters<a></a>/insert cylinder<a></a></font><font color="#000000" face="Tahoma"><br>
/gate<a></a>/Castor/geometry<a></a>/setHeight<a></a> 20. mm<br>
/gate<a></a>/Castor/geometry<a></a>/setRmin<a></a> 0. mm<br>
/gate<a></a>/Castor/geometry<a></a>/setRmax<a></a> 5. mm</font></div>
<div><font face="tahoma">/gate<a></a>/Castor/placement/setTranslation<a></a> +2. -0. 0. mm</font></div>
<div><font face="tahoma"></font> </div>
</font></div>
<div><font face="tahoma">/gate<a></a>/motherbox<a></a>/daughters<a></a>/name<a></a> Pollux<a></a></font></div>
<div><font face="tahoma">/gate<a></a>/motherbox<a></a>/daughters<a></a>/insert cylinder<a></a></font><font color="#000000" face="Tahoma"><br>
/gate<a></a>/Pollux<a></a>/geometry<a></a>/setHeight<a></a> 20. mm<br>
/gate<a></a>/Pollux<a></a>/geometry<a></a>/setRmin<a></a> 0. mm<br>
/gate<a></a>/Pollux<a></a>/geometry<a></a>/setRmax<a></a> 5. mm</font></div>
<div><font face="tahoma">/gate<a></a>/Pollux<a></a>/placement/setTranslation<a></a> -2. -0. 0. mm</font></div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma"><a></a><font face="tahoma">these</font> volumes should<a></a> have a big<a></a> overlap<a></a> at<a></a> the center of motherbox<a></a>.
</font></div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma"><a></a><font face="tahoma">Now</font> what's<a></a> occuring<a></a> when<a></a> a particle<a></a> pass<a></a> through<a></a> the middle of motherbox<a></a> ?
</font></div>
<div><font face="tahoma">Is the particle<a></a> inside<a></a> of Pollux<a></a> ? </font>
</div>
<div><font face="tahoma">Is the particle<a></a> inside<a></a> of Pollux<a></a> and Castor, and can<a></a> interact<a></a> with<a></a> both<a></a>
</font></div>
<div><font face="tahoma"><a></a><font face="tahoma">Does</font> the particle<a></a> belong<a></a> to the first volume it<a></a> crossed<a></a> ?</font></div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma">If the last the volume always<a></a> on-top ? If yes<a></a>, this<a></a> answers<a></a> my<a></a> question from<a></a> yesterday<a></a>,
</font></div>
<div><font face="tahoma">the later-declared<a></a> volume being<a></a> on-top photons spend<a></a> more time inside<a></a> this<a></a> one and thus<a></a> scatter<a></a> more from<a></a> the last one.
</font></div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma"><a></a><font face="tahoma">Cheers</font>, </font></div>
<div><font face="tahoma">Maximilien </font></div>
<div> </div>
<div style="DIRECTION:ltr">
<hr>
<font color="#000000" face="Tahoma"><b>De :</b> <a>gate-users-bounces@lists.opengatecollaboration.org</a> [<a>gate-users-bounces@lists.opengatecollaboration.org</a>] de la part de MELISSAS Maximilien (SAFRAN) [<a>maximilien.melissas-alten@safran.fr</a>]<br>
<b>Date d'envoi :</b> mercredi 26 février 2014 15:12<br>
<b>À :</b> <a>gate-users@lists.opengatecollaboration.org</a><br>
<b>Objet :</b> [SUSPECTED SPOOFING] [Gate-users] (no subject)<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr;font-size:x-small;font-family:Tahoma">
<div dir="ltr"><font color="#000000" face="Tahoma">
<p><a></a>Dear Gaters<a></a>,</p>
<p>I am<a></a> facing<a></a> an issue I don't<a></a> understand<a></a>, with<a></a> my<a></a> current<a></a> description of my<a></a> setup, it<a></a> seems<a></a> that<a></a> the X rays scattering<a></a> depends<a></a> on the order<a></a> in which<a></a> volumes
have been declared<a></a> </p>
<p> </p>
<p>To mimic<a></a> the CT scan of a composite material<a></a> (I am<a></a> using<a></a> Gate<a></a> to understand<a></a> a CT-Scan setup used<a></a> for Aeronautical<a></a> part testing<a></a>), I am<a></a> introducing<a></a> a periodic<a></a> network of carbon<a></a> fiber<a></a> along<a></a> each<a></a>
direction in my<a></a> test phantom<a></a> (Let’s<a></a> call these<a></a> direction 1, 2, 3)</p>
<p> </p>
<p>If I check the branches ComptVolName<a></a> and RayleighVolName<a></a> in the Hit Tree<a></a>, there<a></a> is<a></a> always<a></a> one direction producing<a></a> more scattering<a></a>. However<a></a>, whatever<a></a> the rotation of the phantom<a></a>,
the later-declared<a></a> direction is<a></a> always<a></a> the one producing<a></a> the most<a></a> scattered<a></a> hits.</p>
<p><a></a>Here is<a></a> a pseudo phantom.mac<a></a></p>
<p>/gate<a></a>/world/daughters<a></a>/name<a></a> epoxyBox<a></a></p>
<p>#Define<a></a> an epoxy<a></a> box,</p>
<p>/gate<a></a>/epoxyBox<a></a>/daughters<a></a>/name<a></a> CCylinder1<a></a></p>
<p>#Define<a></a> and rotate<a></a> an array<a></a> of carbon<a></a> Cylinder<a></a> using<a></a> Repeater<a></a></p>
<p>/gate<a></a>/epoxyBox<a></a>/daughters<a></a>/name<a></a> CCylinder2<a></a></p>
<p>#Define<a></a> and rotate<a></a> an array<a></a> of carbon<a></a> Cylinder<a></a> using<a></a> Repeater<a></a></p>
<p>/gate<a></a>/epoxyBox<a></a>/daughters<a></a>/name<a></a> CCylinder3<a></a></p>
<p>#Define<a></a> and rotate<a></a> an array<a></a> of carbon<a></a> Cylinder<a></a> using<a></a> Repeater<a></a></p>
<p> </p>
<p>All the Carbon<a></a> cylinders<a></a> are copy-pasted<a></a> and I change only<a></a> the rotation along<a></a> X/Y/Z . After<a></a> running the simulation, if I check which<a></a> volumes produces<a></a> the most<a></a> scattered<a></a> hits (from<a></a>
Hits/CompVolName<a></a> and Hits/RayleighVolName<a></a>) the volume producing<a></a> the most<a></a> scattered<a></a> hits is<a></a> CCylinder3<a></a> whatever<a></a> the rotation of the epoxyBox<a></a> </p>
<p>If now<a></a> I declare<a></a> the CCylinder<a></a> in a different<a></a> order<a></a> i.e<a></a></p>
<p>/gate<a></a>/epoxyBox<a></a>/daughters<a></a>/name<a></a> CCylinder3<a></a></p>
<p>#Define<a></a> and rotate<a></a> an array<a></a> of carbon<a></a> Cylinder<a></a> using<a></a> Repeater<a></a></p>
<p>/gate<a></a>/epoxyBox<a></a>/daughters<a></a>/name<a></a> CCylinder1<a></a></p>
<p>#Define<a></a> and rotate<a></a> an array<a></a> of carbon<a></a> Cylinder<a></a> using<a></a> Repeater<a></a></p>
<p>/gate<a></a>/epoxyBox<a></a>/daughters<a></a>/name<a></a> CCylinder2<a></a></p>
<p>#Define<a></a> and rotate<a></a> an array<a></a> of carbon<a></a> Cylinder<a></a> using<a></a> Repeater<a></a></p>
<p><a></a>Now the CCylinder<a></a> producing<a></a> the most<a></a> scattered<a></a> hits is<a></a> CCylinder<a></a> 2 (whatever<a></a> the rotation of the epoxy<a></a> box)</p>
<p>I made all the rotation testing<a></a> with<a></a> few photons (around<a></a> 100 000) to save<a></a> Computing<a></a> time, and I ran<a></a> another<a></a> orientation with<a></a> 10 000 000 photons to be<a></a> sure I am<a></a> not seeing<a></a> statistical<a></a>
fluctuations</p>
<p> </p>
<p>Am I misunderstanding<a></a> the meaning<a></a> of the Rayleigh/ComptVolName<a></a> (actually<a></a>, how is<a></a> this<a></a> leaf<a></a> filled<a></a> when<a></a> a photon has been scattered<a></a> several<a></a> times)? Is it<a></a> another<a></a> feature<a></a> that<a></a>
I don’t<a></a> understand<a></a> or am<a></a> I facing<a></a> a bug?</p>
<p> </p>
<p><a></a>Cheers,</p>
<p>Maximilien</p>
<p> </p>
<p>--</p>
<p>Maximilien MELISSAS<a></a><a></a></p>
<p>Consultant, Alten<a></a><a></a> technology<a></a><a></a></p>
<p>Image processing<a></a><a></a> for CT NDT<a></a><a></a> @ Safran composite</p>
<p><a href="http://www.alten.com" target="_blank">http://www.alten.com</a></p>
<p> </p>
</font></div>
</div>
</div>
</div>
<p>#<br>
" Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles, être soumis aux règlementations relatives au contrôle des exportations ou ayant un caractère privé. S'ils ne vous sont pas destinés, nous vous signalons qu'il est strictement interdit de les divulguer, de les reproduire ou d'en utiliser de quelque manière que ce soit le contenu. Toute exportation ou réexportation non autorisée est interdite.Si ce message vous a été transmis par erreur, merci d'en informer l'expéditeur et de supprimer immédiatement de votre système informatique ce courriel ainsi que tous les documents qui y sont attachés."<br>
******<br>
" This e-mail and any attached documents may contain confidential or proprietary information and may be subject to export control laws and regulations. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. Unauthorized export or re-export is prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."<br>
#</p></div>
</blockquote><br><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">David Sarrut, Phd<br>Directeur 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><br>
</font></span><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>