Hi everyone,
I am trying to implement importance biasing with a very simple parallel world (just a G4Box, nothing else).
My Physics list:
myPhysicsList::myPhysicsList(): G4VModularPhysicsList() {
emPhysicsList = new G4EmPenelopePhysics();
}
myPhysicsList::~myPhysicsList() { delete emPhysicsList; }
void myPhysicsList::ConstructParticle() { emPhysicsList->ConstructParticle(); }
void myPhysicsList::ConstructProcess() {
AddTransportation();
emPhysicsList -> ConstructProcess();
}
The way I create the parallel world:
auto detector = new myDetectorConstruction();
runManager->SetUserInitialization(detector);
G4String parallelName("ParallelBiasingWorld");
myParallelWorld* pdet = new myParallelWorld(parallelName);
detector->RegisterParallelWorld(pdet);
G4GeometrySampler pgs(pdet->GetWorldVolume(),"gamma");
pgs.SetParallel(true);
// Physics list
G4VModularPhysicsList* physicsList = new myPhysicsList(); // IMPORTANT LINE
physicsList->RegisterPhysics(new G4ImportanceBiasing(&pgs,parallelName));
physicsList->RegisterPhysics(new G4ParallelWorldPhysics(parallelName));
runManager->SetUserInitialization(physicsList);
Gamma particles that penetrate the “ghost box” are not importance-sampled. However, when I change the “IMPORTANT LINE” from above to
G4VModularPhysicsList* physicsList = new FTFP_BERT();
particles get multiplied when entering the box.
What am I missing here? Thanks a lot in advance for your support