Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
JNuisance.sh
Go to the documentation of this file.
1#!/bin/env zsh
2script=${0##*/}
3
4if [ -z $JPP_DIR ]; then
5 echo "Variable JPP_DIR undefined."
6 exit
7fi
8
9source $JPP_DIR/setenv.sh $JPP_DIR
10
11set_variable DIR $JPP_DIR/examples/JAstronomy
12set_variable DEBUG 2
13set_variable NUMBER_OF_EVENTS 100000
14set_variable: FORMAT GRAPHICS_FORMAT gif
15set_variable+ BATCH GRAPHICS_BATCH -B
16
17if do_usage $*; then
18 usage "$script"
19fi
20
21set_variable FORMULA "[0] * exp(-0.5 * (x-[1])*(x-[1]) / ([2]*[2]))"
22set_variable SIGMA 0.3
23
24$DIR/JNuisance \
25 -o nuisance.root \
26 -n $NUMBER_OF_EVENTS \
27 -u "Gauss $SIGMA" \
28 -d $DEBUG
29
30JFit \
31 -f nuisance.root:h0 \
32 -o fit.root \
33 -F "$FORMULA" \
34 -@ "p0 = GetMaximum" \
35 -@ "p1 = 1.0" \
36 -@ "p2 = 0.7*GetRMS" \
37 -O L \
38 -d $DEBUG >& /dev/null
39
40printf "nuisance %6.3f => %6.3f +/- %6.3f\n" $SIGMA $(JPrintFit -f fit.root:h0 -@ p2)
41
42rm -f nuisance.root fit.root