GB06 example with multiple particles type

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.

We are using importance biasing (as an optional configuration) in our experimental framework. Here’s what our developer reported when we asked about it:

In the same meeting it was also proposed to bias all particles, i.e. gammas, e⁻, etc. at the same time. Unfortunately, Geant4 does not allow this. It is only possible to bias one single particle type per run. The function G4ImportanceBiasing::ConstructProcess() only adds the Importance Biasing process for the first requested particle. Everything else is ignored (because first is set to false after the first time). I could change this in my personal installation of Geant4, but there’s probably a reason why Geant4 makes this limitation. However, the importance process is kind of similar to the CoupledTransportation process, so I don’t see the reason why Geant4 does this.

Note that we are still using Geant4 10.6 and 10.7. It’s possible, I suppose, that this is no longer true in Geant4 11, but I doubt it.

Thank you @mkelsey for your response.
However, it seems that when using genericbiasing, it is possible to use importance biasing for different particles.
See Status of importance sampling for multiple particle types? - #3 by ElenaN

Any information about this generic biasing that allows biasing multiple particle types?

Does the “generic biasing” work in MT? One of the reasons we (CDMS) followed the path we did was that the “other” biasing option (I wasn’t involved in the code development, so I don’t have all the details) only worked with sequential builds, due to a known race condition.

As I noted above, that was with Geant4 10.6 and 10.7. It may already be improved for Geant4 11.

Yes, generic biasing is designed to work in MT mode. The existing examples support this processing. One key point is to instantiate the proper “biasing operators” (the classes which drive the biasing) in the ConstructSDandFields of the detector construction.