Message: Ion decay. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Ion decay. 

Forum: Particles
Date: 04 Apr, 2011
From: J.Ostariz <J.Ostariz>

Hi all,

I am trying to simulate the decay chain of an ion (e.g. 222Ra, 232Th, etc.).

My PhysicList.cc is like follows:

#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"
#include "G4IonTable.hh"
#include "G4Ions.hh"

void PhysicsList::ConstructGeneral() {

// Declare radioactive decay to the GenericIon in the IonTable.

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

  G4RadioactiveDecay *theRadioactiveDecay = new G4RadioactiveDecay();

  for (G4int i=0; i<theIonTable->Entries(); i++) 
    {
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      G4String particleType = theIonTable->GetParticle(i)->GetParticleType();
      G4cout << "## Particle name: " << particleName << " type " << particleType << G4endl;

      if (particleName == "GenericIon") 
	{
	  G4ProcessManager* pmanager = 
	    theIonTable->GetParticle(i)->GetProcessManager();
	  //pmanager->SetVerboseLevel(VerboseLevel);
	  pmanager ->AddProcess(theRadioactiveDecay);
	  pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
	  pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
	} 
    }
}

and my Generator lines are ...

// Get the pointer to the User Interface manager

   G4UImanager * UI = G4UImanager::GetUIpointer();  
   UI->ApplyCommand("/gun/particle ion");
   UI->ApplyCommand("/gun/ion 55 137");

where the ions start with null energy. When I run the programm, the first nuclear decay goes well, and the secondaries are generated normally, but I get a segmentation fault when G4 tries to handle the nuclear product (e.g. 137Ba).

This are the last lines of the output:

********************************************************************************
* G4Track Information:   Particle = anti_nu_e,   Track ID = 3,   Parent ID = 1
********************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     -273      254     42.1    0.0975        0        0         0 experimentalHall initStep
    1      242 1.24e+03    2e+03    0.0975        0 2.25e+03  2.25e+03  OutOfWorld Transportation

********************************************************************************
* G4Track Information:   Particle = Ba137[661.7],   Track ID = 2,   Parent ID = 1
********************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     -273      254     42.1  2.04e-06        0        0         0 experimentalHall initStep
Segmentation fault

Any idea about what could be causing the segmentation fault? How can I solve this problem and peform the complete decay chain??

Thank you in advance

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

1 None: Re: Ion decay.   (michel maire - 05 Apr, 2011)
(_ None: Re: Ion decay.   (J.Ostariz - 05 Apr, 2011)
(_ None: Re: Ion decay.   (Sarah Bender - 03 May, 2011)
(_ None: Re: Ion decay.   (J.Ostariz - 03 May, 2011)
(_ None: Re: Ion decay.   (Sarah Bender - 04 May, 2011)
(_ None: Re: Ion decay.   (J.Ostariz - 05 May, 2011)
(_ None: Re: Ion decay.   (Sarah Bender - 05 May, 2011)
(_ Idea: Re: Ion decay.   (Vladimir Ivanchenko - 12 May, 2011)
(_ None: Re: Ion decay.   (Sarah Bender - 13 May, 2011)
 Add Message Add Message
to: "Ion decay."

 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 ]