I"e

A simple use of G4CAMP as a python module can be like this:

    from g4camp.g4camp import g4camp

    # initialize and configure
    sim = g4camp(...)
    sim.setXXX(...)
    sim.configure()

    # run simulation
    for data in app.run(n_events=10):
        particles = data.particles
        tracks = data.tracks
        photons = data.photons
        # do something else...

Also refer to an Example

## Initialization

Initilization is made by calling `g4camp()`. The arguments are the following:

- `physics`: ‘Custom’ or any standard Geant4 physics list (‘QGSP_BERT’, ‘FTFP_BERT’, and others, see Reference Physics Lists)
- `optics` (bool): enable/disable emission of Cherenkov photons. Can only be enabled for the ‘Custom’ physics.
- `primary_generator`: ‘gun’ or ‘gps’ (see Primary Modes in Introduction)
- `gun_args`: dictionary of gun source parameters:
  - `particle`: particle type (e-, e+, gamma, mu- etc.)
  - `energy`: energy in GeV
  - `position`: positio in meters
  - `direction`: X, Y, Z components of direction vector
    Note that the gun can also be configured by `setGunXXX()` methods

## Configuration

Configuration is done via `setXXX()` methods and should be followed by method `configure()`.

- `setDetectorHeight(val)`: height of the cylindrical simulation volume
- `setDetectorRadius(val)`: radius of the cylindrical simulation volume
- `setGPSMacro(macro)`: path to macro file with Geant4 General Particle Source commands to configure the primary particle source in mode `gps`.
- `setGunParticle(pname)`: name of the particle (e.g. ‘e-‘, ‘e+’, ‘gamma’, ‘mu-‘ etc.)
- `setGunEnergy(ene_val, ene_unit)`: energy value and unit for the `gun` source
- `setGunPosition(x_val, y_val, z_val, pos_unit)`: position X, Y, Z components and unit for the `gun` source
- `setGunDirection(dx, dy, dz)`: direction X, Y, Z components for the `gun` source
- `setSkipMinMax(skip_min, skip_max)`: energy range for cascade starter particles to be skipped, seeSkipping Cascades)
- `setPhotonSuppressionFactor(val)`: only `1/val` of the total number of photons will be produced
- `setRandomSeed(val)`: random seed for simulation
- `setCut(particle, cut_value, cut_unit)`: set individual production cuts for particles
- `setVerbose(control_verbose, tracking_verbose, run_verbose, em_process_verbose, had_process_verbose)`: set verbosity of Geant4 output with integer values (0 – no output, 1 – minimal output, 2 – extended output)
- `applyGeant4Command(command, arguments)`: apply a standard Geant4 command, e.g. `command='/run/printProgress'`, `arguments=[100]` would apply ‘/run/printProgress 100’ (this prints event id of each 100th event).

:ET