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
36 JDetectorDB -D $DETID -r $RUN -o $DETID.datx
38 if (( $? != 0 )); then
39 JDetectorDB -D $DETID -@ "tcal = ?" -@ "pcal = ?" -@ "rcal = ?" -@ "acal = ?" -@ "ccal = ?" -@ "scal = ?" -o $DETID.datx
43eval `JPrintDetector -a $DETID.datx -O IDENTIFIER`
44eval `JPrintDetector -a $DETID.datx -O SUMMARY`
46set_variable INPUT_FILE KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}.root
48if [[ ! -f $INPUT_FILE ]]; then
49 iget /in2p3/km3net/data/raw/darkroom/KM3NeT_${(l:8::0::0:)DETECTOR_ID}/0/$INPUT_FILE
52JConvertDetectorFormat \
76for MODULE in $MODULES[*]; do
78 getLocation -a detector.datx -M $MODULE | read STRING FLOOR
80 if (( $FLOOR != 0 )); then
83 -f pulsar.root:$MODULE \
87 -\^ "number of events [a.u.]" \
90 -o M_${STRING}_${FLOOR}.$FORMAT -B
94for STRING in $STRINGS[*]; do
96 echo "Creating graphics M_${STRING}.$FORMAT."
101 M_${STRING}_{01..18}.$FORMAT \
102 M_${STRING}.$FORMAT >& /dev/null
112$JPP_DIR/examples/JDetector/JTransitTime \
113 -o PMT\[$TYPE\].root \
118 -f legolas.root:pmt \
119 -f PMT\[$TYPE\].root:tts \
128 -o PMT.$FORMAT $BATCH