#!/bin/bash
#
#      Run all the MC programs for the background agile model
#      m.galli - may 2005
#

#       ---- defining the agile dirs ( from setup_asim.sh )

export MAINDIR="/home/galli/AGILE-SIMULATION/" 

export BINDIR="${MAINDIR}bin/"
export INCDIR="${MAINDIR}include/"
export LIBDIR="${MAINDIR}lib/" 

PATH=${BINDIR}:$PATH 

echo "    Main Directory: $MAINDIR "
echo "       Binaries  in: $BINDIR "
echo "       Includes  in: $INCDIR "
echo "       Libraries in: $LIBDIR "
echo "    New path: $PATH "

# ---------------- where the event list can be found ---

export EVDIR="/home/galli/Fondo/Run-fondo/" 

# diffuse gamma backgroung 

cat ${EVDIR}/phlist_g_ascii.out | time agile > g_sec100th0.lis 
mcrename g_sec100th0 
sleep 300  

# primary protons backgroung 

cat ${EVDIR}/phlist_pp_ascii.out | time agile > pp_sec100th0.lis 
mcrename pp_sec100th0 
sleep 300                 # un poco di meritato riposo ... 

# albedo protons backgroung 

cat ${EVDIR}/phlist_ap_ascii.out | time agile > ap_sec100th0.lis 
mcrename ap_sec100th0 
sleep 300  

# albedo gamma backgroung 

cat ${EVDIR}/phlist_ag_ascii.out | time agile > ag_sec100th0.lis 
mcrename ag_sec100th0 
sleep 300  

# e- albedo backgroung 

cat ${EVDIR}/phlist_ae_ascii.out | time agile > ae_sec100th0.lis 
mcrename ae_sec100th0 
sleep 300  

# e+ albedo backgroung 

cat ${EVDIR}/phlist_aep_ascii.out | time agile > aep_sec100th0.lis 
mcrename aep_sec100th0 
sleep 300  

# diffuse X  backgroung 

cat ${EVDIR}/phlist_x_ascii.out | time agile > x_sec10th0.lis 
mcrename x_sec10th0 
sleep 300  


