Geant4 absorbed dose calculating

Hello experts. How can I calculate the absorbed dose in geant4? Which example file should I use for this?

Hello,

If you want examples on how to get the absorbed dose (-> deposited energy per mass) then
example B1 does this with “custom” code and selfmade functions
examples/basic/B1 · master · geant4 / geant4 · GitLab (cern.ch)
As its README says “The energy deposited is collected step by step for a selected volume
in B1::SteppingAction…” and “Total dose deposited is computed at B1::RunAction::EndOfRunAction()”.

A different example is B4d, which explains Primitive Scorers
examples/basic/B4 · master · geant4 / geant4 · GitLab (cern.ch)
which are implemented Geant4-functions. You make a volume a Primitve Scorer/ add a Scorer to a volume in DetectorConstruction and do some histogram creation and filling in EventAction and RunAction. B4d uses G4PSEnergyDeposit and G4PSTrackLength but there is also a G4PSDoseDeposit you can use.

There are many primitive scorer, see here:
Geant4: G4VPrimitiveScorer Class Reference (u-paris.fr)

You need to be a little bit cautious when using these scorers because i noticed G4PSEnergyDeposit and G4PSDoseDeposit don’t work for neutrons when you use a HighPrecision (…_HP) physics lists…

If those two examples dont work for you, read through the READMEs of the other examples. They usually mention what is scored.

Regards
Max

1 Like

Thanks for the nice answer