Make incident region matching name configurable
Right now, in TrackMap::findIncident the name of the region we want the particle to be incident on is hardcoded to be Calorimeter. This hardcoding is begging for an error down the line where someone changes the name of the region in the gdml and then this method is broken.
This seems to be not an issue anymore, right?
https://github.com/LDMX-Software/ldmx-sw/blob/trunk/SimCore/src/SimCore/TrackMap.cxx#L39C22-L39C33
It seems it's coming from the ancestry_.
EDIT: I see this part still has the calorimeter hardcoded: https://github.com/LDMX-Software/ldmx-sw/blob/trunk/SimCore/src/SimCore/TrackMap.cxx#L134
Which producer is supposed to configure this? So far I see that it's used in the insert
https://github.com/LDMX-Software/ldmx-sw/blob/trunk/SimCore/src/SimCore/TrackMap.cxx#L29
which is then used in the TrackingAction
https://github.com/LDMX-Software/ldmx-sw/blob/trunk/SimCore/src/SimCore/G4User/TrackingAction.cxx#L58
but then PreUserTrackingAction I dont see anywhere
https://github.com/search?q=repo%3ALDMX-Software%2Fldmx-sw%20PreUserTrackingAction&type=code
You are correct, it is currently hardcoded into the TrackMap right now
https://github.com/LDMX-Software/ldmx-sw/blob/24423afa333ad19a703cb35b377fcebdbc7cf0ed/SimCore/src/SimCore/TrackMap.cxx#L132-L135
This would be a parameter of the simulator. The reason I made this issue is because, at the time, I didn't want to spend the time necessary to figure out how to pass a configuration option down from the Simulator to the TrackMap. It has fallen by the way side because - as far as I know - no-one else has a physics study that would rely on this being changed from CalorimeterRegion to something else.
Maybe close this as not planned / wontfix?
Yea that's fair, we can re-open or make a new one if some physics study actually needs a different incident region to be deduced.