<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">And thanks to Andreas as well (Luc missed his mail ;-)<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 2 févr. 2017 à 17:23, Luc SIMON <<a href="mailto:uhqd75@gmail.com" class="">uhqd75@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Dear all and in particular:<br class=""><b class=""><a href="mailto:david.sarrut@creatis.insa-lyon.fr" class="">david.sarrut@creatis.insa-lyon.fr</a><br class=""><a href="mailto:gergely.patay@gmail.com" class="">gergely.patay@gmail.com</a><br class=""><a href="mailto:alexvergaragil@gmail.com" class="">alexvergaragil@gmail.com</a><br class=""><a href="mailto:thomas@deschler.fr" class="">thomas@deschler.fr</a><br class=""></b></div><b class="">and all the authors of <a href="http://doseactor.cc" class="">DoseActor.cc</a> ...<br class=""></b><div class=""><br class=""><b class=""><br class=""></b></div><div class=""><b class="">Following the mail of Tony Younes we investigated this bug.<br class=""></b></div><div class=""><b class="">We found that the NaN values seem to come from <a href="http://dosetoactor.cc" class="">DoseToActor.cc</a> at this level (l 360)<br class=""></b><br class=""><br class=""><br class=""><br class="">    // Other particles should be taken into account (Helium etc), but bug ? FIXME<br class="">    if (PartName== "proton" || PartName== "e-" || PartName== "e+" || PartName== "deuteron") {<br class="">      <br class="">      DEDX = emcalc->ComputeTotalDEDX(Energy, PartName, material, cut);<br class="">      DEDX_Water = emcalc->ComputeTotalDEDX(Energy, PartName, "G4_WATER", cut);<br class="">      doseToWater=edep/density/Volume/gray*(DEDX_Water/1.)/(DEDX/(density*e_SI));<br class="">    }<br class="">    else {<br class="">      DEDX = emcalc->ComputeTotalDEDX(100, "proton", material, cut);<br class="">      DEDX_Water = emcalc->ComputeTotalDEDX(100, "proton", "G4_WATER", cut);<br class="">      doseToWater=edep/density/Volume/gray*(DEDX_Water/1.)/(DEDX/(density*e_SI));<br class="">    }<br class=""><br class=""><br class=""></div><div class=""><b class="">In this "if" section sometimes DEDX <u class="">and </u>DEDX_Water are 0.0 and the division 0 / 0 is NaN (please note that 3 / 0 is infinite, which is not a NaN value...)<br class=""></b><br class=""></div><div class="">This problem is fixed. But now another question : why in the "else" part DEDX_water is computed for proton ????? (while proton should be considered in the first part... )<br class=""><br class=""><br class=""></div><div class="">Moreover, photons should not contribute to "dose". So why do we need this "else" part ????<br class=""><br class=""></div><div class="">Thank you for your help.<br class=""><br class=""></div><div class="">Luc & Tony<br class=""></div><div class=""><br class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><br class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-01-31 16:22 GMT+01:00 Grevillot Loic <span dir="ltr" class=""><<a href="mailto:loic.grevillot@medaustron.at" target="_blank" class="">loic.grevillot@medaustron.at</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div bgcolor="white" link="blue" vlink="purple" lang="EN-US" class="">
<div class="m_-6703093031588237583WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="">Hi,<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="">Could you send macros and output files?<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1f497d" lang="DE" class="">Best,<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1f497d" lang="DE" class="">Loïc</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""><u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""><u class=""></u> <u class=""></u></span></p>
<div class="">
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in" class=""><p class="MsoNormal"><b class=""><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" class="">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" class=""> tony youness [mailto:<a href="mailto:tony_youness@live.com" target="_blank" class="">tony_youness@live.com</a>]
<br class="">
<b class="">Sent:</b> Tuesday, January 31, 2017 3:14 PM<br class="">
<b class="">To:</b> Grevillot Loic; <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank" class="">gate-users@lists.<wbr class="">opengatecollaboration.org</a><br class="">
<b class="">Subject:</b> Re: Gate dose to water problem<u class=""></u><u class=""></u></span></p>
</div>
</div><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="">Hi,<u class=""></u><u class=""></u></p><p class="">I am simulating high energy photon beams (6 and 10 MeV) for external radiotherapy applications.
<u class=""></u><u class=""></u></p><p class="">I tried both ("Water" and "G4_WATER") and I am still getting NAN values (only when the absorbed dose is reported as absorbed dose to water). The voxel values between both absorbed dose report (Dose to medium and Dose to water) are also different even though
 that the medium is WATER.<u class=""></u><u class=""></u></p><p class="">Regards, <u class=""></u><u class=""></u></p><p class="">Tony<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
