Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:19:43

0001 #!/usr/bin/env bash
0002 #
0003 # run the mbd calibration passes
0004 # usage:
0005 # runmbd_calpass.sh <prdf> <calpass> <nevts>
0006 #
0007 
0008 prdf=$1
0009 
0010 nevts=0
0011 if [[ $# -gt 1 ]] 
0012 then
0013   nevts=$2
0014 fi
0015 
0016 # get run number from prdf file
0017 run=${prdf##*/}
0018 run=${run%-*}
0019 run=${run#*-}
0020 run=${run#000}
0021 
0022 # make calibration directory and fill it
0023 caldir=results/${run}
0024 echo mkdir -p ${caldir}
0025 mkdir -p ${caldir}
0026 
0027 # link pass0 calibs
0028 export PASS0DIR=/sphenix/user/chiu/sphenix_bbc/CDB/PASS0/
0029 ln -sf ${PASS0DIR}/mbd_shape.calib ${caldir}/
0030 ln -sf ${PASS0DIR}/mbd_sherr.calib ${caldir}/
0031 ln -sf ${PASS0DIR}/mbd_timecorr.calib ${caldir}/
0032 ln -sf ${PASS0DIR}/mbd_slewcorr.calib ${caldir}/
0033 
0034 # if not interactive, run ROOT in batch mode
0035 if [ ! -z $PS1 ]
0036 then
0037   BATCH=-b
0038 fi
0039 
0040 # get the samp_max
0041 pass=1
0042 smax_nevts=20000
0043 echo root.exe ${BATCH} -q Fun4All_MBD_CalPass.C\(\"${prdf}\",${pass},${smax_nevts}\)
0044 root.exe ${BATCH} -q Fun4All_MBD_CalPass.C\(\"${prdf}\",${pass},${smax_nevts}\)
0045 
0046 # now process the laser events and write out a DST
0047 pass=2
0048 echo root.exe ${BATCH} -q Fun4All_MBD_CalPass.C\(\"${prdf}\",${pass},${nevts}\)
0049 root.exe ${BATCH} -q Fun4All_MBD_CalPass.C\(\"${prdf}\",${pass},${nevts}\)
0050