| Summary: | G4ProcessManager::GetProcessListLength() returns incorrect value in a special case. | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Ivana.Hrivnacova |
| Component: | processes | Assignee: | kurasige |
| Status: | CLOSED FIXED | ||
| Severity: | normal | CC: | Isidro.Gonzalez.Caballero |
| Priority: | P2 | ||
| Version: | 3.2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
It is an obvious bug. I fixed it and revised version will be included in the tag "procman-V03-02-01". |
The returned value from G4ProcessManager::GetProcessListLength() happened to be 2x bigger than G4ProcessManager::GetProcessList()->length() for the particle Cr51[0.0] (coming from PiMinusAbsorptionAtRest process). Possible reason for that can be (?) the copy constructor of G4ProcessManager: G4ProcessManager::G4ProcessManager(G4ProcessManager &right) :duringTracking(false) { // .. skipped numberOfProcesses = right.numberOfProcesses; // ...skipped for (G4int idx=0; idx < right.numberOfProcesses; idx++) { // copy contents in theProcessList // ... skipped numberOfProcesses +=1; } // ... }