5 # | | |_/ / _ _ __ / /_\ \_ __ __ _| |_ _ _______ _ __
6 # | | / | | | '_ \| _ | '_ \ / _` | | | | |_ / _ \ '__|
7 # /\__/ / |\ \ |_| | | | | | | | | | | (_| | | |_| |/ / __/ |
8 # \____/\_| \_\__,_|_| |_\_| |_/_| |_|\__,_|_|\__, /___\___|_|
14 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16 if ( do_usage $* ); then
17 usage "$script [jra file string floor out dir]"
20 set_variable WORKDIR ${PWD}
22 set_variable JRA_FILE ${WORKDIR}/out/JRA_4237.root
24 set_variable OUT_DIR ${WORKDIR}/out/JRA_Project
50 echo "Too many arguments"
55 #######################################
56 #Variables that we will need to define#
57 #######################################
59 if [ ! -d ${OUT_DIR} ]
64 # Parse the detector file name from the complete path, and format it so that it compiles in latex.
66 ####################################################################
67 # Use JFitToT to fit the ToT distributions for each PMT in the DOM #
68 ####################################################################
70 if [[ ${JRA_FILE} =~ 'JRA_'(.*)(.root) ]]; then
71 RUN_NUMBER="${BASH_REMATCH[1]}"
78 for((j=0;j<N_PMTS;j++)); do
79 SLICES=$SLICES" $(echo ${j} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./') $(echo ${j} + 0.5 | bc)"
82 JProject2D -f "${JRA_FILE}:Detector/DU${STRING}/F${FLOOR}/h_pmt_rate_distributions_TimesliceL1" -P x -y "${SLICES}" -o "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_TSL1.root"
84 JProject2D -f "${JRA_FILE}:Detector/DU${STRING}/F${FLOOR}/h_pmt_rate_distributions_Summaryslice" -P x -y "${SLICES}" -o "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_Summary.root"
86 JProject2D -f "${JRA_FILE}:Detector/DU${STRING}/F${FLOOR}/h_fifo_almost_full" -P x -y "${SLICES}" -o "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_FIFO.root"
88 JProject2D -f "${JRA_FILE}:Detector/DU${STRING}/F${FLOOR}/h_hrv" -P x -y "${SLICES}" -o "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_HRV.root"
90 JProject2D -f "${JRA_FILE}:Detector/DU${STRING}/F${FLOOR}/h_rate_vs_time_Summaryslice" -P x -y "${SLICES}" -o "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_summary_rate_vs_t.root"
92 JProject2D -f "${JRA_FILE}:Detector/DU${STRING}/F${FLOOR}/h_rate_vs_time_TimesliceL1" -P x -y "${SLICES}" -o "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_L1_rate_vs_t.root"
95 JPlot1D -f "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_TSL1.root:h_pmt_rate_distributions_TimesliceL1_px\\[$(echo ${PMT} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./')" -x "1e-3 1e1" -X -y "1e-1 1e6" -O "hist" -Y -G "[X][Y]" -T "TimesliceL1 S${STRING}F${FLOOR}PMT${PMT}" -o "${OUT_DIR}/rateL1_PMT_${PMT}.png" -B
97 JPlot1D -f "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_Summary.root:h_pmt_rate_distributions_Summaryslice_px\\[$(echo ${PMT} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./')" -x "1e-3 1e3" -X -y "1e-1 1e6" -Y -O "hist" -G "[X][Y]" -T "Summaryslice S${STRING}F${FLOOR}PMT${PMT}" -o "${OUT_DIR}/rateSummary_PMT_${PMT}.png" -B
99 JPlot1D -f "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_summary_rate_vs_t.root:h_rate_vs_time_Summaryslice_px\\[$(echo ${PMT} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./')" -y "1e-1 1e6" -Y -G "[X][Y]" -T "Summaryslice S${STRING}F${FLOOR}PMT${PMT}" -O "hist" -o "${OUT_DIR}/rateSummary_t_PMT_${PMT}.png" -B
101 JPlot1D -f "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_L1_rate_vs_t.root:h_rate_vs_time_TimesliceL1_px\\[$(echo ${PMT} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./')" -y "1e-1 1e6" -Y -G "[X][Y]" -T "TimesliceL1 S${STRING}F${FLOOR}PMT${PMT}" -O "hist" -o "${OUT_DIR}/rateL1_t_PMT_${PMT}.png" -B
103 JPlot1D -f "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_FIFO.root:h_fifo_almost_full_px\\[$(echo ${PMT} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./')" -y "0 2" -T "FIFO S${STRING}F${FLOOR}PMT${PMT}" -O "hist" -o "${OUT_DIR}/FIFO_${PMT}.png" -B
105 JPlot1D -f "${OUT_DIR}/JRA_proj_${RUN_NUMBER}_S${STRING}F${FLOOR}_HRV.root:h_hrv_px\\[$(echo ${PMT} - 0.5 | bc -l | sed -e 's/^\./0./' -e 's/^-\./-0./')" -y "0 2" -T "HRV S${STRING}F${FLOOR}PMT${PMT}" -O "hist" -o "${OUT_DIR}/HRV_${PMT}.png" -B