Changing a parameter in an interactive session

Hi everyone!

I’m modelling a Multi-Gap Resistive Plate Chamber (MRPC) with Geant4 using a calorimeter, I’ve set an uniform electric field in the z-direction to reproduce the field between plates but I would like to investigate the energy stored between gaps of the calorimeter as a function of the electric field intensity, which I’ve let constant with my program.

I know that I could just change the value of the electric field directly in my source code, build the solution, run the program to save the data and repeat this procedure for each value of the electric field that I would need, but I’d like to know if it’s possible to set the value of the electric field in such a way that I could just modify it through the interactive session of the simulation, and then run the program to see the energy deposited between gaps.

I hope you could help me with this problem, let me know if something is not clear, if necessary, I’m using the Geant4 version for Visual Studio 2019 on Windows.

P.S. I apologize if my redaction or grammar are not good, I haven’t practiced too much my English as a non-native speaker.

Have a look at Control, User Interface - Defining New Commands, in the Application Developers Book.

1 Like