3 ana=$ALICE_ROOT/PWG2/FORWARD/analysis2
27 Do Pass1 and Pass2 on ESD files in current directory.
31 -n,--events N Number of events ($nev)
32 -1,--pass1 Run only pass 1, no draw ($nodraw)
33 -2,--pass2 Run only pass 2, just draw ($noanal)
34 -r,--rebin N Rebin by N ($rebin)
35 -v,--vz-min CM Minimum value of vz ($vzmin)
36 -V,--vz-max CM Maximum value of vz ($vzmax)
37 -t,--trigger TYPE Select trigger TYPE ($type)
38 -e,--energy CMS Center of mass energy ($cms)
39 -b,--batch Do batch processing ($batch)
40 -P,--proof NWORKERS Run in PROOF(Lite) mode ($proof)
41 -M,--mc Run over MC data ($mc)
42 -S,--title STRING Set the title string ($tit)
43 -g,--gdb Run in GDB mode ($gdb)
44 -H,--hhd Do comparison to HHD ($hhd)
45 -O,--other Do comparison to other ($comp)
46 -E,--eloss Run energy loss script
48 TYPE is a comma or space separated list of
50 INEL Inelastic triggers (V0A|V0C|SPD)
51 INEL>0 As above + N_ch > 0 in -0.5<eta<+0.5
52 NSD Non-single diffractive ((VOA&VOC)|N_ch > 5 -1.9<eta<+1.9)
54 If NWORKERS is 0, then the analysis will be run in local mode.
64 while test $# -gt 0 ; do
66 -h|--help) usage ; exit 0;;
67 -n|--events) nev=$2 ; shift ;;
68 -2|--pass2) noanal=`toggle $noanal` ;;
69 -1|--pass1) nodraw=`toggle $nodraw` ;;
70 -b|--batch) batch=`toggle $batch` ;;
71 -P|--proof) proof=$2 ; shift ;;
72 -M|--mc) mc=`toggle $mc` ;;
73 -g|--gdb) gdb=`toggle $gdb` ;;
74 -H|--hhd) hhd=`toggle $hhd` ;;
75 -O|--other) comp=`toggle $comp` ;;
76 -r|--rebin) rebin=$2 ; shift ;;
77 -v|--vz-min) vzmin=$2 ; shift ;;
78 -V|--vz-max) vzmax=$2 ; shift ;;
79 -e|--energy) cms=$2 ; shift ;;
80 -S|--title) tit="$2" ; shift ;;
81 -E|--eloss) pass1=MakeELossFits.C ;
82 output=forward_eloss.root ;
85 if test "x$type" = "x" ; then type=$2 ; else type="$type|$2"; fi
87 *) echo "$0: Unknown option '$1'" >> /dev/stderr ; exit 1 ;;
92 if test $nev -lt 0 ; then
95 base=`printf dndeta_%07d $nev`
100 if test $nodraw -lt 1 ; then
103 if test $batch -gt 0 ; then
105 redir="2>&1 | tee ${base}.log"
108 if test $noanal -lt 1 ; then
109 rm -f AnalysisResult.root AliAODs.root
112 if test $gdb -gt 0 ; then
113 export PROOF_WRAPPERCMD="gdb -batch -x $ALICE_ROOT/PWG2/FORWARD/analysis2/gdb_cmds --args"
115 echo "Running aliroot ${opts} ${opts1} ${ana}/${pass1}\(\".\",$nev,$proof,$mc\) $redir"
116 if test $batch -gt 0 ; then
117 aliroot $opts $opts1 ${ana}/${pass1}\(\".\",$nev,$proof,$mc\) 2>&1 | tee ${base}.log
119 aliroot $opts $opts1 ${ana}/${pass1}\(\".\",$nev,$proof,$mc\)
122 rm -f event_stat.root \
123 EventStat_temp.root \
125 `printf %09d.stat $nev`
126 if test $fail -gt 0 ; then
127 echo "Return value $fail not 0" ; exit $fail
129 if test ! -f ${output} ; then
130 echo "$output not made" ; exit 1;
132 if test ! -f AliAODs.root ; then
133 echo "No AOD creates" ; exit 1;
138 if test $nodraw -lt 1 ; then
140 tit=`echo $tit | tr ' ' '@'`
141 echo "Running aliroot ${opts} ${opts1} ${ana}/Pass2.C\(\".\",\"$type\",$cms,$vzmin,$vzmax,$rebin,$hhd,$comp\)"
142 aliroot ${opts} ${ana}/Pass2.C\(\".\",\"$type\",$cms,$vzmin,$vzmax,$rebin,\"$tit\",$hhd,$comp\)