Problem 285 - G4ProcessManager::GetProcessListLength() returns incorrect value in a special case.
Summary: G4ProcessManager::GetProcessListLength() returns incorrect value in a special...
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes (show other problems)
Version: 3.2
Hardware: PC Linux
: P2 normal
Assignee: kurasige
URL:
Depends on:
Blocks:
 
Reported: 2001-08-13 05:39 CEST by Ivana.Hrivnacova
Modified: 2012-02-15 05:29 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ivana.Hrivnacova 2001-08-13 05:39:07 CEST
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;
   }
   // ...
}
Comment 1 kurasige 2001-08-16 01:22:59 CEST
It is  an obvious bug.
I fixed it and revised version will be included in the tag "procman-V03-02-01".