Jpp  17.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
hydrophone-t0:fit.sh File Reference

Go to the source code of this file.

Functions

then usage $script< detector
file >< stringidentifier > fi 
if (($#==0||$# > 3))
 
then fatal Wrong number of
arguments fi set_variable
DETECTOR $argv[1] set_variable
STRING $argv[2] set_array
QUANTILES set_variable FORMULA *[0] 
exp (-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
 
then printf string mean RMS us
n $STRING 
$XMEAN ((sqrt($TOTAL *$STDEV[1]/($TOTAL *($TOTAL-1.0))))) fi typeset-Z 4 STRING JOpera1D-f hydrophone.root
 

Variables

 script
 
then echo Variable JPP_DIR
undefined exit fi source
$JPP_DIR setenv sh $JPP_DIR
&dev null zmodload zsh
mathfunc 
set_variable
 
do JPrintQuantiles f hydrophone root
 
then P1
 
then XMEAN [1]
 
H[${STRING}\] root u Add d
JPrintQuantiles 
f
 

Function Documentation

then usage $script<detector file><stringidentifier> fi if ( ($#==0||$# > 3)  )
then fatal Wrong number of arguments fi set_variable DETECTOR $argv [1] set_variable STRING $argv [2] set_array QUANTILES set_variable FORMULA* [0] exp ( -0.5 *  x-[1])*(x-[1])/([2]*[2])

Definition at line 46 of file toashort_monitor.sh.

50  {(@k)EMITTERS}; do
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
then printf string mean RMS us n $STRING $XMEAN ( (sqrt($TOTAL *$STDEV[1]/($TOTAL *($TOTAL-1.0))))  )

Definition at line 86 of file hydrophone-t0:fit.sh.

92  :$MODULE \
93  -o ${TMPDIR:-/tmp}/H\[${STRING}\].root \
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
usr share Modules init zsh export TMPDIR
static const double H
Planck constant [eV s].
then fatal Wrong number of arguments fi JConvertDetectorFormat a o

Variable Documentation

script
Initial value:
=${0##*/}
if [ -z $JPP_DIR ]

Definition at line 2 of file hydrophone-t0:fit.sh.

then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR& dev null zmodload zsh mathfunc set_variable

Definition at line 20 of file hydrophone-t0:fit.sh.

do JPrintQuantiles f hydrophone root

Definition at line 51 of file hydrophone-t0:fit.sh.

then P1
Initial value:
=$((0.5*($RESULT[-1] + $RESULT[1]))) # average
P2=$((0.5*($RESULT[-1] - $RESULT[1]))) # width
-f "hydrophone.root:${MODULE}.${TRIPOD}"
-o ${TMPDIR:-/tmp}/fit.root
-F "$FORMULA"
-@"@"p0 = GetMaximum * 0.8"
-@"@"p1 = $P1"
-@"@"p2 = $P2"
-d 0 >& /dev/null
JPrintFit -f ${TMPDIR:-/tmp}/fit.root:\.\* -@p1 | read -A P1
JPrintFit -f ${TMPDIR:-/tmp}/fit.root:\.\* -@p2 | read -A P2
VALUE=$((1.0e+6 * $P1[1])) # [us]
TOTAL=$(($TOTAL + 1.0))
if (( $TOTAL == 1.0 ))
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
usr share Modules init zsh export TMPDIR
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then awk F

Definition at line 53 of file hydrophone-t0:fit.sh.

then XMEAN[1]
Initial value:
=$VALUE
STDEV[1]=0.0
else
XMEAN[2]=$(($XMEAN[1] + ($VALUE - $XMEAN[1]) / $TOTAL))
STDEV[2]=$(($STDEV[1] + ($VALUE - $XMEAN[1]) * ($VALUE - $XMEAN[2])))
XMEAN[1]=$XMEAN[2]
STDEV[1]=$STDEV[2]
fi
printf "string %4d tripod %2d %5.0f %3.0f us\n" $STRING $TRIPOD $(($P1[1] * 1.0e6)) $(($P2[1] * 1.0e6))
fi
if (( $TOTAL > 1.0 ))
then fatal Invalid string $STRING
then XMEAN[1]
then printf string mean RMS us n $STRING $XMEAN((sqrt($TOTAL *$STDEV[1]/($TOTAL *($TOTAL-1.0))))) fi typeset-Z 4 STRING JOpera1D-f hydrophone.root
then fatal Invalid tripod $TRIPOD
esac done
Definition: JAddHDE.sh:21

Definition at line 72 of file hydrophone-t0:fit.sh.

H [${STRING}\] root u Add d JPrintQuantiles f
Initial value:
{TMPDIR:-/tmp}/H\[${STRING}\].root:Add
-Q "$QUANTILES[*]"
-d 0 | read -A RESULT
P1=$((0.5*($RESULT[-1] + $RESULT[1]))) # average
P2=$((0.5*($RESULT[-1] - $RESULT[1]))) # width
-f ${TMPDIR:-/tmp}/H\[${STRING}\].root:Add
-o ${TMPDIR:-/tmp}/F\[${STRING}\].root
-F "$FORMULA"
-@"@"p0 = GetMaximum * 0.8"
-@"@"p1 = $P1"
-@"@"p2 = $P2"
-d $DEBUG
JPrintFit -f ${TMPDIR:-/tmp}/F\[${STRING}\].root:Add -@p1 | read -A P1
JPrintFit -f ${TMPDIR:-/tmp}/F\[${STRING}\].root:Add -@p2 | read -A P2
printf "string %4d t0 %6.0f +/- %6.0f us\n" $STRING $(($P1[1] * 1.0e6)) $(($P1[2] * 1.0e6))
printf "string %4d sigma %6.0f +/- %6.0f us\n" $STRING $(($P2[1] * 1.0e6)) $(($P2[2] * 1.0e6))
if (( ${#} == 3 ))
Q(UTCMax_s-UTCMin_s)-livetime_s
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
usr share Modules init zsh export TMPDIR
static const double H
Planck constant [eV s].
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then awk F
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then P1
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A

Definition at line 97 of file hydrophone-t0:fit.sh.