Problem 378 - Tracking in G4Spheres
Summary: Tracking in G4Spheres
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 4.0
Hardware: Other Other
: P2 major
Assignee: Vladimir.Grichine
URL: http://iglez.home.cern.ch/iglez/alice...
Depends on:
Blocks:
 
Reported: 2002-06-10 04:59 CEST by Isidro.Gonzalez
Modified: 2002-06-19 05:31 CEST (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 Isidro.Gonzalez 2002-06-10 04:59:35 CEST
Hi,
  I have seen a what I think is a bug in the tracking inside G4Sphere's. Find
in http://iglez.home.cern.ch/iglez/alice/geant4/DetectorConstruction.cc a very
simple geometry with two spheres (Rinnersphere = 10 mm, Routersphere = 20 mm)
one inside the other. If you run /geometry/test/run no problem is found. But if
you try to shut any particle (geantino for example) in the z direction:

/tracking/verbose 1
/gun/particle geantino
/gun/position 0 0 -30 mm
/gun/direction 0 0 1
/run/beamOn

you don't see the outer sphere when you exit from the inner sphere:

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng
NextVolume ProcName
    0        0        0      -30      8.75        0        0         0
Hall      initStep
    1        0        0      -20      8.75        0       10        10
P_Outer         Transportation
    2        0        0      -10      8.75        0       10        20
P_Inner         Transportation
    3        0        0       10      8.75        0       20        40
Hall      Transportation
    4        0        0    6e+03      8.75        0 5.99e+03  6.03e+03
OutOfWorld Transportation

I have seen that if one goes in the y direction both spheres are seen. If
instead of placing one sphere inside the other, I place them directly in the
hall by making the outer sphere have its inner radius equal to that of the
inner sphere everything works. However one should be able to use the other
model as some times it is more convenient.

I am using Geant4.4.0 plus patch 1 on a PC running linux RH7.2. Compiler: gcc
2.96.

  Cheers,
          Isidro
Comment 1 Gabriele Cosmo 2002-06-10 11:06:59 CEST
Can you please verify your test application on gcc-2.95.2 ?
Reliable results cannot be expected on 2.96.
Comment 2 Gabriele Cosmo 2002-06-12 09:21:59 CEST
The user verified the problem can be reproduced also on egcs-1.1.2 compiler.

Some additional info:
"I also realised that if you use charged particles that suffer some kind of
scattering and therefore do not go through the straight line at (0,0,0) in
the direction (0,0,1) both spheres are seen. Gammas, geantinos and
neutrinos certainly have this effect."
Comment 3 Vladimir.Grichine 2002-06-19 05:07:59 CEST
Bug was fixed in G4Sphere::Inside concerning the treatment of particles on
z-axis. The current condition for that is:
if ( (rho2 || p.z()) && fDTheta < M_PI - kAngTolerance*0.5)
Comment 4 Gabriele Cosmo 2002-06-19 05:31:59 CEST
Fix included in tag "geom-csg-V04-00-05".
Will be included in release 4.1, pending validation of system testing.