Biasing of G4GammaConversion in a volume

Dear all,

I am new to GEANT4 and would appreciate some help.
I currently have a setup which consists of consecutive silicon discs. It is supposed to track e+ and e- coming from gamma conversion.
I shoot a photon at these layers, but the photon conversion (to e+e-) probability is very low. The thickness of each layer is 1% of a radiation length.

I would like to increase the photon conversion probability for the first layer such that the photon that enters this first layer (or passes through, whichever is the proper way of doing it) converts in an e+e- pair.
I understood you can introduce a biasing by doing the following in the main program:

// -- Select a modular physics list
FTFP_BERT* physicsList = new FTFP_BERT;
// -- And augment it with biasing facilities:
G4GenericBiasingPhysics* biasingPhysics = new G4GenericBiasingPhysics();

And then you attach it to a layer in the ConstructSDandField of the detector construction by doing

MyBiasingOperator* biasingOperator = new MyBiasingOperator();
biasingOperator->AttachTo( logicalVolumeToBias );

But then I don’t know what the next step would be (or if this is the right way at all). Right now it does not seem like I biased (or introduced a weight) to the cross section of gamma to e+e- at all.
How would you go forward? Or alternatively, how is this done?


I recommend the biasing built into electromagnetics processes:

Dear @dsawkey ,

Thank you for your answer. That gives me something new to look into.
The command to target a specific “region” is

/process/em/setSecBiasing processName Region factor energyLimit energyUnit

processName would be “conv” I assume. Line 80 at Geant4: G4GammaConversion.hh Source File

Would the region be the physical volume, or logical volume?

I shoot photons up to 400 MeV with a particle gun at the target.
So I assume the command would be

/process/em/setSecBiasing conv LogicLayer_0 2000 500 MeV

But nothing happens. Do you know whether I use the command correctly?

Kind regards,

Update: I found out it does not find my logical (nor physical) volume. I suspect this is because you need to provide a “Region”. For that you need to register your logical volume as region.

I did that as follows in DetectorConstruction::ConstructSDandField

mRegion = new G4Region("target");

Is that correct?
Still nothing happens though

Indeed, “Region” is a G4Region. As a test, try the world region:

/process/em/setSecBiasing conv world 2000 500 MeV

(or it may be World with a capital W)

If that works, try using the name of the relevant region, in your case “target”, instead of “world”.

Parallel thread: