Dear community,
I am using the GB06 example to define an importance biasing in my geometry.
I am trying to assign different importances for different particles.
As a consequence, in the GB06ParallelWorldForSlices::ConstructSD()
method, I have defined the following:
auto biasingOperator = new GB06BOptrSplitAndKillByImportance(nPart[ip], "parallelOptr");
// -- Tell it it is active for this parallel geometry, passing the world
// -- volume of this geometry :
biasingOperator->SetParallelWorld( GetWorld() );
// -- Attach to the logical volume where the biasing has to be applied:
auto slice = G4LogicalVolumeStore::GetInstance()->GetVolume("slice.logicalX");
biasingOperator->AttachTo(slice);
When I proceed this way, I get the error below and the importance for my second particle type is not considered. All happen like if the replica from my parallelworld cannot be used to define different GB06BOptrSplitAndKillByImportance.
Is there a way to solve this or is it impossible ?
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.MNG.01
issued by : G4VBiasingOperator::AttachTo(...)
Biasing operator `parallelOptr' can not be attached to Logical volume `slice.logicalX' which is already used by another operator !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
Also, I have slightly modified the main to have the following particles taken into account:
if ( onOffBiasing == "on" )
{
// -- We use only the "non physics biasing" functionnality (ie, the ones which don't
// -- alter physics processes behavior), and hence we equipe the physics list
// -- accordingly:
biasingPhysics->NonPhysicsBias("neutron");
biasingPhysics->NonPhysicsBias("e-");
biasingPhysics->NonPhysicsBias("gamma");
biasingPhysics->NonPhysicsBias("e+");
// -- we activate and configure the parallel geometry facility:
biasingPhysics->AddParallelGeometry("neutron","parallelWorldForSlices");
biasingPhysics->AddParallelGeometry("e-","parallelWorldForSlices");
biasingPhysics->AddParallelGeometry("gamma","parallelWorldForSlices");
biasingPhysics->AddParallelGeometry("e+","parallelWorldForSlices");
physicsList->RegisterPhysics(biasingPhysics);
G4cout << " ********************************************************* "
<< G4endl;
G4cout << " ********** processes are wrapped for biasing ************ "
<< G4endl;
G4cout << " ********************************************************* "
<< G4endl;
}
else
{
G4cout << " ************************************************* " << G4endl;
G4cout << " ********** processes are not wrapped ************ " << G4endl;
G4cout << " ************************************************* " << G4endl;
}
This also provides me with an exception as follows:
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.GEN.28
issued by : G4BiasingHelper::AddBiasingProcessLimiter(G4ProcessManager* pmanager)
Trying to re-add a G4ParallelGeometriesLimiterProcess process to the process manager for 'e- (PDG : 11 ) while one is already present.
Call ignored.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.GEN.28
issued by : G4BiasingHelper::AddBiasingProcessLimiter(G4ProcessManager* pmanager)
Trying to re-add a G4ParallelGeometriesLimiterProcess process to the process manager for 'gamma (PDG : 22 ) while one is already present.
Call ignored.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.GEN.28
issued by : G4BiasingHelper::AddBiasingProcessLimiter(G4ProcessManager* pmanager)
Trying to re-add a G4ParallelGeometriesLimiterProcess process to the process manager for 'neutron (PDG : 2112 ) while one is already present.
Call ignored.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
e+ : biasWrapper(0)
e- : biasWrapper(0)
gamma : biasWrapper(0)
neutron : biasWrapper(0)
Can I ignore this exception ? Why is it happening, knowing it is the first time I add those processes and the code writes it is already present
Thanks in advance for your appreciated help.