How to store data of bremsstrahlung spectrum from GEANT4 simulation

Hey ,
I want to extract data of bremsstrahlung spectrum distribution where electrons are bombarded on the target and gamma are released that is photons .
How to get the information data of the spectrum in x axis and y axis ?
Is there any example of spectrum data extraction ?

Thank you

Geant4 Version:_PACKAGE_VERSION “10.4.2”
_Operating System:_CentOS LINUX
Compiler/Version: CPack ,Terminal
CMake Version: CPack

I have one more question ,

Does Bremsstarlung photons have units in GEANT4 ?

Can we calculate Photon flux directly and does photon flux has some units in GEANT4 ?

If there is any chart/Table in which photon fluence , energy fluence etc units are written in the GEANT4 user guide then do share .

Dear Dipanuta,

You need to extract the correlated information (x,y,E) for each photon via Sensitive Detector & Hits when the your condition is met (i.e., when the photon is produced, or when the photon crosses a given surface, etc.). You may also consider to do this in your UserSteppingAction class in case this suits better to your code.

You may adapt code from some examples for your own purpose. Maybe good starting points are GammaTherapy extended example, or Radioprotection advanced example. I am sure these are others which could be of help.

As for the units, please note that you may set the units of your outputs using the system of units incorporated in Geant4. There is no need to ‘guess’ what the internal units are.

Hope this helps,
Miguel

Thanks Miguel this will surely help .
So according to G4UnitTable can you tell what is unit for photon and photon flux .

Dear Dipanuta,

Do not pay to much attention to native unit of Geant4. You can apply your own unit like this : YourValue/(YourUnit) when you are computing your flux.