<div dir="ltr"><div>Hi,</div><div>I don't know about opitical simulations and surface definitions... but I have observed the same change in behavior for the definition of sources. See e.g. </div><div><a href="https://github.com/OpenGATE/GateContrib/commit/1344cfdc791bbfce90d2b716bc2f6cbf106525dd">https://github.com/OpenGATE/GateContrib/commit/1344cfdc791bbfce90d2b716bc2f6cbf106525dd</a></div><div>I never understood this change in behavior, just accepted it...</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 16, 2020 at 4:33 PM Carlotta Trigila <<a href="mailto:ctrigila@ucdavis.edu">ctrigila@ucdavis.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Dear GATE Users, </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">I am specifically addressing this e-mail to anyone using optical simulations and surface definition with GATE v9.0. </span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">I noticed that in the last versions of GATE the definition of the surfaces for optical simulations has to be performed AFTER the "/gate/run/initialize" command. </span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">E.g. from <span style="background-color:rgb(255,255,255);display:inline"><i>optical.mac</i> benchmark example</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">"
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/run/initialize</p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36);min-height:14px">
<br>
</p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
# Definition of surfaces</p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/detector/surfaces/name <span>                           
</span>Detection1<span> </span></p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/detector/surfaces/insert <span>                         
</span>Electronics</p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/detector/surfaces/Detection1/setSurface<span>           
</span>perfect_apd<span>   </span></p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/Electronics/surfaces/name<span>                         
</span>Detection2<span> </span></p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/Electronics/surfaces/insert<span>                       
</span>detector<span> </span></p>
<p style="margin:0px;font:12px Menlo;color:rgba(255,255,255,0.85);background-color:rgb(31,31,36)">
/gate/Electronics/surfaces/Detection2/setSurface <span>
        </span>perfect_apd<span> </span></p>
"</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
If we move these commands BEFORE the initialization, the simulation crashes with a message like </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(255,255,255)">"</span><span style="font-variant-ligatures:no-common-ligatures;background-color:rgba(0,0,0,0.9);color:rgb(255,255,255)">[G4-cerr] ***** Illegal application state <<span style="color:rgba(255,255,255,0.85);font-family:Menlo;font-size:12px;background-color:rgb(31,31,36);display:inline">/gate/detector/surfaces/insert</span></span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;font-variant-ligatures:no-common-ligatures;background-color:rgba(0,0,0,0.9);color:rgb(255,255,255)"><span style="font-size:12px;font-family:Menlo;color:rgba(255,255,255,0.85)"> </span><span style="color:rgba(255,255,255,0.85);font-family:Menlo;font-size:12px;background-color:rgb(31,31,36)">Electronics</span>>
 *****</span><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">".</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">However, I am sure that with GATE v8.0 (and older) we were able to define them BEFORE the initialization. I am not sure of what happens with the v8.2.</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Did someone ever notice it before? Did you have an idea of what could have changed? </span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Many thanks for your help, </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Carlotta Trigila </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div>
<div id="gmail-m_8535220387196687498Signature">
<div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<p style="margin-top:0px;margin-bottom:0px"><span>-- <br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span>Carlotta Trigila, PhD  <br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span><br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span>Department of Biomedical Engineering
<span>– GBSF 2505</span><br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span><span>University of California, Davis</span><br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span><span>451 East Health Sciences Drive</span><br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span>Davis, CA 95616 <br>
</span></p>
<p style="margin-top:0px;margin-bottom:0px"><span></span><span><a href="http://ccjliu@ucdavis.edu" rel="noopener noreferrer" target="_blank">ctrigila@ucdavis.edu
</a></span><br>
<span></span></p>
<span></span> <br>
</div>
</div>
</div>
</div>
<div id="gmail-m_8535220387196687498appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8535220387196687498divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Gate-users <<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>> on behalf of Mathieu Dupont <<a href="mailto:mdupont@cppm.in2p3.fr" target="_blank">mdupont@cppm.in2p3.fr</a>><br>
<b>Sent:</b> Thursday, October 22, 2020 2:17 AM<br>
<b>To:</b> 강한규 <<a href="mailto:lovehangulp@naver.com" target="_blank">lovehangulp@naver.com</a>><br>
<b>Cc:</b> GATE-users <<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a>><br>
<b>Subject:</b> Re: [Gate-users] GATEv9.0 Scintillation Process is NOT working.(Solved)</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>Thx for your report,<br>
<br>
The aim of my fix is to make scintillation working for the combination<br>
 "GATEv9.0  (with my patch) + Geant4.10.06.p02 "<br>
