17 Run analysis and visualize it using HHD analysis code
21 -N,--no-analysis Do not analyse, just draw ($noanal)
22 -D,--no-draw Do not draw, just analysis ($nodraw)
23 -n,--events N Number of events ($nev)
24 -r,--rebin N Rebin by N ($rebin)
25 -v,--vz-min CM Minimum value of vz ($vzmin)
26 -V,--vz-max CM Maximum value of vz ($vzmax)
27 -t,--trigger TYPE Select trigger TYPE ($type)
28 -e,--energy CMS Center of mass energy ($cms)
38 while test $# -gt 0 ; do
40 -h|--help) usage ; exit 0;;
41 -n|--events) nev=$2 ; shift ;;
42 -N|--no-analysis) noanal=$((($noanal+1)%2)) ;;
43 -D|--no-draw) nodraw=$((($nodraw+1)%2)) ;;
44 -r|--rebin) rebin=$2 ; shift ;;
45 -v|--vz-min) vzmin=$2 ; shift ;;
46 -V|--vz-max) vzmax=$2 ; shift ;;
47 -e|--energy) cms=$2 ; shift ;;
48 -t|--type) type="$2" ; shift ;;
49 *) echo "$0: Unknown option '$1'" >> /dev/stderr ; exit 1 ;;
54 base=`printf hhd_%07d $nev`
59 if test -f $file ; then
66 if test -f ${file}.keep ; then
67 mv ${file}.keep ${file}
71 if test $noanal -lt 1 ; then
72 keep_file AnalysisResult.root
73 keep_file AliAODs.root
75 aliroot -l -b -q -x RunManager.C\(\".\",$nev\) 2>&1 | tee $base.log
77 if test ! -f AnalysisResults.root ; then
78 echo "Analysis failed"
79 restore_file AnalysisResult.root
80 restore_file AliAODs.root
84 rm -f event_stat.root EventStat_temp.root outputs_valid
85 mv AnalysisResults.root ${base}_hists.root
86 if test -f AliAODs.root ; then
87 mv AliAODs.root ${base}_aods.root
89 restore_file AnalysisResult.root
90 restore_file AliAODs.root
94 if test $nodraw -lt 1 ; then
95 rm -f fmd_dNdeta_mult.root
98 tt=`echo $type | tr '[a-z]' '[A-Z]'`
100 "xINEL") n="inel"; s="" ; samp=0 ;;
101 "xINEL>0") n="inelgt0"; s="_NSD"; samp=4 ; echo "Using NSD for $tt";;
102 "xNSD") n="nsd"; s="_NSD"; samp=4 ;;
103 *) echo "Unknown type $tt" > /dev/stderr ; exit 1 ;;
106 aliroot -l -b -q -x \
107 $ALICE_ROOT/PWG2/FORWARD/analysis/drawdNdeta.C\(\"${base}_hists.root\",$samp,$rebin,$vzmin,$vzmax,1,$cms\)
108 tmin=`printf %+03d $vzmin | tr '+-' 'pm'`
109 tmax=`printf %+03d $vzmax | tr '+-' 'pm'`
110 out=`printf "hhd_%04dGeV_%s-%scm_rb%02d_%s.root" $cms $tmin $tmax $rebin $n`
111 mv fmd_dNdeta_mult${s}.root $out
113 mv fmdana.png `basename $out .root`.png