hello,
can annybody tell me what the problem is?
What physics list are you using? Particles are instantiated in the CreateParticle()
function of the physics list. If you don’t have one defined, then you won’t get any particles and you’ll get the error your report above (which is different from the error you put in the subject line, maybe fix that?).
After /run/initialize
try the command /particle/list
and see what it tells you.
Thanks. Only the geantion
if I find particle in PrimaryGeneratorAction like this:
G4ParticleDefinition particle= G4ParticleTable::GetParticleTable()->FindParticle(“proton”);*
The following prompt (error) will appear…How can i modify it?
Again, my first question:
Yes, that’s exactly right. You’ve written your executable with a dummy physics list, so you’re not creating any particles. If no particles are created, then obviously no particles are available to be used.
Please look at some of the basic examples to see how to either create your own physics list, or even better, use one of the predefined Geant4 physics lists. The documentation and examples are pretty clear.
OK. That ia a nice advice. I still have a great room for improvement. Many thanks!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.