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,
|
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.