ldmx-sw icon indicating copy to clipboard operation
ldmx-sw copied to clipboard

Make incident region matching name configurable

Open tomeichlersmith opened this issue 5 years ago • 1 comments

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.

tomeichlersmith avatar Jul 01 '20 21:07 tomeichlersmith

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

tvami avatar May 06 '24 19:05 tvami

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

tvami avatar Sep 09 '24 04:09 tvami

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.

tomeichlersmith avatar Sep 09 '24 14:09 tomeichlersmith

Maybe close this as not planned / wontfix?

tvami avatar Sep 17 '24 21:09 tvami

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.

tomeichlersmith avatar Sep 17 '24 22:09 tomeichlersmith