Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-05-18 07:43:06

0001 #!/bin/bash
0002 # alias for checking for overlaps
0003 
0004 if [ $# -ne 1 ]; then
0005   echo """
0006   USAGE: $0 [check]
0007     check:
0008       1 = TGeo
0009       2 = Geant4
0010     ideally you want to run both the checks
0011   """
0012   exit 2
0013 fi
0014 
0015 xmlfile=${DETECTOR_PATH}/${DETECTOR}.xml
0016 wdir=$(pwd)
0017 
0018 case $1 in
0019   1)
0020     checkOverlaps -c $xmlfile
0021     ;;
0022   2)
0023     python epic/scripts/checkOverlaps.py -c $xmlfile 2>&1 | tee tempo.log
0024     grep -E 'Overlap.is.detected.for' tempo.log -A1 |\
0025       sed 's/^.*for volume //g;s/^.* with //g' |\
0026       sed 's/ volume.s//g' |\
0027       tee $wdir/overlaps.log
0028     rm tempo.log
0029     ;;
0030   *)
0031     echo "ERROR: unknown check"
0032     exit 1
0033 esac