
Examples of gemc command lines:


gemc -GT=CTOF                                    # Geometry Table:  CTOF
     -USE_QT=0                                   # Batch Mode
     -PRINT_EVENT=1                              # Print log message on screen every event.
     -OUTPUT="txt, out.txt"                      # The output is a TEXT output, filename = out.txt
     -N=100                                      # Process 100 events
     -BEAM_P="proton, 0.8*GeV, 60*deg, 0*deg"    # Generated particle is a 800 MeV proton, theta = 60 deg, phi = 0 deg.
     -SPREAD_P="0.2*GeV, 20*deg, 180*deg"        # The proton momentum is uniformly spread by 200 MeV, 20 deg in theta, 180 in phi
     -SPREAD_V="(0.1, 0.1, 2.5)cm"               # The proton primary vertex is spread by 0.1 cm in x, 0.1 cm in y, 2.5 cm in z


gemc -GT=BST                                     # Geometry Table:  BST
     -USE_QT=0                                   # Batch Mode
     -PRINT_EVENT=1                              # Print log message on screen every event.
     -OUTPUT="evio, out.ev"                      # The output is a EVIO output, filename = out.ev
     -N=10                                       # Process 100 events
     -BEAM_P="proton, 0.8*GeV, 80*deg, 0*deg"    # Generated particle is a 800 MeV proton, theta = 60 deg, phi = 0 deg.
     -SPREAD_P="0.2*GeV, 40*deg, 180*deg"        # The proton momentum is uniformly spread by 200 MeV, 20 deg in theta, 180 in phi
     -SPREAD_V="(0.1, 0.1, 2.5)cm"               # The proton primary vertex is spread by 0.1 cm in x, 0.1 cm in y, 2.5 cm in z
     -LUMI_P="e-, 11*GeV, 0, 0"                  # Luminosity Particle: 11 GeV electrons
     -LUMI_V="(0, 0, -10)cm"                     # vertex of electrons
     -LUMI_EVENT="2000, 124*ns, 2*ns"            # 2000 electrons per event, spread in 124 ns, 2ns per bunch
     -USE_PHYSICSL=QGSP                          # QGSP physics list
     -HALL_MATERIAL=Vacuum                       # Hall Material set to Vacuum (faster simulation)


gemc -gcard=example.gcard                        # Use the gcard to specify the detectors in the simulation
     -USE_QT=0                                   # Batch Mode
     -PRINT_EVENT=1000                           # Print log message on screen every 1000 events.
     -OUTPUT="evio, dvcs.ev"                     # The output is a EVIO output, filename $
     -N=40000                                    # Process 40000 events
     -INPUT_GEN_FILE="LUND, dvcsgen3.dat"        # Events come from LUND file format specified
     -USE_PHYSICSL=QGSP_BIC                      # QGSP_BIC physics list (QGSP + Binary Cascade)
     -HALL_MATERIAL=Air                          # Hall Material set to Air (more correct)
     -HALL_FIELD=itep-solenoid                   # Hall magnetic field set to ihep-solenoid
     -NGENP=3                                    # Saves max 3 generated particles in the output stream

to use evio2xml:

$EVIO/bin/evio2xml -dict eviodict.xml -p64 4 -brief out.ev


Valgrind leaks check:

valgrind --leak-check=yes  --show-reachable=no --tool=memcheck -v --log-file=valgrind.log ./gemc -GT=BST -PRINT_EVENT=1 -OUTPUT="evio, dvcs.ev" -BEAM_P="proton, 0.8*GeV, 80*deg, 0*deg" -SPREAD_P="0.2*GeV, 40*deg, 360*deg"  -N=400 -HALL_MATERIAL=Vacuum -USE_QT=0