Jpp  18.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPlotP5D.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 PDF $JPP_DATA/J%p.dat
35 set_variable HISTOGRAM "520 -20 +500"
36 
37 set_variable: FORMAT GRAPHICS_FORMAT gif
38 set_variable+ BATCH GRAPHICS_BATCH -B
39 
40 if do_usage $*; then
41  usage "$script [distance]"
42 fi
43 
44 case $# in
45  1) set_variable R $1;;
46 esac
47 
48 
49 if (( 1 )); then
50 
51  for dir in NORTH EAST SOUTH WEST; do
52 
53  echo "Generating $dir."
54 
55  eval D=\$$dir
56 
57  for CD in +0.9 +0.7 +0.5 +0.3 +0.1 -0.1; do
58 
59  if [[ ! -f $WORKDIR/f\[${CD}\]_${dir}.root ]]; then
60 
61  JPlotPDG \
62  -f ${PDF/\%/12} \
63  -D "${D}" -R $R -c $CD \
64  -H "${HISTOGRAM}" \
65  -o $WORKDIR/f\[${CD}\]_${dir}.root
66  fi
67  done
68 
69  set_array HISTOGRAMS `ls $WORKDIR/f\[*\]_${dir}.root`
70 
71  JPlot1D \
72  -f${^HISTOGRAMS}:h0 \
73  -y "$YMIN $YMAX" -Y \
74  -\> "#Deltat [ns]" \
75  -\^ "d^{2}P/dxdt [npe/m/ns]" \
76  -L TR \
77  -T "R = ${R} m#; ${dir}" \
78  -o pdf_${dir}.$FORMAT $BATCH
79  done
80 fi
do echo n Creating graphics for string $STRING HISTOGRAMS
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG set_variable PDF $JPP_DATA J p dat set_variable HISTOGRAM if do_usage *then usage $script< detector file >< inputfile >< outputfile > fi case set_variable PDF
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 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:48
then eval ls $DIR $ID $TYPE _
Definition: getArchive.sh:104
then echo
Definition: JQAQC.sh:90
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
esac done
Definition: JAddHDE.sh:21