<font style="font-size:14px;font-family:sans-serif">
<div><font style="font-family:sans-serif;font-size:14px">Great, I'm glad it helped. </font></div><div><font style="font-family:sans-serif;font-size:14px"></font></div><div><font style="font-family:sans-serif;font-size:14px">This is what I use in my mac files: </font></div><div><font style="font-family:sans-serif;font-size:14px"></font></div><div><font style="font-family:sans-serif;font-size:14px">/gate/actor/{DetectorName}/enableXDirection true</font></div><div>/gate/actor/{DetectorName}/enableYDirection true</div><div>/gate/actor/{DetectorName}/enableZDirection true</div><br><div>So maybe you have to specify X, Y, Z as well. Let us know. </div><div></div><div>Nils</div><div class="gmail_quote_attribution">On Feb 12 2021, at 11:02 am, Dmitry Hits <dmitry.hits@phys.ethz.ch> wrote:</div><blockquote class="gmail_quote"><div>Hi Nils, Hi Nicolas,</div><div><br></div><div>Thank you very much for the detailed answer! I only did some preliminary tests but I think that the option 1 will work for me.</div><div><br></div><div>By the way, I am not sure whether you have an access to the documentation files, but if you do, I may have found a small typo there.</div><div><br></div><div><a href="https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#phase-space-actor" title="https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#phase-space-actor">https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#phase-space-actor</a></div><div><div><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace"><span style="color:rgb(88, 40, 0)">/</span></font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace">gate</font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace"><span style="color:rgb(88, 40, 0)">/</span></font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace">actor</font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace"><span style="color:rgb(88, 40, 0)">/</span></font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace">MyActor</font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace"><span style="color:rgb(88, 40, 0)">/</span></font></font></span><span style="color:rgb(62, 67, 73)"><font style="font-size:0.9em"><font style="font-family:Consolas, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace">enableDirection false</font></font></span></div><div>Gave me an error. I think because it is not one of the methods of PhaseSpaceActor. </div></div><div><br></div><div>Cheers,</div><div><br></div><div>Dmitry</div><div><br><div><br><blockquote class=""><div>On 11 Feb 2021, at 15:07, Nils Krah <<a href="mailto:nils.krah@creatis.insa-lyon.fr" title="mailto:nils.krah@creatis.insa-lyon.fr">nils.krah@creatis.insa-lyon.fr</a>> wrote:</div><br><div><div><font style="font-family:sans-serif">Hi Dmitry,</font></div><div><font style="font-family:sans-serif">To extend Nicolas' suggestion:</font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">Bear in mind that a PhaseSpaceActor by default stores the particles' kinematic properties once it enters the volume to which the actor is attached.</font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">I see two ways in which you can use the PhaseSpaceActor for your purpose:</font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">1) Insert many PhaseSpaceActors at different depths into the volume in which you want to track the protons. You need to be a bit careful with the geometry because each actor needs a volume to attach to which in turn needs to be inserted into the volume across which the protons are tracked. Maybe very thin slices of a suitable material would work. Essentially, you are placing virtual tracking detectors into your volume. As a result you will get a list of events per actor, i.e. a list of root files, from which you need to merge information in post-processing, e.g. by matching the EventID. Per proton you will then get a set of transverse positions in discretized depths (where you placed the actors). Bear in mind that nuclear interactions can produce secondary particle with the same EventID, so that multiple positions can appear per actor. You will want some filtering strategy, based on what you try to analyze.</font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">2) Option 2: Attach one actor to the entire volume across which the protons are tracked and turn on the option "storeAllSteps". This will write an entry for each step of each proton to a root file, and not only when the proton enters the volume. You get one root file. You get the full information about where the proton and its descendants were at each tracking step. Clearly, output data is much larger. And the depths at which information is stored is not regularly spaced because Geant4 dynamically adjusts the step length. So again, you need post-processing to merge entries with the same EventID in the root file and take care of secondary particles according to your needs. If you want to compare transverse positions of the protons among each other, you might need to interpolate to common depths.</font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">Hope my explanations are clear, please ask if not.</font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">Cheers,</font></div><div><font style="font-family:sans-serif">Nils</font></div><br><div class="gmail_quote_attribution"><font style="font-family:sans-serif">On Feb 11 2021, at 10:39 am, Nicolas Arbor <</font><font style="font-family:sans-serif"><a href="mailto:nicolas.arbor@iphc.cnrs.fr" title="mailto:nicolas.arbor@iphc.cnrs.fr">nicolas.arbor@iphc.cnrs.fr</a></font><font style="font-family:sans-serif">> wrote:</font></div><blockquote class="gmail_quote"><div><font style="font-family:sans-serif"><font size="1">Hi Dmitry,</font></font></div><br><div><font style="font-family:sans-serif"><font size="1">I think the PhaseSpace actor could be suitable for that purpose, no ?</font></font></div><br><div><font style="font-family:sans-serif"><font size="1"><a href="https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#phase-space-actor" title="https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#phase-space-actor">https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#phase-space-actor</a></font></font></div><br><div><font style="font-family:sans-serif"><font size="1">Cheers,</font></font></div><div><font style="font-family:sans-serif"><font size="1">Nicolas</font></font></div><br><div class="moz-cite-prefix"><div><font style="font-family:sans-serif">Le 11/02/2021 à 10:12, Dmitry Hits a écrit :</font></div></div><blockquote class=""><div><div><font style="font-family:sans-serif">Dear Gate-Users,</font></div><br><div><font style="font-family:sans-serif">I was wondering if someone has already written an actor that stores the parameters of proton trajectory?</font></div><div><font style="font-family:sans-serif">In particular, I am interested to know the energy and direction of a proton at different points its trajectory.</font></div><br><div><font style="font-family:sans-serif">Cheers,</font></div><br><div><font style="font-family:sans-serif">Dmitry</font></div></div><div><div><font style="font-family:sans-serif">_______________________________________________</font></div><div><font style="font-family:sans-serif">Gate-users mailing list</font></div><div><font style="font-family:sans-serif"><a href="mailto:Gate-users@lists.opengatecollaboration.org" title="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.opengatecollaboration.org</a></font><font style="font-family:sans-serif"><a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" title="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></font></div></div></blockquote><br><div><div><font style="font-family:sans-serif">--</font></div><div><font style="font-family:sans-serif">***********************************************************************</font></div><div><font style="font-family:sans-serif">Nicolas ARBOR</font></div><div><font style="font-family:sans-serif">Maître de Conférences</font></div><div><font style="font-family:sans-serif">Université de Strasbourg - Faculté de Physique et Ingénierie</font></div><div><font style="font-family:sans-serif">Groupe de recherche DeSIs - Institut Pluridisciplinaire Hubert Curien</font></div><div><font style="font-family:sans-serif">23, rue du Loess BP28 67037 Strasbourg Cedex 2</font></div><div><font style="font-family:sans-serif">mail : </font><font style="font-family:sans-serif"><a href="mailto:nicolas.arbor@iphc.cnrs.fr" title="mailto:nicolas.arbor@iphc.cnrs.fr">nicolas.arbor@iphc.cnrs.fr</a></font><font style="font-family:sans-serif"> / tel : 03.88.10.64.27</font></div><div><font style="font-family:sans-serif">***********************************************************************</font></div></div><div><div><font style="font-family:sans-serif">_______________________________________________</font></div><div><font style="font-family:sans-serif">Gate-users mailing list</font></div><div><font style="font-family:sans-serif"><a href="mailto:Gate-users@lists.opengatecollaboration.org" title="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.opengatecollaboration.org</a></font></div><div><font style="font-family:sans-serif"><a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" title="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></font></div></div></blockquote></div></blockquote></div></div></blockquote>
</font>