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

Question Generic Ion Problems 

Forum: Particles
Date: 01 Nov, 2007
From: Laura <lapaulucci@gmail.com>

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.

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

1 None: RE: Generic Ion Problems   (Makoto Asai - 01 Nov, 2007)
1 Agree: RE: Generic Ion Problems   (Laura - 01 Nov, 2007)
2 None: Re: Generic Ion Problems   (Vladimir IVANTCHENKO - 02 Nov, 2007)
 Add Message Add Message
to: "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 ]