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
Can you please verify your test application on gcc-2.95.2 ? Reliable results cannot be expected on 2.96.
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."
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)
Fix included in tag "geom-csg-V04-00-05". Will be included in release 4.1, pending validation of system testing.