MC particle reference broken in files
Summary
It seems like MC particle relations are not written properly to file. On mac, all MC particle info in an event is that of the first MC particle read (or first detector, unclear), while on linux the throwMissingReference exception is thrown.
This behaviour only occurs if we write things to file and read them back in. If the full simulation is run in one go then all is fine and the MC particle info (such as local and global positions) are different from plane to plane.
Example Configuration
Attached in next post. Running./bin/allpix -c dut0config.conf
will run the simulation in 1 go, and gives the correct debug output from CorryvreckanWriter. Running ./bin/allpix -c dut0digit.conf
will read the output file created by the previous allpix run containing only PixelCharges and MCParticles, and attempt to digitise them.
The bug is only observed in CorryvreckanWriter because this is the only module navigating the MC truth history (as opposed to grabbing all particles existing).