<br>
Can you test it, if you have time  ? <br>
<br>
<br>
<br>
On Thu, 22 Oct 2020 16:52:32 +0900<br>
강한규 <<a href="mailto:lovehangulp@naver.com" target="_blank">lovehangulp@naver.com</a>> wrote:<br>
<br>
> Dear Mathieu Dupont and GATE users,<br>
>  <br>
> After downgrading the Geant4 version from Geant4.10.06.p02 to<br>
> Geant4.9.05.p01, the scintillation process works in GATEv9.0<br>
> (Attached file). (Before)GATEv9.0 + Geant4.10.06.p02 -> Scintillation<br>
> Process does NOT work. (After) GATEv9.0 + Geant4.9.05.p01 -><br>
> Scintillation Process does work. <br>
> You can find issue and fix on the following links of the GATE git hub.<br>
> Issue: <a href="https://github.com/OpenGATE/Gate/issues/346" target="_blank">https://github.com/OpenGATE/Gate/issues/346</a>
<br>
> Fix: <a href="https://github.com/OpenGATE/Gate/pull/368" target="_blank">https://github.com/OpenGATE/Gate/pull/368</a>
<br>
>  <br>
> Thanks Mathieu Dupont for your good advice.<br>
>  <br>
> Best regards,<br>
>  <br>
> Han Gyu Kang<br>
>  <br>
>  <br>
> --------Han Gyu Kang, Ph.D, Researcher<br>
> <br>
> National Institute of Radiological Sciences (NIRS)<br>
> National Institutes for Quantum and Radiological Science and<br>
> Technology (QST) 4-9-1 Anagawa, Inage-ku, Chiba 263-8555, JAPAN<br>
>  <br>
> -----Original Message-----<br>
> From: "강한규"<<a href="mailto:lovehangulp@naver.com" target="_blank">lovehangulp@naver.com</a>><br>
> To: "GATE-users"<<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a>>;<br>
> Cc:<br>
> Sent: 2020-06-08 (월) 20:20:02 (GMT+09:00)<br>
> Subject: [Gate-users] GATEv9.0 Scintillation Process is NOT working.<br>
>  <br>
> Dear GATE users,<br>
>  <br>
> Is there anyone who checked the scintillation process in GATEv9.0?<br>
>  <br>
> I installed GATEv9.0 on my Ubuntu Linux PC.<br>
> Of course, the "GATE_USE_OPTICAL" option was turned ON during the<br>
> installation. After GATE installation, I checked that everything<br>
> works fine except the scintillation process. <br>
> The optical.mac in the benchImaging folder is working well as it uses<br>
> "opticalphoton" as a source. I checked that Cerenkov process is also<br>
> working well. <br>
> However, "Scintillation Process" is NOT working in GATEv9.0 optical<br>
> simulation. If there is anyone who succeeded in scintillation process<br>
> in GATEv9.0, please let me know. <br>
> Best regards,<br>
>  <br>
> Han Gyu Kang<br>
>  <br>
> --------Han Gyu Kang, Ph.D, Researcher<br>
> <br>
> National Institute of Radiological Sciences (NIRS)<br>
> National Institutes for Quantum and Radiological Science and<br>
> Technology (QST) 4-9-1 Anagawa, Inage-ku, Chiba 263-8555, JAPAN<br>
> <br>
> <br>
> <br>
<br>
<br>
<br>
-- <br>
Démobilisé contre la réforme des retraites et la LPPR<br>
-- <br>
Mathieu Dupont - Ingénieur de Recherche<br>
CENTRE DE PHYSIQUE DES PARTICULES DE MARSEILLE<br>
UMR 7346 - Aix-Marseille Université - CNRS/IN2P3<br>
163 avenue de Luminy, Case 902, F -13288 Marseille CEDEX 09<br>
Tél.: +33 (0) 4 91 82 72 19<br>
Site : <a href="http://cppm.in2p3.fr" target="_blank">cppm.in2p3.fr</a> - Email : <a href="mailto:mdupont@cppm.in2p3.fr" target="_blank">mdupont@cppm.in2p3.fr</a><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></div>
</span></font></div>
</div>

_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></blockquote></div>