5 # argument 1 - path to the aliroot iinitialization script
6 # argument 2 - action argument
7 # see $ALICE_ROOT/TPC/Upgrade/macros/spaceChargeFluctuation.C
8 # if (mode==0) GenerateMapRawIons(arg0);
9 # if (mode==1) DoMerge();
10 # if (mode==2) spaceChargeFluctuationToyMC(arg0,arg1);
11 # argument 3 - according the C++ code
12 #export flucPath=$HOME/AliRoot/TPCdev/TPC/Upgrade/macros
15 aliroot -b -q $flucPath/NimStyle.C $ALICE_ROOT/TPC/Upgrade/macros/spaceChargeFluctuation.C+\($2,$3,$4,$5\)
20 #Example usage hera (here we have 1000 nodes, but no acces to user disk)
21 # (to install aliroot on hera, the best is to use the rsync)
22 # jobs to be submitted form the lxsub0x
23 export baliceTPC=/hera/alice/miranov/.baliceHera
24 export flucPath=$HOME/AliRoot/TPCdev/TPC/Upgrade/macros/
25 export batchCommand="qsub -cwd -V -l h_rt=24:0:0,h_rss=4G "
29 # jobs to be submitted form the lxb1001 or lxb1002
30 #(here we have 80 nodes and user disk)
32 export baliceTPC=/u/miranov/.baliceTPC
33 export flucPath=$HOME/AliRoot/TPCdev/TPC/Upgrade/macros/
34 export batchCommand="qsub -cwd -V "
36 # 0.) sumbmit jobs to process raw data and accumlate space charge
39 prefix="/hera/alice/local/filtered/alice/data/"
41 for a in `tail -n 1900 rawAll.list`; do
42 dname=`echo $a| sed s_"$prefix"__g| sed s_"/"_"\_"_g | sed s_".root"__`
47 $batchCommand -o filter.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 0 0 0
51 # 1.) submit merging jobs example
53 ls `pwd`/*/histo.root | grep -v dirmerge > histo.list
55 split -l 50 -d histo.list merge
56 for a in `ls merge*`; do
58 mv $a dir$a/histo.list
62 for a in `ls -d dirmerge*`; do
64 $batchCommand -o filter.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 1 1 0
70 # 3.) submit fluctuation code analysis
75 for a in `ls -d dirmerge*`; do
77 $batchCommand -o filter.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 3 1000 10
83 # 4.) submit fluctuation code dist scan
85 rm dir*/SpaceCharg*root
90 for a in `ls -d dirmerge* | grep -v dirmergeAll`; do
92 $batchCommand -o filterFluc0.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 0 0
93 $batchCommand -o filterFlucP.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 0 1
94 $batchCommand -o filterFlucM.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 0 2
99 ls $wdir/dirmerge*/fluct*.root| grep -v mergeAll > $wdir/dirmergeAll/fluctuation.list
101 rm dir*/SpaceCharg*root
105 for idir in {0..100}; do
106 mkdir $wdir/dirmergeAll/dir$idir
107 cd $wdir/dirmergeAll/dir$idir
108 cp $wdir/dirmergeAll/fluctuation.list $wdir/dirmergeAll/dir$idir/
109 for i in {0..14..2} ; do
110 $batchCommand -o filterFluc0$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 $i 0
111 $batchCommand -o filterFlucP$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 $i 1
112 $batchCommand -o filterFlucM$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 $i 2
118 # 4.b) submit the code for the epsilon scan
121 cd /hera/alice/miranov/SpaceCharge/Fluctuations/PbPbWithGain
124 ls $wdir/dirmerge*/fluct*.root| grep -v mergeAll > $wdir/dirmergeAll/fluctuation.list
126 for epsilon in {5,10,20}; do
127 #create and clean directories for epsilon
128 mkdirhier $wdir/dirmergeAll/dEpsilon$epsilon
129 rm -rf $wdir/dirmergeAll/dEpsilon$epsilon/*
130 cp $wdir/dirmergeAll/fluctuation.list $wdir/dirmergeAll/dEpsilon$epsilon/
132 #submit epsilon scan jobs
133 for epsilon in {5,10,20}; do # loop over epsilons
134 for idir in {0..40}; do # loop create different random ion pileup frames
135 mkdir $wdir/dirmergeAll/dEpsilon$epsilon/dir$idir
136 cd $wdir/dirmergeAll/dEpsilon$epsilon/dir$idir
137 cp $wdir/dirmergeAll/fluctuation.list $wdir/dirmergeAll/dEpsilon$epsilon/dir$idir/
138 for i in {0..14..2} ; do # specify differnt mulitpliicty of ions in pilepy frame run B0, B+, B-
139 scaling=$(($epsilon/5))
140 $batchCommand -o filterFluc0$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 $scaling $i 0
141 $batchCommand -o filterFlucP$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 $scaling $i 1
142 $batchCommand -o filterFlucM$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 $scaling $i 2
152 # 5.) submit drawing jobs
155 for a in `ls -d dirmerge*`; do
157 $batchCommand -o filterFluc.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 5 0 10000
164 # 6.) make chain files
166 for i in 0 2 4 6 8 10 12 14 ; do
167 ls `pwd`/dir*/SpaceChargeTrackFluc$i\_1.root > track$i\_1.list
168 ls `pwd`/dir*/SpaceChargeTrackFluc$i\_0.root > track$i\_0.list