Jpp  debug
the software that should make you happy
JPerth.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 source $JPP_DIR/setenv.sh $JPP_DIR
8 
9 set_variable: DEBUG RECONSTRUCTION_DEBUG 2
10 set_variable: WORKDIR RECONSTRUCTION_WORKDIR ./
11 set_variable: PDF RECONSTRUCTION_PDF $JPP_DATA/J%p.dat
12 set_variable: THREADS RECONSTRUCTION_THREADS 5
13 set_variable: T_NS RECONSTRUCTION_T_NS 10.0
14 
15 if do_usage $*; then
16  usage "$script <detector file> <input file>"\
17  "\nExample script to test inter-string calibration."\
18  "\nThe input file corresponds to an input file for the detector simulation (e.g. JSirene)."
19 fi
20 
21 if (( $# != 2 )); then
22  fatal "Wrong number of arguments."
23 fi
24 
25 set_variable DETECTOR $argv[1]
26 set_variable INPUT_FILE $argv[2]
27 
28 mkdir -p $WORKDIR
29 pushd $WORKDIR
30 
31 eval `JPrintDetector -a $DETECTOR -O SUMMARY`
32 
33 JConvertDetectorFormat \
34  -a $DETECTOR \
35  -o detector.datx
36 
37 for STRING in $STRINGS[*]; do
38 
39  JEditDetector \
40  -a detector.datx \
41  -s "$STRING randadd $T_NS" \
42  -o detector.datx
43 done
44 
45 JConvertDetectorFormat \
46  -a detector.datx \
47  -o detector_A.datx
48 
49 JSirene.sh $DETECTOR $INPUT_FILE sirene.root
50 JTriggerEfficiency.sh $DETECTOR detector.datx sirene.root trigger_efficieny.root $JPP_DATA/trigger_parameters_arca.txt $JPP_DATA/PMT_parameters.txt
51 
52 JARCAMuonReconstruction.sh detector.datx trigger_efficieny.root %.root $JPP_DATA/PMT_parameters.txt
53 
54 typeset -A PARAMETERS
55 
56 PARAMETERS=(
57  TTS_ns 2
58  E_GeV 1.0e3
59  TMin_ns -50.0
60  TMax_ns +450.0
61  R_Hz 6.0e3
62  roadWidth_m 175.0
63  numberOfPrefits 0)
64 
65 eval JPerth \
66  -a detector.datx \
67  -f jmuon.root \
68  -P $PDF \
69  -@ `make_equation PARAMETERS` \
70  -A \
71  -N $THREADS \
72  -d $DEBUG >& perth_A.log
73 
74 JConvertDetectorFormat \
75  -a detector.datx \
76  -o detector_B.datx
77 
78 rm -f jmuon.root jmuon.offline.root
79 
80 JARCAMuonReconstruction.sh detector.datx trigger_efficieny.root %.root $JPP_DATA/PMT_parameters.txt
81 
82 eval JPerth \
83  -a detector.datx \
84  -f jmuon.root \
85  -P $PDF \
86  -@ `make_equation PARAMETERS` \
87  -A \
88  -N $THREADS \
89  -d $DEBUG >& perth_B.log
90 
91 popd
92