change library dependencies and paths to the new places of the analysis under PWGGA...
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / macros / start_GammaConversionAnalysis.sh
CommitLineData
baf06eb6 1#! /bin/bash
2#
3#
4#
5# This script gests as input a directory where the AnalysisResults root file is stored
6# , it also needs the desired output directory where the produced root files are put.
7# If nothing is given it will use ./ for the input directory and ./Output for the output
8#
9#Input 1: Root file to analyze (not including the .root) Default: AnalyisResults
10#Input 2: Input directory Default:$PWD
11#Input 3: Output directory Default: $PWD/Output (directory will be created if it does not exist)
12#
13
14RootFile="";
15if [ -n $1 ]; then
16 RootFile=AnalysisResults
17else
18 RootFile=$1
19fi
20
21
22InputDirectory="";
23if [ -n $2 ]; then
24 InputDirectory=$PWD/
25else
26 InputDirectory=$2
27fi
28echo Input directory is $InputDirectory
29
30OutputDirectory="";
31if [ -n $3 ]; then
32 OutputDirectory=$PWD/Output/
33else
34 OutputDirectory=$3
35fi
36
37if [ ! -d $OutputDirectory ]; then
38 mkdir $OutputDirectory
39fi
40echo Output directory is $OutputDirectory
41
42DatFilenameBase=RB-data-AnalysisResults;
43Suffix=gif;
44
45if [ -f $OutputDirectory/$DatFilenameBase.dat ]; then
46 echo Warning: The file RB-data-AnalysisResults.dat exists, please remove before continuing.
47 echo -e "\t Otherwise the file will accumulate more entries than it is supposed to."
48 exit;
49fi
50
51
5fdef45d 52root -b -q $ALICE_ROOT/PWGGA/GammaConv/macros/MakeCutLog.C\(\"$RootFile\"\,\"$InputDirectory\"\,\"$OutputDirectory\"\)
baf06eb6 53
54# Read the different cuts form the Cut selection log file
55exec<"$OutputDirectory/CutSelection.log"
56
57while read cutSelection
58do
59 echo CutSelection is $cutSelection;
5fdef45d 60 root -b -q $ALICE_ROOT/PWGGA/GammaConv/macros/Extract_IntegratedPi0Yield.C\(\"$cutSelection\"\,\"$RootFile\"\,\"$InputDirectory\"\,\"$OutputDirectory\"\"\);
baf06eb6 61
5fdef45d 62 root -b -q $ALICE_ROOT/PWGGA/GammaConv/macros/Extract_Pi0_Characteristics.C\(\"$cutSelection\"\,\"$RootFile\"\,\"$InputDirectory\"\,\"$OutputDirectory\"\);
baf06eb6 63
64done
65
5fdef45d 66 root -b -q $ALICE_ROOT/PWGGA/GammaConv/macros/Plot_IntegratedPi0Yield.C\(\"$DatFilenameBase\"\,\"$OutputDirectory\"\,\"$Suffix\"\)
baf06eb6 67
5fdef45d 68 root -b -q $ALICE_ROOT/PWGGA/GammaConv/macros/Plot_Pi0_Characteristics.C