Conflicts between G4GenericBiasing and G4OpticalPhysics?

Hi everyone!

When I run my code, I get the following warning:

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : ProcMan114
issued by : G4ProcessManager::SetProcessOrderingToLast()
Set Ordering Last is invoked twice for biasLimiter to triton
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

(I get this warning many times, once for each particle I think).

I believe the problem is due to some conflict between G4GenericBiasing and G4OpticalPhysics: indeed, if in my PhysicsList class I put G4GenericBiasing after G4OpticalPhysics, I get this message, if Biasing is before OpticalPhysics, instead, I get

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : ProcMan114
issued by : G4ProcessManager::SetProcessOrderingToLast()
Set Ordering Last is invoked twice for Scintillation to triton
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

other stuff in PhysicsList does not seems to have any effect; I tried removing Biasing and no warning message appears.

Have you even encounter such kind of issue? Do you think it could be something dangerous, or is it something that can be (relatively) safe to ignore?

Thank you in advance for any input you can give me…

For the record, the relevant part of my PhysicsList class is

G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
auto opticalParams = G4OpticalParameters::Instance();

opticalParams->SetCerenkovMaxPhotonsPerStep(100);
opticalParams->SetCerenkovMaxBetaChange(10.0);
opticalParams->SetCerenkovTrackSecondariesFirst(true);

opticalParams->SetScintYieldFactor(1.0);
opticalParams->SetScintTrackSecondariesFirst(true);
RegisterPhysics(opticalPhysics);

G4GenericBiasingPhysics* biasingPhysics = new G4GenericBiasingPhysics();
biasingPhysics->NonPhysicsBias(G4Gamma::GammaDefinition()->GetParticleName());
RegisterPhysics(biasingPhysics);

Hi, you might need to investigate. First, it looks like your biasing is only for gamma. Since there are probably a negligible amount of scintillation photons generated by gammas, it may not matter.

If this doesn’t hold, try to set your NonPhysicsBias to not do anything. e.g. if it is splitting, set it to 1. Then compare what you get with and without biasing–they should be the same.

Also, probably you don’t want to split the primary, and then generate opticalphotons (typically there are plenty of opticalphotons produced). Conversely, if you are playing Russian Roulette, maybe you wnat to do that first, then generate opticalphotons.

Try small runs with
/tracking/verbose 2
to compare.

Thanks!

I followed your advice, and removed the scintillation part (I had to remove the whole G4OpticalPhysics to avoid any conflicts), and indeed the conflict disappear.

I run a code to check the results, and it does not seem to make any difference, so the problem is solved!

For the record, he reason why it was there is that I am studying the gamma background in 0n2b experiments, and I’m not 100% sure that OpticalPhysics would not affect the energy deposition inside the detector; however (for other reasons) I have to use two separate codes, one to propagate the gamma’s and one to study the energy deposition, so I can keep G4OpticalPhysics in the second code (where I don’t need biasing), and remove it from the first.

Thank you very much for your help!