Defining a Na22 gamma source using GPS

Dear Geant4 users and experts,

I am studing the detector responses/corelations to gamma-rays using Na-22 source. In the experiment, the Na-22 source emits two back-to-back 511-keV gamma-rays besides the 1274 keV. But in the simulation, I did not figure out how to define the back-to-back gamma rays in each event using GPS (General Particle Source).
A naive way I tried is defining two gamma sources, and confine the theta and phi angles in each event, by turning the “multiplevetex” as ture, as shown in the picture. But in this way I have to change the theta and phi confinment in each run repeatly in order to cover more simualited angles. What getting worse is that the repeated runs by changing the angle confinements lead to repeated patterns of separated gamma lines (The simulated spectrum is supposed to be continuous distrubution rather than seprated lines), when merging these runs together in the analysis.

Can anyone give me any suggestion of defining the Na-22 gamma-source using GPS in a proper way?
Thank you for reading, and in advance for the help!

1- why not to start directly with a Na22 source ?
/gps/particle ion
/gps/ion 11 22

ligs.mac.txt (370 Bytes)
ligs.out.txt (2.3 KB)

2- if you would prefer to generate only the back to back 511 keV gamma rays, it is probably not more complicated to use particleGun and C++ code.
See example eventgenerator/particleGun : PrimaryGeneratorAction1

Thank you very much for the help!
I tried the first option of using directly with Na22 source, the input file you offered me. But my application was modified based on the code from exampleB1, rather than rdecay01. Therefore, the command of “rdecay01/fullChain true” dose not work, and the resulted spectrum is not as expected. Do I have to re-build the my application based on the example of “rdecay01”, if I want to use this option?
Thank you again for the help!

No ! I sent you output of rdecay01 just to show you the capability of radioactive decay module in Geant4.
But this example is very specific and cannot be used for realistic simulations.

Which G4 version do you use and which physics list ? You should make sure that radioactive decay is included. Add /process/list in your macro; you must see radioactiveDecay. If not, it is possible to add it to an existing physicsList, but I do not remember how to do. I hope somebody else will tell you.

Did you had a look to example basic B3 ?

Last thing. In my opinion, you should have strong good reasons to move from particleGun to GPS.

Looking in or, you have eventually to put in your main :

G4VModularPhysicsList* physicsList = new QBBC;
physicsList->RegisterPhysics(new G4RadioactiveDecayPhysics());

Dear maire,
I followed your indication to registed the “G4RadioactiveDecayPhysics” in my application, and succesfully got Na22 source spectrum as expected. I am pretty appreciated for your help on this, otherwise I could not solve my problem.

In case that the informaion maybe helpful to other users, I have tried G4 version of 10.6 and 10.5, with physic list of QBBC and FTFP_BERT_LIV from G4PhysListFactory, they all worked well as I expected.