Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPlotPDF.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong, bofearraigh
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to plot tabulated 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 z 60
33 set_variable: YMAX PHYSICS_YMAX 2e-2
34 set_variable: YMIN PHYSICS_YMIN 1e-7
35 set_variable: HISTOGRAM PHYSICS_HISTOGRAM "1040 -20 +500"
36 
37 set_variable PDF $JPP_DATA/J%p.dat
38 
39 set_variable: FORMAT GRAPHICS_FORMAT gif
40 set_variable+ BATCH GRAPHICS_BATCH -B
41 
42 if do_usage $*; then
43  usage "$script [energy [distance [z of PMT]]]"
44 fi
45 
46 case $# in
47  3) set_variable z $3;&
48  2) set_variable R $2;&
49  1) set_variable E $1;;
50 esac
51 
52 
53 if (( 1 )); then
54 
55  for dir in NORTH EAST SOUTH WEST; do
56 
57  echo "Generating $dir."
58 
59  eval D=\$$dir
60 
61  JPlotPDF \
62  -f ${PDF/\%/1} \
63  -f ${PDF/\%/2} \
64  -f ${PDF/\%/3} \
65  -f ${PDF/\%/4} \
66  -f ${PDF/\%/5} \
67  -f ${PDF/\%/6} \
68  -D "${D}" -R $R -E $E -z $z \
69  -H "$HISTOGRAM" \
70  -o $WORKDIR/F\[${dir}\].root
71 
72  done
73 
74 fi
75 
76 
77 if (( 1 )); then
78 
79  JPlot1D \
80  -f $WORKDIR/F\[NORTH\].root:h0 \
81  -f $WORKDIR/F\[EAST\].root:h0 \
82  -f $WORKDIR/F\[SOUTH\].root:h0 \
83  -f $WORKDIR/F\[WEST\].root:h0 \
84  -y "$YMIN $YMAX" -Y \
85  -\> "#Deltat [ns]" \
86  -\^ "dP/dt [npe/ns]" \
87  -L TR \
88  -T "E = ${E} GeV#; R = ${R} m#; z = ${z} m" \
89  -o PDF.$FORMAT $BATCH
90 
91 fi
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< input file >[option[primary[working directory]]] nWhere option can be E
Definition: JMuonPostfit.sh:40
version
Definition: JEditTuneHV.sh:5
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:34
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 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
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
then awk F
* usage
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
Definition: JDrawPDF.sh:45
then fatal The output file must have the wildcard in the e g root fi 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 JHobbit a $DETECTOR f
then echo
Definition: JQAQC.sh:92
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
then getFile sh $JPP_ARCHIVE $DETECTOR_ID $RUNS[1] $KEY $VERSION $WORKDIR
esac done
Definition: JAddHDE.sh:21