Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version: 10.2
Operating System: linux
Compiler/Version:
CMake Version:
Hi experts,
I encountered particle source definition issue.here is my code.
G4int Z = 92, A = 238;
G4IonTable* ionTable = G4IonTable::GetIonTable();
ionTable->CreateAllIon();
G4ParticleDefinition* particle_here = ionTable->GetIon(Z, A, 0.0);
gps_->SetParticleDefinition(particle_here);
gps_->SetParticleCharge(0.0);
And then this happened:
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : PART105
issued by : G4IonTable::CreateIon()
Can not create ions because GenericIon is not ready
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
and then the program crashed. Should I Initialize some things before there?
Thanks for any help!!