Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JSirene.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 # utility script for Sirene Monte Carlo.
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Example script to run JSirene.
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 set_variable: DEBUG SIRENE_DEBUG 1
23 set_variable CDF $JPP_DATA/I%p.dat
24 set_variable INPUT_FILE $JPP_DATA/genhen.km3net_wpd_V2_0.evt.gz
26 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
27 set_variable+ KEEP SIRENE_KEEP -k
28 set_variable: SEED SIRENE_SEED 0
29 set_variable: FACTOR SIRENE_FACTOR 1.0
30 
31 if do_usage $*; then
32  usage "$script [detector file (input file)+ [output file [CDF file descriptor]]]]"\
33  "\nNote that if more than one input file is specified, all other arguments must be provided."
34 fi
35 
36 case $# in
37  4) set_variable CDF $4;&
41  0) ;;
46 esac
47 
48 # Sanity checks
49 
50 print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF
51 
52 for TYPE in 1 2 5 6 13 14; do
53  if [[ ! -f ${CDF/\%/${TYPE}} ]]; then
54  error "Missing CDF files."
55  error "Run: JMakePDF.sh"
56  JMakePDF.sh -h
57  exit
58  fi
59 done
60 
61 if [[ ! -f $DETECTOR ]]; then
62  error "Missing detector file."
63  error "Run: JDetector.sh"
64  JDetector.sh -h
65  exit
66 fi
67 
68 check_input_file $DETECTOR $INPUT_FILE
69 check_output_file $OUTPUT_FILE
70 
72 
73 JSirene \
74  -F $CDF \
75  -a $DETECTOR \
76  -f $INPUT_FILE \
77  -o $OUTPUT_FILE \
78  -@ "Tmax_ns=2.0;" \
79  -U $FACTOR \
80  $KEEP \
81  -S $SEED \
82  -d $DEBUG --!
83 
84 timer_stop
85 timer_print
86 
87 JPrintMeta \
88  -f $OUTPUT_FILE
89 
90 JPrintSirene \
91  -f $OUTPUT_FILE
92 
93 JPrintTree \
94  -f $OUTPUT_FILE
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
then usage $script[detector file(input file)+[output file[CDF file descriptor]]] nNote that if more than one input file is all other arguments must be provided fi case set_variable CDF
Definition: JSirene.sh:33
set_variable INPUT_FILE
exit
Definition: JPizza.sh:36
then JPizza f
Definition: JPizza.sh:46
then echo
then timer_start(JRandomTimesliceWriter-a ${DETECTOR}-o ${PIPE}-n ${NUMBER_OF_SLICES}-P ${PMT_FILE}-d ${DEBUG}-S ${SEED}-B"$BACKGROUND_HZ"-N"$RECYCLING"--!&&for((i=0;$i!=10;++i));do;echo 'EOF' > $PIPE;usleep 100000;done &&rm-f $PIPE)&JTimesliceReprocessor-a $
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
then awk F
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
*set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2,-2] set_variable OUTPUT_FILE $argv[-1]
Definition: JDomino.sh:39
do set_variable SIGMA_NS set_variable OUTLIERS set_variable OUTPUT_FILE matrix[${ALPHA_DEG}\deg\] root $JPP JMatrixNZ a $DETECTOR f $INPUT_FILE o $OUTPUT_FILE S
Definition: JMatrixNZ.sh:56
&set_variable OUTPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:45
then JCalibrateToT a
Definition: JTuneHV.sh:116
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then display $WORKDIR
Definition: plot-Domino.sh:127
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
set_variable DETECTOR
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
script
Definition: JAcoustics.sh:2
esac done
Definition: JAddHDE.sh:21