Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:50:27

0001 #!/bin/bash -l 
0002 usage(){ cat << EOU
0003 cf.sh  : runs U4SimulateTest.sh twice with N=0 and N=1 and Chi2 compares histories
0004 ======================================================================================
0005 
0006 ::
0007 
0008     u4t                              # cd ~/opticks/u4/tests 
0009 
0010     APID=475 BPID=476 ./cf.sh cf     # dump single photons and chi2 compare
0011 
0012     ./cf.sh run_cf                   # create SEvt and compare histories  
0013 
0014     POM=0 ./cf.sh                    # traditional stop at photocathode 
0015 
0016     NUM_PHOTONS=50000 POM=0 ./cf.sh 
0017 
0018 
0019 EOU
0020 }
0021 
0022 defarg="run_cf"
0023 #defarg="cf"
0024 arg=${1:-$defarg}
0025 
0026 if [ "${arg/run}" != "$arg" ]; then 
0027    N=0 ./U4SimulateTest.sh run
0028    [ $? -ne 0 ] && echo $BASH_SOURCE N=0 RUN ERROR && exit 1
0029 
0030    N=1 ./U4SimulateTest.sh run
0031    [ $? -ne 0 ] && echo $BASH_SOURCE N=1 RUN ERROR && exit 2
0032 fi 
0033 
0034 if [ "${arg/cf}" != "$arg" ]; then 
0035    C2CUT=30 ./U4SimulateTest.sh cf
0036    [ $? -ne 0 ] && echo $BASH_SOURCE cf ANA ERROR && exit 3
0037 fi
0038 
0039 exit 0 
0040 
0041