OpenGATE / opengate

Gate 10 (beta)
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
46 stars 40 forks source link

Compton and Brem splitting #322

Closed majacquet closed 6 months ago

majacquet commented 10 months ago

Add of the G4 biasing operator with the form of an actor to apply to a specific volume. Therefore, creation of an test operator which "actorify" the GEANT4 example proposing the Brem splitting.

Basically : Creation of an actor (BremSplittingActor) which inherit from two classes (GateVActor and G4VOperator). This actor call "operations" (here juste one operation : the brem splitting process) which is performed for each track on the desired volume.

At the same time, the physics list has to be modified (call of the special constructor class GenericBiasingPhysics) to include biased particles and biased processes applied to each of these particles.

PS : sry for the name of the branch which should be brem splitting and not Compton splitting.

majacquet commented 10 months ago

Update of the pull request. I created an other actor (with the test 071) which generates a biasing on the compton scattering, splitting it N times.

Basically, the actor, linked to a specific volume, is triggered each time a compton process ocurred. When a compton process ocurres, it will call N times the process compton, to generate the corresponding particles (gamma + electron)

The tests is basically the same as the 70, except the validation test is a comparison of each parameter of interest between :

majacquet commented 9 months ago

New update of the pull request :

The Russian roulette probability is now dynamically determined as the inverse of the splitting factor. To utilize the Russian roulette feature, set the russian_roulette boolean to True. Following this, the user is required to specify an acceptance angle relative to a user-defined vector director. If you intend to adjust your vector director to align with potential rotations in your biased geometry, set the rotation_vector_director boolean to True.

dsarrut commented 8 months ago
majacquet commented 8 months ago

For the users : 2 Variance Reduction Method were developed. The first one is the Brem splitting, which take as reference the code developed in the GEANT4 biasing examples. The test 070 shows briefly how to use it.

The second one is the Compton splitting, which create N particles with a 1/N weight when a Compton process occurs. The tests 071 shows how to use, and how to use the Russian roulette to control :

For the developers :

If you want to create a biasing actor, you have to create a class which inherit both of th G4VActor and G4VBiasingOperator class. This class will provide you several way to bias the physics on a specific volume. Your class will then call one or more classes inheriting from G4VBiasingOperation you have to create and call in your actor class to describe within your actor how and when the physics is biased in your simulation. The minimal thing you have to give to the physic list is , for the moment, the list of processes and list of particles you want to bias.