<div class=""><p class="MsoNormal">On 31/01/17 8:37 am, Grevillot Loic wrote:<u class=""></u><u class=""></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" class=""><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="">Hello,</span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""> </span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="">Which beam are you simulating?
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="FR" class="">(photons, electrons, light ions, etc.)</span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="">Which water did you define in your simulation? “Water” is different from “GEANT4_WATER” -> could you try using GEANT4_WATER?</span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""> </span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1f497d" lang="DE" class="">Best,</span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1f497d" lang="DE" class="">Loïc</span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""> </span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""> </span><u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class=""> </span><u class=""></u><u class=""></u></p>
<div class="">
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in" class=""><p class="MsoNormal"><b class=""><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" class="">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" class=""> Gate-users [<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank" class="">mailto:gate-users-bounces@<wbr class="">lists.opengatecollaboration.<wbr class="">org</a>]
<b class="">On Behalf Of </b>tony youness<br class="">
<b class="">Sent:</b> Monday, January 30, 2017 1:04 PM<br class="">
<b class="">To:</b> <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank" class="">gate-users@lists.<wbr class="">opengatecollaboration.org</a><br class="">
<b class="">Subject:</b> [Gate-users] Gate dose to water problem</span><u class=""></u><u class=""></u></p>
</div>
</div><p class="MsoNormal"> <u class=""></u><u class=""></u></p><p class="">Dear All,<u class=""></u><u class=""></u></p><p class="">I am facing a problem with gate dose actor. When enabling dose to water i get Nan values in some of the voxels in the water region of my phantom. I also get different values in the water voxels between both dose reports (dose to medium and dose to water).
 It seems like there's a bug when gate tries to converts dose to medium into the dose to water
<u class="">when in the water region</u>. Has anyone already faced this problem? Any help would be much appreciated.<u class=""></u><u class=""></u></p><p class="">Kind Regards,<u class=""></u><u class=""></u></p><p class="">Tony Younes<u class=""></u><u class=""></u></p><p class=""> <u class=""></u><u class=""></u></p><p class=""> <u class=""></u><u class=""></u></p><p class=""> <u class=""></u><u class=""></u></p><p class="MsoNormal"><b class=""><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#112359" lang="EN-GB" class="">Disclaimer:</span></b><span style="font-size:10.0pt" class=""><br class="">
</span><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-GB" class="">Please notice our E-Mail Disclaimer <a href="http://www.medaustron.at/email-disclaimer/" target="_blank" class=""><span style="color:#112359" class="">http://www.<wbr class="">medaustron.at/email-<wbr class="">disclaimer/</span></a></span> <u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</blockquote><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
<div class="m_-6703093031588237583WordSection1"><p class="MsoNormal"><small class=""><span class=""><u class=""></u><u class=""></u></span><b class=""><span style="font-family:"Verdana","sans-serif";color:rgb(17,35,89)" lang="EN-GB" class="">Disclaimer:</span></b><br class="">
<span style="font-family:"Verdana","sans-serif";color:rgb(17,35,89)" lang="EN-GB" class="">Please notice our E-Mail Disclaimer <a href="http://www.medaustron.at/email-disclaimer/" target="_blank" class=""><span style="color:rgb(17,35,89)" class="">http://www.<wbr class="">medaustron.at/email-<wbr class="">disclaimer/</span></a></span></small><span class=""><u class=""></u><u class=""></u></span><u class=""></u> <u class=""></u></p>
</div>
<br class="">
</div>

<br class="">______________________________<wbr class="">_________________<br class="">
Gate-users mailing list<br class="">
<a href="mailto:Gate-users@lists.opengatecollaboration.org" class="">Gate-users@lists.<wbr class="">opengatecollaboration.org</a><br class="">
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank" class="">http://lists.<wbr class="">opengatecollaboration.org/<wbr class="">mailman/listinfo/gate-users</a><br class=""></blockquote></div><br class=""><br clear="all" class=""><br class="">-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">___________________<br class=""><br class="">SIMON Luc, Physicien Médical, PhD<br class="">Département d'Ingénierie et de Physique Médicale - IUCT-Oncopole - Toulouse, FRANCE</div><div class="">INSERM UMR 1037 (CRCT) - Equipe 15 - Toulouse, FRANCE</div></div></div></div></div>
</div>
_______________________________________________<br class="">Gate-users mailing list<br class=""><a href="mailto:Gate-users@lists.opengatecollaboration.org" class="">Gate-users@lists.opengatecollaboration.org</a><br class="">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</div></blockquote></div><br class=""></div></body></html>