Including emstandard_optX in Geant basic B4 example -- Bethe-Bloch, stopping power for low energy muons

Dear all,

I was trying to calculate the stopping power (thus energy deposited vs position or kinetic energy of the incident particle) for low energy muons (10 keV to 1 MeV).

I used the TestEm0 and TestEm5. I would like to know how to include the emstandard_optX physics in an example like the B4.

I added the Detector and PhysMessenger files, where the G4UIdirectory is created, with the relative Physics List, but when I use the command “/testem/phys/addPhysics emstandard_opt0” I receive an error message saying “the command is not found”.

Or better, anyone can help me in introducing the graph Edeposited vs position in one of TestEm5 or TestEm18?

Thanks

Hi, if you copied the physics list and the physics messenger classes from TestEm5 (I did not check testEm0) it should work as long as you initialize the physics list in the main. Did you do that?

Then, for the second question, I propose two methods:

  • one is to use the Geant4 scoring mesh. You fix it via UI commands and calculates the edep integrated over a run. You can find an example in the brachytherapy advanced example and there are also extended examples showing this functionality. The results are stored in an outputfile and then you can plot the results.

-The second method is to retrieve the edep in the Stepping Action class and the position using the information of the PreStepPoint of the step associated with the edep. Look at the TestEm4, in the Stepping Action. You can also record only edeps that happen in specific volumes.

There are other methods (implementation of Geant4 sensitive detectors), however, if you are just starting to use Geant4, I suggest one of the two methods listed above as they usually are found to be easier (at least my students think so!).

Finally, look at the extended examples on the analysis. They show how to store information in histograms and ntuple.

Good luck and I hope this answer will help you.

Cheers.
Susanna