Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JCompareDynamics.sh
Go to the documentation of this file.
1#!/usr/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 >& /dev/null
10
11set_variable: DEBUG DYNAMICS_DEBUG 2
12set_variable: WORKDIR DYNAMICS_WORKDIR ./
13set_variable TSTEP_S 600.0
14set_variable DIR $JPP_DIR/examples/JDynamics/
15set_variable: TIMESTAMP GRAPHICS_TIMESTAMP utc
16set_variable: FORMAT GRAPHICS_FORMAT gif
17
18if do_usage $*; then
19 usage "$script <detector file> <calibration file 1> <calibration file 2>"
20 "\nCalibration files correspond to the output of JKatoomba[.sh]."
21fi
22
23if (( $# < 3 )); then
24 fatal "Wrong number of arguments."
25fi
26
27set_variable DETECTOR $argv[1]
28set_variable INPUT_FILE_1 $argv[2]
29set_variable INPUT_FILE_2 $argv[3]
30set_variable OUTPUT_FILE $WORKDIR/compare_dynamic_positions.root
31
32eval `JPrintDetector -a $DETECTOR -O SUMMARY`
33
34$DIR/JCompareDynamicPositions \
35 -a $DETECTOR \
36 -f "$INPUT_FILE_1" \
37 -F "$INPUT_FILE_2" \
38 -o $OUTPUT_FILE \
39 -T $TSTEP_S \
40 -d $DEBUG --!
41
42echo "Creating graphics output in directory $WORKDIR"
43
44JPlot1D \
45 -w 1200x600 \
46 -f $OUTPUT_FILE:H\.\*comparetx \
47 -\^ "#DeltaTx [mrad]" \
48 -N "X 505" \
49 -t "$TIMESTAMP" \
50 -L BR \
51 -T "" \
52 -o $WORKDIR/comparetx.$FORMAT -B
53
54JPlot1D \
55 -w 1200x600 \
56 -f $OUTPUT_FILE:K\.\*comparety \
57 -\^ "#DeltaTy [mrad]" \
58 -N "X 505" \
59 -t "$TIMESTAMP" \
60 -L TR \
61 -T "" \
62 -o $WORKDIR/comparety.$FORMAT -B
63
64JPlot1D \
65 -w 1200x600 \
66 -f $OUTPUT_FILE:M\.\*comparetx \
67 -> "#DeltaTx [mrad]" \
68 -\^ "number of events [a.u.]" \
69 -N "X 505" \
70 -L BR \
71 -T "" \
72 -s 100110 \
73 -x "0 1" \
74 -o $WORKDIR/comparetx_hist.$FORMAT -B
75
76JPlot1D \
77 -w 1200x600 \
78 -f $OUTPUT_FILE:N\.\*comparety \
79 -> "#DeltaTy [mrad]" \
80 -\^ "number of events [a.u.]" \
81 -N "X 505" \
82 -L BR \
83 -T "" \
84 -s 100110 \
85 -x "0 1" \
86 -o $WORKDIR/comparety_hist.$FORMAT -B
87
88#clean
89rm compare_dynamic_positions.root