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.