Thank you Maire for this very useful suggestion. I do feel like now I am in the right direction. I made a few changes in the example according to my geometry. The changes I made are in the following files:
(DetectorConstruction.cc (6.9 KB)
PrimaryGeneratorAction.cc (3.5 KB)
inelastic.cc (497 Bytes)
(attaching the changed files in this reply. )
(changed the name of file “inelastic.mac” to “inelasctic.cc” please change it back to run for trial)
I have basically just changed the target size and its material from Molybdenum98 to Molybdenum100.
I have also changed the beam from 10MeV proton to 30MeV electron.
the output on the console is incomplete for me after making these changes.
For example is says
Nb of incident particles surviving after 1 cm of Molybdenum100 : 10000
Which is weird because 1cm (size of the target is more than the radiation length of electron Mo)
I then changed the target size to 10m to check if the electron get absorbed but the output remained the same.
Next problem is that in the console output the List of nuclear reactions and generated particles is empty which is exactly what I want.
following is the complete console output:
Number of events processed : 10000
User=0.03s Real=0.04s Sys=0s
The run is 10000 e- of 30 MeV through 1 cm of Molybdenum100 (density: 10.28 g/cm3 )
Process calls frequency:
***Nb of incident particles surviving after 1 cm of Molybdenum100 : 10000***
MeanFreePath: 0 fm +- 0 fm massic: 0 mg/cm2
CrossSection: 0 cm^-1 massic: 0 um2/mg
crossSection per atom: 0 pbarn
Verification: crossSections from G4HadronicProcessStore:
Transportation= 0 um2/mg 0 pbarn
total= 0 um2/mg 0 pbarn
***List of nuclear reactions:***
***List of generated particles:***
... write Root file : inelastic.root - done
... close Root file : inelastic.root - done
If possible please let me know what could I be doing wrong here. This program if I could tweak according to geometry I might get exactly what I am looking for.
Thank you very much.