Problem 1078 - checkoverlaps in G4PVParameterised / potential bug
Summary: checkoverlaps in G4PVParameterised / potential bug
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/volumes (show other problems)
Version: 9.2
Hardware: All All
: P5 minor
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2009-09-18 12:24 CEST by Evaristo Cisbani
Modified: 2009-09-21 12:32 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Evaristo Cisbani 2009-09-18 12:24:06 CEST
I defined a relatively simple parameterised volume made of layers of
identical surface but different thickness and material (to simulate a
GEM chamber).

When I enabled the CheckOverlaps I got an unexpected overlap warning
between two layers that are separated by several mm.

Looking at the code of CheckOverlaps in G4PVParameterised.cc (version
4.9.2.p02) it seems to me that the line:

G4AffineTransform Td( GetRotation(), GetTranslation() );

should be moved inside the "pos" loop, right before the definition of
"md"

Does it sound correct ?
Comment 1 Gabriele Cosmo 2009-09-21 12:32:03 CEST
Thanks for reporting this. The fix has been now introduced in the development tree and will be included in a future patch or release. The correct fix is actually the following, adopt:
    G4ThreeVector md = Td.Inverse().TransformPoint(*pos);
in place of:
    G4ThreeVector md = Td.Invert().TransformPoint(*pos);