| Summary: | G4MultipleSensitiveDetector does not handle correctly some corner cases | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Andrea Dotti <andrea.dotti> |
| Component: | digits_hits/detector | Assignee: | Andrea Dotti <andrea.dotti> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P4 | ||
| Version: | 10.2 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Andrea Dotti
2016-11-11 00:19:40 CET
There is a corner case not handled correctly, if two logical volumes have the same name, and each has multipleSD attached to it, the names of the multiSDs will be the same causing an overwrite in the SD structure. Also I am not 100% sure the handling of names is correct, and I think that in case multipleSD are used they are registered multiple times: Why I did not see warnings that should be spit out in my tests? G4VUserDetectorConstruction::SetSensitiveDetector( ) {
G4SDManager GetSDMpointer()->AddNewDetector(aSD); (1)
[...]
msd->AddSD(aSD); This contains the same line (1)
}
Please ignore the split of this bug-report in several messages Current code checks for adding of the same pointer to the tree of SDs. If pointer is already there nothing happens, while a warning is emitted only if a new SD with an already seen name is added. However current implementation of MultiSD does not allow to share the same SD instance between different LogVols, so I will implement a change that does not add the SD to the manager in the proxy. In addition the proxy name will include the pointer of the log volume. Fixed in tags: digits_hits-V10-02-09 and run-V10-02-38 |