8 # ------------------------------------------------------------------------------------------------
10 # Utility script for finding PMT supply voltages corresponding to the nominal gain setting.
12 # ------------------------------------------------------------------------------------------------
15 if [ -z $JPP_DIR ];
then
16 echo "Variable JPP_DIR undefined."
21 source $JPP_DIR/setenv.sh $JPP_DIR
25 set_variable: FIT_RANGE TUNEHV_GAINFIT_RANGE
"0.0 -1.0" # Invalid fit-
range such that ToT-fit
is conducted around histogram maximum (see JFitToT.hh)
28 set_variable: DB_TESTTYPE TUNEHV_DB_TESTTYPE "HV-TUNING-GAIN-v3"
29 set_variable: TIMESLICE_SELECTOR TUNEHV_TIMESLICE_SELECTOR "JDAQTimesliceL0"
64 echo "Creating output directory:\t${DIR}"
81 set_array OUTPUT_FITS
""
89 if [ -z $RUNID ];
then
90 echo "WARNING: header of ${INPUT_FILE}\n"
91 echo "does not contain run number; skip."
99 set_variable OUTPUT_CALTOT $CAL_DIR/${FILENAME}_calToT.root
104 if [ ! -z $PMT_PARAMETER_FILE ];
then
105 if [ -
f $PMT_PARAMETER_FILE ];
then
106 cp $PMT_PARAMETER_FILE $OUTPUT_PMT
108 echo $PMT_PARAMETER_FILE > $OUTPUT_PMT
116 -
a ${DETECTOR_FILE} \
118 -
C ${TIMESLICE_SELECTOR} \
119 -
o ${OUTPUT_CALTOT} --!
127 -
a ${DETECTOR_FILE} \
128 -
f ${OUTPUT_CALTOT} \
129 -
o ${OUTPUT_FITTOT} \
133 -
d ${
DEBUG} --! 2>&1 | tee ${LOG_FITTOT}
136 set_array OUTPUT_FITS ${OUTPUT_FITS[@]} ${
RUNID} ${OUTPUT_FITTOT}
140 # Retrieve high-voltage data
145 -
f "${OUTPUT_FITS[*]}" \
147 -
a ${DETECTOR_FILE} \
152 # Fit high-voltage values
166 -
a ${DETECTOR_FILE} \
168 -#
"APIversion = ${DB_APIVERSION}" \
169 -#
"testType = ${DB_TESTTYPE}" \
170 -#
"login = ${LOGIN}" \
171 -#
"locationID = ${LOCATIONID}" \
172 -#
"runNumbers = ${RUN_NUMBERS[*]}" \
173 -#
"elapsedTime = ${TIMER}" \
186 -
a ${DETECTOR_FILE} \
then usage $script< detector file >< inputfiles > n Note that if more than one input file is all other arguments must be provided fi case set_variable PMT_PARAMETER_FILE
set_variable LOCATIONID(getLocationID-L ${LOGIN}) if(($
then usage $script< detector file >< inputfiles > n Note that if more than one input file is specified
*set_variable DETECTOR_FILE set_array INPUT_FILES $argv[2,-3] set_variable WORKDIR $argv[-2] set_variable PMT_PARAMETER_FILE $argv[-1] esac timer_start set_variable PMT_DIR $WORKDIR PMTfiles set_variable CAL_DIR $WORKDIR caldata set_variable TOT_DIR $WORKDIR fitdata for DIR in $PMT_DIR $CAL_DIR $TOT_DIR
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
then usage $script< detector file >< inputfile > nUtility script to create PDF and CDF of transition time distribution fi case set_variable WORKDIR
TFitResultPtr Fit(TH1D *h)
do set_array DAQHEADER(JPrintDAQHeader-f ${INPUT_FILE}) set_variable DETID $
do echo Generating $dir eval DIR
then usage $script< string identifier >< detectorfile > input file(toashort file)+" "\nNote that the input files and toashort files should be one-to-one related." fi if (( $
set_variable DETECTOR_FILE
static const double C
Physics constants.
then timer_start(JRandomTimesliceWriter-a ${DETECTOR}-o ${PIPE}-n ${NUMBER_OF_SLICES}-P ${PMT_FILE}-d ${DEBUG}-S ${SEED}-B"$BACKGROUND_HZ"-N"$RECYCLING"--!&&for((i=0;$i!=10;++i));do;echo 'EOF' > $PIPE;usleep 100000;done &&rm-f $PIPE)&JTimesliceReprocessor-a $
then usage $script< input file >< outputfiles > n n Note
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
*fatal Wrong number of arguments
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
*set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2,-2] set_variable OUTPUT_FILE $argv[-1]
then $JPP_DIR examples JDetector JToT o $OUTPUT_FILE n N $NPE P gain
&set_variable OUTPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG set_variable WORKDIR if do_usage *then usage $script(input file)+" fi if (( $ fatal "Invalid number of arguments." fi JCookie.sh set_array INPUT_FILES $argv[1
alias put_queue eval echo n
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then echo Creating output directory
esac timer_start JCookie sh set_variable COOKIE(cat~/.km3netdb_cookie) set_variable LOGIN $
do set_variable DETECTOR_TXT $WORKDIR detector
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
do if[[!-f $ACOUSTICS_WORKDIR/${KEY}.txt]]