_Geant4 Version:_v11.2.1
_Operating System:_Ubuntu 22.04
Hi all,
I’m trying to implement forced collision biasing for gammas (and later neutrons) by copying the method in the GB02 example. So far I’ve added GB02BOptrMultiParticleForceCollision.cc and it’s header to my project, I’ve included
void DetectorConstruction::ConstructSDandField()
{
// -- Fetch volume for biasing:
G4LogicalVolume* logicBox = G4LogicalVolumeStore::GetInstance()->GetVolume("Box.logical");
// ----------------------------------------------
// -- operator creation and attachment to volume:
// ----------------------------------------------
GB02BOptrMultiParticleForceCollision* forceMany = new GB02BOptrMultiParticleForceCollision();
forceMany->AddParticle("gamma");
//testMany->AddParticle("neutron");
forceMany->AttachTo(logicBox);
G4cout << " Attaching biasing operator " << forceMany->GetName() << " to logical volume "
<< logicBox->GetName() << G4endl;
}
in DetectorConstruction, and I’m using a modular physics list where I’ve added:
G4GenericBiasingPhysics* biasingPhysics = new G4GenericBiasingPhysics();
biasingPhysics->Bias("gamma");
biasingPhysics->ConstructProcess();
For a few amount of histories in interactive mode, it appears to be working correctly but when I increase the history count to 1e5 it begins to throw exceptions:
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.GEN.18
issued by : G4BOptrForceCollision::EndTracking()
Current track deleted while under biasing by ForceCollisionForgamma. Will result in inconsistencies.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4WT5 >
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.GEN.19
issued by : G4BOptrForceCollisionTrackData::~G4BOptrForceCollisionTrackData()
Track deleted while under G4BOptrForceCollision biasing scheme of operator `ForceCollisionForgamma'. Will result in inconsistencies.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4WT2 >
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.GEN.05
issued by : G4BOptnForceFreeFlight::ApplyFinalStateBiasing(...)
Initial track weight is null !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
with the last one being the most common by far. I was hoping someone could shed some light on what may be causing these exceptions and where to start fixing them.
Thank you,
Aaron