Message: Decay Table Not Defined Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Decay Table Not Defined 

Keywords: Decay table Co-57
Forum: Particles
Date: 17 Nov, 2005
From: Burcin Donmez <Burcin Donmez>


I've just started to use geant4. I'm trying to simulate co-57 source incident to the detector.Reading the forum I've made following changes to my program.

In the file -------------------------------

void ExN01PhysicsList::ConstructGeneral() {

 // Add Decay Process
 G4Decay* theDecayProcess = new G4Decay();

	G4ParticleDefinition* particle = theParticleIterator->value();
	G4ProcessManager* pmanager = particle->GetProcessManager();

	if (theDecayProcess->IsApplicable(*particle)){
       	pmanager ->AddProcess(theDecayProcess);
	// set ordering for PostStepDoIt and AtRestDoIt
	pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
	pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);

   // 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();

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

In the file 
void ExN01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
  static ofstream outFile;

  G4int n_particle = 1;
  particleGun = new G4ParticleGun(n_particle);
  G4ParticleTable *pTable = G4ParticleTable::GetParticleTable();
  G4ParticleDefinition* particle;
  particle= pTable->GetIon(27,57,0.0);                           

  // Reset variables
  numberOfDetectorsHit = 0;

  // Use system time as seed
  G4double rand_x, rand_y;
  static time_t curr = time(0);
  static TRandomMersenne randomizer(curr);

  rand_x = randomizer.Random()*1.50 - .75; // Originally ... *0.225 - ...
  rand_y = randomizer.Random()*1.50 - .75; // Originally ... *0.225 - ...

  particleGun->SetParticlePosition(G4ThreeVector(rand_x*mm, rand_y*mm,-50*mm));


But, when I run the simulation, I see "Decay table is not defined !!" line. Also when I look at the energy of the beam it is around 5MeV. I try to put 122 keV but it did not work.

How can i solve this problem?



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

 Add Message Add Message
to: "Decay Table Not Defined"

 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 ]