]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/scan/dcScan.sh
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / scan / dcScan.sh
1 #!/bin/bash 
2
3 # --- Variables needed by base stuff ---------------------------------
4 base=${ANA_SRC}/scan
5 datadir=/data/alice/data/pbpb/LHC10h/pass2
6
7 # --- Our set-up -----------------------------------------------------
8 runs="137848 138190"
9 methods="sig xi mpv prob"
10 mpvcuts="0.1 0.3 0.5 0.7"
11 xicuts="1 2 3 5"
12 probcuts="1 3 5 7"
13 sfcuts="0.10 fix 0.7 mpv"
14 strcuts="true false"
15 mycuts=
16
17 # --- Help -----------------------------------------------------------
18 usage()
19 {
20     cat <<EOF
21 Usage: $0 [OPTIONS] [-- [TRAIN OPTIONS]]
22
23 Options:
24         -h,--help               This help
25         -d,--datadir DIR        Top level directory of data
26         -r,--runs    RUNS       Runs to analyze
27         -2,--no-3               Do not do 3-strip sharing
28         -m,--methods METHODS    Override which methods to scan ($methods)
29         -c,--cuts    VALUES     Override cuts (for all methods)
30         -s,--sharing CUTS       Override sharing cuts ($sfcuts)
31         -n,--no-act             Do not do any processing, just show
32         --                      Terminate command line handling 
33
34 RUNS is a space separated list of runs 
35
36 METHODS is a space separated string of one or more of 
37
38   mpv    c = X x Delta_p
39   xi     c = Delta_p - X x xi
40   sig    c = Delta_p - x x (xi + sigma)
41   fix    c = X 
42   prob   c: P(Delta<c) < X
43   fit    Fit range
44
45 where X is the cut parameter.
46
47 VALUES is a space separated list of X values. 
48
49 Sharing CUTS must consist of 4 parts. 
50 EOF
51 }
52
53 noact=0
54
55 # --- Handle command line --------------------------------------------
56 while test $# -gt 0 ; do 
57     case $1 in 
58         -h|--help)      usage ; exit 0 ;;
59         -d|--datadir)   datadir=$2 ; shift ;;
60         -r|--runs)      runs="$2" ; shift ;;
61         -2|--no-3)      strcuts="false" ;; 
62         -m|--methods)   methods="$2" ; shift ;; 
63         -c|--cuts)      mycuts="$2"; shift ;;
64         -s|--sharing)   sfcuts="$2"; shift ;;
65         -n|--no-act)    noact=1 ;;
66         --)             shift ; break;;
67         *) echo "$0: Unknown argument $1" >/dev/stderr; exit 1;;
68     esac
69     shift
70 done
71
72 # --- Source basic setup ---------------------------------------------
73 . ${base}/baseScan.sh 
74
75 # --- Loop over everyting --------------------------------------------
76 for r in $runs ; do                      # Loop over runs 
77     echo "=== Now processing run $r" 
78     for t in ${strcuts} ; do             # Loop over 3-strip merging 
79         echo "===  With allow 3-particle merging $t" 
80         for m in $methods ; do               # Loop over methods 
81             echo "===   For method $m" 
82             if test "x$mycuts" = "x" ; then 
83                 # If we should use the defined cuts 
84                 case $m in 
85                     mpv)    cuts="$mpvcuts" ;; 
86                     xi|sig) cuts="$xicuts" ;; 
87                     prob)   cuts="$probcuts" ;; 
88                     *) echo "Unknown cut type: $m" ; exit 1 ;;
89                 esac
90             else
91                 # If cuts are overwritten by command line 
92                 cuts="$mycuts" 
93             fi
94             for c in $cuts ; do              # Loop over cuts 
95                 echo "===    With cut value $c" 
96                 runOne $r $t $sfcuts $c $m $@ # 'sfcuts' expand to 4 args
97             done                             # Loop over cuts 
98         done                                 # Loop over methods 
99     done                                     # Loop over 3-strip merging 
100 done                                         # Loop over runs 
101
102 # EOF