<font style="font-size:14px;font-family:sans-serif">
<div><font style="font-family:sans-serif;font-size:14px">Hi Dmitry, </font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">To extend Nicolas' suggestion: </font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif"></font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><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></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif"></font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">I see two ways in which you can use the </font></font><font style="font-family:sans-serif">PhaseSpaceActor</font><font style="font-size:14px"><font style="font-family:sans-serif"> for your purpose:</font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif"></font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">1) Insert many </font></font><font style="font-family:sans-serif">PhaseSpaceActors</font><font style="font-size:14px"><font style="font-family:sans-serif"> 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></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif"></font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><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 </font></font><font style="font-family:sans-serif">to a root file</font><font style="font-size:14px"><font style="font-family:sans-serif">, 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></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif"></font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">Hope my explanations are clear, please ask if not. </font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif"></font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">Cheers,</font></font></font></div><div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">Nils</font></font></font></div><br><div class="gmail_quote_attribution">On Feb 11 2021, at 10:39 am, Nicolas Arbor <nicolas.arbor@iphc.cnrs.fr> wrote:</div><blockquote class="gmail_quote"><div><font size="1">Hi Dmitry,</font></div><br><div><font size="1">I think the PhaseSpace actor could be suitable for that purpose, no ?</font></div><br><div><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></div><br><div><font size="1">Cheers,</font></div><div><font size="1">Nicolas</font></div><br><div class="moz-cite-prefix"><div>Le 11/02/2021 à 10:12, Dmitry Hits a écrit :</div></div><blockquote class=""><div><div>Dear Gate-Users,</div><br><div>I was wondering if someone has already written an actor that stores the parameters of proton trajectory?</div><div>In particular, I am interested to know the energy and direction of a proton at different points its trajectory.</div><br><div>Cheers,</div><br><div>Dmitry</div></div><div><div>_______________________________________________</div><div>Gate-users mailing list</div><div><a href="mailto:Gate-users@lists.opengatecollaboration.org" title="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.opengatecollaboration.org</a><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></div></div></blockquote><br><div><div>--</div><div>***********************************************************************</div><div>Nicolas ARBOR</div><div>Maître de Conférences</div><div>Université de Strasbourg - Faculté de Physique et Ingénierie</div><div>Groupe de recherche DeSIs - Institut Pluridisciplinaire Hubert Curien</div><div>23, rue du Loess BP28 67037 Strasbourg Cedex 2</div><div>mail : <a href="mailto:nicolas.arbor@iphc.cnrs.fr" title="mailto:nicolas.arbor@iphc.cnrs.fr">nicolas.arbor@iphc.cnrs.fr</a> / tel : 03.88.10.64.27</div><div>***********************************************************************</div></div><div><div>_______________________________________________</div><div>Gate-users mailing list</div><div>Gate-users@lists.opengatecollaboration.org</div><div>http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</div></div></blockquote>
</font>