Do generic biasing methods work in multithreaded?

Geant4 Version: 11.2.1

Hi All,

I was playing around with forced collision biasing by adapting the GB02 example into an existing simulating. Everything compiles and runs fine (for short simulations, at least), but I noticed these lines in the output:

Attaching biasing operator TestManyForceCollision to logical volume BiasedVolume

and then later:

G4WT0 > 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.MNG.01
      issued by : G4VBiasingOperator::AttachTo(...)
Biasing operator `TestManyForceCollision' can not be attached to Logical volume `BiasedVolume' which is already used by another operator !

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

G4WT0 >  Attaching biasing operator TestManyForceCollision to logical volume BiasedVolume
G4WT0 > PhysicsList::SetCuts:CutLength : 100000 fm 
G4WT0 > 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : BIAS.MNG.01
      issued by : G4VBiasingOperator::AttachTo(...)
Biasing operator `TestManyForceCollision' can not be attached to Logical volume `BiasedVolume' which is already used by another operator !

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4WT0 >  Attaching biasing operator TestManyForceCollision to logical volume BiasedVolume

From my understanding, these warnings are coming from the worker threads attempting to build the geometry. My question is does anyone know if these warnings will impact the simulation at all? Would it be better to restrict the ConstructSDandField to master thread or worker threads only?

Thanks!

ConstructSDandField() must be called by both master and worker threads; that’s how they’re designed. The call in the master thread ensures that any important side effects (instantiating Messengers, reading data files) happen when things can still be configured. The worker threads then get their own mutable instances (since SDs may have accumulator data members, and fields often have computed data).

I would have expected the biasing operators to be exactly the same, and need to be instantiated and attached by the worker threads. And in fact, the documentation is clear:

// The volume in which biasing is applied is specified by the
// AttachTo(const G4LogicalVolume *) method. This has to be specified
// at detector construction time in the method ConstructSDandField() of
// G4VUsedDetectorConstruction.