Problem 223 - transfer of several copies of the same logical volume with g3tog4
Summary: transfer of several copies of the same logical volume with g3tog4
Status: RESOLVED DUPLICATE of problem 188
Alias: None
Product: Geant4
Classification: Unclassified
Component: g3tog4 (show other problems)
Version: other
Hardware: PC Linux
: P2 normal
Assignee: lockman
URL:
Depends on:
Blocks:
 
Reported: 2001-02-23 03:44 CET by desorgher
Modified: 2001-03-05 06:42 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 desorgher 2001-02-23 03:44:56 CET
The problem occurs when generating the geometry tree in geant4 by using
G3toG4BuildTree(G3VolTable*,G3VolTable*) function.
When there is only one copy of a logical volume G3toG4BuildTree works perfectly.
But if more than one copies  have to be created, G3toG4BuildTree create only the
half of it: The error occurs in the loop whic is between line 65 and line 103 of
the  file G3toG4BuildTree.cc.
.
.The loop is declared as following (line 65)
.
for (G4int i=0; i<curVTE->NPCopies(); i++){

In this definition the curVTE->NPCopies() defined the number of logical volume
copies  in curVTE. At the end of the loop (line 101) we have the following
statement
curVTE->ClearG3PosCopy(i);
By this way the curVTE->NPCopies() is decreased by 1 and the born of the loop
in  (line 101) is then changing dynamically which produce geant4 to only
consider  half of the copies of a the same logical volume.

I changed the routine as following and it works:
 1) I add before line 65 : g4int ilim=curVTE->NPCopies();
 2) I changed line 65 as following :
        for (G4int i=0; i<ilim; i++){
 3)I changed line 67 as following : G3Pos* theG3Pos = curVTE->GetG3PosCopy(0);
 4)I changed line 101  as following : curVTE->ClearG3PosCopy(0);



Laurent Desorgher



.
.
Comment 1 Gabriele Cosmo 2001-03-05 06:42:59 CET
Thanks for the report. A fix for this problem already reported in bug #188,
has already been put in place and will be included in future patches or minor
relases.
Comment 2 Gabriele Cosmo 2001-03-05 06:42:59 CET
Thanks for the report. A fix for this problem already reported in bug #188,
has already been put in place and will be included in future patches or minor
relases.