Jpp  18.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPlotPD0.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 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.0
25 set_variable EAST +1.0
26 set_variable SOUTH 0.0
27 set_variable WEST -1.0
28 
30 set_variable E 10
31 set_variable R 25
32 set_variable YMAX 2e-3
33 set_variable YMIN 1e-6
34 
35 set_variable PDF $JPP_DATA/J%p.dat
36 set_variable HISTOGRAM "510 -20 +150"
37 
38 set_variable: FORMAT GRAPHICS_FORMAT gif
39 set_variable+ BATCH GRAPHICS_BATCH -B
40 
41 if do_usage $*; then
42  usage "$script [energy [distance]]"
43 fi
44 
45 case $# in
46  2) set_variable R $2;&
47  1) set_variable E $1;;
48 esac
49 
50 
51 if (( 1 )); then
52 
53  for dir in NORTH EAST SOUTH WEST; do
54 
55  echo "Generating $dir."
56 
57  eval D=\$$dir
58 
59  JPlotPD0 \
60  -f ${PDF/\%/24} \
61  -R $R -E $E -c ${D} \
62  -H "${HISTOGRAM}" \
63  -o $WORKDIR/F\[${dir}\].root
64 
65  done
66 
67 fi
68 
69 
70 if (( 1 )); then
71 
72  JPlot1D \
73  -f $WORKDIR/F\[NORTH\].root:h0 \
74  -f $WORKDIR/F\[EAST\].root:h0 \
75  -f $WORKDIR/F\[SOUTH\].root:h0 \
76  -f $WORKDIR/F\[WEST\].root:h0 \
77  -y "$YMIN $YMAX" -Y \
78  -\> "#Deltat [ns]" \
79  -\^ "dP/dt [npe/ns]" \
80  -L TR \
81  -T "E = ${E} GeV#; R = ${R} m" \
82  -o $WORKDIR/PDG.$FORMAT $BATCH
83 
84 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
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
then awk F
* 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 echo
Definition: JQAQC.sh:90
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
esac done
Definition: JAddHDE.sh:21