1 # this script filters data from a root file to binned BNL events
2 # should be called by run_X_PWA_analysis.sh script
3 # test_workspace.sh must be run before to set some additional variables
4 # author: P.Jasinski Promme@web.de , jasinski@kph.uni-mainz.de
6 source ${ROOTPWA}/scripts/pwa_Kpipi_example/set_workspace_var.sh
8 echo -e
"\n **************** part 5 ******************"
9 echo " *${STEP_NAME[4]}*"
10 echo -e
" ******************************************\n"
12 echo -e
"\n compiling tree reader "
13 g++ `
root-config --glibs` `
root-config --cflags` -O0 -o /tmp/readtree ${KPIPI_TREE_READER}
14 if [ -f /tmp/readtree ]
17 echo -e
" compilation succeeded"
18 if [
"${FILTERED_RAW_EVENTS_EXIST}" ==
'1' ]
20 echo -e
"\E[37;31m RAW events seem to exist already. skipping! "; tput sgr0
22 echo -e
" filling RAW events... "
23 /tmp/readtree ${KPIPI_RAW_FILE_DIR}/${KPIPI_RAW_FILE} ${KPIPI_FILE_TREE} \
24 ${KPIPI_WORK_DIR} ${KPIPI_NBINS} ${KPIPI_BIN_MIN} ${KPIPI_BIN_MAX} ${KPIPI_NPARTICLES}
27 if [
"${FILTERED_MC_ACC_EVENTS_EXIST}" ==
'1' ]
29 echo -e
"\E[37;31m MC acceptance events seem to exist already. skipping! "; tput sgr0
31 echo -e
" filling MC acceptance events... "
32 /tmp/readtree ${KPIPI_MC_FILE_DIR}/${KPIPI_MC_FILE} ${KPIPI_FILE_TREE} \
33 ${KPIPI_WORK_DIR} ${KPIPI_NBINS} ${KPIPI_BIN_MIN} ${KPIPI_BIN_MAX} ${KPIPI_NPARTICLES}
37 echo -e
"\E[37;31m \n Error in compilation to /tmp/readtree "; tput sgr0
38 echo -e
"\E[37;31m Please check! "; tput sgr0
39 echo -e
"\n Aborting this script"; tput sgr0