-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Labels
Description
The code that activates GEANT4 sensitive detectors is fragile, as it relies on string comparison to guess what volumes should be made sensitive. For example,
Offline/Mu2eG4/src/Mu2eWorld.cc
Line 983 in 6b14d1b
| if (LVname.find("EMFModule") != std::string::npos) { |
There are many more instances of that in Mu2eWorld.cc
This has already caused a problem (PR #1640).
A better approach is to store pointers to volumes that need to be made sensitive at the volume creation time and pass the pointers to the code that activates sensitive detectors.