Message: Re: Generic Ion Problems Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Generic Ion Problems 

Forum: Particles
Re: Question Generic Ion Problems (Laura)
Date: 02 Nov, 2007
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Thu, 1 Nov 2007, Laura wrote:

> *** Discussion title: Particles
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/particles/367"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hello!
> 
> I am sorry for this may sound like a very basic question but 
> I am trying to implement an iron beam and for that I did:
> 
> In the Physics List:
> 
> void ISMPhysicsList::ConstructIons()
> { 
>     G4IonConstructor iConstructor;
>     iConstructor.ConstructParticle();
> }
> 
> In the Primary Generator Action:
> 
> ISMPrimaryGeneratorAction::ISMPrimaryGeneratorAction()
> {
>   particleGun = new G4ParticleGun(1);
> 
>   G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
>   G4ParticleDefinition* particleName = particleTable->GetIon(26,56,0.);
>   particleGun->SetParticleDefinition(particleName);
> (...)
> }  
> 
> And I am getting the following error message:
> 
> *** G4Exception : Illegal operation
>       issued by : G4IonTable::CreateIon()
> Can not create ions in PreInit state
> *** This is just a warning message.
> 
> *** G4Exception : Event00003
>       issued by : G4ParticleGun::SetParticleDefinition()
> Null pointer is given.
> *** Fatal Exception *** core dump ***
> 
> *** G4Exception: Aborting execution ***
> Abort
> 
> I have tried to look the advanced examples but I did not 
> find what seems to be the problem...
> Does anybody know what am I doing wrong?
> Thank you.
> 
> 

Please, visit examples:

$G4INSTALL/examples/extended/electromagnetic/TestEm7

Other may be be also useful. There are variants of Physics Lists and also 
macro files to start ion beams.

VI

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

 Add Message Add Message
to: "Re: Generic Ion Problems"

 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 ]