ROOTPWA
doKineValidation_root.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 export FITDIR=$ROOTPWA_DATA_DIR/fits
4 #export FITDIR=$WORKDIR/PWAFITS/GENETICS/ltRUN21/gen39/set42
5 export FITFILE=$FITDIR/fit.root
6 export PLOTFILE=${FITFILE/.root/.plots.root}
7 export BOOKY=${FITFILE/.root/.booky.pdf}
8 export DATADIR=$ROOTPWA_DATA_DIR
9 
10 echo FITDIR=$FITDIR
11 echo FITFILE=$FITFILE
12 echo PLOTFILE=$PLOTFILE
13 echo BOOKY=$BOOKY
14 echo DATADIR=$DATADIR
15 
16 
17 cd $DATADIR
18 
19 rm $PLOTFILE;
20 
21 # here generate sequence of the mass bin folders only ...
22 
23 for i in `ls | awk '/[0-9].[0-9]/ {print $1}'`; do
24 #for i in "1300.1340"; do
25  echo "MassBin: $i";
26  cd $i;
27  # convert events to root tree if not already done
28  test -s $i.neubert.root || cat $i.evt | evt2tree $i.neubert.root;
29  # run evtweight on accepted events:
30  #cd ACCAMPS
31  cd PSPAMPS
32  WEIGHTEDFILE=${FITFILE/.root/.kineval.$i.root}
33  test -s $WEIGHTEDFILE || evtweight -e ../$i.ps.evt -o $WEIGHTEDFILE -w $FITFILE -i norm.int -m $i;
34  echo "created weightfile for massbin $i";
35  # produce nice plots
36  root -b -q "$ROOTPWA/generators/rootlogon.C" "$ROOTPWA/generators/doPlotWEvts.C(\"../$i.neubert.root\",\"$WEIGHTEDFILE\",\"$PLOTFILE\",\"$i\")";
37 
38  cd $DATADIR;
39 done;
40 
41 
42 #echo "CREATING BOOKY $BOOKY ..."
43 ## collect all plots into a booky:
44 #cd $FITDIR
45 #for i in *plots*.ps; do ps2pdf $i; rm -f $i; done;
46 #pdftk *plots*.pdf cat output $BOOKY
47 #for i in *plots*.pdf; do rm -f $i; done;