9 # ------------------------------------------------------------------------------------------
11 # Utility script to test sea time recalibration.
13 # ------------------------------------------------------------------------------------------
14 # the detector file used as a starting point is supposed to correspond to the latest sea
17 if [ -z $JPP_DIR ];
then
18 echo "Variable JPP_DIR undefined."
22 source $JPP_DIR/setenv.sh $JPP_DIR
27 usage "$script <working directory> <detector file> <data hv odd fix> <data hv even fix>"
35 *) fatal
"wrong number of arguments!";;
39 # generic name for all files: detector files, root data files, root results files...
42 if [ ! -
f "${WORKDIR}/${DETX}" ];
then
43 echo "WARNING: detector file from sea calibration not found, check that the path to the file is correct or that the file has effectively been created"
51 -
o calibrateK40_searecalibration_oddFix.root \
63 -
o calibrateK40_searecalibration_evenFix.root \
73 -
f calibrateK40_searecalibration_oddFix.root \
74 -
o mergecalibrateK40_searecalibration_oddFix.root
80 -
f calibrateK40_searecalibration_evenFix.root \
81 -
o mergecalibrateK40_searecalibration_evenFix.root
84 # this creates the odd/even PMT maps. If the HV of odd PMTs is kept fix, then you need to
85 # keep fix the time offset of odd PMTs
94 # create new detector files to perform sea recalibration on the 2 populations
95 # this 2 new files will be merged at the end of the script
101 # when the HV and time offset off odd PMTs are kept fix,
102 # the time offset of even PMTs are estimated
106 -
f mergecalibrateK40_searecalibration_oddFix.root \
108 -
o fitK40_searecalibration_oddFix.root \
109 -!
"`cat ${WORKDIR}/${BASENAME}_pmtOdd_map.txt`" \
114 # when the HV and time offset off even PMTs are kept fix,
115 # the time offset of odd PMTs are estimated
119 -
f mergecalibrateK40_searecalibration_evenFix.root \
121 -
o fitK40_searecalibration_evenFix.root \
122 -!
"`cat ${WORKDIR}/${BASENAME}_pmtOdd_map.txt`" \
128 # create a new detector for saving the merging of the 2 previous detector files
133 # merge the 2 detector files of odd/even PMT populations: the time offsets of odd pmts
134 # are taken from the first detector file (option -a), the ones of even PMTs from the second
135 # detector file (option -b) and both are saved in the third detector file (option -c).
set_variable DATAHVODDFIX
JFitK40_t< TF2 > JFitK40
Type definition for backward compatibility.
o $QUALITY_ROOT d $DEBUG!JPlot1D f
static const double C
Physics constants.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
then JConvertDetectorFormat a $DETECTOR[1] o
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG if do_usage *then usage $script< working directory >< detectorfile >< datahvoddfix >< datahvevenfix > fi case set_variable DATAHVEVENFIX
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
esac set_variable BASENAME
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A