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)
39 usage "$script <input file> [option [muons [working directory]]]\n" \
40 "Where option can be N, E, LINE, LOGE.\n" \
41 "Note that if more than one input file is specified, all other arguments must be provided."
49 0) fatal
"Wrong number of arguments";;
57 # Number of prefits as a function of application (0 = all)
59 typeset -
A NUMBER_OF_FIT
69 #
Fit application identifier
71 typeset -
A ENUMERATION
99 if [[ ! -
f $OUTPUT_FILE ]];
then
102 -
f "${INPUT_FILES[*]}" \
105 -
N ${NUMBER_OF_FIT[${
APP}]} \
106 -
A ${ENUMERATION[${
APP}]} \
117 -
f $WORKDIR/jshowerpostfit\[completefit\].root:ha \
118 -\>
"angle wrt selected fermion [deg]" \
119 -\^
"number of events [a.u.]" \
128 QUANTILES=
"0.33 0.5 0.66"
130 for APP in prefit pointsimplex positionfit energyprefit directionprefit completefit;
do
149 -
f $WORKDIR/jshowerpostfit\[completefit\].root:ee \
150 -O COLZ -p $PALETTE \
151 $LOGX $LOGY -
Z -
T "" \
152 -\>
"E_{true} [GeV]" \
153 -\<
"E_{fit} [GeV]" \
then usage $script< detector >< run >< outputfile > fi case set_variable OPTION
Q(UTCMax_s-UTCMin_s)-livetime_s
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
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
fi set_variable FILENAME $WORKDIR
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
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
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
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
*fatal Wrong option $OPTION
#define DEBUG(A)
Message macros.