Output data from the multi-layer structure

Hello,
I am a geant4 newbie and interested in the irradiation of multi-layer structure (7 layers with 10 um thickness) by gamma, electron and neutron to get the deposition energy and non-ionizing energy loss in each material. So, is it possible to output data (histograms, csv or anything else) from each layer? What am I supposed to do?

_Geant4 Version:_10.7.4
_Operating System:_Kubuntu 22.04
_Compiler/Version:_gcc 11.4
_CMake Version:_cmake 3.22.1

Thank you in advance,
Ivan

You may have a look to examples/extended/electromagnetic/TestEm11 or hadronic/Hadr07

Dear Michel,
Thank you for the answer, I’ll try to build the examples and figure out a little bit later.

Cheers,
Ivan

Dear Michel,

I’ve built the TestEm11 example, set 5 absorber layers with different materials and thiknesses. They are created and visualized on geant4 ui, however, when I run it with 100 / 1000 particles, it crushes. What am I supposed to do? What should I change in files?

Cheers,
Ivan

Difficult to answer with so little information !
Did you modify the code ?
Can you post your macro (and an output) ?

I’ve seen your answer and got an idea. I’ve found the macro (multiLayers), set the materials in detector construction, and then in the macro I’ve add them.
It works for Edep, but I think that it is possible to modify the code to output the non-ionizing energy loss.
Thank you!

To access non-ionizing energy loss, see SteppingAction of TestEm7 and TestEm1