Depth dose calculation

I want to calculate depth dose in Geant4. I will use the TestEm11 example for this. How can I convert the output values ​​to Gy?

examples/basic/B1/src/RunAction.cc lines 100-104 and 138-139

1 Like

I don’t understand completely, could you please give some detailed answer?How should I change these code parts?

looking at the two code sections, you find one solution to your question, i.e., how to make geant4 provide output values in sensible units. What units does it display in your case?

1 Like

At first, I actually asked the question for the TestEm11 sample. In this example, I wanted to calculate the dose value in Gy.

The natural solution is to modify line ~74 of SteppingAction.cc: divide by the mass of a bin (to be calculated) before to fill histo 1
If you have only 1 absorber, a more efficient way is to include this division in the normalization factor at end of Run.cc, line ~332
Anyway, you have also to change unit in this factor: Gy instead of MeV

1 Like

How do I need to change line 74? I don’t quite understand. I think 332 lines in Run.cc will be written Gy instead of MeV.

If the dose to be calculated here is the ionized dose . Then how do I calculate the absorbed dose?