Jpp  17.1.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
thresholdCalibration.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author acreusot
5 #
6 version=1.0
7 script=${0##*/}
8 
9 # ------------------------------------------------------------------------------------------
10 #
11 # Utility script to test threshold calibration.
12 #
13 # ------------------------------------------------------------------------------------------
14 # all data related to the threshold calibration have to be set in the same directory
15 
16 
17 if [ -z $JPP_DIR ]; then
18  echo "Variable JPP_DIR undefined."
19  exit
20 fi
21 
22 source $JPP_DIR/setenv.sh $JPP_DIR
23 
25 
26 if do_usage $*; then
27  usage "$script <working directory> <detector file> <threshold data directory>"
28 fi
29 
30 case $# in
31  3) set_variable THDIR $3;
34  *) fatal "wrong number of arguments!";;
35 esac
36 
37 # Retrieve cookie
38 JCookie.sh
39 
40 for FILEPATH in $(ls ${WORKDIR}/${THDIR}/); do
41  CURFILE=("${WORKDIR}/${THDIR}/${FILEPATH}")
42  TMP1=${FILEPATH#*_}
43  TMP2=${TMP1#*_}
44  RUNNB=${TMP2%.root}
45  if (( 1 )); then
46  JCalibrateToT \
47  -d $DEBUG \
48  -f ${CURFILE} \
49  -a ${WORKDIR}/${DETX} \
50  -C JDAQTimesliceL0 \
51  -o ${WORKDIR}/${FILEPATH%.root}_calibrateToT.root
52  fi
53 
54  if (( 1 )); then
55  JIntegrateToT \
56  -d $DEBUG \
57  -f ${WORKDIR}/${FILEPATH%.root}_calibrateToT.root \
58  -o ${WORKDIR}/${DETX%.detx}_integrateToT.txt \
59  -a ${WORKDIR}/${DETX} \
60  -r ${RUNNB}
61  fi
62 
63 done
64 
65 if (( 1 )); then
66  JTuneTH \
67  -d $DEBUG \
68  -a ${WORKDIR}/${DETX} \
69  -f ${WORKDIR}/${DETX%.detx}_integrateToT.txt \
70  -o ${WORKDIR}/${DETX%.detx}_thresholdTuning.json \
71  -t 0.5 \
72  -T "TH-TUNING-SEA-v1"
73 fi
version
Definition: JEditTuneHV.sh:5
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
exit
Definition: JPizza.sh:36
data_type r[M+1]
Definition: JPolint.hh:779
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then echo
static const double C
Physics constants.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
do set_variable OUTPUT_DIRECTORY $WORKDIR T
set_variable DETX
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG if do_usage *then usage $script< working directory >< detectorfile >< thresholddatadirectory > fi case set_variable THDIR
then JCalibrateToT a
Definition: JTuneHV.sh:116
do CURFILE
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
Definition: JCanberra.sh:46
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62