Message: Re: neutron activation problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: neutron activation problem 

Forum: Physics List
Re: None neutron activation problem (Eleni)
Date: 29 Jun, 2011
From: Sean Turnbull <Sean Turnbull>

On Wed, 29 Jun 2011 14:49:27 GMT, Eleni wrote:
> Hello All,
> 
> I am trying to count U-239 produced by the U238(n,g) reaction. In my
> StackingAction class I added the following
> 
> G4String particleType = track->GetDefinition()->GetParticleType();
> if (particleType == "nucleus" && track->GetParentID()>0)
>    {
>      G4Ions* ion = (G4Ions*) track->GetDefinition();
>      G4int Z = ion->GetAtomicNumber();
>      G4int A = ion->GetAtomicMass();
>      if (Z==92 && A==239)
>      runaction->CountU239();
>     }
> In the RunAction.hh I added the following 
> 
> void CountU239 ()
>             { nbU239++ ;};
> 
> But when I run the programma I get the same number of gammas and U239
> isotopes.
> 
> What do I do wrong in the code?
> 
> I attach the classes : StackingAction.cc RunAction.cc RunAction.hh
> 
> Thanks in advance
> 
>    Attachment:
>       http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2011/06/29/07.49-28914-RunAction.hh
>       http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2011/06/29/07.49-60316-SteppingAction.cc
>       http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2011/06/29/07.49-73541-StackingAction.cc
> 

Hi Eleni,

I asked the same question here: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hadronprocess/1140.html

I got my code going by using this in SteppingAction:

G4double particleValue = G4double(fTrack->GetDefinition()->GetPDGEncoding());

G4String particleName = fTrack->GetDefinition()->GetParticleName();

      if ( particleValue == 1000791980 )
        {
          G4cout << " Au198 Isotope: " << particleName.
          << " particle encoding " << particleValue.
          << " trackID " << fTrack->GetTrackID()
          << " ID= " << fTrack->GetParentID()
          << G4endl;
        }
You will need to check but looking at G4IonTable.hh, I think the code for U239 is  1000922390. The check is also much faster than a string check.
See how you. Hope it helps!

Sean

 Add Message Add Message
to: "Re: neutron activation problem"

 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 ]