geant4/G4Em07- Bragg peak

I am a new user of the Geant4 program
I have a question about the interaction of protons in a water
I used an example of electromagnetic geant4/G4Em07
But I want to study the interaction of protons in water in the micro dimensions[µm] and when the dimensions change from cm to µm do not appear with me and I do not know the reason for that ??
But when I put the dimensions of cm to [mm] the Bragg appears
Please help me, the problem just µm ??

the command /units/list will show all existing units

For units of microns, use the plain ASCII abbreviation “um”, rather than the Unicode µm.

I know that
But when you change the unit from cm to micro(um) inside the code geant4/electromagnetic /G4Em07, it does not work !!!
Try to give it a try and you will find what I am saying is true
Thank you very much

I’ll give it a try. We use um frequently in our experiment’s simulation (both in macros and in code), so this surprises me a bit. But it’s possible that the example is wonky.

Oh, wait a minute. Are you changing the dimensions of your geometry, and nothing else? As you may or may not know, Geant4 has “production cuts” for different particles in the EM physics, where the default “production cut” is 1 mm. What this means is that when a process creates a secondary, it estimates the range of that secondary based on its energy and the current material. If that estimated range is less than the production cut, it does not actually create the track; instead, the energy is added to the parent’s “Energy Deposit” value for the step.

When you’re wanting to do detailed event tracking in very small regions, you need to also set those production cuts to be smaller than your geometry. Otherwise you’ll never see secondaries.

for information, you can do Bragg peak with TestEm11 or Hadr07 as well.

Thank you.
I used a very excellent example TestEM7describing the interaction of protons with water and I was able to get to the Bragg peak, but I want to cut the interaction of protons, ie at 100 µm/um because the thickness phantom is 6 cm.
I put the definition of cut=100um
void Physicslist::SetCuts()
set cut value (cutproton,“proton”);
in but when I run the code and see the geometry with a
Protons appear ??
please help me
I want to stop it permanently after 100 micro and I do not want to watch it after 100 micro so that other interactions do not work for me
Thank you

The physics list SetCuts() function does not specify a maximum range (which is what you’re asking about). Instead, it specifies a minimum range, such that protons below that minimum will never get created as secondaries.

For the configuration you describe, you will want to set “cutproton” in your pseudocode above to zero. Then you’ll implement a stepping action of your own, and apply the 100*um maximum track length for protons.

You could also implement a subclass of G4StepLimiter with IsApplicable() returning true only for protons. Then you could attach a G4UserLimits to your geometry volume with a maximum track length of 100*um.


EM examples are designed in the way, that user should not try C++ code but configure macro-file with UI commands. In particular TestEm7, you may use as built in Geant4 UI commands and few commands of this example. So, you problem may be discussed on level what commands you are using to get what you want.

Because in the discussion there is some misunderstanding due to terminology I would suggest to study a bit Geant4 Physics
Reference Manuel.