Problem 1973 - G4CutTubs::Inside() returns incorrect reply "kSurface" for a point inside the solid
Summary: G4CutTubs::Inside() returns incorrect reply "kSurface" for a point inside the...
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 10.3
Hardware: All All
: P4 normal
Assignee: Evgueni.Tcherniaev
URL:
Depends on:
Blocks:
 
Reported: 2017-05-08 20:04 CEST by Evgueni.Tcherniaev
Modified: 2017-05-22 10:45 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 Evgueni.Tcherniaev 2017-05-08 20:04:20 CEST
The code below illustrates the bug:

  G4double rMin = 15.;
  G4double rMax = 20.;
  G4double dz = 15.;
  G4double startPhi = -20*deg;
  G4double deltaPhi =  40*deg;
  G4ThreeVector lnorm = G4ThreeVector(0.001, 0., -1.).unit();
  G4ThreeVector tnorm = G4ThreeVector(0.001, 0., +1.).unit();
  G4CutTubs tube("CutTube", rMin, rMax, dz, startPhi, deltaPhi, lnorm, tnorm);

  G4ThreeVector p(18.,0.,0.);
  G4int in = tube.Inside(p);
  G4cout << "Point " << p << " : "
         << ((in == 0) ? "Outside" : ((in == 1) ? "Surface" : "Inside")) << G4endl;

The output is:

  Point (18,0,0) : Surface

instead	of:

  Point (18,0,0) : Inside
Comment 1 Evgueni.Tcherniaev 2017-05-22 10:45:27 CEST
Fixed, tag geom-csg-V10-03-17