rundqdxcalib_data.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 mkdir log
4 
5 input=$1
6 while IFS= read -r line
7 do
8  echo "Run $line"
9  nevts=$( filelisting.py protodune-sp_runset_${line}_michelremoving_merged_v09_09_01_v0 )
10  echo "Total entries: $nevts"
11  if [ $nevts -ge 20000 ]; then
12  make_yz_correction input_run${line}.txt 2 >& log/yz_correction_run${line}.out
13  fi
14  if [ $nevts -ge 1000 ]; then
15  if [ ! -f "YZcalo_mich2_r${line}.root" ]; then
16  YZcalo=`ls YZcalo_mich2_r*.root | tail -n 1`
17  echo "Using $YZcalo for YZ correction"
18  ln -s $YZcalo YZcalo_mich2_r${line}.root
19  fi
20  make_x_correction input_run${line}.txt 2 >& log/x_correction_run${line}.out
21  fi
22 done < "$input"