Jpp
16.0.0-rc.1
the software that should make you happy
|
Go to the source code of this file.
Variables | |
script | |
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID set_array RUNS if do_usage *then usage $script[ < detector file >< tripod file > ][user directory] nThe user directory should be specified when this script is submitted in a batch queue nThe optional detector file and tripod file correspond to a pre calibrated sub detector fi set_variable WORKDIR pwd set_variable HOMEDIR $WORKDIR case set_variable | HOMEDIR |
&set_variable | TRIPOD |
set_variable | DETECTOR |
*fatal Wrong number of arguments esac set_variable TRIPOD_INITIAL tripod_initial txt set_variable DETECTOR_INITIAL detector_initial datx mkdir p $HOMEDIR cd $HOMEDIR | if [[!-f $DETECTOR_INITIAL]] |
then cat $TRIPOD_INITIAL << EOF2+256815.500+4743395.000-2436.6773+257096.200+4743636.000-2439.3544+256919.238+4743354.178-2439.354EOFfiJEditDetector-a $DETECTOR_INITIAL-o ${TMPDIR:-/tmp}/detector.datxif[[-n"$DETECTOR"]];then eval`JPrintDetector-a $DETECTOR-O SUMMARY`JEditDetector-a ${TMPDIR:-/tmp}/detector.datx-r"$STRINGS[*]"-o ${TMPDIR:-/tmp}/detector.datx JMergeDetector-a ${TMPDIR:-/tmp}/detector.datx-a $DETECTOR-o detector.datx set_variable ACOUSTICS_STRINGS $STRINGS[*]#fix strings in acoustics-fit.shelse JConvertDetectorFormat-a ${TMPDIR:-/tmp}/detector.datx-o detector.datxfiif[[-n"$TRIPOD"]];then source JAcoustics.sh--typeset-A TRIPODS get_tripods $TRIPOD TRIPODS typeset-A TRIPODS_INITIAL get_tripods $TRIPOD_INITIAL TRIPODS_INITIAL cp-p $TRIPOD_INITIAL tripod.txt for ID in ${(@k) TRIPODS_INITIAL};do if[[-n"$TRIPODS[$ID]"]];then JEditTripod-f tripod.txt-T"$ID set $TRIPODS[$ID]"fi done set_variable ACOUSTICS_TRIPODS ${(@k) TRIPODS[*]}#fix tripods in acoustics-fit.shelse cp-p $TRIPOD_INITIAL tripod.txtfiset_variable DETECTOR detector.datxset_variable TRIPOD tripod.txtJAcoustics.sh $DETECTOR_IDJAcousticsEventBuilder.sh $DETECTOR $RUNS[*]cd $WORKDIRif[!$HOMEDIR-ef $WORKDIR];then cp-p $HOMEDIR/$TRIPOD $WORKDIR cp-p $HOMEDIR/$DETECTOR $WORKDIR for RANGE in $RUNS[*];do for((RUN=${RANGE%%-*};$RUN<=${RANGE##*-};RUN+=1));do cp-p $HOMEDIR/KM3NeT_ ${(l:8::0::0:) DETECTOR_ID}_ ${(l:8::0::0:) RUN}_event.root $WORKDIR done done JAcoustics.sh $DETECTOR_IDfifor STAGE in 1;do $JPP_DIR/examples/JAcoustics/acoustics-fit.sh $DETECTOR $TRIPOD $STAGE $WORKDIR/KM3NeT_ ${(l:8::0::0:) DETECTOR_ID}_ *event.root > $HOMEDIR | stage |
then cp vru *$HOMEDIR fi done unset_variable ACOUSTICS_STRINGS unset_variable ACOUSTICS_TRIPODS for STAGE | in |
do $JPP_DIR examples JAcoustics acoustics fit sh $DETECTOR $TRIPOD $STAGE $WORKDIR | KM3NeT_ |
script |
Definition at line 2 of file acoustics-fit_00000100.sh.
set_variable HOMEDIR |
Definition at line 21 of file acoustics-fit_00000100.sh.
& set_variable TRIPOD |
Definition at line 32 of file acoustics-fit_00000100.sh.
set_variable DETECTOR |
Definition at line 33 of file acoustics-fit_00000100.sh.
Definition at line 34 of file acoustics-fit_00000100.sh.
then cat $TRIPOD_INITIAL<<EOF2 +256815.500 +4743395.000 -2436.6773 +257096.200 +4743636.000 -2439.3544 +256919.238 +4743354.178 -2439.354EOFfiJEditDetector -a $DETECTOR_INITIAL -o ${TMPDIR:-/tmp}/detector.datxif [[ -n "$DETECTOR" ]]; then eval `JPrintDetector -a $DETECTOR -O SUMMARY` JEditDetector -a ${TMPDIR:-/tmp}/detector.datx -r "$STRINGS[*]" -o ${TMPDIR:-/tmp}/detector.datx JMergeDetector -a ${TMPDIR:-/tmp}/detector.datx -a $DETECTOR -o detector.datx set_variable ACOUSTICS_STRINGS $STRINGS[*] # fix strings in acoustics-fit.shelse JConvertDetectorFormat -a ${TMPDIR:-/tmp}/detector.datx -o detector.datxfiif [[ -n "$TRIPOD" ]]; then source JAcoustics.sh -- typeset -A TRIPODS get_tripods $TRIPOD TRIPODS typeset -A TRIPODS_INITIAL get_tripods $TRIPOD_INITIAL TRIPODS_INITIAL cp -p $TRIPOD_INITIAL tripod.txt for ID in ${(@k)TRIPODS_INITIAL}; do if [[ -n "$TRIPODS[$ID]" ]]; then JEditTripod -f tripod.txt -T "$ID set $TRIPODS[$ID]" fi done set_variable ACOUSTICS_TRIPODS ${(@k)TRIPODS[*]} # fix tripods in acoustics-fit.shelse cp -p $TRIPOD_INITIAL tripod.txtfiset_variable DETECTOR detector.datxset_variable TRIPOD tripod.txtJAcoustics.sh $DETECTOR_IDJAcousticsEventBuilder.sh $DETECTOR $RUNS[*]cd $WORKDIRif [ ! $HOMEDIR -ef $WORKDIR ]; then cp -p $HOMEDIR/$TRIPOD $WORKDIR cp -p $HOMEDIR/$DETECTOR $WORKDIR for RANGE in $RUNS[*]; do for (( RUN = ${RANGE%%-*}; $RUN <= ${RANGE##*-}; RUN += 1 )); do cp -p $HOMEDIR/KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}_event.root $WORKDIR done done JAcoustics.sh $DETECTOR_IDfifor STAGE in 1; do $JPP_DIR/examples/JAcoustics/acoustics-fit.sh $DETECTOR $TRIPOD $STAGE $WORKDIR/KM3NeT_${(l:8::0::0:)DETECTOR_ID}_*event.root > $HOMEDIR stage |
Definition at line 144 of file acoustics-fit_00000100.sh.
then cp vru* $HOMEDIR fi done unset_variable ACOUSTICS_STRINGS unset_variable ACOUSTICS_TRIPODS for STAGE in |
Definition at line 154 of file acoustics-fit_00000100.sh.
Definition at line 156 of file acoustics-fit_00000100.sh.