I want to calculate deposited energy of the electron pencil beam in the z direction inside a sphere filled with water which its edge located at z=5 cm. If you have any resource, input file or guidance, help me please.
You can do this with two different approaches. In the first one, you are going to use the user action classes to save the deposited energy you can save the energy deposited per each step for every particle simulated. If you want the dose, you have to add the dose for each event for a whole run. In the other way, you can do this with the hits and sensitive detector class. The logic to do this is the same.
Thanks, Have you any sample files (except Geant4 samples) that have done this with defining sensitive detector? In the first way that you mentioned , in my run action txt file deposited energy is calculated for the world. Do you know how can I set a condition to calculate it inside my detector?
Hassan Ghavidel you can see how I have done it in my last paper https://www.sciencedirect.com/science/article/abs/pii/S0969806X23003018?via%3Dihub. Also, you can see the code in my GitHub repo: https://github.com/sebassaras02/RPT_NaI_4array