Definition of ion source

Dear all,
How to simulate the decay of y-90 radioisotope as a source of primary particles, taking into account all decays and all its energies in calculating the final dose?

Hi,

I refer to go with this documentation. Geant4 General Particle Source — Book For Application Developers 11.0 documentation.

:slight_smile:

vj

Hi,
Thank you for your guidance, I defined the source using the Particle Gun method according to the following definition:


//Set definition of ION beam for Y90:
G4int Z=39;
G4int A=90;
G4double ionCharge = 0.*eplus;
G4double excitEnergy = 0.keV;
.
G4ParticleDefinition ion = G4IonTable::GetIonTable()->GetIon(Z,A,excitEnergy);
G4ParticleDefinition
particle = fpParticleGun->GetParticleDefinition();
fpParticleGun->SetParticlePosition(G4ThreeVector(0. ,0. ,0.));
fpParticleGun->SetParticleDefinition(ion);
fpParticleGun->SetParticleCharge(ionCharge);
fpParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));


But there were following errors during run. Thank you for your help, how to fix this errors.

Hi @zahra.jalalvand

As error says G4IonTable::CreateIon()
and other error says set particle definition
Modify your primary generator action class by defining proper definition of particles under GeneratePrimaries() ;

e.g. as
G4ParticleDefinition *particle = G4ChargedGeantino::ChargedGeantino();
put consition that your particle is G4ChargedGeantino::ChargedGeantino();
You need to turn ion to pointer by placing *

vj

1 Like

Hi @drvijayraj

Thank you so much for Your valuable advice. Thank you so much for your time.


// default particle kinematic

G4ParticleDefinition* particle
= G4ParticleTable::GetParticleTable()->FindParticle(“e-”);
fpParticleGun->SetParticleDefinition(particle);
fpParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
fpParticleGun->SetParticleEnergy(0.1*MeV);
fpParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,0.));
}

//…oooOO0OOooo…oooOO0OOooo…oooOO0OOooo…oooOO0OOooo…

PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
delete fpParticleGun;
}

//…oooOO0OOooo…oooOO0OOooo…oooOO0OOooo…oooOO0OOooo…

void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{

if (fpParticleGun->GetParticleDefinition() == G4Geantino::Geantino()) {  
G4int Z = 39 , A = 90;
G4double ionCharge   = 0.*eplus;
G4double excitEnergy = 0.*keV;

G4ParticleDefinition* ion
   = G4IonTable::GetIonTable()->GetIon(Z,A,excitEnergy);
 fpParticleGun->SetParticleDefinition(ion);
 fpParticleGun->SetParticleCharge(ionCharge);

}


By replacing the above code, the error was solved, but please advise if the decay of radioisotope is considered as the source of primary particles?

Hi !!

here you need to add radioactive decay physics in your physicsList class. And you are ready to go with your simulations.

vj

1 Like

Hi,
Thank you @drvijayraj again so much for all of your help.

Zahra