How I can calculate and plot the spread out Bragg Peak, or SOBP in Geant4?

I am working on simulating an ion beam in the water phantom. I need to plot spread out Bragg Peak (SOBP) for my project. But unfortunately, I do not know what should I do.
I would be grateful for any help or suggestion on this issue.
Thank you


You can calculate and plot the spread out Bragg Peak using the advanced example “hadrontherapy” in Geant4.

best wishes,

1 Like

Dear Batmunkh,

I looked at the hadrontherapy documentation and I was still confused about how to generate SOBP.

Can you tell me how to operate in detail and get the SOBP I need? (260MeV/u 6cmSOBP)

Looking forward to your reply.

your sincerely,

1 Like

Dear Yuri,
You can execute modulatorMacro.mac file in batch mode from hadrontherapy/macro.

Best regards,

Hi, m.rajabnejad. You can: (1) simulate different monoenergetic bemas with a fixed energy step and record the IDD for each beam; (2)
Optimize the weight of each beam using an optimization algorithm. Remember that in (1), the range or Bragg peak of the selected monoenergetic beam should be within the SOBP

Hi yangshiyan

I’m interested in what you’re talking about in terms of optimization algorithms.
What do you mean by an optimization algorithm?

your sincerely

1 Like

Hi batmunkh,

Thank you for your reply. I have now mastered the method of using matRad to broaden the Bragg peak.

I just started using Geant4 this week, so I’m not very familiar with the compilation operation.

Compiling modulatorMacro.mac into an executable is a bit difficult for me, but I’ll try.

Do you have any executable files for my reference?Looking forward to your reply.

your sincerely

Hi. Thanks for your reply.
what is IDD? How we can write an optimization algorithm?
Can you explain it more precisely?

In my work, I generate SOBP with the below Equation:
DSOBP (z)=∑wi×Di (z)
Here DSOBP(z) is the SOBP dose at depth z, wi is the weight of the ith beamlet and Di(z) is the dose contribution of the ith beamlet at depth z
In my work, the MATLAB built-in function lsqnonlin() was applied to solve the beam weights wi, which uses a nonlinear least-squares minimization scheme based on the Trust-Region-Reflective algorithm.

IDD means integral depth dose