3 # \author mdejong, bofearraigh
7 # ------------------------------------------------------------------------------------------
9 # Utility script to plot fit results of track reconstruction chain for Monte Carlo data.
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
39 usage "$script <input file> [option [primary [working directory]]]"\
40 "\nWhere option can be N, E, LINE, LOGE."\
41 "\nNote that if more than one input file is specified, all other arguments must be provided."
49 0) fatal
"Wrong number of arguments";;
56 # Number of prefits as a function of application (0 = all)
58 typeset -
A NUMBER_OF_FIT
68 #
Fit application identifier
70 typeset -
A ENUMERATION
100 *) fatal
"Invalid option $OPTION"
110 if [[ -
f $OUTPUT_FILE ]];
then
122 if [[ ! -
f $OUTPUT_FILE ]];
then
125 -
f"${INPUT_FILES[*]}" \
128 -
N ${NUMBER_OF_FIT[${
APP}]} \
129 -
A ${ENUMERATION[${
APP}]} \
143 -\^
"number of events [a.u.]" \
151 QUANTILES=
"0.33 0.5 0.66"
153 for APP in prefit simplex gandalf;
do
162 -
f $WORKDIR/quantiles\[prefit\].root:h21 \
163 -
f $WORKDIR/quantiles\[simplex\].root:h21 \
164 -
f $WORKDIR/quantiles\[gandalf\].root:h21 \
166 -\^
"resolution (reco muon) [deg]" \
179 -\^
"number of events [a.u.]" \
180 -\>
"E_{#mu} [GeV]" $LOGX \
194 -O COLZ -p $PALETTE \
195 -\>
"E_{#mu} [GeV]" $LOGX \
196 -\<
"E_{fit} [GeV]" $LOGY \
207 -
F "[0]*exp(-0.5*(x-[1])*(x-[1])/([2]*[2]))" \
208 -@
"p0 = 0.8*GetMaximum" \
222 -O COLZ -p $PALETTE \
223 -\>
"R^{2} [m^{2}]" \
234 -O COLZ -p $PALETTE \
235 -\>
"R^{2} [m^{2}]" \
247 -\^
"number of events [a.u.]" \
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
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
then wget no check certificate user
TFitResultPtr Fit(TH1D *h)
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
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
then usage $script< input file >[option[primary[working directory]]] nWhere option can be LINE
do sput $STRING $FLOOR sget MODULE INPUT_FILES
then for APP in event gandalf start energy
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
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.