3 ana=$ALICE_ROOT/PWG2/FORWARD/analysis2
25 Do Pass1 and Pass2 on ESD files in current directory.
29 -n,--events N Number of events ($nev)
30 -1,--pass1 Run only pass 1, no draw ($nodraw)
31 -2,--pass2 Run only pass 2, just draw ($noanal)
32 -r,--rebin N Rebin by N ($rebin)
33 -v,--vz-min CM Minimum value of vz ($vzmin)
34 -V,--vz-max CM Maximum value of vz ($vzmax)
35 -t,--trigger TYPE Select trigger TYPE ($type)
36 -e,--energy CMS Center of mass energy ($cms)
37 -b,--batch Do batch processing ($batch)
38 -P,--proof Run in PROOF(Lite) mode ($proof)
39 -M,--mc Run over MC data ($mc)
40 -S,--title STRING Set the title string ($tit)
41 -g,--gdb Run in GDB mode ($gdb)
42 -H,--hhd Do comparison to HHD ($hhd)
43 -O,--other Do comparison to other ($comp)
45 TYPE is a comma or space separated list of
47 INEL Inelastic triggers (V0A|V0C|SPD)
48 INEL>0 As above + N_ch > 0 in -0.5<eta<+0.5
49 NSD Non-single diffractive ((VOA&VOC)|N_ch > 5 -1.9<eta<+1.9)
60 while test $# -gt 0 ; do
62 -h|--help) usage ; exit 0;;
63 -n|--events) nev=$2 ; shift ;;
64 -2|--pass2) noanal=`toggle $noanal` ;;
65 -1|--pass1) nodraw=`toggle $nodraw` ;;
66 -b|--batch) batch=`toggle $batch` ;;
67 -P|--proof) proof=`toggle $proof` ;;
68 -M|--mc) mc=`toggle $mc` ;;
69 -g|--gdb) gdb=`toggle $gdb` ;;
70 -H|--hhd) hhd=`toggle $hhd` ;;
71 -O|--other) comp=`toggle $comp` ;;
72 -r|--rebin) rebin=$2 ; shift ;;
73 -v|--vz-min) vzmin=$2 ; shift ;;
74 -V|--vz-max) vzmax=$2 ; shift ;;
75 -e|--energy) cms=$2 ; shift ;;
76 -S|--title) tit="$2" ; shift ;;
78 if test "x$type" = "x" ; then type=$2 ; else type="$type|$2"; fi
80 *) echo "$0: Unknown option '$1'" >> /dev/stderr ; exit 1 ;;
85 base=`printf dndeta_%07d $nev`
89 if test $nodraw -lt 1 ; then
92 if test $batch -gt 0 ; then
94 redir="2>&1 | tee ${base}.log"
97 if test $noanal -lt 1 ; then
98 rm -f AnalysisResult.root AliAODs.root
101 if test $gdb -gt 0 ; then
102 export PROOF_WRAPPERCMD="gdb -batch -x $ALICE_ROOT/PWG2/FORWARD/analysis2/gdb_cmds --args"
104 echo "Running aliroot ${opts} ${opts1} ${ana}/Pass1.C\(\".\",$nev,$proof,$mc\) $redir"
105 if test $batch -gt 0 ; then
106 aliroot $opts $opts1 ${ana}/Pass1.C\(\".\",$nev,$proof,$mc\) 2>&1 | tee ${base}.log
108 aliroot $opts $opts1 ${ana}/Pass1.C\(\".\",$nev,$proof,$mc\)
110 rm -f event_stat.root \
111 EventStat_temp.root \
113 `printf %09d.stat $nev`
114 if test ! -f AnalysisResults.root || test ! -f AliAODs.root ; then
115 echo "Analysis failed"
121 if test $nodraw -lt 1 ; then
123 if test "x$tit" = "x" ; then
124 tit="$nev events, v_{z}#in[$vzmin,$vzmax], $type"
126 tit=`echo $tit | tr ' ' '@'`
127 echo "Running aliroot ${opts} ${opts1} ${ana}/Pass2.C\(\"AliAODs.root\",\"$type\",$cms,$vzmin,$vzmax,$rebin,$hhd,$comp\)"
128 aliroot ${opts} ${ana}/Pass2.C\(\"AliAODs.root\",\"$type\",$cms,$vzmin,$vzmax,$rebin,\"$tit\",$hhd,$comp\)