8 # ------------------------------------------------------------------------------------------ 
   10 #                     Utility script to evaluate rates due to K40 decays. 
   12 # ------------------------------------------------------------------------------------------ 
   15 if [ -z $JPP_DIR ]; 
then 
   16     echo "Variable JPP_DIR undefined." 
   21 source $JPP_DIR/setenv.sh $JPP_DIR
 
   28 set_variable   rateL0_Hz     4500.0
 
   32 set_array      rateL1_Hz     568  49.1  5.48  0.479  # 0.0613  0.000781  0.000133
 
   35     usage "$script [working directory]" 
   41     printf 
"(%4.0f, " $(( $rateL0_Hz + $darkcount_Hz ))
 
   42     printf 
"{ %6.1f" $rateL1_Hz[1]
 
   43     printf 
", %6.2f" $rateL1_Hz[2,-1]
 
   48 # https://git.km3net.de/common/jpp/-/issues/351 
   58 include \$(JPP_DIR)/make/JMakefile
 
   61 for TARGET 
in KM3NeT KM3NeT_highQE; 
do 
   80     eval set_array     rateL1_${TARGET}_Hz  `
awk '/Rate\[.*\] *=/ { print $3 }' $WORKDIR/rateL1_${TARGET}.txt`
 
   91 rateL0_Hz=$(( $rateL0_Hz * $rateL0_KM3NeT_highQE_Hz / $rateL0_KM3NeT_Hz ))
 
   93 darkcount_Hz=$(( $darkcount_Hz * 3 ))
 
   95 for (( 
i = 1; 
i <= ${#rateL1_Hz}; ++
i )); 
do 
   96     rateL1_Hz[
$i]=$(( $rateL1_Hz[
$i] * $rateL1_KM3NeT_highQE_Hz[
$i] / $rateL1_KM3NeT_Hz[
$i] ))
 
then make C $WORKDIR clean make C $WORKDIR $TARGET $WORKDIR rateL0 d &$WORKDIR rateL0_
 
then JLigier sh continue fi cat
 
usr share Modules init zsh export TMPDIR
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID set_array RUNS if do_usage *then usage $script< source directory > nThe source directory corresponds to a pre calibrated D0ARCA009 detector fi case set_variable DIR
 
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
 
static const double C
Physics constants. 
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DIR $JPP_DIR examples JPhysics set_variable DEBUG set_variable darkcount_Hz set_variable rateL0_Hz set_array rateL1_Hz if do_usage *then usage $script[working directory] fi function typeout()
 
do set_variable STRING_TXT awk
 
case $OPTION in clean clean
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
 
then fatal Timeout at user input fi set_variable SERVER JServerDB wget no check certificate q https
 
then for DETECTOR in Antares KM3NeT
 
fi set_variable FILENAME $WORKDIR
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
 
do echo Generating $dir eval D
 
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
 
#define DEBUG(A)
Message macros.