Skip to content

User primary generator action adding plugin functionality

The Gean4 provides an interface to the user's custom primary generator. It is very needed in some cases, for example for reading primary vertexes data from an external file, or for writing generator data into an output analysis file.

The main goal of changes in this branch is to provide the functionality to use G4VUserPrimaryGeneratorAction from FSLUserActionPlugin. So that one could be able to implement one's own primary generator action.

On the side of FSL, a new type of generator has been added (with the name "User Primary Generator"). If chosen generators with the names "Particle Gun" or "Pythia", the primary generator in FSLUserActionPlugin will be ignored. If chosen "User Primary Generator", the generator in the user plugin will be used.

Here is a picture of the changes in the FSL window. Screenshot_from_2022-09-10_19-23-59

Here is an example of a user plugin with a custom primary generator https://gitlab.cern.ch/dklekots/denys-klekots-summer-student-project/-/tree/master/FSLExamplePrimaryGeneratorPlugin

Edited by Denys Klekots

Merge request reports