Message: RadioactiveDecay is (sometimes) eating memory Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RadioactiveDecay is (sometimes) eating memory 

Forum: Event and Track Management
Date: 10 Mar, 2005
From: Karen Saucke <Karen Saucke>

Hello,

I do have a problem with the memory.

I am simulation the radioactive decay of ions. for most ions, e.g Co60: /gun/ion 27 60 0 0 the used memory goes into a constant value independent of the number of runs e.g /run/beamOn 100 or /run/beamOn 100000 etc. in this case the allocated memory is about 4.7%

not so by simulating Pu239 /gun/ion 94 239 0 0 there, the needed memory is increasing with every run /run/beamOn 50000 13.4% /run/beamOn 50000 22.4% /run/beamOn 50000 31.4% /run/beamOn 50000 40.4% and so on

Similar is meantioned in other threads, I checked for too much UI commands, for the hits collection associated to G4HCofThisEvent.

I boiled it down to: When I uncommend the RadioactiveDecay for GerericIon in my PhysicsList, the memory usage will be constant (4.7%)

What could be causing this kind of memory consumption?

Thanks,Karen

I am using Geant 4.6 gcc 3.3.4

My PhysicsList:

void TarDet01PhysicsList::ConstructEM()
{
   theParticleIterator->reset();

   //----------------------------------------------------------------
   // Schleife ueber alle Teilchenarten:
   while( (*theParticleIterator)() ){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

      if (particleName == "gamma") {
         // Niederenergetische Erweiterung:            
         G4LowEnergyPhotoElectric* thePhotoElectric = new G4LowEnergyPhotoElectric();
         pmanager->AddDiscreteProcess(thePhotoElectric);
         pmanager->AddDiscreteProcess(new G4LowEnergyCompton());
         pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh());
         pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion());
      	 thePhotoElectric->SetCutForLowEnSecPhotons(10.*keV);
      }
      else
      if (particleName == "e-") {
         // Niederenergetische Erweiterung:            
         G4LowEnergyIonisation* theLEIonisation = new G4LowEnergyIonisation();
         G4LowEnergyBremsstrahlung* theLEBremsstrahlung = new G4LowEnergyBremsstrahlung();
         pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
         pmanager->AddProcess(theLEIonisation,           -1, 2,2);
         pmanager->AddProcess(theLEBremsstrahlung,       -1,-1,3);
         theLEIonisation->SetCutForLowEnSecPhotons(10.*keV); 
         theLEIonisation->SetCutForLowEnSecElectrons(10.*keV);
         theLEIonisation->ActivateAuger( true);
         theLEBremsstrahlung->SetCutForLowEnSecPhotons(10.*keV);
      }
      else
      if (particleName == "e+") {
         // Standardwechselwirkungsprozesse:            
         G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
         G4VProcess* theeplusIonisation         = new G4eIonisation();
         G4VProcess* theeplusBremsstrahlung     = new G4eBremsstrahlung();
         G4VProcess* theeplusAnnihilation       = new G4eplusAnnihilation();
         pmanager->AddProcess(theeplusMultipleScattering);
         pmanager->AddProcess(theeplusIonisation);
         pmanager->AddProcess(theeplusBremsstrahlung);
         pmanager->AddProcess(theeplusAnnihilation);
         pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
         pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
         pmanager->SetProcessOrdering(theeplusIonisation,         idxAlongStep,2);
         pmanager->SetProcessOrdering(theeplusBremsstrahlung,     idxAlongStep,3);      
         pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
         pmanager->SetProcessOrdering(theeplusIonisation,         idxPostStep,2);
         pmanager->SetProcessOrdering(theeplusBremsstrahlung,     idxPostStep,3);
         pmanager->SetProcessOrdering(theeplusAnnihilation,       idxPostStep,4);
      } 

    if( particleName == "ion") 
     {
     } 

   }    
}
//***************************************************************************
   // Decays ///////////////////////////////////////////////////////////////////
#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"
#include "G4IonTable.hh"
#include "G4Ions.hh"

//***************************************************************************
void TarDet01PhysicsList::ConstructGeneral()
{
   //------------------------------------------------------------------
   // Add Decay Process
   G4Decay* theDecayProcess = new G4Decay();
   theParticleIterator->reset();

   //------------------------------------------------------------------
   // Schleife ueber alle Teilchenarten:
   while( (*theParticleIterator)() )
   {
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      if (theDecayProcess->IsApplicable(*particle)) 
      { 
         pmanager ->AddProcess(theDecayProcess);
         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();
      if (particleName == "GenericIon") 
      {
         G4ProcessManager* pmanager = 
	 theIonTable->GetParticle(i)->GetProcessManager();
	 pmanager ->SetVerboseLevel(verboseLevel);
	 pmanager ->AddProcess(theRadioactiveDecay);
	 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep,1);
	 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest,1);
      } 
    }
}

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

 Add Message Add Message
to: "RadioactiveDecay is (sometimes) eating memory"

 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 ]