Force neutron to induce a fission process

Hello everyone,

My project is to develop a code to transport all particles produced by a neutron-induced fission and bin the energy deposited as a function of time and space.

For what I understand of the Geant4 philosophy, you start an event with a particle, not a process. So I define my particleGun as shooting a neutron. So far so good.

My problem is that the neutron is transported before undergoing either a nFission or a nCapture. I don’t want the neutron to be transported, I want it to undergo a nFission process with the position, angle, energy and time it has at the begining of the track. Do you know how to call that ?

Thanks,
Rookie Paul

Geant4 Version: v11.2.1
Operating System: MacOS
Compiler/Version: Clang 15.0.0
CMake Version: 3.27.7


Ok I found a solution :

I go in the following routine :
preUserTrackingAction(const G4Track* track)

And add this :

  G4ProcessManager* processManager = track->GetDefinition()->GetProcessManager();
  G4ProcessVector* processList = processManager->GetProcessList();
  for (G4int i=0; i<processList->size();i++)
  {
    G4VProcess* process  = processList->operator[](i);
    G4String processName = process->GetProcessName();
    if (processName!="nFission" && parentID==0)
    {
      processManager->SetProcessActivation(i, false);
    }
    else
    {
      processManager->SetProcessActivation(i, true);
    }
  }

At the beginning of every step, it will check if it is the initial neutron. If yes, it will disable every process but fission. If no, every process are activated. I end up with a fission at the beginning of each event, which is what I want to have.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.