In some experiments I am running, we are shooting few GeV electrons into tungsten blocks. After some irradiation time, the tungsten becomes pretty activated. I would like to simulate the isotopes created and the source activity with GEANT4 to estimate how much downtime we need given a certain amount of beamtime.
I tried to run the Activation example with neutron changed to electron and material changed to G4_W, but all the histograms are empty. Any help would be greatly appreciated! I noticed the definition of Bi209 in the example was more complex, would something similar need to be adopted for tungsten? Or are there some physics models which are not included in that example?
The Activation example may have a pretty limited physics list, to just demonstrate that process. In your code, you may want to adopt the Shielding reference physics list, rather than building your own. You may need to set the “proton” SetCut() to zero, so the activation isotopes are created and visible.
For your goal, I think what you described sounds right. If you were writing the code by hand, you’d set up your Sensitive Detector (attached to the tungsten volume) to record all G4Ions secondaries from the G4Step (or equivalently, record any G4Ions track at step==1). Then you can normalize the counds of each isotope to the number of electrons in your beam, and that lets you compute exposure directly from beam intensity.
1- in PhysicsList.cc, instead of GammaNuclearPhysics, you can try to use G4BertiniElectroNuclearBuilder or G4EmExtraPhysics (I have never test them … )
see Geant4/source/physics_lists/contructors/gamma_lepto_nuclear
2- Bi209.mac illustrates the time of exposure feature (/testhadr/gun/beamTime)
(compare the histograms with and without this command)
many thanks for all the detailed replies, specially @maire1 - I can now create lots of tungsten isotopes in the simulation!
I had a follow-up: is there an easy way to compare the registered physics processes in two simulations? My other simulation setup takes substantially longer:
the modified Activation example does 1e6 electrons in 23 seconds,
my other code (but FTFP_BERT phsyics list) does 1e5 events in 52 seconds
I would assume the difference comes from additional physics (the geometry is the same) - I would like to interrogate the binary at runtime as comparing the definitions in source files is very error-prone and time-consuming (at least for me )
I don’t know a way to compare the physics lists themself (i.e., at the high level of “what were the RegisterPhysics() calls”). But if you set /run/verbose 1 you’ll get a dump of the processes and cross-sections during initialization. At that point, you could diff extracts from the two log files.