ToA information in Timepix4

Hi @simonspa

okay, then all should be fine now, thanks again for looking into it!

I am already using an adjusted version of the ADTreeWriter (with branches adjusted to Tpx4 structure instead of Tpx3), but I just saw that I had still called the GlobalTime as an UInt_t instead of Double_t, that fixed the resolution issue :sweat_smile:

I have also tried to implement the track_id as was discussed in this thread

because I wanted to check if my clustering algorithm is properly differentiating the tracks/particles.
I added the lines as shown in the thread/Gitlab links into the MCParticle class and incremented ClassDefOverride(MCParticle, 10); to ClassDefOverride(MCParticle, 11); (as there are now already 10), but when I try to call it the same way as the ParticleID I still get only zeros. Do you have an idea what could be the issue there?

auto particles = hit.getPrimaryMCParticles();
auto mcparticle = (particles.empty() ? nullptr : particles.front());
        data_.pdg_codes_ = (mcparticle != nullptr ? mcparticle->getParticleID() : 0);
        data_.track_ = (mcparticle != nullptr ? mcparticle->getParticleTrackID() : 0);

Here is the ADTreeWriter I currently use: CERNBox

Thanks and all the best,
Viktoria