MCParticles Created Outside Sensor Can Be Linked
Summary
In some cases (e.g. backscattering) there can be a parent-daughter relation between two MCParticles despite both of their origins being outside the sensor volume. E.g. primary proton crosses sensor, interacts with PCB and creates secondary that backscatters and crosses sensor in the other direction. Since the initial particle is known, we have its track ID stored and will match it to the secondary's parent track ID - even though it was created outside the sensor volume and should be considered a primary to this sensor.
Steps to reproduce
allpix -c Main.conf -o random_seed=8156334119563125231 -o skip_events=9027 -o number_of_events=1
Example Configuration
What is the current bug behavior?
Link exists between the two protons created:
Particle ID: 2212
Local Start Position: (4.88646,4.12467,-0.1425) mm
Local End Position: (4.88647,4.12467,0.1425) mm
Self: 0x55f343bcdd30
Parent: 0
Particle ID: 2212
Local Start Position: (5.87754,4.04292,0.1425) mm
Local End Position: (6.05043,4.03337,-0.1425) mm
Self: 0x55f343ef8840
Parent: 0x55f343bcdd30
What is the expected correct behavior?
No link should be created since both originate outside the sensor volume:
Particle ID: 2212
Local Start Position: (4.88646,4.12467,-0.1425) mm
Local End Position: (4.88647,4.12467,0.1425) mm
Self: 0x55f343bcdd30
Parent: 0
Particle ID: 2212
Local Start Position: (5.87754,4.04292,0.1425) mm
Local End Position: (6.05043,4.03337,-0.1425) mm
Self: 0x55f343ef8840
Parent: 0
Relevant event logs and/or screenshots
See forum discussion: https://allpix-squared-forum.web.cern.ch/t/particle-incidence-direction/268