ROOTPWA
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
scripts
pwa_Kpipi_example
step3.sh
Go to the documentation of this file.
1
# this script generates flat phasespace events into the bins
2
# should be called by run_X_PWA_analysis.sh script
3
# author: P.Jasinski Promme@web.de , jasinski@kph.uni-mainz.de
4
5
source ${ROOTPWA}/scripts/pwa_Kpipi_example/set_workspace_var.sh
6
7
echo
-e
"\n **************** part 3 ******************"
8
echo
" *${STEP_NAME[2]}*"
9
echo
-e
" ******************************************\n"
10
11
if
which genpw >/dev/null; then
12
echo
-e
"\n genpw found"
13
else
14
echo
-e
"\E[37;31m \n phasespace generator genpw not found:"
; tput sgr0
15
echo
-e
"\E[37;31m Please compile rootpwa according to "
16
echo
-e
"\E[37;34m ${ROOTPWA}/INSTALL "
17
echo
-e
"\E[37;31m instructions "
; tput sgr0
18
echo
-e
"\n Aborting this script"
; tput sgr0
19
return
0
20
fi
21
22
FILTERED_RAWEVENTS=
""
23
for
BIN
in ${KPIPI_WORK_DIR}
/*
24
do
25
_BIN=$(basename ${BIN}) # get the directory name
26
BINHIGH=${_BIN#*.} # the number behind the "." is the hight bound
27
BINLOW=${_BIN%.*} # the number in front of the "." is the low bound
28
let BINWIDTH=(${KPIPI_BIN_MAX}-${KPIPI_BIN_MIN})/${KPIPI_NBINS}
29
# not everything in ./* is always a valid folder. Check the name to have numbers
30
if echo ${BINLOW} | grep "^[0-9]*$">/tmp/aux
31
then
32
echo -e "\n attempting to generate flat phasespace MC events in "
33
echo -e "${BIN}"
34
cd ${BIN}
35
#echo "${BINHIGH} ${BINLOW} ${BINWIDTH}"
36
if [ -e ${BINLOW}.${BINHIGH}.genbod.evt ]
37
then
38
echo -e "\E[37;31m omitting: There is allready a file existing! "; tput sgr0
39
else
40
#echo " doing it "
41
genpw -n ${KPIPI_NPHASESPACE_MC_EVENTS} -M ${BINLOW} -B ${BINWIDTH} -c -r ${KPIPI_MC_CONFIG_FILE_FLAT}
42
fi
43
# by the way: do we have filtered RAW events in here?
44
if [ -e ${BINLOW}.${BINHIGH}.evt ]
45
then
46
echo " FILE EXISTS "
47
FILTERED_RAWEVENTS=1
48
fi
49
cd -
50
else
51
echo -e "\n skipping ${BIN}"
52
fi
53
rm /tmp/aux
54
done
Generated by
1.8.1.2