Hi!
I am simulating a beam of antiprotons with low energies (250 eV and 1 keV) using the FTFP_INCLXX_EMZ list. Only a minor part of the antiprotons annihilate immediately on my target, the rest first scatter. This is in general not an issue, but to have a better comparison with another model I would like to force the antiprotons to always annihilate (hINCLXXCaptureAtRest).
Is there a possibility to do this?
Thank you!
Geant4 Version: v11.2.1
I wonder if forcing the process via Physics Based Biasing might be useful to you.
Failing that, using a G4WrapperProcess
in a custom PhysicsList might work. You could retrieve the process from the antiproton’s process manager, stick it in your wrapper process which sets ‘Forced’, and replace the original process with your wrapper in the process manager.
Thanks!
I tried the biasing but ran into an issue with writing the custom physics list. Even though I load the
“FTFP_INCLXX_EMZ” physics from the factory and only want to change it afterwards, it seems like only Transportation is included as a process. Is there somewhere a list of processes that I need to include to actually get the same physics?
#include "G4PhysListFactory.hh"
#include "G4EmStandardPhysics_option4.hh"
#include "G4ProcessManager.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4INCLXXInterface.hh"
#include "G4StepLimiterPhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4AntiProton.hh"
MyPhysicsList::MyPhysicsList() {
G4PhysListFactory factory;
G4VModularPhysicsList* baseList = factory.GetReferencePhysList("FTFP_INCLXX_EMZ");
baseList->RegisterPhysics(new G4StepLimiterPhysics());
}
MyPhysicsList::~MyPhysicsList() {}
void MyPhysicsList::ConstructProcess() {
G4VModularPhysicsList::ConstructProcess();
ModifyAntiprotonProcesses();
}
void MyPhysicsList::ConstructParticle()
{
G4AntiProton::AntiProton();
}
void MyPhysicsList::ModifyAntiprotonProcesses() {
G4ParticleDefinition* particle = G4AntiProton::AntiProton();
G4ProcessManager* pManager = particle->GetProcessManager();
if (!pManager) return;
// Remove msc for antiprotons
G4VProcess* msc = pManager->GetProcess("msc");
if (msc) {
pManager->RemoveProcess(msc);
}
// Bias Capture Cross section
G4ProcessVector* processList = pManager->GetProcessList();
for (size_t i = 0; i < processList->size(); ++i) {
G4VProcess* process = (*processList)[i];
G4cout << "Process " << i << ": " << process->GetProcessName() << G4endl;
auto* hadronicProcess = dynamic_cast<G4HadronicProcess*>(process);
if (hadronicProcess && hadronicProcess->GetProcessName() == "hINCLXXCaptureAtRest") {
printf("Setting bias for %s\n", hadronicProcess->GetProcessName());
hadronicProcess->BiasCrossSectionByFactor(100.0);
}
}
}