Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JThetaMCS.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable: DEBUG PHYSICS_DEBUG 2
12 set_variable: WORKDIR PHYSICS_WORKDIR ${TMPDIR:-/tmp}
13 set_variable: FORMAT GRAPHICS_FORMAT gif
14 set_variable+ BATCH GRAPHICS_BATCH -B
15 
16 if do_usage $*; then
17  usage "$script"
18 fi
19 
20 $JPP_DIR/examples/JPhysics/JThetaMCS \
21  -o $WORKDIR/mcs.root \
22  -d $DEBUG
23 
24 JPlot2D \
25  -f $WORKDIR/mcs.root:h2 \
26  -z "1e-5 1e-1" -Z \
27  -XX \
28  -> "E [GeV]" \
29  -< "x [m]" \
30  -T "#theta [rad]" \
31  -O COLZ \
32  -o mcs.$FORMAT $BATCH
33 
34 for X in 1 2 3 4 5 6; do
35 
36  let "XMIN = $X - 0.005"
37  let "XMAX = $X + 0.005"
38 
39  JPlot1D \
40  -f mcs.root:h2 \
41  -PY \
42  -x "$XMIN $XMAX" \
43  -z "1e-6 2e-2" -Z \
44  -> "x [m]" \
45  -\^ "#theta_{0}" \
46  -T "E = 10^{$X} [GeV]" \
47  -o ${TMPDIR:-/tmp}/mcs_${X}.$FORMAT $BATCH
48 done
49 
50 montage \
51  -tile 3x2 \
52  -geometry +0+0 \
53  ${TMPDIR:-/tmp}/mcs_{1..6}.$FORMAT \
54  $WORKDIR/MCS.$FORMAT >& /dev/null