Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JEMShower.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 number of photons - GeV for EM-showers
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 if [ -z $JPP_DIR ]; then
15  echo "Variable JPP_DIR undefined."
16  exit
17 fi
18 
19 source $JPP_DIR/setenv.sh $JPP_DIR
20 
21 
24 
25 if ( do_usage $* ); then
26  usage "$script [working directory]"
27 fi
28 
29 case $# in
30  1) WORKDIR=$1;;
31 esac
32 
34 set_variable GRAPH_ROOT $WORKDIR/graph\[Geant4\].root
35 set_variable GEANC_ROOT $WORKDIR/geanc\[JSirene\].root
36 
37 # number of photons per GeV
38 # from Geant4 simulation by Daniel Lopez
39 
40 cat>$GRAPH_TXT<<EOF
41  1.0e-3 90.96
42  2.0e-3 277.36
43  3.0e-3 485.82
44  4.0e-3 692.83
45  5.0e-3 890.01
46  6.0e-3 1098.53
47  7.0e-3 1285.47
48  8.0e-3 1502.86
49  9.0e-3 1687.15
50  10.0e-3 1856.97
51 100.0e-3 1.905e4
52  1.0 1.889e5
53  10.0 1.875e6
54 100.0 1.881e7
55 EOF
56 
57 JGraph \
58  -f $GRAPH_TXT \
59  -o $GRAPH_ROOT
60 
61 JEMShower \
62  -o $GEANC_ROOT
63 
64 JPlot1D \
65  -f ${GRAPH_ROOT}:\.\* \
66  -f ${GEANC_ROOT}:h0 \
67  -x "-4 +4" \
68  -XX \
69  -y "1e1 1e9" \
70  -Y \
71  -\> "E [GeV]" \
72  -\^ "number of photons" \
73  -T "" \
74  -o $WORKDIR/geant4.gif
75 
76 
77 JPlot1D \
78  -f ${GEANC_ROOT}:h1 \
79  -XX \
80  -y "0.0 1.1" \
81  -\> "E [GeV]" \
82  -\^ "Geant4/JSirene" \
83  -T "" \
84  -o $WORKDIR/ratio.gif
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
exit
Definition: JPizza.sh:36
do set_array DAQHEADER JPrintDAQHeader f
Definition: JTuneHV.sh:74
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:69
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 echo
*fatal Wrong number of arguments esac set_variable GRAPH_TXT
do set_variable OUTPUT_DIRECTORY $WORKDIR T
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
then display $WORKDIR
Definition: plot-Domino.sh:127
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 source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:36
version
Definition: JCalibratePMT.sh:7
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:28
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62