#include #include "i3module.h" /** * Follow these steps: * 1. call initJre() to create Java runtime environment * call setStderr(filename) to redirect stderr (optional) * 2. call initMMC(options, flag) to initialize the mmc module: * flag=1: to run tfa/Amanda * flag=2: to run gen/AtmFlux as generator * flag=3: to run gen/AtmFlux as propagator * 3. call propagate(...) for flag=[1/3] or createNext() for flag=2 * 4. call getNum() to get the number of particles in the returned event * 5. call startRead(i) before reading particle #i * 6. call endRead() when done reading event particles * 7. call endProp() when you are done with the processed event * 8. at the end of your program, or when Jre is no longer necessary * call stopJre() to stop the Jre */ char *name; double x, y, z, theta, phi, e, t; main(){ int events=10; // number of events to generate int n, i; char *options[]={ "-seed=1 -user -sdec -raw -rw=0", "-seed=1 -user -Emu=1.e7 -Enm=1.e6 -Ene=1.e6 -sdec -raw", "-seed=1 -user -sdec -raw -prop" }; double r, z1=0, z2=0, h1=0, h2=0, nx=0, ny=0, nz=0, e1=0, e2=0, ec=0; initJre(); // setStderr("mmc.log"); printf("\nRunning %s\n", "tfa/Amanda (1)"); initMMC(options[0], 1); for(n=0; n