ROOTPWA
step8.sh
Go to the documentation of this file.
1 # this script filters creates a list of amplitudes available
2 # by using the available keys
3 # should be called by run_X_PWA_analysis.sh script
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 8 ******************"
9 echo " *${STEP_NAME[7]}*"
10 echo -e " ******************************************\n"
11 
12 # put the list with amplitudes to fit in the fit directory
13 if [ -e ${KPIPI_FIT_DIR} ];
14 then
15  echo -e "\E[37;31m \n The directory "; tput sgr0
16  echo -e "\E[37;34m ${KPIPI_FIT_DIR}"; tput sgr0
17  echo -e "\E[37;31m exists already. Remove the contents (Y/N)? "; tput sgr0
18  read CONTINUE
19  if [ ${CONTINUE} == "Y" ];
20  then
21  echo -e "\n cleaning up ${KPIPI_FIT_DIR}\n"
22  rm -rf ${KPIPI_FIT_DIR}
23  else
24  echo -e "\E[37;31m \n Please specify a new fit file folder! "; tput sgr0
25  echo -e "\n Aborting this script"; tput sgr0
26  return 0
27  fi
28 fi
29 mkdir ${KPIPI_FIT_DIR}
30 
31 # here we take all waves for all bins, you may change it binwise
32 # by applying different wavelists
33 
34 ls ${KPIPI_KEYFILE_DIR} > "${KPIPI_WAVE_LIST}_temp"
35 # cat "${KPIPI_WAVE_LIST}_temp"
36 for AMP in $(cat ${KPIPI_WAVE_LIST}_temp); # keep only .key files
37 do
38  EXT=${AMP#*.}
39  FNAME=${AMP%.*}
40  if [ ${EXT} == "key" ];
41  then
42  # save with the extension to .amp
43  echo "${FNAME}.amp" >> ${KPIPI_WAVE_LIST}
44  fi
45 done
46 rm "${KPIPI_WAVE_LIST}_temp"
47 echo -e "\E[37;31m \n the following amplitudes will be fitted: \n"; tput sgr0
48 cat ${KPIPI_WAVE_LIST}