7# ------------------------------------------------------------------------------------------
9# Utility script to produce the transit time probability and generator for HAMA-R12199.
11# ------------------------------------------------------------------------------------------
13source $JPP_DIR/setenv.sh $JPP_DIR
16set_variable DETID D0DU005MA
18set_variable DAQ_TIMESLICE JDAQTimeslice
23set_variable: FORMAT GRAPHICS_FORMAT gif
24set_variable+ BATCH GRAPHICS_BATCH -B
31 fatal "Wrong number of arguments."
34if [[ ! -f $DETID.datx ]]; then
35 JDetectorDB -D $DETID -r $RUN -o $DETID.datx
38eval `JPrintDetector -a $DETID.datx -O IDENTIFIER`
39eval `JPrintDetector -a $DETID.datx -O SUMMARY`
41set_variable INPUT_FILE KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}.root
43if [[ ! -f $INPUT_FILE ]]; then
44 iget /in2p3/km3net/data/raw/darkroom/KM3NeT_${(l:8::0::0:)DETECTOR_ID}/0/$INPUT_FILE
47JConvertDetectorFormat \
71for MODULE in $MODULES[*]; do
73 getLocation -a detector.datx -M $MODULE | read STRING FLOOR
75 if (( $FLOOR != 0 )); then
78 -f pulsar.root:$MODULE \
82 -\^ "number of events [a.u.]" \
85 -o M_${STRING}_${FLOOR}.$FORMAT -B
89for STRING in $STRINGS[*]; do
91 echo "Creating graphics M_${STRING}.$FORMAT."
96 M_${STRING}_{01..18}.$FORMAT \
97 M_${STRING}.$FORMAT >& /dev/null
107$JPP_DIR/examples/JDetector/JTransitTime \
108 -o PMT\[$TYPE\].root \
113 -f legolas.root:pmt \
114 -f PMT\[$TYPE\].root:tts \
123 -o PMT.$FORMAT $BATCH