Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JPerth.sh
Go to the documentation of this file.
1#!/bin/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 -A \
71 -N $THREADS \
72 -d $DEBUG >& perth_A.log
73
74JConvertDetectorFormat \
75 -a detector.datx \
76 -o detector_B.datx
77
78rm -f jmuon.root jmuon.offline.root
79
80JARCAMuonReconstruction.sh detector.datx trigger_efficieny.root %.root $JPP_DATA/PMT_parameters.txt
81
82eval 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
91popd
92