Geometrical biasing not working on multithread mode

Hi!

I have some problems running a code, which involve geometrical biasing, in multi-thread mode, namely no biasing is taking place.

The code is running correctly in single-thread mode, the only modification I’ve done is that, as required, the initialization of the RunAction, EventAction, etc… are moved from the main to the ActionInitialization class, while DetectorConstruction and PhysicsList are still initialized in the main; namely

void ActionInitialization::Build() const
{
PrimaryGeneratorAction* primary = new PrimaryGeneratorAction();
SetUserAction(primary);

//runAction
RunAction* runaction = new RunAction();
SetUserAction(runaction);

//eventAction
EventAction* eventaction = new EventAction(histo);
SetUserAction(eventaction);

//trackAction
TrackingAction* trackingaction = new TrackingAction(detector, histo);
SetUserAction(trackingaction);

//stepAction
SteppingAction* steppingaction = (detector, eventaction, histo);
SetUserAction(new SteppingAction);

//stackAction
StackingAction* stackingaction =(detector, eventaction, histo);
SetUserAction( new StackingAction);
}

int main(int argc,char** argv) {
[…]
DetectorConstruction* detector;
detector = new DetectorConstruction;
runManager->SetUserInitialization(detector);

PhysicsList* aPhysicsList = new PhysicsList();
G4GenericBiasingPhysics* biasingPhysics = new G4GenericBiasingPhysics(); biasingPhysics->NonPhysicsBias(G4Gamma::GammaDefinition()->GetParticleName());
biasingPhysics->NonPhysicsBias(G4Electron::ElectronDefinition()->GetParticleName());
biasingPhysics->NonPhysicsBias(G4Alpha::AlphaDefinition()->GetParticleName());
aPhysicsList->RegisterPhysics(biasingPhysics);
[…]
}

However, if I run the code, even if the multi-threading is working fine, no biasing is happening (all the particles that reach the detector have weight 1; to be sure I added a line of code in the biasing class, that print out a message every time biasing is invoked, no message appears); moreover when I launch the code I can see the following command is executed for each thread:

/run/physicsModified

which is not included in the macro file.
What could be the problem? How could it be fixed?