Radioactive decay, move daughters in the StackingAction

Hi everybody!

I am working on a model of the radioactive decay chain of 224Ra. During this decay, the daughter Rn220 diffuses through the medium, however, Geant4 does not simulate this diffusion and everything decays in the same spot where everything was created. this is what I get on the terminal:

The original position of: Ra224 is: -0.298867 -0.18215 4.04117 mm
The original position of: Rn220 is: -0.298867 -0.18215 4.04117 mm

(Obviously, the same position)

According to literature, Rn220 is supposed to move/diffuse. I am using the Stacking Action to identify this daughter and move it to a random point in my geometry. So far I have identified the daughters and now I want to move the daughter Rn220 to a different position. My code in my StackingAction.cc file is the following:

G4ClassificationOfNewTrack classification = fWaiting; // We classify the stacks as Waiting
G4ParticleDefinition* Particle = aTrack → GetDefinition(); // We get the particle definition
G4String Name = Particle → GetParticleName(); // The particle name
G4ThreeVector Pos = aTrack → GetPosition(); // We get the particle’s position
G4ThreeVector DeltaPos = G4ThreeVector(10mm, 10mm, 10*mm); // Increment test
G4ThreeVector NewPos = Pos + DeltaPos; // New Position

if(aTrack->GetParentID() != 0)
{
    if(Name == "Ra224") {classification = fUrgent;}    // Parent: 224Ra
    else if(Name == "Rn220")                                        // Daughters: Rn220
    {
        classification = fWaiting;        // We put Rn220 in the waiting stack to increase its position
        //SetPosition(NewPos);
    }
}

As you can see from the code, I put the Rn220 in the waiting stack so that I can move it first and then let it decay. My first thought was to do a simple mathematical test operation as it is defined in the variable NewPos, but it just didn’t work.

My new attempt is to use: void SetPosition(const G4ThreeVector & aValue) from the G4Track.hh, but I get this type of error in the terminal:

dyld: lazy symbol binding failed: Symbol not found: __ZN14StackingAction11SetPositionERKN5CLHEP10Hep3VectorE
Referenced from: /Users/victor/geant4_workdir/tmp/Darwin-g++/DaRT/libDaRT.dylib
Expected in: flat namespace

Does anybody know how it could be possible to move this atom to a different position? By recoil, Rn220 should move but it doesn’t.

I am not sure to understand your question.
1- Obviously Rn220 is created at the point where Ra224 decays.
You must look at the end point of Rn220, available from TrackingAction::PostUserTrackingAction()
2- Anyway, assuming Ra224 at rest, the kinetic energy of Rn220 is ~100 keV.
At such energy, the stopping range of Rn220 is ~280 um in Air, and ~0.3 um in Water.

You may run example Hadr06 with the following macro

/control/verbose 1
/run/verbose 1

/testhadr/det/setMat G4_AIR
/testhadr/det/setRadius 1 mm

/process/em/verbose 0
/process/had/verbose 0

/run/initialize

/gun/particle ion
/gun/ion 88 224
/gun/energy 0. eV

/tracking/verbose 2
/run/beamOn 1

@maire , I think what the OP is saying is that in real life, after the Rn220 is “stopped due to energy loss”, it still has plenty of time to diffuse (as a gas) through the material that contains it.

@VictorDDiaz Geant4 doesn’t model that sort of environmental diffusion, but just has the particle stopped at rest, and then it decays with an appropriate time stamp.

In your commented out line, you’re trying to call a member function of the StackingAction, which obviously doesn’t exist. The error message tells you that explicitly; if you’re not comfortable parsing the munged name yourself, you can put it through c++filt:

{michaels-mbp:305} echo __ZN14StackingAction11SetPositionERKN5CLHEP10Hep3VectorE|c++filt
StackingAction::SetPosition(CLHEP::Hep3Vector const&)

I think what you wanted was to call that member function of the track.

@mkelsey ok, I missed the point ! thanks, Mike.