Message: Re: Lithium ion definiton in particlegun ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Lithium ion definiton in particlegun ? 

Forum: Particles
Re: Question Lithium ion definiton in particlegun ? (cihangir celik)
Date: 13 Nov, 2008
From: Gumplinger Peter <Gumplinger Peter>

Two things:

particleTable->FindIon(3,7,0)

will only 'find' an ion if it is already in the particleTable, else it will return NULL. Instead, you should be using GetIon, this will actually instantiate the ion if it's not already in the table. Granted, this is a bit of a trap.

Your code with the ionTable cannot work, because you need to get a hold of the kernel's G4IonTable:

ionTable = (G4IonTable *)(G4ParticleTable::GetParticleTable()->GetIonTable());

Best you follow the code at:

http://www-geant4.kek.jp/lxr/source/event/src/G4ParticleGunMessenger.cc#L280

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Ok: Re: Lithium ion definiton in particlegun ?   (cihangir celik - 14 Nov, 2008)
 Add Message Add Message
to: "Re: Lithium ion definiton in particlegun ?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]