I am experiencing an error when using the track finding/track fitter (not sure where the error occurs) for the ALLEGRO_o1_v03 simulation. I was writing a script to plot tracks overlayed with helices, and I found that for very specific events, I get a “segmentation violation” when trying to access the position of hits associated with a track. Inside the FittedTracksWithFilteredHits there is a list of Vector3d’s giving the positions of hits used to make the track, and it seems that the Vector3d’s (for only a handful of events) points to an invalid address. I have linked a folder with the necessary files to reproduce the error and a short description. Please let me know if I need to clarify anything, or if there is trouble with the link. Thanks!
Hi! Thank you for reporting this. You were absolutely right, there was indeed a bug. The fitter was not saving all of the filtered hits into the corresponding hit collection.
Could you please try this updated version of k4RecTracker and let me know if the issue is now resolved? In the meantime, I’ll open a PR to address this bug properly.
Thanks again for catching this!