Equivalent dose calculation in slices

Good morning everyone,I need to calculate the equivalent dose in my phantom, but I have a problem in the quality factor using this equation (H = Q (L) .D) for the carbon ion beam. Can someone help me please.

Quality factors are provided in ICRU reports.

greetings dear @guatelli ;
yes i have already found it in this report. but i don’t know the way to implement it in my code because it has three conditions. if you have any idea please help me.
G4double dedxtot=emCal.ComputeElectronicDEDX(energy1,particle1,material1);
G4double LET=dedxtot;
G4double Dosetot=edep/mass;

if(LET<10.keV/um){ Q=1;}
else if(10
keV/um<=LET && LET<=100keV/um){Q=0.32/pow(LET,2.2);}
else if(LET>100

H = Dosetot*Q;

Here it seems that the nuclear stopping power is neglected. I would calculate the edep in the sensitive volume (SV), with high cut and switching off the energy loss fluctuations and multiple scattering, and divide the edep value by the track length in the SV.

Hello, i am also interested in this topic so can you please tell me in which class (stepping action or event action) you are calculating equivalent dose ? and how ? apart from this quality factor consideration.
actually i am throwing some different-2 energy particle on my detector and now i want to write equivalent dose in a file and in which class i should do that but i am unable to do this so can you please help me with this, it will be very helpful.


Check out example B5 it might help clarify things.

Have you defined one of your logical volumes as a sensitive detector volume in your detector construction?

I would record the energy deposition within the event action by accessing your sensitive detector hits.

Recording the dose via the stepping action adds some complexity and will likely slow down your code. It’s best to stick with the event action in your case.

What do you mean by “throwing two energy particles?” Do you mean that your primary generator action generates two primary particles with different energies at once?

If you want the total dose deposited by each particle you’ll need to keep track of the parent ID (under step->track) within the sensitive detector class.

Happy coding!


As mentioned above, you can calculate the dose in a SV and then, based on the LET, you multiply by Q. As far as I know there is no example in Geant4 calculating directly the equivalent dose.