]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/GammaConv/macros/start_Analysis.sh
added macros for analysis
[u/mrichter/AliRoot.git] / PWG4 / GammaConv / macros / start_Analysis.sh
1 #!/bin/sh
2
3 # - This script will handle the running of the different Macros of the Mapping of the Conversions for you.
4 # - In the directory, in which this script is lying in, the different macros and header files which the macros
5 #   need have to be included as well.
6 # - Variable #1 is the directory where your rootfiles are put in
7 # - Variable #2 is the cut you want to analyse, a directory with the same name will be created in #1
8 # - You need to put in one directory the different root files for MC and data, and rename them so that they 
9 #   contain the words MC and data an in the corresponding filename. With the outputMerge, outputPdf, outputEps
10 #   outputSvg and outputGif you can set the different output formats of the files by setting the specific variable
11 #   to 1.
12 # - $backup is the the directory where a copy of the macros will be stored.
13 # - The script will handle all other things for you.
14
15 outputMerge=1
16 outputPdf=0
17 outputGif=0
18 outputEps=0
19 outputSvg=0
20
21 cp *.C $1
22 cp *.h $1
23
24 backup= /home/fredi/Dokumente/CERN/ALICE/Photon/Aktuelle\ Makros/newest\ Macros/
25 cp *.C $backup
26 cp *.h $backup
27
28
29 cd $1
30
31
32 data=`ls *.root | grep -v Output | grep -i data`
33 mc=`ls *.root | grep -v Output | grep -i mc`
34
35 echo $data
36 echo $mc
37
38 mkdir $2
39 cp $data $2/
40 cp $mc $2/
41 cp *.C $2
42 cp *.h $2
43
44
45 cd $2
46
47 echo $outputMerge 
48 if [ "$outputMerge" -eq 1 ]; then
49         root -l -x -q -b  Photon_Characteristics_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"PhotonCharacteristics_Events_Mult\"\,\"kFALSE\"\,\"gif\"\)
50         root -l -x -q -b  Plot_Mapping_Histos_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Mapping_Events_Mult\"\,\"kFALSE\"\,\"gif\"\)
51         root -l -x -q -b  Cuts_Events_new.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Cuts_Events_Mult\"\,\"kFALSE\"\,\"gif\"\, \"\"\)
52 fi
53
54 if [ "$outputPdf" -eq 1 ]; then
55         mkdir pdf
56         root -l -x -q -b Photon_Characteristics_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"PhotonCharacteristics_Events_Mult\"\,\"kTRUE\"\,\"pdf\"\)
57         root -l -x -q -b Plot_Mapping_Histos_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Mapping_Events_Mult\"\,\"kTRUE\"\,\"pdf\"\)
58         root -l -x -q -b  Cuts_Events_new.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Cuts_Events_Mult\"\,\"kTRUE\"\,\"pdf\"\, \"\"\)
59 fi
60
61 if [ "$outputGif" -eq 1 ]; then
62         mkdir gif
63         root -l -x -q -b  Photon_Characteristics_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"PhotonCharacteristics_Events_Mult\"\,\"kTRUE\"\,\"gif\"\)
64         root -l -x -q -b Plot_Mapping_Histos_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Mapping_Events_Mult\"\,\"kTRUE\"\,\"gif\"\)
65         root -l -x -q -b  Cuts_Events_new.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Cuts_Events_Mult\"\,\"kTRUE\"\,\"gif\"\, \"\"\)
66 fi
67
68 if [ "$outputEps" -eq 1 ]; then
69         mkdir eps
70         root -l -x -q -b  Photon_Characteristics_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"PhotonCharacteristics_Events_Mult\"\,\"kTRUE\"\,\"eps\"\)
71         root -l -x -q -b Plot_Mapping_Histos_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Mapping_Events_Mult\"\,\"kTRUE\"\,\"eps\"\)
72         root -l -x -q -b  Cuts_Events_new.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Cuts_Events_Mult\"\,\"kTRUE\"\,\"eps\"\, \"\"\)
73 fi
74
75 if [ "$outputSvg" -eq 1 ]; then
76         mkdir svg
77         root -l -x -q -b  Photon_Characteristics_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"PhotonCharacteristics_Events_Mult\"\,\"kTRUE\"\,\"svg\"\)
78         root -l -x -q -b Plot_Mapping_Histos_Events.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Mapping_Events_Mult\"\,\"kTRUE\"\,\"svg\"\)
79         root -l -x -q -b  Cuts_Events_new.C\(\"$data\"\,\"$mc\"\,\"$2\"\,\"\"\,\"Cuts_Events_Mult\"\,\"kTRUE\"\,\"svg\"\, \"\"\)
80 fi
81
82 rm $mc
83 rm $data
84 rm *.C
85 rm *.h
86
87 cd ..
88 rm *.C
89 rm *.h
90
91
92 cd ..
93 echo Ready with Standard Conversion Analysis
94