Message: Re: Boundless memory consumption w. StackingAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Boundless memory consumption w. StackingAction 

Forum: Event and Track Management
Re: Question Boundless memory consumption w. StackingAction (I Cornelius)
Date: 15 Mar, 2006
From: Vladimir Ivantchenko <vnivanch@mail.cern.ch>

On Wed, 15 Mar 2006, I Cornelius wrote:

> *** Discussion title: Event and Track Management
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/eventtrackmanage/458"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi All, 
> 
> Banging my head against a wall here...
> 
> I am simulating decays of Ir-192 nuclei using G4RadioactiveDecay. I am running version 4.8.0.p01 under linux (gcc 4.0.2). 
> 
> I am only interested in emitted photons (no need to track Augers or Betas); accordingly, I have implemented a StackingAction class (see snippet below). 
> 
> Now, if I have no stacking action implemented, memory usage is static; however, once I implement this class (ie kill all tracks that are not primaries (Ir-192 nuclei) or gammas) memory consumption increases rapdily. 
> 
> Interestingly enough, if I remove the PhotonEvaporation data this problem is not encountered. 
> 
> Anybody else had such a problem?
> 
> Cheers, 
> Iwan
> 
> #include "StackingAction.hh"
> #include "G4ParticleDefinition.hh"
> #include "G4Track.hh"
> #include "G4Gamma.hh"
> #include "G4Electron.hh"
> 
> StackingAction::StackingAction()
> {  
> }
> 
> StackingAction::~StackingAction()
> {;}
> 
> G4ClassificationOfNewTrack StackingAction::ClassifyNewTrack(const G4Track * aTrack){
> //
> //by default don't track anything
>     G4ClassificationOfNewTrack classification = fKill;
> 
> //
>     G4bool IsGamma = false;
> //
>     G4bool IsPrimary = false;
> //
>     if(aTrack->GetDefinition()==G4Gamma::GammaDefinition())
>         IsGamma = true;
> //
>     if(aTrack->GetParentID()==0)
>         IsPrimary = true;
>     //
>     if(IsGamma||IsPrimary)
>         classification = fWaiting;
> //
>     return classification;
> //
> }
> 
> void StackingAction::NewStage(){
> 
> }
> 
> void StackingAction::PrepareNewEvent()
> { 
> }
> 
> 

Try fUrgent instead of fWaiting.

VI

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

1 None: Re: Boundless memory consumption w. StackingAction   (I Cornelius - 15 Mar, 2006)
 Add Message Add Message
to: "Re: Boundless memory consumption w. StackingAction"

 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 ]