Hi all!
I’m currently new to the Allpix environment and I am looking into measuring the time it takes for a particle to fly between two Timepix4 sensors. This could be done with the time of arrival information of the pixel hits. Could anybody give any tips on how to obtain this information. I have been able to save all the simulation data using the [ROOTObjectWriter]
module. However navigating the root file has not been very successful.
Thank you in advance!
Floris
Dear @ffassin
first of all - welcome!
I hope you’ll find your way around the Allpix Squared ecosystem quickly!
Assuming you would store your information using something akin to
[ROOTObjectWriter]
include = MCParticle, PixelHit
you essentially have two ways to obtain the time of flight information:
- You could take the two
MCParticle
objects in the two detectors, get their getGlobalTime()
and subtract it. This would essentially represent the Monte Carlo truth of the flight information, something that you can compare with. (see here)
- To include the effects from your detectors, you could - just as you said - take the two
PixelHit
objects (or more, if a cluster is formed) and use their getGlobalTime()
which, depending on your simulation setup, includes effects from signal formation and even your front-end peaking. see here
Now as for how to get this information from the ROOT file: we have some example anslysis scripts in the repository, see here:
Depending on whether you prefer C/C++ or Python there is either
I hope this helps! Feel encouraged to contribute your own example (maybe a short, clean script to calculate time-of-flight?
) to the repository!
Also, maybe consider attending our workshop in Amsterdam beginning of May: 6th Allpix Squared User Workshop (7-9 May 2025): Overview · Indico
All the best,
Simon
P.S. with @hwennlof you have one of the main developers sitting right next door 
Dear Simon,
Thank you for the quick reply.
The tools/root_analysis_macros was indeed what I was searching for.
I’ll see if I can adjust it such that I get exactly what I am interested in.
I signed up for the workshop in May, so I’ll see you then!
-Floris
Top, very nice to hear @ffassin !
(just in case, abstract submission is still open, you are very welcome to still submit an abstract telling us about your project!)