]>
Commit | Line | Data |
---|---|---|
06f630bb | 1 | //char *gridMode=""; |
2 | char *gridMode = "full"; // "" for local | |
bafab209 | 3 | char *workingDir = "taku_LHC11h_2012_rev1"; |
06f630bb | 4 | TString commonOutputFileName = Form("Results%s",workingDir); |
5 | ||
6 | class AliAnalysisAlien; | |
7 | class AliAnalysisGrid; | |
8 | void runTaku() { | |
9 | ||
10 | ||
11 | // gSystem->Setenv("alien_CLOSE_SE", "ALICE::GSI::SE"); | |
12 | // cout << "alien_CLOSE_SE: " << gSystem->Getenv("alien_CLOSE_SE") << endl; | |
13 | TGrid::Connect("alien://"); | |
14 | ||
15 | ||
16 | TStopwatch timer; timer.Start(); | |
17 | LoadLibraries(); | |
18 | if(gridMode!="") | |
19 | AliAnalysisGrid *alienHandler = CreateAlienHandler(); | |
20 | else { | |
21 | TChain *chain = new TChain("esdTree"); | |
22 | /* | |
23 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169837060.10.root")); | |
24 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169846080.10.root")); | |
25 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169858040.10.root")); | |
26 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169859060.10.root")); | |
27 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169918060.10.root")); | |
28 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169918080.10.root")); | |
29 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169919060.10.root")); | |
30 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169919080.10.root")); | |
31 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169922040.10.root")); | |
32 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169922080.10.root")); | |
33 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169923040.10.root")); | |
34 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169923060.10.root")); | |
35 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169923080.10.root")); | |
36 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169956040.10.root")); | |
37 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169956060.10.root")); | |
38 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169956080.10.root")); | |
39 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169961040.10.root")); | |
40 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169961060.10.root")); | |
41 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169961080.10.root")); | |
42 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169965040.10.root")); | |
43 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169965080.10.root")); | |
44 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169975040.10.root")); | |
45 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169981040.10.root")); | |
46 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169981060.10.root")); | |
47 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000169981080.10.root")); | |
48 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170027040.10.root")); | |
49 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170027060.10.root")); | |
50 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170027080.10.root")); | |
51 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170036060.10.root")); | |
52 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170036080.10.root")); | |
53 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170038040.10.root")); | |
54 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170038060.10.root")); | |
55 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170081080.10.root")); | |
56 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170083040.10.root")); | |
57 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170084040.10.root")); | |
58 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170085060.10.root")); | |
59 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170085080.10.root")); | |
60 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170088040.10.root")); | |
61 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170088080.10.root")); | |
62 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170089040.10.root")); | |
63 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170089060.10.root")); | |
64 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170089080.10.root")); | |
65 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170091060.10.root")); | |
66 | */ | |
67 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170152040.10.root")); | |
68 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170152060.10.root")); | |
69 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170152080.10.root")); | |
70 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170155060.10.root")); | |
71 | /* | |
72 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170155080.10.root")); | |
73 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170163080.10.root")); | |
74 | ||
75 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170193040.10.root")); | |
76 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170193060.10.root")); | |
77 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170193080.10.root")); | |
78 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170195040.10.root")); | |
79 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170195080.10.root")); | |
80 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170204060.10.root")); | |
81 | ||
82 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170205040.10.root")); | |
83 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170205060.10.root")); | |
84 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170205080.10.root")); | |
85 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170207040.10.root")); | |
86 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170207060.10.root")); | |
87 | ||
88 | ||
89 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170208040.10.root")); | |
90 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170208060.10.root")); | |
91 | chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170208080.10.root")); | |
92 | */ | |
93 | //chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170228060.10.root")); | |
94 | ||
95 | //chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170264040.10.root")); | |
96 | //chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170264060.10.root")); | |
97 | //chain->Add( Form("/home/gunji/softwares/data/2011/AliESDs_11000170264080.10.root")); | |
98 | } | |
99 | AliAnalysisManager *mgr = new AliAnalysisManager("DielectronAnalysisManager"); | |
100 | AliESDInputHandler *esdH = new AliESDInputHandler(); | |
101 | mgr->SetInputEventHandler(esdH); | |
102 | if(gridMode!="") | |
103 | mgr->SetGridHandler(alienHandler); | |
104 | gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C"); | |
105 | AddTaskPhysicsSelection(kFALSE); | |
106 | gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C"); | |
107 | AliCentralitySelectionTask *taskCentrality =AddTaskCentrality(); | |
108 | //taskCentrality->SetPass(2); | |
109 | ||
110 | gROOT->LoadMacro("AliDielectronDebugTreeTaku.cxx++"); | |
111 | gROOT->LoadMacro("AliDielectronHistosTaku.cxx++"); | |
112 | gROOT->LoadMacro("AliDielectronTaku.cxx++"); | |
113 | gROOT->LoadMacro("AliAnalysisTaskMultiDielectronNewTaku.cxx++"); | |
114 | ||
115 | LoadAddLibraries(); | |
116 | ||
117 | TString configFile("./ConfigJpsi2eeDataTaku.C"); | |
118 | Bool_t hasMC=(mgr->GetMCtruthEventHandler()!=0x0); | |
119 | if (hasMC){ | |
120 | configFile="$ALICE_ROOT/PWG3/dielectron/macros/ConfigJpsi2eeEff.C"; | |
121 | } | |
122 | gROOT->LoadMacro(configFile.Data()); | |
123 | ||
124 | gROOT->LoadMacro("AddTaskDielectronTaku.C"); | |
125 | ||
126 | ||
127 | ||
128 | AddTaskDielectronTaku( 0, 99, commonOutputFileName.Data(), "CENT1" ); | |
129 | /* | |
130 | AddTaskDielectronTaku( 10, 20, commonOutputFileName.Data(), "CENT2" ); | |
131 | AddTaskDielectronTaku( 20, 30, commonOutputFileName.Data(), "CENT3" ); | |
132 | AddTaskDielectronTaku( 30, 40, commonOutputFileName.Data(), "CENT4" ); | |
133 | AddTaskDielectronTaku( 40, 50, commonOutputFileName.Data(), "CENT5" ); | |
134 | AddTaskDielectronTaku( 50, 60, commonOutputFileName.Data(), "CENT6" ); | |
135 | AddTaskDielectronTaku( 60, 70, commonOutputFileName.Data(), "CENT7" ); | |
136 | AddTaskDielectronTaku( 70, 80, commonOutputFileName.Data(), "CENT8" ); | |
137 | AddTaskDielectronTaku( 80, 99, commonOutputFileName.Data(), "CENT9" ); | |
138 | */ | |
139 | ||
140 | mgr->SetDebugLevel(2); | |
141 | mgr->SetDebugLevel(0); | |
142 | if(!mgr->InitAnalysis()) return; | |
143 | mgr->PrintStatus(); | |
144 | if(gridMode!="") | |
145 | mgr->StartAnalysis("grid"); | |
146 | else | |
147 | mgr->StartAnalysis("local",chain); | |
148 | timer.Stop(); | |
149 | timer.Print(); | |
150 | ||
151 | } | |
152 | ||
153 | AliAnalysisGrid* CreateAlienHandler() { | |
154 | AliAnalysisAlien *plugin = new AliAnalysisAlien(); | |
155 | plugin->SetRunMode(gridMode); | |
156 | plugin->SetNtestFiles(1); | |
157 | plugin->SetAPIVersion("V1.1x"); | |
158 | ||
159 | // plugin->SetROOTVersion("v5-28-00d"); | |
160 | // plugin->SetAliROOTVersion("v4-21-25-AN"); | |
161 | plugin->SetROOTVersion("v5-30-03-1"); | |
162 | plugin->SetAliROOTVersion("v5-01-Rev-19"); | |
163 | plugin->SetRunPrefix("000"); | |
164 | gROOT->LoadMacro("AddRunsPbPb.C"); | |
165 | AddRunsPbPb(plugin); | |
166 | //plugin->AddDataFile("/alice/cern.ch/user/t/tgunji/takuv2c123456_rev2_6/000169554_000169553.xml") | |
167 | //plugin->AddDataFile("/alice/cern.ch/user/t/tgunji/takuv2c123456_rev2_6/000169557_000169555.xml") | |
168 | plugin->SetOutputToRunNo(); | |
169 | plugin->SetGridWorkingDir(workingDir); | |
170 | plugin->SetGridOutputDir("output"); | |
171 | plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWG2/FLOW/AliFlowCommon -I$ALICE_ROOT/PWG2/FLOW/AliFlowTasks -I$ALICE_ROOT/PWG3/dielectron/ -g"); | |
172 | plugin->SetAnalysisSource("AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.cxx AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.cxx"); | |
230b7aff | 173 | // plugin->SetAdditionalLibs("libCORRFW libPWG3base libPWG3dielectron libPWG3hfe libTender libTenderSupplies AliAnalysisTaskMultiDielectronNew.h AliAnalysisTaskMultiDielectronNew.cxx"); |
174 | plugin->SetAdditionalLibs("libCORRFW libPWG3base libPWG3dielectron libPWG3hfe AliDielectronHistosTaku.h AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.h AliDielectronDebugTreeTaku.cxx AliDielectronTaku.h AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.h AliAnalysisTaskMultiDielectronNewTaku.cxx"); | |
06f630bb | 175 | plugin->SetDefaultOutputs(kTRUE); |
176 | plugin->SetAnalysisMacro(Form("%s.C",workingDir)); | |
177 | plugin->SetExecutable(Form("%s.sh",workingDir)); | |
178 | plugin->SetSplitMaxInputFileNumber(50); | |
179 | plugin->SetOverwriteMode(kTRUE); | |
180 | plugin->SetMaxInitFailed(20); | |
181 | plugin->SetTTL(90000); | |
182 | plugin->SetOutputToRunNo(kTRUE); | |
183 | plugin->SetMasterResubmitThreshold(90); | |
184 | plugin->SetInputFormat("xml-single"); | |
185 | plugin->SetJDLName(Form("%s.jdl",workingDir)); | |
186 | plugin->SetPrice(1); | |
187 | plugin->SetSplitMode("se"); | |
188 | plugin->SetKeepLogs(kTRUE); | |
189 | plugin->SetExecutableCommand("aliroot -b -q "); | |
190 | return plugin; | |
191 | } | |
192 | ||
193 | void LoadLibraries() | |
194 | { | |
195 | gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/build/include -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWG2/FLOW/AliFlowCommon -I$ALICE_ROOT/PWG2/FLOW/AliFlowTasks -I$ALICE_ROOT/PWG3/dielectron/ -g"); | |
196 | gSystem->Load("libCore");// no | |
197 | gSystem->Load("libTree"); | |
198 | gSystem->Load("libGeom"); | |
199 | gSystem->Load("libVMC"); | |
200 | gSystem->Load("libXMLIO");// no | |
201 | gSystem->Load("libPhysics"); | |
202 | gSystem->Load("libXMLParser"); | |
203 | gSystem->Load("libProof"); | |
204 | gSystem->Load("libMinuit"); | |
205 | ||
206 | gSystem->Load("libSTEERBase"); | |
207 | gSystem->Load("libCDB"); | |
208 | gSystem->Load("libRAWDatabase"); | |
209 | gSystem->Load("libRAWDatarec"); | |
210 | gSystem->Load("libESD"); | |
211 | gSystem->Load("libAOD"); | |
212 | gSystem->Load("libSTEER"); | |
213 | gSystem->Load("libANALYSIS"); | |
214 | gSystem->Load("libANALYSISalice"); | |
215 | gSystem->Load("libTOFbase"); | |
216 | gSystem->Load("libTOFrec"); | |
217 | gSystem->Load("libT0base"); | |
218 | gSystem->Load("libT0rec"); | |
219 | gSystem->Load("libPWG2flowCommon"); | |
220 | gSystem->Load("libPWG2flowTasks"); | |
221 | ||
230b7aff | 222 | gSystem->Load("libTender"); |
223 | gSystem->Load("libTenderSupplies"); | |
06f630bb | 224 | |
225 | ||
226 | ||
230b7aff | 227 | gSystem->Load("libCORRFW"); |
228 | gSystem->Load("libPWG3base"); | |
229 | gSystem->Load("libPWG3dielectron"); | |
230 | gSystem->Load("libPWG3hfe"); | |
06f630bb | 231 | |
232 | } | |
233 | ||
234 | void LoadAddLibraries(){ | |
b0635849 | 235 | gSystem->Load("./AliDielectronHistosTaku_cxx"); |
236 | gSystem->Load("./AliDielectronDebugTreeTaku_cxx"); | |
237 | gSystem->Load("./AliDielectronTaku_cxx"); | |
06f630bb | 238 | |
239 | ||
240 | } |