Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
examples/JReconstruction/JEnergyCorrection.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to plot energy correction.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 if [ -z $JPP_DIR ]; then
15  echo "Variable JPP_DIR undefined."
16  exit
17 fi
18 
19 source $JPP_DIR/setenv.sh $JPP_DIR
20 
21 if do_usage $*; then
22  usage "$script [(input file)+]"
23 fi
24 
26 set_variable WORKDIR ${TMPDIR:-/tmp}/
27 set_variable DIR $JPP_DIR/examples/JReconstruction
28 set_variable: FORMAT GRAPHICS_FORMAT gif
29 set_variable+ BATCH GRAPHICS_BATCH -B
30 
31 if (( $# == 0 )); then
32  set_array INPUT_FILES `ls ${JPP_LIB}/energy_correction*.txt`
33 else
34  set_array INPUT_FILES $argv[1,-1]
35 fi
36 
37 $DIR/JEnergyCorrection \
38  -E${^INPUT_FILES} \
39  -o $WORKDIR/f1.root \
40  -d $DEBUG --!
41 
42 JPlot1D \
43  -f $WORKDIR/f1.root:\.\* \
44  -y "1e-3 5e1" -Y \
45  -XX \
46  -\> "E [GeV]" \
47  -\^ "correction" \
48  -T "" -L BR \
49  -o $WORKDIR/energy-correction.$FORMAT $BATCH
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn only modules within the given range of floors are used fi case set_variable RANGE $argv[3]
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
exit
Definition: JPizza.sh:36
do echo Generating $dir eval DIR
Definition: JPlotNPE1D.sh:54
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
then usage E
Definition: JMuonPostfit.sh:35
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
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 JConvertDetectorFormat a $DETECTOR[1] o
then for APP in event gandalf start energy
Definition: JMuonMCEvt.sh:44
do sput $STRING $FLOOR sget MODULE INPUT_FILES
Definition: JCanberra.sh:73
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then display $WORKDIR
Definition: plot-Domino.sh:128
version
Definition: JCalibratePMT.sh:7