Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JPerth.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7source $JPP_DIR/setenv.sh $JPP_DIR
8
9set_variable: DEBUG RECONSTRUCTION_DEBUG 2
10set_variable: WORKDIR RECONSTRUCTION_WORKDIR ./
11set_variable: PDF RECONSTRUCTION_PDF $JPP_DATA/J%p.dat
12set_variable: THREADS RECONSTRUCTION_THREADS 5
13set_variable: T_NS RECONSTRUCTION_T_NS 10.0
14
15if 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)."
19fi
20
21if (( $# != 2 )); then
22 fatal "Wrong number of arguments."
23fi
24
25set_variable DETECTOR $argv[1]
26set_variable INPUT_FILE $argv[2]
27
28mkdir -p $WORKDIR
29pushd $WORKDIR
30
31eval `JPrintDetector -a $DETECTOR -O SUMMARY`
32
33JConvertDetectorFormat \
34 -a $DETECTOR \
35 -o detector.datx
36
37for STRING in $STRINGS[*]; do
38
39 JEditDetector \
40 -a detector.datx \
41 -s "$STRING randadd $T_NS" \
42 -o detector.datx
43done
44
45JConvertDetectorFormat \
46 -a detector.datx \
47 -o detector_A.datx
48
49JSirene.sh $DETECTOR $INPUT_FILE sirene.root
50JTriggerEfficiency.sh $DETECTOR detector.datx sirene.root trigger_efficieny.root $JPP_DATA/trigger_parameters_arca.txt $JPP_DATA/PMT_parameters.txt
51
52JARCAMuonReconstruction.sh detector.datx trigger_efficieny.root %.root $JPP_DATA/PMT_parameters.txt
53
54typeset -A PARAMETERS
55
56PARAMETERS=(
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
65eval JPerth \
66 -a detector.datx \
67 -f jmuon.root \
68 -P $PDF \
69 -@ `make_equation PARAMETERS` \
70 -% "number_of_extra_steps = 25" \
71 -% "T_ns = 2.5" \
72 -A \
73 -N $THREADS \
74 -d $DEBUG >& perth_A.log
75
76JConvertDetectorFormat \
77 -a detector.datx \
78 -o detector_B.datx
79
80rm -f jmuon.root jmuon.offline.root
81
82JARCAMuonReconstruction.sh detector.datx trigger_efficieny.root %.root $JPP_DATA/PMT_parameters.txt
83
84eval JPerth \
85 -a detector.datx \
86 -f jmuon.root \
87 -P $PDF \
88 -@ `make_equation PARAMETERS` \
89 -% "number_of_extra_steps = 25" \
90 -% "T_ns = 2.5" \
91 -A \
92 -N $THREADS \
93 -d $DEBUG >& perth_B.log
94
95popd
96