Jpp  15.0.1-rc.1-highqe
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sound-V:fit.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable: DEBUG ACOUSTICS_DEBUG 2
12 set_variable: WORKDIR ACOUSTICS_WORKDIR ./
13 set_variable FORMULA "[0] + [1]*(sqrt(1.0 + 0.5*(x-[2])*(x-[2])/([3]*[3])) - 1.0)"
14 set_variable: FORMAT GRAPHICS_FORMAT gif
15 set_variable+ BATCH GRAPHICS_BATCH -B
16 
17 if do_usage $*; then
18  usage "$script"
19 fi
20 
21 if (( $# != 0 )); then
22  fatal "Wrong number of arguments."
23 fi
24 
25 set_variable VELOCITY_TXT $WORKDIR/soundv.txt
26 set_variable VELOCITY_ROOT $WORKDIR/soundv.root
27 
28 if [[ ! -f $VELOCITY_TXT ]]; then
29  fatal "No sound velocity file $VELOCITY_TXT."
30 fi
31 
32 JGraph \
33  -f $VELOCITY_TXT \
35 
36 sort -gr -k 2,2 $VELOCITY_TXT | tail -1 | read X Y RMS
37 
38 JFit \
39  -f ${VELOCITY_ROOT}:\.\* \
40  -o $WORKDIR/fit.root \
41  -F "$FORMULA" \
42  -@"p0 = $Y" \
43  -@"p1 = 1.0" \
44  -@"p2 = $X" \
45  -@"p3 = 1.0" \
46  -d $DEBUG
47 
48 set_array P2 `JPrintFit -f $WORKDIR/fit.root:\.\* -@p2`
49 
50 printf "result %10.5f +/- %10.5f\n" $P2[1] $P2[2]
51 
52 mv $WORKDIR/fit.root $VELOCITY_ROOT
53 
54 JPlot1D \
55  -f $VELOCITY_ROOT:\.\* \
56  -\> "V [m/s]" \
57  -\^ "#chi^{2}/NDF" \
58  -T "" \
59  -o $WORKDIR/velocity.$FORMAT $BATCH
60 
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then JMuonPostfit f
then cat $WORKDIR tripod txt<< EOF 12 587888 4017079-3450.0 14 587436 4016992-3450.0 16 587843 4016727-3450.0EOF fi if[[!-f $WORKDIR/base.txt]];then $DIR/JBaseModuleWriter-a $WORKDIR/detector.detx-o $WORKDIR/base.txt fi if[[!-f $WORKDIR/toashort.root]];then JConvertDB-q toashort-@"detid = `getDetector -D $DETECTOR`"-@"minrun = $RUN"-@"maxrun = $RUN"-o $WORKDIR/toashort.root-d $DEBUG--!fi if(!reuse_file $VELOCITY_TXT);then for A in 1500.0 1510.0 1520.0 1530.0 1532.0 1534.0 1536.0 1538.0 1540.0 1542.0 1544.0 1546.0 1548.0 1550.0 1560.0 1570.0 1580.0;do rm-f event.root JAcousticsEventBuilder-a $WORKDIR/detector.detx-f $WORKDIR/toashort.root-@"Q = $QUANTILE;"-@"TMax_s = $TMAX_S;"-@"numberOfHits = $NUMBER_OF_HITS;"-T $WORKDIR/tripod.txt-B $WORKDIR/base.txt-o $WORKDIR/event.root-V"$A"-d $DEBUG--!RMS=`$DIR/JPrintRMS-f $WORKDIR/event.root-N 1-d0`let RMS="$RMS*1000"echo"$A $RMS" > $VELOCITY_TXT done fi JGraph f $VELOCITY_TXT o $VELOCITY_ROOT JPlot1D f $VELOCITY_ROOT
then usage $script< detector file >< inputfile > nUtility script to create PDF and CDF of transition time distribution fi case set_variable WORKDIR
Definition: JLegolas.sh:31
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then break fi done getCenter read X Y Z let X
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
then awk F
* usage
&set_variable FORMULA
p2
Definition: module-Z:fit.sh:74
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
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:128
script
Definition: JAcoustics.sh:2
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null