| Summary: | some photons not tracked through all detector volumes | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Paul <paul_cons> |
| Component: | processes/transportation | Assignee: | John Apostolakis <John.Apostolakis> |
| Status: | RESOLVED INVALID | ||
| Severity: | major | ||
| Priority: | P5 | ||
| Version: | 10.1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | the code tar.gz file | ||
Created attachment 338 [details]
the code tar.gz file
Please find the code attachment here.
Best regards,
Paul
Dear expert, I found the cause for the strange behaviour: I was placing the source of gammas _exactly_ at the beginning of the "World" volume. Once I moved it 1mm inside, all gammas are transported correctly. I therefore changed the status of this report to "RESOLVED/INVALID". Best regards, Paul |
Dear Geant4 expert, PROBLEM: gammas (~few MeV) transported over large distances (~30m) sometimes do not get transported through all detector volumes in their path. Sometimes means about 1/4 of them (see below). Hence, in the code below, 25% of gammas penetrate 2 meters of tungstene (or lead)... CODE: I attach a very simple Geant4 application (BIC.tar.gz) that demonstrates the bug. It has only 3 classes: 1) PhysicsList has one line: "RegisterPhysics(new G4EmStandardPhysics())"; 2) PrimaryGeneratorAction reads gammas (their position, momentum, energy) from the ascii file gamma500.dat in BIC-build (one gamma per line) and shoots them with a G4ParticleGun from a position (0,0,-22m); 3) DetectorConstruction defines an "experimentalHall" filled with vacuum in (-22m,+22m), a block of W (or Pb) at -22m+8.9m with dimensions 2x2x2m^3 and a "target" of air at -22m+30m with thickness 10microns and size 20x20cm^2 (just for counting). Obviously, no gamma should pass through 2m of tungstene (or lead)! But some (~1/4) do because they somehow skip the W block in their path. To see that: - cmake in BIC-build (I used last Geant4 10.1, but also 9.6) - run "./BIC >out.txt" - look in the output file out.txt - I turned on verbosities in BIC.cc Search for "Target" in that txt file and you'll see many gammas like the following, which should have hit the W block (called "Collimator") but never do: !!!!!!! Now start processing an event !!!!!!! ************************************************************************** * G4Track Information: Particle = gamma, Track ID = 1, Parent ID = 0 ************************************************************************** Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName 0 -0.0413 0.0147 -2.2e+04 5.3 0 0 0 expHall initStep 1 0.677 11.8 8e+03 5.3 0 3e+04 3e+04 Target Transportation 2 0.677 11.8 8e+03 5.3 0 0.02 3e+04 expHall Transportation 3 1.01 17.4 2.2e+04 5.3 0 1.4e+04 4.4e+04 OutOfWorld Transportation Track (trackID 1, parentID 0) is processed with stopping code 2 NULL returned from G4StackManager. Terminate current event processing. Two final comments: - run "./BIC 1" followed by "/control/execute vis.mac" and "/run/beamOn 100" to visualize them; - interestingly, if the "Target" location is placed at 20m instead of 30m ("Targ_Disp = 20.*m" in DetectorConstruction), everything comes back to normal (all gammas stop in "Collimator")! Thank you. Best regards, Paul