Jpp  17.3.0
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 set_variable: FORMAT GRAPHICS_FORMAT gif
30 set_variable+ BATCH GRAPHICS_BATCH -B
31 
32 if do_usage $*; then
33  usage "$script [input file [output file]]"
34 fi
35 
36 case $# in
39 esac
40 
41 
42 if (( 1 )); then
43 
44  print_variable INPUT_FILE OUTPUT_FILE
45  check_input_file $INPUT_FILE
46 
47  $JPP_DIR/examples/JAstronomy/JRate \
48  -f $INPUT_FILE \
49  -o $OUTPUT_FILE \
50  -N $NUMBER_OF_BLOCKS \
51  -d $DEBUG --!
52 
53 fi
54 
55 
56 if (( 1 )); then
57 
58  JPlot1D \
59  -f ${OUTPUT_FILE}:ct \
60  -\> "cos(#theta)" \
61  -\^ "dP/d#Omega" \
62  -L TR
63 
64 fi
65 
66 
67 JPlot1D \
68  -f ${OUTPUT_FILE}:h0 \
69  -f ${OUTPUT_FILE}:h1 \
70  -y "0.01 4" \
71  -XXY \
72  -\> "E [GeV]" \
73  -\^ "Rate [events/year]" \
74  -L TR \
75  -o rate.$FORMAT $BATCH
version
Definition: JEditTuneHV.sh:5
then set_variable singlesRate set_variable doublesRate set_variable numberOfSlices echo Generating random background echo Singles rate
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
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
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
&set_variable OUTPUT_FILE
set_variable INPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
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:46
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62