Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JRate.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 event rate of astrophysical source.
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 
26 set_variable INPUT_FILE $JPP_DATA/trigger_efficiency+background.root
28 set_variable NUMBER_OF_BLOCKS 2
29 
30 
31 if do_usage $*; then
32  usage "$script [input file [output file]]"
33 fi
34 
35 case $# in
36  2) OUTPUT_FILE=$2;&
37  1) INPUT_FILE=$1;;
38 esac
39 
40 
41 if (( 1 )); then
42 
43  print_variable INPUT_FILE OUTPUT_FILE
44  check_input_file $INPUT_FILE
45 
46  $JPP_DIR/examples/JAstronomy/JRate \
47  -f $INPUT_FILE \
48  -o $OUTPUT_FILE \
49  -N $NUMBER_OF_BLOCKS \
50  -d $DEBUG --!
51 
52 fi
53 
54 
55 if (( 1 )); then
56 
57  JPlot1D \
58  -f ${OUTPUT_FILE}:ct \
59  -\> "cos(#theta)" \
60  -\^ "dP/d#Omega" \
61  -L TR
62 
63 fi
64 
65 
66 JPlot1D \
67  -f ${OUTPUT_FILE}:h0 \
68  -f ${OUTPUT_FILE}:h1 \
69  -y "0.01 4" \
70  -XXY \
71  -\> "E [GeV]" \
72  -\^ "Rate [events/year]" \
73  -L TR \
74  -o rate.gif
set_variable INPUT_FILE
then set_variable singlesRate set_variable doublesRate set_variable numberOfSlices echo Generating random background echo Singles rate
exit
Definition: JPizza.sh:36
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:69
then JPizza f
Definition: JPizza.sh:46
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
&set_variable OUTPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:45
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR tmp set_variable JDAQ_TIMESLICE JDAQTimeslice if do_usage *then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:23
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 CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:35
version
Definition: JCalibratePMT.sh:7