Created attachment 466 [details] Patch for G4SDStructure against geant4.10.03.p01 source Summary: Calling G4SDManager::FindSensitiveDetector(G4String name, G4bool warning) propagates the warning flag to the first level of G4SDStructure::FindSensitiveDetector(name,warning), but inside that function the flag is not passed to the recursive call to G4SDStructure when SDs are organized in directories. Test scenario: 1. Call G4SDManager::GetSDPointer()->FindSensitiveDetector(name,false) with a name that contains a '/' but a second level name that does not exist yet (e.g. "remoll/det_2001") Expected behavior: Calling FindSensitiveDetector(name,false) should not warn when a detector is not found. Observed behavior: Regardless of the G4bool warning flag, a warning is generated when the second level SD name is not found. Reason for behavior: G4SDStructure::FindSensitiveDetector recursively calls tgtSDS->FindSensitiveDetector(aName) which throws away the flag (default value is true). Patch attached against geant4.10.03.p01 source.
Thank you for spotting the issue. The fix you specified will be included in the next patch release (or 10.4 release if we do not make another patch release soon). Kind regards, Makoto