Jpp  17.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDrawPDG.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to plot PDFs.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 
21 source $JPP_DIR/setenv.sh $JPP_DIR
22 
23 
24 set_variable NORTH "0.00 0.00"
25 set_variable EAST "1.57 0.00"
26 set_variable SOUTH "3.14 0.00"
27 set_variable WEST "1.57 3.14"
28 
30 set_variable E 1e3
31 set_variable R 50
32 set_variable CD 0.7
33 set_variable: YMAX PHYSICS_YMAX 2e-0
34 set_variable: YMIN PHYSICS_YMIN 1e-7
35 set_variable: HISTOGRAM PHYSICS_HISTOGRAM "520 -20 +500"
36 
37 set_variable: FORMAT GRAPHICS_FORMAT gif
38 set_variable+ BATCH GRAPHICS_BATCH -B
39 
40 
41 if do_usage $*; then
42  usage "$script [energy [distance [cosine]]]"
43 fi
44 
45 case $# in
46  3) set_variable CD $3;&
47  2) set_variable R $2;&
48  1) set_variable E $1;;
49 esac
50 
51 
52 if (( 1 )); then
53 
54  for dir in NORTH EAST SOUTH WEST; do
55 
56  echo "Generating $dir."
57 
58  eval D=\$$dir
59 
60  JDrawPDG \
61  -F13 \
62  -F14 \
63  -D "${D}" -R $R -c $CD -E $E \
64  -H "${HISTOGRAM}" \
65  -o $WORKDIR/f\[${dir}\].root
66 
67  done
68 
69 fi
70 
71 
72 if (( 1 )); then
73 
74  JPlot1D \
75  -f $WORKDIR/f\[NORTH\].root:h0 \
76  -f $WORKDIR/f\[EAST\].root:h0 \
77  -f $WORKDIR/f\[SOUTH\].root:h0 \
78  -f $WORKDIR/f\[WEST\].root:h0 \
79  -y "$YMIN $YMAX" -Y \
80  -\> "#Deltat [ns]" \
81  -\^ "dP/dt [npe/ns]" \
82  -L TR \
83  -T "E = ${E} GeV#; R = ${R} m#; cos(#theta_{0}) = ${CD}" \
84  -o pdf.$FORMAT $BATCH
85 
86 fi
then usage $script[energy[distance[cosine]]] fi case set_variable CD
Definition: JDrawPDG.sh:46
then usage E
Definition: JMuonPostfit.sh:35
version
Definition: JEditTuneHV.sh:5
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
static const double H
Planck constant [eV s].
exit
Definition: JPizza.sh:36
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 for dir in NORTH EAST SOUTH WEST
Definition: JDrawLED.sh:49
fatal Invalid number of arguments esac let YMIN
Definition: testToT.sh:39
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then JConvertDetectorFormat a $DETECTOR[1] o
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
then display $WORKDIR
Definition: plot-Domino.sh:128
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
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
Definition: JCanberra.sh:46
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
esac done
Definition: JAddHDE.sh:21