Jpp  18.2.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDrawP5D.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 R 50
31 set_variable YMAX 2e-4
32 set_variable YMIN 1e-10
33 
34 set_variable HISTOGRAM "520 -20 +500"
35 
36 set_variable: FORMAT GRAPHICS_FORMAT gif
37 set_variable+ BATCH GRAPHICS_BATCH -B
38 
39 if do_usage $*; then
40  usage "$script [distance]"
41 fi
42 
43 case $# in
44  1) set_variable R $1;;
45 esac
46 
47 
48 if (( 1 )); then
49 
50  for dir in NORTH EAST SOUTH WEST; do
51 
52  echo "Generating $dir."
53 
54  eval D=\$$dir
55 
56  for CD in +0.9 +0.7 +0.5 +0.3 +0.1 -0.1; do
57 
58  if [[ ! -f $WORKDIR/f\[${CD}\]_${dir}.root ]]; then
59 
60  JDrawPDG \
61  -F12 \
62  -D "${D}" -R $R -c $CD \
63  -H "${HISTOGRAM}" \
64  -o $WORKDIR/f\[${CD}\]_${dir}.root
65  fi
66  done
67 
68  set_array HISTOGRAMS `ls $WORKDIR/f\[*\]_${dir}.root`
69 
70  JPlot1D \
71  -f${^HISTOGRAMS}:h0 \
72  -y "$YMIN $YMAX" -Y \
73  -\> "#Deltat [ns]" \
74  -\^ "d^{2}P/dxdt [npe/m/ns]" \
75  -L TR \
76  -T "R = ${R} m#; ${dir}" \
77  -o $WORKDIR/pdf_${dir}.$FORMAT $BATCH
78  done
79 fi
do echo n Creating graphics for string $STRING HISTOGRAMS
then usage $script[energy[distance[cosine]]] fi case set_variable CD
Definition: JDrawPDG.sh:46
version
Definition: JEditTuneHV.sh:5
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
usr share Modules init zsh export TMPDIR
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
then
Definition: datalogs.sh:31
fatal Invalid number of arguments esac let YMIN
Definition: testToT.sh:39
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
Definition: JAcoustics.sh:21
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
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
fi set_variable FILENAME $WORKDIR
Definition: datalogs.sh:34
then eval ls $DIR $ID $TYPE _
Definition: getArchive.sh:104
then echo
Definition: JQAQC.sh:90
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