I am trying to inject gammas from Cs137 source in my simulation.
I had tried by specifying that in .mac file as below
/gun/ion 55 137
But when I am printing the energy in my Primary generator as
fParticlegun->GetParticleEnergy() then i am always getting 1000.
Please suggest how to proceed.
If there is any small example to just check this then it will be great help.
The primary is the Cs-137 ion itself. So I guess that you’re setting your Cs-137 ion to have an energy of 1 GeV (1000*MeV). If you want to see the gammas, you need to be looking at the secondaries after the Cs-137 decays. And you probalby want to set the primary energy to zero.
Could one build a physical volume consisting of some isotope, or it has to be a volume source with zero energy?
No, you cannot make a source out of
G4Isotope material. That’s used only for geometry materials (density, Z & A, etc.).
An isotope source would consist of
G4GeneralParticleSource, or your own generator creating
G4PrimaryParticle objects with
G4Ions. If you want to restrict them to a particular region, you would do that by limiting the coordinates of the corresponding
G4PrimaryVertex. GPS can do that for you automatically.