Hi,
sorry for the confusion, I should probably document this better.
You can’t “replay” a track. When you call GetCluster
, the previous cluster and its electrons are discarded. After the first loop, you’ve reached the end of the track and the body of the second loop is never executed because GetCluster
always returns false
(as there are no more clusters on the track). I’m a bit surprised that the program crashes with a segmentation fault though (not sure why).
The issue should be easy to fix, you can just add the coordinates of the electrons to a vector already in the first loop.
PS: you don’t need to add the ee, dx, dy, dz
parameters to the list. They are there in the interface because other implementations might provide them, but Heed doesn’t calculate them.