7 # ------------------------------------------------------------------------------------------ 
    9 #                         Utility script to plot fit results. 
   11 # ------------------------------------------------------------------------------------------ 
   14 if [ -z $JPP_DIR ]; 
then 
   15     echo "Variable JPP_DIR undefined." 
   20 source $JPP_DIR/setenv.sh $JPP_DIR
 
   23 # list of applications in the processing chain 
   25 APPLICATIONS=(prefit pointsimplex positionfit energyprefit directionprefit completefit)
 
   35     usage "$script <input file> [option [muons [working directory]]]\n" \
 
   36           "Where option can be N, E, LINE, LOGE.\n"                     \
 
   37           "Note that if more than one input file is specified, all other arguments must be provided." 
   45     0)  fatal 
"Wrong number of arguments";;    
 
   53 # Number of prefits as a function of application (0 = all) 
   55 typeset -
A NUMBER_OF_FIT
 
   65 # 
Fit application identifier
 
   67 typeset -
A ENUMERATION
 
   95     if [[ ! -
f $OUTPUT_FILE ]]; 
then 
   97         echo "************************************************ " $MUONS 
 
   98         if [[ -z $MUONS ]]; 
then 
  100                 -
f "${INPUT_FILES[*]}"        \
 
  102                 -
N  ${NUMBER_OF_FIT[${
APP}]}  \
 
  103                 -
A  ${ENUMERATION[${
APP}]}    \
 
  109                 -
f "${INPUT_FILES[*]}"        \
 
  111                 -
N ${NUMBER_OF_FIT[${
APP}]}   \
 
  112                 -
A ${ENUMERATION[${
APP}]}     \
 
  125         -
f $WORKDIR/jshowerpostfit\[completefit\].root:ha     \
 
  126         -\> 
"angle wrt selected fermion [deg]"                \
 
  127         -\^ 
"number of events [a.u.]"                         \
 
  136     QUANTILES=
"0.33 0.5 0.66" 
  138     for APP in prefit pointsimplex positionfit energyprefit directionprefit completefit; 
do 
  157         -
f $WORKDIR/jshowerpostfit\[completefit\].root:ee  \
 
  158         -O COLZ -p $PALETTE                                \
 
  159         $LOGX $LOGY -
Z -
T ""                               \
 
  160         -\> 
"E_{true} [GeV]"                               \
 
  161         -\< 
"E_{fit} [GeV]"                                \
 
then usage $script< detector >< run >< outputfile > fi case set_variable OPTION
 
Q(UTCMax_s-UTCMin_s)-livetime_s
 
TFitResultPtr Fit(TH1D *h)
 
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
 
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
 
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 rm i $OUTPUT_FILE fi done for APP in $APPLICATIONS[*]
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
 
then fatal The output file must have the wildcard in the e g root fi typeset A PARAMETERS typeset a APPLICATIONS APPLICATIONS
 
&set_variable OUTPUT_FILE
 
do sput $STRING $FLOOR sget MODULE INPUT_FILES
 
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
 
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
 
*fatal Wrong option $OPTION
 
#define DEBUG(A)
Message macros.