ROOTPWA
step5.sh
Go to the documentation of this file.
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
5 
6 source ${ROOTPWA}/scripts/pwa_Kpipi_example/set_workspace_var.sh
7 
8 echo -e "\n **************** part 5 ******************"
9 echo " *${STEP_NAME[4]}*"
10 echo -e " ******************************************\n"
11 
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 ]
15 then
16 
17  echo -e " compilation succeeded"
18  if [ "${FILTERED_RAW_EVENTS_EXIST}" == '1' ]
19  then
20  echo -e "\E[37;31m RAW events seem to exist already. skipping! "; tput sgr0
21  else
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}
25  fi
26 
27  if [ "${FILTERED_MC_ACC_EVENTS_EXIST}" == '1' ]
28  then
29  echo -e "\E[37;31m MC acceptance events seem to exist already. skipping! "; tput sgr0
30  else
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}
34  fi
35  rm /tmp/readtree
36 else
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
40  return 0
41 fi