# Retrieve position at a given time

**URL:** <https://geant4-forum.web.cern.ch/t/retrieve-position-at-a-given-time/12081>\
**Category:** Particles, Track, Event, Run and Biasing\
**Created:** [April 14, 2024, 12:04am UTC](https://geant4-forum.web.cern.ch/t/retrieve-position-at-a-given-time/12081 "2024-04-14T00:04:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ileonmon](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@ileonmon](https://geant4-forum.web.cern.ch/u/ileonmon)\
**Post date:** [April 14, 2024, 12:04am UTC](https://geant4-forum.web.cern.ch/t/retrieve-position-at-a-given-time/12081/1 "2024-04-14T00:04:38Z")

</div>

Please fill out the following information to help in answering your question, and also see [tips for posting code snippets](https://geant4-forum.web.cern.ch/t/how-to-post-code-snippets/9944). If you don’t provide this information it will take more time to help with your problem!

\_Geant4 Version:\_geant4-11.1.2  
\_Operating System:\_linux  
\_Compiler/Version:\_gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0  
\_CMake Version:\_cmake version 3.22.1

* * *

Hi,

I would like to know if it is possible to have a particle’s position at a given time; I am able to have the position, momentum, energy, etc., for every pre- and post-step. However, the time interval is not constant. I mean, I have the position but at different intervals of time for different particles.  
I would like to use this information to animate the process, but not inside Geant 4.

Thank you.

Ildefonso.

---

<div class="post-metadata">

**Author:** ![mkelsey](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/mkelsey/32/49_2.png) [@mkelsey](https://geant4-forum.web.cern.ch/u/mkelsey)\
**Post date:** [April 14, 2024, 4:01pm UTC](https://geant4-forum.web.cern.ch/t/retrieve-position-at-a-given-time/12081/2 "2024-04-14T16:01:39Z")

</div>

Right. The step-by-step information is not uniform in time, because Geant4 isn’t a “time based” simulation, it’s “interaction based.” However, I think that if you store “rich trajectories” then you get additional information, including intermediate points interpolated for you between steps.
