8 # ------------------------------------------------------------------------------------------ 
   10 #                         Script to run the JPP Shower Reconstruction Chain for ORCA. 
   12 # ------------------------------------------------------------------------------------------ 
   15 if [ -z $JPP_DIR ]; 
then 
   16     echo "Variable JPP_DIR undefined." 
   20 source $JPP_DIR/setenv.sh $JPP_DIR
 
   21 source $JPP_DIR/externals/km3net-dataformat/definitions/reconstruction.sh
 
   26 set_variable:  ENERGY_CORRECTION RECONSTRUCTION_ENERGY_CORRECTION    energy_correction_showerfit_fullorca.txt
 
   39 set_array    CALIBRATION     
$argv[5,-1]
 
   41 if [[ ! "$OUTPUT_FILE" == *"%"* ]]; 
then 
   51 if [[ "$OVERWRITE" == 1 ]]; 
then 
   65 # ------------------------------------------------------------------------------------------ 
   67 # ------------------------------------------------------------------------------------------ 
   88     -@ `make_equation PARAMETERS`       \
 
   99 # ------------------------------------------------------------------------------------------ 
  100 #                                       JShowerPointSimplex 
  101 # ------------------------------------------------------------------------------------------ 
  113     TWindow_ns       
"-130 120" 
  116     time_grid_ns     
" -90  90" 
  124 eval JShowerPointSimplex                  \
 
  130     -@ `make_equation PARAMETERS`         \
 
  143 # ------------------------------------------------------------------------------------------ 
  145 # ------------------------------------------------------------------------------------------ 
  159 eval JShowerPositionFit                   \
 
  166     -@ `make_equation PARAMETERS`         \
 
  179 # ------------------------------------------------------------------------------------------ 
  180 #                                       JShowerEnergyPrefit 
  181 # ------------------------------------------------------------------------------------------ 
  197 eval JShowerEnergyPrefit                  \
 
  204     -@ `make_equation PARAMETERS`         \
 
  217 # ------------------------------------------------------------------------------------------ 
  218 #                                       JShowerDirectionPrefit 
  219 # ------------------------------------------------------------------------------------------ 
  232     scanAngle_deg_lowE         10
 
  233     MaxAngle_deg_highE         20
 
  234     scanAngle_deg_highE         5)
 
  238 eval JShowerDirectionPrefit                  \
 
  245     -@ `make_equation PARAMETERS`            \
 
  258 # ------------------------------------------------------------------------------------------ 
  260 # ------------------------------------------------------------------------------------------ 
  280     -@ `make_equation PARAMETERS`            \
 
  281     -
E $ENERGY_CORRECTION                    \
 
  294 # ------------------------------------------------------------------------------------------ 
  296 # ------------------------------------------------------------------------------------------ 
  303     -
A "$APPLICATIONS[*]"          \
 
  314 # ------------------------------------------------------------------------------------------ 
  316 # ------------------------------------------------------------------------------------------ 
  328 # ------------------------------------------------------------------------------------------ 
  330 # ------------------------------------------------------------------------------------------ 
then usage $script< detector identifier >< startdate\"YYYY-MM-DDHH:MM:SS\"><finaldate\"YYYY-MM-DDHH:MM:SS\"><QA/QCfile> fi case set_variable QAQC_TXT $argv[4]
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG set_variable PDF $JPP_DATA J p dat set_variable HISTOGRAM if do_usage *then usage $script< detector file >< inputfile >< outputfile > fi case set_variable PDF
 
then usage $script< input_file >< detector_file >< output_file(.root)> fi set_variable NUMBER_OF_TIMESLICES set_variable NUMBER_OF_SUMMARYSLICES set_variable NUMBER_OF_EVENTS set_variable ALL_PLOTS case set_variable NUMBER_OF_EVENTS
 
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
 
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
 
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT) 
 
then echo Enter input within $TIMEOUT_S seconds echo n User name
 
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
 
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 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 fatal The output file must have the wildcard in the e g root fi typeset A PARAMETERS typeset a APPLICATIONS APPLICATIONS
 
then JFileTuna f $INPUT_FILE
 
&set_variable OUTPUT_FILE
 
do JPlot2D f $WORKDIR detector root
 
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
 
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
 
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
 
#define DEBUG(A)
Message macros.