4 # argument 1 - path to the aliroot iinitialization script
5 # argument 2 - action argument
6 # see $ALICE_ROOT/TPC/Upgrade/macros/spaceChargeFluctuation.C
7 # if (mode==0) GenerateMapRawIons(arg0);
8 # if (mode==1) DoMerge();
9 # if (mode==2) spaceChargeFluctuationToyMC(arg0,arg1);
10 # argument 3 - according the C++ code
11 export flucPath=$HOME/AliRoot/TPCdev/TPC/Upgrade/macros
14 aliroot -b -q $HOME/NimStyle.C $ALICE_ROOT/TPC/Upgrade/macros/spaceChargeFluctuation.C+\($2,$3,$4,$5\)
19 #Example usage hera (here we have 1000 nodes, but no acces to user disk)
20 # (to install aliroot on hera, the best is to use the rsync)
21 # jobs to be submitted form the lxsub0x
22 export baliceTPC=/hera/alice/miranov/.baliceHera
23 export flucPath=$HOME/AliRoot/TPCdev/TPC/Upgrade/macros/
24 export batchCommand="qsub -cwd -l h_rt=24:0:0,h_rss=4G "
28 # jobs to be submitted form the lxb1001 or lxb1002
29 #(here we have 80 nodes and user disk)
31 export baliceTPC=/u/miranov/.baliceTPC
32 export flucPath=$HOME/AliRoot/TPCdev/TPC/Upgrade/macros/
33 export batchCommand="qsub -cwd "
35 # 0.) sumbmit jobs to process raw data and accumlate space charge
38 prefix="/hera/alice/local/filtered/alice/data/"
40 for a in `tail -n 1900 rawAll.list`; do
41 dname=`echo $a| sed s_"$prefix"__g| sed s_"/"_"\_"_g | sed s_".root"__`
46 $batchCommand -o filter.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 0 0 0
50 # 1.) submit merging jobs example
52 ls `pwd`/*/histo.root | grep -v dirmerge > histo.list
54 split -l 50 -d histo.list merge
55 for a in `ls merge*`; do
57 mv $a dir$a/histo.list
61 for a in `ls -d dirmerge*`; do
63 $batchCommand -o filter.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 1 1 0
69 # 3.) submit fluctuation code analysis
74 for a in `ls -d dirmerge*`; do
76 $batchCommand -o filter.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 3 1000 10
82 # 4.) submit fluctuation code dist scan
84 rm dir*/SpaceCharg*root
89 for a in `ls -d dirmerge* | grep -v dirmergeAll`; do
91 $batchCommand -o filterFluc0.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 0 0
92 $batchCommand -o filterFlucP.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 0 1
93 $batchCommand -o filterFlucM.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 0 2
98 ls $wdir/dirmerge*/fluct*.root| grep -v mergeAll > $wdir/dirmergeAll/fluctuation.list
100 rm dir*/SpaceCharg*root
104 for idir in {0..100}; do
105 mkdir $wdir/dirmergeAll/dir$idir
106 cd $wdir/dirmergeAll/dir$idir
107 cp $wdir/dirmergeAll/fluctuation.list $wdir/dirmergeAll/dir$idir/
108 for i in {0..14..2} ; do
109 $batchCommand -o filterFluc0$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 $i 0
110 $batchCommand -o filterFlucP$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 $i 1
111 $batchCommand -o filterFlucM$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 1 $i 2
117 # 4.b) submit the code for the epsilon scan
120 cd /hera/alice/miranov/SpaceCharge/Fluctuations/PbPbWithGain
123 ls $wdir/dirmerge*/fluct*.root| grep -v mergeAll > $wdir/dirmergeAll/fluctuation.list
125 for epsilon in {5,10,20}; do
126 #create and clean directories for epsilon
127 mkdirhier $wdir/dirmergeAll/dEpsilon$epsilon
128 rm -rf $wdir/dirmergeAll/dEpsilon$epsilon/*
129 cp $wdir/dirmergeAll/fluctuation.list $wdir/dirmergeAll/dEpsilon$epsilon/
131 #submit epsilon scan jobs
132 for epsilon in {5,10,20}; do # loop over epsilons
133 for idir in {0..40}; do # loop create different random ion pileup frames
134 mkdir $wdir/dirmergeAll/dEpsilon$epsilon/dir$idir
135 cd $wdir/dirmergeAll/dEpsilon$epsilon/dir$idir
136 cp $wdir/dirmergeAll/fluctuation.list $wdir/dirmergeAll/dEpsilon$epsilon/dir$idir/
137 for i in {0..14..2} ; do # specify differnt mulitpliicty of ions in pilepy frame run B0, B+, B-
138 scaling=$(($epsilon/5))
139 $batchCommand -o filterFluc0$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 $scaling $i 0
140 $batchCommand -o filterFlucP$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 $scaling $i 1
141 $batchCommand -o filterFlucM$i.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 4 $scaling $i 2
151 # 5.) submit drawing jobs
154 for a in `ls -d dirmerge*`; do
156 $batchCommand -o filterFluc.log $flucPath/spaceChargeFluctuation.sh $baliceTPC 5 0 10000
163 # 6.) make chain files
165 for i in 0 2 4 6 8 10 12 14 ; do
166 ls `pwd`/dir*/SpaceChargeTrackFluc$i\_1.root > track$i\_1.list
167 ls `pwd`/dir*/SpaceChargeTrackFluc$i\_0.root > track$i\_0.list