Closed WitekPokorski closed 2 weeks ago
Can one of the admins verify this patch?
Looks like example1 is failing with these changes
OK, this is super weird. The reason for the crash is that sometimes (very rarely) the volume that is reconstructed as sensitive is ECAL, which is the mother volume of the sensitive detectors (and it's not sensitive on its own). The thing is that all other sensitive volumes are reconstructed OK and all the physics results are correct. I don't know what's happening, but one possibility is that with the fix for the navigation history, we are now hitting some rare bug in VecGeom which gives the mother volume instead of the daughter volume in some rare cases. But I could be wrong.... I will keep on investigating.
OK, I found one additional problem which I overlooked in the previous fix (visible only in specific case which we hit with example1). Now, it should be all fine.
This fixes the wrong logic in FillG4NavigationHistory and adds the missing MaterialCutsCouple pointer in the 'fake' step reconstructed from AdePT information and used to call the G4 sensitive detectors.