Problem 1973

Summary: G4CutTubs::Inside() returns incorrect reply "kSurface" for a point inside the solid
Product: Geant4 Reporter: Evgueni.Tcherniaev
Component: geometry/solidsAssignee: Evgueni.Tcherniaev
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 10.3   
Hardware: All   
OS: All   

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