From cafed4c03d442993b01298cb2c4f3f235e38f65e Mon Sep 17 00:00:00 2001 From: Andrew Edmonds Date: Mon, 2 Feb 2015 14:51:39 +0100 Subject: [PATCH] Adding Ben's script to insert the Si calibration constants into the calib DB. See issue #248 --- analyzer/rootana/scripts/insert_calib_si.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 analyzer/rootana/scripts/insert_calib_si.sh diff --git a/analyzer/rootana/scripts/insert_calib_si.sh b/analyzer/rootana/scripts/insert_calib_si.sh new file mode 100755 index 000000000..fef138d48 --- /dev/null +++ b/analyzer/rootana/scripts/insert_calib_si.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +RightChannels=( SiR{1_{1..4},2}-S ) +RightGains=( 2.53 2.62 2.49 2.53 7.96 ) +RightOffsets=( -87.97 -139.5 -30.2 -103.7 -182.99 ) + +LeftChannels=( SiL{1_{1..4},2}-S ) +LeftGains=( 2.61 2.54 2.65 2.54 7.86 ) +LeftOffsets=( -113.17 -52.19 -131.1 -84.29 -111.23 ) + +for run in $@;do + for i_channel in {0..4};do + echo "INSERT into Energy (run, channel, gain, offset) values ( $run, \"${RightChannels[$i_channel]}\", ${RightGains[$i_channel]}, ${RightOffsets[$i_channel]}) ;" + echo "INSERT into Energy (run, channel, gain, offset) values ( $run, \"${LeftChannels[$i_channel]}\", ${LeftGains[$i_channel]}, ${LeftOffsets[$i_channel]}) ;" + done +done \ No newline at end of file