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 -v,--vz-min CM Minimum value of vz ($vzmin)
35 -V,--vz-max CM Maximum value of vz ($vzmax)
36 -t,--trigger TYPE Select trigger TYPE ($type)
37 -b,--batch Do batch processing ($batch)
38 -P,--proof NWORKERS Run in PROOF(Lite) mode ($proof)
39 -M,--mc Run over MC data ($mc)
40 -g,--gdb Run in GDB mode ($gdb)
41 -E,--eloss Run energy loss script
43 TYPE is a comma or space separated list of
45 INEL Inelastic triggers (V0A|V0C|SPD)
46 INEL>0 As above + N_ch > 0 in -0.5<eta<+0.5
47 NSD Non-single diffractive ((VOA&VOC)|N_ch > 5 -1.9<eta<+1.9)
49 If NWORKERS is 0, then the analysis will be run in local mode.
59 while test $# -gt 0 ; do
61 -h|--help) usage ; exit 0;;
62 -n|--events) nev=$2 ; shift ;;
63 -2|--pass2) noanal=`toggle $noanal` ;;
64 -1|--pass1) nodraw=`toggle $nodraw` ;;
65 -b|--batch) batch=`toggle $batch` ;;
66 -P|--proof) proof=$2 ; shift ;;
67 -M|--mc) mc=`toggle $mc` ;;
68 -g|--gdb) gdb=`toggle $gdb` ;;
69 -v|--vz-min) vzmin=$2 ; shift ;;
70 -V|--vz-max) vzmax=$2 ; shift ;;
71 -E|--eloss) pass1=MakeELossFits.C ;
72 output=forward_eloss.root ;
75 if test "x$type" = "x" ; then type=$2 ; else type="$type|$2"; fi
77 *) echo "$0: Unknown option '$1'" >> /dev/stderr ; exit 1 ;;
82 if test $nev -lt 0 ; then
85 base=`printf dndeta_%07d $nev`
90 if test $nodraw -lt 1 ; then
93 if test $batch -gt 0 ; then
95 redir="2>&1 | tee ${base}.log"
98 if test $noanal -lt 1 ; then
99 rm -f AnalysisResult.root AliAODs.root
102 if test $gdb -gt 0 ; then
103 export PROOF_WRAPPERCMD="gdb -batch -x $ALICE_ROOT/PWG2/FORWARD/analysis2/gdb_cmds --args"
105 echo "Running aliroot ${opts} ${opts1} ${ana}/${pass1}\(\".\",$nev,$proof,$mc\) $redir"
106 if test $batch -gt 0 ; then
107 aliroot $opts $opts1 ${ana}/${pass1}\(\".\",$nev,$proof,$mc\) 2>&1 | tee ${base}.log
109 aliroot $opts $opts1 ${ana}/${pass1}\(\".\",$nev,$proof,$mc\)
112 rm -f outputs_valid \
113 `printf %09d.stat $nev`
114 if test $fail -gt 0 ; then
115 echo "Return value $fail not 0" ; exit $fail
117 if test ! -f ${output} ; then
118 echo "$output not made" ; exit 1;
120 if test ! -f AliAODs.root ; then
121 echo "No AOD creates" ; exit 1;
126 if test $nodraw -lt 1 ; then
128 tit=`echo $tit | tr ' ' '@'`
129 echo "Running aliroot ${opts} ${opts1} ${ana}/Pass2.C\(\".\",$nev,\"$type\",$vzmin,$vzmax,$proof\)"
130 aliroot ${opts} ${ana}/Pass2.C\(\".\",$nev,\"$type\",$vzmin,$vzmax,$proof\)