Problem 1082

Summary: repeated calls to G4LogicalVolume::TotalVolumeEntities() give wrong value
Product: Geant4 Reporter: munther.m.hindi
Component: geometry/volumesAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: 9.2   
Hardware: PC   
OS: Linux   

Description munther.m.hindi 2009-09-24 19:09:55 CEST
In geant4.9.2.p01 there is a logical mistake in the function 
G4LogicalVolume::TotalVolumeEntities(). The function uses a static 
variable (static G4int vols=0) that is used to accumulate the number 
of repeated entities recursively. This works correctly the first time 
that function is called, but if the function is called again you will 
get double the correct number, then  triple, then quadruple, etc, 
since the static variable still retains the value from previous 
calls.
Comment 1 Gabriele Cosmo 2009-09-25 10:02:28 CEST
The implementation has been corrected in the development version
and will be included in the next release or patch. Thanks.