Strange transition at 400eV (gamma rays)

Hi!
I am using Geant4 to simulate particles in the atmosphere. Typically I am using electrons, protons and alpha particles and it works well. Now I tried to use gamma photons (not optical photons) as primary particles and I noticed a strange transition at about 400eV primary energy as shown in the attached figure.

strange-transition-at-400eV.pdf (57.2 KB)

The figure shows the deposited energy in different atmospheric layers (eV/m) divided by the primary particle energy (or in other words more or less the fraction of the primary particle energy that is deposited per meter).

While the two regions >400eV and <400eV alone look reasonable, the transition between them is obviously wrong. However, I cannot figure out what happens here, namely which process causes the shift. As gamma rays are affected by just a few processes, namely:

pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
pmanager->AddDiscreteProcess(new G4ComptonScattering);
pmanager->AddDiscreteProcess(new G4GammaConversion);

My guess is that it only the PhotoElectricProcess takes place here. But I am still completely blank why that might cause an altitude shift at a specific energy.

I also set some cut values and other parameters, which might cause differences, but none of them links to 400eV:

SetDefaultCutValue(1.0CLHEP::m);
G4EmParameters
param = G4EmParameters::Instance();
param->SetDefaults();
param->SetMinEnergy(10CLHEP::eV);
param->SetMaxEnergy(10
CLHEP::TeV);
param->SetLowestElectronEnergy(10CLHEP::eV);
param->SetLowestMuHadEnergy(10
CLHEP::eV);
param->SetNumberOfBinsPerDecade(10);
param->SetBuildCSDARange(true);

I also tried this with the Livermore model, which switches the PhotoElectricEffect, the ComptonScattering and the GammaConversion to the Livermore versions and adds RayleighScattering. It changes the atmospheric deposition to some extend, but the shift at 400eV is still clearly seen.

Might anybody give me a hint what causes the strange transition (and which part might be considered the most accurate)? It would be really helpful!

Version used: geant4-10-06-patch-03

Hello,

what you can check:

  1. how scoring of energy deposition is working in your geometry?
  2. Take $G4INSTALL/examples/extended/electromagnetic/TestEm5
    define some macro with material of atmosphere, set primary gamma with energy above and below 400 eV.

VI

Hi Vladimir, thank you for the reply!

I am using the following code to retrieve the energy deposition:

AtmosphereActionControl.cpp

energystat = new EnergyStatistics(parameterlist);
...
void AtmosphereActionControl::ToDoFor_UserSteppingAction(const G4Step* theStep)
{
...
energystat->GetEnergyDistribution(theStep);
...
}

EnergyStatistics.cpp

...
void EnergyStatistics::GetEnergyDistribution(const G4Step* theStep)
 {
   G4Track* theTrack = theStep->GetTrack();

   G4VPhysicalVolume* physVolume = theTrack->GetVolume();
   G4String volume = physVolume->GetName();

   if (volume.at(0) == 'a')      //just picks atmosphereXX volumes and neglects space and water
   {
     //get atmospheric layer:
     G4String Nr="00";
     Nr.at(0) = volume.at(10);
     Nr.at(1) = volume.at(11);
     int i= 10*(Nr.at(0)-'0') + (Nr.at(1)-'0');

     //add energy deposition
     energy[i] = energy[i] + theStep->GetTotalEnergyDeposit();
   }
 }
...

I will have a look at TestEm5 and see if the outcome is similar when applying my atmospheric composition. Thanks again and I will report the results.

Regards,
Maik

Hello Maik,

check “i” value.

VI

Totally agree, the string conversion is clumsy. I inherited parts of the code, but I checked it (today again) and it is working correctly as long as it is less than 100 layers. So there was no need to rewrite it.
Anyhow if this would be a problem, it guess it shouldn’t appear as shift at a specific energy but as inconsistency for all particle depositions.

Hi!
Instead of TestEm5, I used TestEm7, which allows to see the energy deposition along the path. Using the following code, I got the energy deposition of gamma rays in air:

#
# Macro file for "TestEm7.cc"
# (can be run in batch, without graphic)
#
#
/control/verbose 2
/run/verbose 2
#
/testem/det/setMat Air
/testem/det/setSizeX  .02 m
/testem/det/setSizeYZ .02 m
#
##/testem/phys/addPhysics  local
##/testem/phys/addPhysics  emstandard_opt3
/testem/phys/addPhysics emlivermore
#
/run/initialize
/run/printProgress 100000
# step limit
#/testem/stepMax 0.5 mm
/run/setCut .01 m
#
#/gun/particle proton
#/gun/energy 400 keV
#/gun/particle e-
#/gun/energy 20 keV
/gun/particle gamma
#
#
#/gun/energy 350 eV
#/analysis/setFileName maik350eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 360 eV
#/analysis/setFileName maik360eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 370 eV
#/analysis/setFileName maik370eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 380 eV
#/analysis/setFileName maik380eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 390 eV
#/analysis/setFileName maik390eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 400 eV
#/analysis/setFileName maik400eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 410 eV
#/analysis/setFileName maik410eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 420 eV
#/analysis/setFileName maik420eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
#/gun/energy 430 eV
#/analysis/setFileName maik430eV
#/analysis/h1/set 2 1000 0 .02 m
#/analysis/h1/setAscii 2 true
#/run/beamOn 1000000
#
/gun/energy 440 eV
/analysis/setFileName maik440eV
/analysis/h1/set 2 1000 0 .02 m
/analysis/h1/setAscii 2 true
/run/beamOn 1000000

Plotting the result, we end up here:
strange-transition-at-400eV-TestEm7.pdf (982.8 KB)

So with the given setup TestEm7 also shows a transition at 400eV. I used Livermore physics here, but as my atmospheric application shows this transition for different physics lists the choice probably doesn’t matter.

Do you have any idea where the transition comes from?
For the higher atmosphere the transition is responsible for a 20km shift of the main deposition altitude, so I am really interested in it.

Best regards,
Maik

Hi,

You’re seeing the K-shell transition energy. You can run TestEm0 to get the raw cross-sections as a function of energy, and compare to online data e.g. for nitrogen:

https://www-nds.iaea.org/epics2014/ENDF/EPDL/za007000

Hi Daren, thank you very much for the explanation!
So it is a real effect and no artifact, that is good to know.
With your help I also found a website that gives a simple introduction to that topic in a few words, see: attenuation coefficient. (At least for me it was helpful as well.)

Thanks,
Maik