]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////////// | |
2 | // | |
3 | // HOW TO USE THIS MACRO: | |
4 | // | |
5 | // With this macro several flow analysis can be run. | |
6 | // SP = Scalar Product (for PbPb or pp) | |
7 | // LYZ1 = Lee Yang Zeroes first run (for PbPb) | |
8 | // LYZ2 = Lee Yang Zeroes second run (for PbPb) | |
9 | // LYZEP = Lee Yang Zeroes Event Plane (for PbPb) | |
10 | // GFC = Cumulants (for PbPb) | |
11 | // QC = Q-cumulants (for PbPb or pp) | |
12 | // FQD = Fitting q-distribution (for PbPb) | |
13 | // MCEP = Flow calculated from the real MC event plane (for PbPb only) | |
14 | // | |
15 | // The LYZ analysis should be done in the following order; | |
16 | // LYZ1 -> LYZ2 -> LYZEP, | |
17 | // because LYZ2 depends on the outputfile of LYZ1 and LYZEP on the outputfile | |
18 | // of LYZ2. | |
19 | // | |
20 | // The MCEP method is a reference method. | |
21 | // It can only be run when MC information (kinematics.root & galice.root file) | |
22 | // is available in which the reaction plane is stored. | |
23 | // | |
24 | // One can run on ESD, AOD or MC. | |
25 | // Additional options are ESDMC0, ESDMC1. In these options the ESD and MC | |
26 | // information is combined. Tracks are selected in the ESD, the PID information | |
27 | // is taken from the MC (perfect PID). For ESDMC0 the track kinematics is taken | |
28 | // from the ESD and for ESDMC1 it is taken from the MC information. | |
29 | // | |
30 | /////////////////////////////////////////////////////////////////////////////////// | |
31 | ||
32 | ||
33 | // RUN SETTINGS | |
34 | ||
35 | // Flow analysis method can be:(set to kTRUE or kFALSE) | |
36 | Bool_t SP = kTRUE; | |
37 | Bool_t LYZ1 = kTRUE; | |
38 | Bool_t LYZ2 = kFALSE; | |
39 | Bool_t LYZEP = kFALSE; | |
40 | Bool_t GFC = kTRUE; | |
41 | Bool_t QC = kTRUE; | |
42 | Bool_t FQD = kTRUE; | |
43 | Bool_t MCEP = kTRUE; | |
44 | ||
45 | // Analysis type can be ESD, AOD, MC, ESDMC0, ESDMC1 | |
46 | const TString type = "ESD"; | |
47 | ||
48 | // Boolean to fill/not fill the QA histograms | |
49 | Bool_t QA = kFALSE; | |
50 | ||
51 | // Weights | |
52 | //Use weights for Q vector | |
53 | Bool_t usePhiWeights = kFALSE; //Phi | |
54 | Bool_t usePtWeights = kFALSE; //v'(pt) | |
55 | Bool_t useEtaWeights = kFALSE; //v'(eta) | |
56 | Bool_t useWeights = usePhiWeights||usePtWeights||useEtaWeights; | |
57 | ||
58 | ||
59 | // SETTING THE CUTS | |
60 | ||
61 | // For integrated flow | |
62 | const Double_t ptmin1 = 0.0; | |
63 | const Double_t ptmax1 = 10.0; | |
64 | const Double_t ymin1 = -1.; | |
65 | const Double_t ymax1 = 1.; | |
66 | const Int_t mintrackrefsTPC1 = 2; | |
67 | const Int_t mintrackrefsITS1 = 3; | |
68 | const Int_t charge1 = 1; | |
69 | Bool_t UsePIDIntegratedFlow = kFALSE; | |
70 | const Int_t PDG1 = 211; | |
71 | const Int_t minclustersTPC1 = 50; | |
72 | const Int_t maxnsigmatovertex1 = 3; | |
73 | ||
74 | // For differential flow | |
75 | const Double_t ptmin2 = 0.0; | |
76 | const Double_t ptmax2 = 10.0; | |
77 | const Double_t ymin2 = -1.; | |
78 | const Double_t ymax2 = 1.; | |
79 | const Int_t mintrackrefsTPC2 = 2; | |
80 | const Int_t mintrackrefsITS2 = 3; | |
81 | const Int_t charge2 = 1; | |
82 | Bool_t UsePIDDifferentialFlow = kFALSE; | |
83 | const Int_t PDG2 = 211; | |
84 | const Int_t minclustersTPC2 = 50; | |
85 | const Int_t maxnsigmatovertex2 = 3; | |
86 | ||
87 | //ESD (pp) | |
88 | //void runProofFlow(const Char_t* data="/COMMON/COMMON/LHC08c11_10TeV_0.5T", Int_t nRuns=-1, Int_t offset=0) { | |
89 | //void runProofFlow(const Char_t* data="/COMMON/COMMON/LHC08c18_0.9TeV_0T_Phojet", Int_t nRuns=-1, Int_t offset=0) { | |
90 | ||
91 | //ESD (therminator) | |
92 | //void runProofFlow(const Char_t* data="/PWG2/akisiel/Therminator_midcentral_ESD", Int_t nRuns=-1, Int_t offset=0) { | |
93 | ||
94 | void runProofFlow(const Char_t* data="/PWG2/akisiel/Therminator_c2030", Int_t nRuns=-1, Int_t offset=0) { | |
95 | //void runProofFlow(const Char_t* data="/PWG2/akisiel/Therminator_central", Int_t nRuns=-1, Int_t offset=0) { | |
96 | //void runProofFlow(const Char_t* data="/PWG2/akisiel/Therminator_midcentral", Int_t nRuns=-1, Int_t offset=0) { | |
97 | ||
98 | //AOD | |
99 | //void runProofFlow(const Char_t* data="/PWG2/nkolk/myDataSet", Int_t nRuns=-1, Int_t offset=0) { | |
100 | //void runProofFlow(const Char_t* data="/PWG2/akisiel/Therminator_midcentral_AOD", Int_t nRuns=44, Int_t offset=0) { | |
101 | ||
102 | TStopwatch timer; | |
103 | timer.Start(); | |
104 | ||
105 | if (LYZ1 && LYZ2) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(); } | |
106 | if (LYZ2 && LYZEP) {cout<<"WARNING: you cannot run LYZ2 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); } | |
107 | if (LYZ1 && LYZEP) {cout<<"WARNING: you cannot run LYZ1 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); } | |
108 | ||
109 | // set to debug root versus if needed | |
110 | // TProof::Mgr("alicecaf")->SetROOTVersion("v5-21-01-alice_dbg"); | |
111 | // TProof::Mgr("alicecaf")->SetROOTVersion("v5-21-01-alice"); | |
112 | ||
113 | printf("*** Connect to PROOF ***\n"); | |
114 | // TProof::Open("abilandz@alicecaf.cern.ch"); | |
115 | TProof::Open("snelling@localhost"); | |
116 | ||
117 | //gProof->UploadPackage("AF-v4-15"); | |
118 | //gProof->EnablePackage("AF-v4-15"); | |
119 | gProof->UploadPackage("STEERBase.par"); | |
120 | gProof->EnablePackage("STEERBase"); | |
121 | gProof->UploadPackage("ESD.par"); | |
122 | gProof->EnablePackage("ESD"); | |
123 | gProof->UploadPackage("AOD.par"); | |
124 | gProof->EnablePackage("AOD"); | |
125 | gProof->UploadPackage("ANALYSIS.par"); | |
126 | gProof->EnablePackage("ANALYSIS"); | |
127 | gProof->UploadPackage("ANALYSISalice.par"); | |
128 | gProof->EnablePackage("ANALYSISalice"); | |
129 | gProof->UploadPackage("PWG2AOD.par"); | |
130 | gProof->EnablePackage("PWG2AOD"); | |
131 | gProof->ClearPackage("CORRFW.par"); | |
132 | gProof->UploadPackage("CORRFW.par"); | |
133 | gProof->EnablePackage("CORRFW"); | |
134 | gProof->ClearPackage("PWG2flowCommon"); | |
135 | gProof->UploadPackage("PWG2flowCommon.par"); | |
136 | gProof->EnablePackage("PWG2flowCommon"); | |
137 | gProof->ClearPackage("PWG2flowTasks"); | |
138 | gProof->UploadPackage("PWG2flowTasks.par"); | |
139 | gProof->EnablePackage("PWG2flowTasks"); | |
140 | ||
141 | ||
142 | //____________________________________________// | |
143 | //Create cuts using correction framework | |
144 | ||
145 | //Set TList for the QA histograms | |
146 | if (QA) { | |
147 | if (SP){ | |
148 | TList* qaIntSP = new TList(); | |
149 | TList* qaDiffSP = new TList(); } | |
150 | if (LYZ1) { | |
151 | TList* qaIntLYZ1 = new TList(); | |
152 | TList* qaDiffLYZ1 = new TList(); } | |
153 | if (LYZ2) { | |
154 | TList* qaIntLYZ2 = new TList(); | |
155 | TList* qaDiffLYZ2 = new TList(); } | |
156 | if (LYZEP) { | |
157 | TList* qaIntLYZEP = new TList(); | |
158 | TList* qaDiffLYZEP = new TList(); } | |
159 | if (GFC) { | |
160 | TList* qaIntGFC = new TList(); | |
161 | TList* qaDiffGFC = new TList(); } | |
162 | if (QC) { | |
163 | TList* qaIntQC = new TList(); | |
164 | TList* qaDiffQC = new TList(); } | |
165 | if (FQD) { | |
166 | TList* qaIntFQD = new TList(); | |
167 | TList* qaDiffFQD = new TList(); } | |
168 | if (MCEP) { | |
169 | TList* qaIntMCEP = new TList(); | |
170 | TList* qaDiffMCEP = new TList(); } | |
171 | } | |
172 | ||
173 | //############# cuts on MC | |
174 | AliCFTrackKineCuts* mcKineCuts1 = new AliCFTrackKineCuts("mcKineCuts1","MC-level kinematic cuts"); | |
175 | mcKineCuts1->SetPtRange(ptmin1,ptmax1); | |
176 | mcKineCuts1->SetRapidityRange(ymin1,ymax1); | |
177 | mcKineCuts1->SetChargeMC(charge1); | |
178 | if (QA) { | |
179 | if (SP) { mcKineCuts1->SetQAOn(qaIntSP); } | |
180 | if (LYZ1) { mcKineCuts1->SetQAOn(qaIntLYZ1); } | |
181 | if (LYZ2) { mcKineCuts1->SetQAOn(qaIntLYZ2); } | |
182 | if (LYZEP){ mcKineCuts1->SetQAOn(qaIntLYZEP); } | |
183 | if (GFC) { mcKineCuts1->SetQAOn(qaIntGFC); } | |
184 | if (QC) { mcKineCuts1->SetQAOn(qaIntQC); } | |
185 | if (FQD) { mcKineCuts1->SetQAOn(qaIntFQD); } | |
186 | if (MCEP) { mcKineCuts1->SetQAOn(qaIntMCEP); } | |
187 | } | |
188 | ||
189 | AliCFTrackKineCuts* mcKineCuts2 = new AliCFTrackKineCuts("mcKineCuts2","MC-level kinematic cuts"); | |
190 | mcKineCuts2->SetPtRange(ptmin2,ptmax2); | |
191 | mcKineCuts2->SetRapidityRange(ymin2,ymax2); | |
192 | mcKineCuts2->SetChargeMC(charge2); | |
193 | if (QA) { | |
194 | if (SP) { mcKineCuts2->SetQAOn(qaDiffSP); } | |
195 | if (LYZ1) { mcKineCuts2->SetQAOn(qaDiffLYZ1); } | |
196 | if (LYZ2) { mcKineCuts2->SetQAOn(qaDiffLYZ2); } | |
197 | if (LYZEP){ mcKineCuts2->SetQAOn(qaDiffLYZEP); } | |
198 | if (GFC) { mcKineCuts2->SetQAOn(qaDiffGFC); } | |
199 | if (QC) { mcKineCuts2->SetQAOn(qaDiffQC); } | |
200 | if (FQD) { mcKineCuts2->SetQAOn(qaDiffFQD); } | |
201 | if (MCEP) { mcKineCuts2->SetQAOn(qaDiffMCEP); } | |
202 | } | |
203 | ||
204 | AliCFParticleGenCuts* mcGenCuts1 = new AliCFParticleGenCuts("mcGenCuts1","MC particle generation cuts for integrated flow"); | |
205 | mcGenCuts1->SetRequireIsPrimary(); | |
206 | if (UsePIDIntegratedFlow) {mcGenCuts1->SetRequirePdgCode(PDG1);} | |
207 | if (QA) { | |
208 | if (SP) { mcGenCuts1->SetQAOn(qaIntSP); } | |
209 | if (LYZ1) { mcGenCuts1->SetQAOn(qaIntLYZ1); } | |
210 | if (LYZ2) { mcGenCuts1->SetQAOn(qaIntLYZ2); } | |
211 | if (LYZEP){ mcGenCuts1->SetQAOn(qaIntLYZEP); } | |
212 | if (GFC) { mcGenCuts1->SetQAOn(qaIntGFC); } | |
213 | if (QC) { mcGenCuts1->SetQAOn(qaIntQC); } | |
214 | if (FQD) { mcGenCuts1->SetQAOn(qaIntFQD); } | |
215 | if (MCEP) { mcGenCuts1->SetQAOn(qaIntMCEP); } | |
216 | } | |
217 | ||
218 | AliCFParticleGenCuts* mcGenCuts2 = new AliCFParticleGenCuts("mcGenCuts2","MC particle generation cuts for differential flow"); | |
219 | mcGenCuts2->SetRequireIsPrimary(); | |
220 | if (UsePIDDifferentialFlow) {mcGenCuts2->SetRequirePdgCode(PDG2);} | |
221 | if (QA) { | |
222 | if (SP) { mcGenCuts2->SetQAOn(qaDiffSP); } | |
223 | if (LYZ1) { mcGenCuts2->SetQAOn(qaDiffLYZ1); } | |
224 | if (LYZ2) { mcGenCuts2->SetQAOn(qaDiffLYZ2); } | |
225 | if (LYZEP){ mcGenCuts2->SetQAOn(qaDiffLYZEP); } | |
226 | if (GFC) { mcGenCuts2->SetQAOn(qaDiffGFC); } | |
227 | if (QC) { mcGenCuts2->SetQAOn(qaDiffQC); } | |
228 | if (FQD) { mcGenCuts2->SetQAOn(qaDiffFQD); } | |
229 | if (MCEP) { mcGenCuts2->SetQAOn(qaDiffMCEP); } | |
230 | } | |
231 | ||
232 | //############# Acceptance Cuts | |
233 | AliCFAcceptanceCuts *mcAccCuts1 = new AliCFAcceptanceCuts("mcAccCuts1","MC acceptance cuts"); | |
234 | mcAccCuts1->SetMinNHitITS(mintrackrefsITS1); | |
235 | mcAccCuts1->SetMinNHitTPC(mintrackrefsTPC1); | |
236 | if (QA) { | |
237 | if (SP) { mcAccCuts1->SetQAOn(qaIntSP); } | |
238 | if (LYZ1) { mcAccCuts1->SetQAOn(qaIntLYZ1); } | |
239 | if (LYZ2) { mcAccCuts1->SetQAOn(qaIntLYZ2); } | |
240 | if (LYZEP){ mcAccCuts1->SetQAOn(qaIntLYZEP); } | |
241 | if (GFC) { mcAccCuts1->SetQAOn(qaIntGFC); } | |
242 | if (QC) { mcAccCuts1->SetQAOn(qaIntQC); } | |
243 | if (FQD) { mcAccCuts1->SetQAOn(qaIntFQD); } | |
244 | if (MCEP) { mcAccCuts1->SetQAOn(qaIntMCEP); } | |
245 | } | |
246 | ||
247 | AliCFAcceptanceCuts *mcAccCuts2 = new AliCFAcceptanceCuts("mcAccCuts2","MC acceptance cuts"); | |
248 | mcAccCuts2->SetMinNHitITS(mintrackrefsITS2); | |
249 | mcAccCuts2->SetMinNHitTPC(mintrackrefsTPC2); | |
250 | if (QA) { | |
251 | if (SP) { mcAccCuts2->SetQAOn(qaDiffSP); } | |
252 | if (LYZ1) { mcAccCuts2->SetQAOn(qaDiffLYZ1); } | |
253 | if (LYZ2) { mcAccCuts2->SetQAOn(qaDiffLYZ2); } | |
254 | if (LYZEP){ mcAccCuts2->SetQAOn(qaDiffLYZEP); } | |
255 | if (GFC) { mcAccCuts2->SetQAOn(qaDiffGFC); } | |
256 | if (QC) { mcAccCuts2->SetQAOn(qaDiffQC); } | |
257 | if (FQD) { mcAccCuts2->SetQAOn(qaDiffFQD); } | |
258 | if (MCEP) { mcAccCuts2->SetQAOn(qaDiffMCEP); } | |
259 | } | |
260 | ||
261 | //############# Rec-Level kinematic cuts | |
262 | AliCFTrackKineCuts *recKineCuts1 = new AliCFTrackKineCuts("recKineCuts1","rec-level kine cuts"); | |
263 | recKineCuts1->SetPtRange(ptmin1,ptmax1); | |
264 | recKineCuts1->SetRapidityRange(ymin1,ymax1); | |
265 | recKineCuts1->SetChargeRec(charge1); | |
266 | if (QA) { | |
267 | if (SP) { recKineCuts1->SetQAOn(qaIntSP); } | |
268 | if (LYZ1) { recKineCuts1->SetQAOn(qaIntLYZ1); } | |
269 | if (LYZ2) { recKineCuts1->SetQAOn(qaIntLYZ2); } | |
270 | if (LYZEP){ recKineCuts1->SetQAOn(qaIntLYZEP); } | |
271 | if (GFC) { recKineCuts1->SetQAOn(qaIntGFC); } | |
272 | if (QC) { recKineCuts1->SetQAOn(qaIntQC); } | |
273 | if (FQD) { recKineCuts1->SetQAOn(qaIntFQD); } | |
274 | if (MCEP) { recKineCuts1->SetQAOn(qaIntMCEP); } | |
275 | } | |
276 | ||
277 | AliCFTrackKineCuts *recKineCuts2 = new AliCFTrackKineCuts("recKineCuts2","rec-level kine cuts"); | |
278 | recKineCuts2->SetPtRange(ptmin2,ptmax2); | |
279 | recKineCuts2->SetRapidityRange(ymin2,ymax2); | |
280 | recKineCuts2->SetChargeRec(charge2); | |
281 | if (QA) { | |
282 | if (SP) { recKineCuts2->SetQAOn(qaDiffSP); } | |
283 | if (LYZ1) { recKineCuts2->SetQAOn(qaDiffLYZ1); } | |
284 | if (LYZ2) { recKineCuts2->SetQAOn(qaDiffLYZ2); } | |
285 | if (LYZEP){ recKineCuts2->SetQAOn(qaDiffLYZEP); } | |
286 | if (GFC) { recKineCuts2->SetQAOn(qaDiffGFC); } | |
287 | if (QC) { recKineCuts2->SetQAOn(qaDiffQC); } | |
288 | if (FQD) { recKineCuts2->SetQAOn(qaDiffFQD); } | |
289 | if (MCEP) { recKineCuts2->SetQAOn(qaDiffMCEP); } | |
290 | } | |
291 | ||
292 | AliCFTrackQualityCuts *recQualityCuts1 = new AliCFTrackQualityCuts("recQualityCuts1","rec-level quality cuts"); | |
293 | recQualityCuts1->SetMinNClusterTPC(minclustersTPC1); | |
294 | recQualityCuts1->SetStatus(AliESDtrack::kITSrefit); | |
295 | if (QA) { | |
296 | if (SP) { recQualityCuts1->SetQAOn(qaIntSP); } | |
297 | if (LYZ1) { recQualityCuts1->SetQAOn(qaIntLYZ1); } | |
298 | if (LYZ2) { recQualityCuts1->SetQAOn(qaIntLYZ2); } | |
299 | if (LYZEP){ recQualityCuts1->SetQAOn(qaIntLYZEP); } | |
300 | if (GFC) { recQualityCuts1->SetQAOn(qaIntGFC); } | |
301 | if (QC) { recQualityCuts1->SetQAOn(qaIntQC); } | |
302 | if (FQD) { recQualityCuts1->SetQAOn(qaIntFQD); } | |
303 | if (MCEP) { recQualityCuts1->SetQAOn(qaIntMCEP); } | |
304 | } | |
305 | ||
306 | AliCFTrackQualityCuts *recQualityCuts2 = new AliCFTrackQualityCuts("recQualityCuts2","rec-level quality cuts"); | |
307 | recQualityCuts2->SetMinNClusterTPC(minclustersTPC2); | |
308 | recQualityCuts2->SetStatus(AliESDtrack::kITSrefit); | |
309 | if (QA) { | |
310 | if (SP) { recQualityCuts2->SetQAOn(qaDiffSP); } | |
311 | if (LYZ1) { recQualityCuts2->SetQAOn(qaDiffLYZ1); } | |
312 | if (LYZ2) { recQualityCuts2->SetQAOn(qaDiffLYZ2); } | |
313 | if (LYZEP){ recQualityCuts2->SetQAOn(qaDiffLYZEP); } | |
314 | if (GFC) { recQualityCuts2->SetQAOn(qaDiffGFC); } | |
315 | if (QC) { recQualityCuts2->SetQAOn(qaDiffQC); } | |
316 | if (FQD) { recQualityCuts2->SetQAOn(qaDiffFQD); } | |
317 | if (MCEP) { recQualityCuts2->SetQAOn(qaDiffMCEP); } | |
318 | } | |
319 | ||
320 | AliCFTrackIsPrimaryCuts *recIsPrimaryCuts1 = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts1","rec-level isPrimary cuts"); | |
321 | recIsPrimaryCuts1->SetMaxNSigmaToVertex(maxnsigmatovertex1); | |
322 | if (QA) { | |
323 | if (SP) { recIsPrimaryCuts1->SetQAOn(qaIntSP); } | |
324 | if (LYZ1) { recIsPrimaryCuts1->SetQAOn(qaIntLYZ1); } | |
325 | if (LYZ2) { recIsPrimaryCuts1->SetQAOn(qaIntLYZ2); } | |
326 | if (LYZEP){ recIsPrimaryCuts1->SetQAOn(qaIntLYZEP); } | |
327 | if (GFC) { recIsPrimaryCuts1->SetQAOn(qaIntGFC); } | |
328 | if (QC) { recIsPrimaryCuts1->SetQAOn(qaIntQC); } | |
329 | if (FQD) { recIsPrimaryCuts1->SetQAOn(qaIntFQD); } | |
330 | if (MCEP) { recIsPrimaryCuts1->SetQAOn(qaIntMCEP); } | |
331 | } | |
332 | ||
333 | AliCFTrackIsPrimaryCuts *recIsPrimaryCuts2 = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts2","rec-level isPrimary cuts"); | |
334 | recIsPrimaryCuts2->SetMaxNSigmaToVertex(maxnsigmatovertex2); | |
335 | if (QA) { | |
336 | if (SP) { recIsPrimaryCuts2->SetQAOn(qaDiffSP); } | |
337 | if (LYZ1) { recIsPrimaryCuts2->SetQAOn(qaDiffLYZ1); } | |
338 | if (LYZ2) { recIsPrimaryCuts2->SetQAOn(qaDiffLYZ2); } | |
339 | if (LYZEP){ recIsPrimaryCuts2->SetQAOn(qaDiffLYZEP); } | |
340 | if (GFC) { recIsPrimaryCuts2->SetQAOn(qaDiffGFC); } | |
341 | if (QC) { recIsPrimaryCuts2->SetQAOn(qaDiffQC); } | |
342 | if (FQD) { recIsPrimaryCuts2->SetQAOn(qaDiffFQD); } | |
343 | if (MCEP) { recIsPrimaryCuts2->SetQAOn(qaDiffMCEP); } | |
344 | } | |
345 | ||
346 | int n_species = AliPID::kSPECIES ; | |
347 | Double_t* prior = new Double_t[n_species]; | |
348 | ||
349 | prior[0] = 0.0244519 ; | |
350 | prior[1] = 0.0143988 ; | |
351 | prior[2] = 0.805747 ; | |
352 | prior[3] = 0.0928785 ; | |
353 | prior[4] = 0.0625243 ; | |
354 | ||
355 | AliCFTrackCutPid* cutPID1 = NULL; | |
356 | if(UsePIDIntegratedFlow) { | |
357 | AliCFTrackCutPid* cutPID1 = new AliCFTrackCutPid("cutPID1","ESD_PID for integrated flow") ; | |
358 | cutPID1->SetPriors(prior); | |
359 | cutPID1->SetProbabilityCut(0.0); | |
360 | cutPID1->SetDetectors("TPC TOF"); | |
361 | switch(TMath::Abs(PDG1)) { | |
362 | case 11 : cutPID1->SetParticleType(AliPID::kElectron, kTRUE); break; | |
363 | case 13 : cutPID1->SetParticleType(AliPID::kMuon , kTRUE); break; | |
364 | case 211 : cutPID1->SetParticleType(AliPID::kPion , kTRUE); break; | |
365 | case 321 : cutPID1->SetParticleType(AliPID::kKaon , kTRUE); break; | |
366 | case 2212 : cutPID1->SetParticleType(AliPID::kProton , kTRUE); break; | |
367 | default : printf("UNDEFINED PID\n"); break; | |
368 | } | |
369 | if (QA) { | |
370 | if (SP) {cutPID1->SetQAOn(qaIntSP);} | |
371 | if (LYZ1) {cutPID1->SetQAOn(qaIntLYZ1);} | |
372 | if (LYZ2) {cutPID1->SetQAOn(qaIntLYZ2);} | |
373 | if (LYZEP){cutPID1->SetQAOn(qaIntLYZEP);} | |
374 | if (GFC) {cutPID1->SetQAOn(qaIntGFC);} | |
375 | if (QC) {cutPID1->SetQAOn(qaIntQC);} | |
376 | if (FQD) {cutPID1->SetQAOn(qaIntFQD);} | |
377 | if (MCEP) {cutPID1->SetQAOn(qaIntMCEP);} | |
378 | } | |
379 | } | |
380 | ||
381 | AliCFTrackCutPid* cutPID2 = NULL; | |
382 | if (UsePIDDifferentialFlow) { | |
383 | AliCFTrackCutPid* cutPID2 = new AliCFTrackCutPid("cutPID2","ESD_PID for differential flow") ; | |
384 | cutPID2->SetPriors(prior); | |
385 | cutPID2->SetProbabilityCut(0.0); | |
386 | cutPID2->SetDetectors("TPC TOF"); | |
387 | switch(TMath::Abs(PDG2)) { | |
388 | case 11 : cutPID2->SetParticleType(AliPID::kElectron, kTRUE); break; | |
389 | case 13 : cutPID2->SetParticleType(AliPID::kMuon , kTRUE); break; | |
390 | case 211 : cutPID2->SetParticleType(AliPID::kPion , kTRUE); break; | |
391 | case 321 : cutPID2->SetParticleType(AliPID::kKaon , kTRUE); break; | |
392 | case 2212 : cutPID2->SetParticleType(AliPID::kProton , kTRUE); break; | |
393 | default : printf("UNDEFINED PID\n"); break; | |
394 | } | |
395 | if (QA) { | |
396 | if (SP) {cutPID2->SetQAOn(qaIntSP);} | |
397 | if (LYZ1) {cutPID2->SetQAOn(qaIntLYZ1);} | |
398 | if (LYZ2) {cutPID2->SetQAOn(qaIntLYZ2);} | |
399 | if (LYZEP){cutPID2->SetQAOn(qaIntLYZEP);} | |
400 | if (GFC) {cutPID2->SetQAOn(qaIntGFC);} | |
401 | if (QC) {cutPID2->SetQAOn(qaIntQC);} | |
402 | if (FQD) {cutPID2->SetQAOn(qaIntFQD);} | |
403 | if (MCEP) {cutPID2->SetQAOn(qaIntMCEP);} | |
404 | } | |
405 | } | |
406 | ||
407 | printf("CREATE MC KINE CUTS\n"); | |
408 | TObjArray* mcList1 = new TObjArray(0); | |
409 | mcList1->AddLast(mcKineCuts1); | |
410 | mcList1->AddLast(mcGenCuts1); | |
411 | ||
412 | TObjArray* mcList2 = new TObjArray(0); | |
413 | mcList2->AddLast(mcKineCuts2); | |
414 | mcList2->AddLast(mcGenCuts2); | |
415 | ||
416 | printf("CREATE ACCEPTANCE CUTS\n"); | |
417 | TObjArray* accList1 = new TObjArray(0) ; | |
418 | accList1->AddLast(mcAccCuts1); | |
419 | ||
420 | TObjArray* accList2 = new TObjArray(0) ; | |
421 | accList2->AddLast(mcAccCuts2); | |
422 | ||
423 | printf("CREATE RECONSTRUCTION CUTS\n"); | |
424 | TObjArray* recList1 = new TObjArray(0) ; | |
425 | recList1->AddLast(recKineCuts1); | |
426 | recList1->AddLast(recQualityCuts1); | |
427 | recList1->AddLast(recIsPrimaryCuts1); | |
428 | ||
429 | TObjArray* recList2 = new TObjArray(0) ; | |
430 | recList2->AddLast(recKineCuts2); | |
431 | recList2->AddLast(recQualityCuts2); | |
432 | recList2->AddLast(recIsPrimaryCuts2); | |
433 | ||
434 | printf("CREATE PID CUTS\n"); | |
435 | TObjArray* fPIDCutList1 = new TObjArray(0) ; | |
436 | if(UsePIDIntegratedFlow) {fPIDCutList1->AddLast(cutPID1);} | |
437 | ||
438 | TObjArray* fPIDCutList2 = new TObjArray(0) ; | |
439 | if (UsePIDDifferentialFlow) {fPIDCutList2->AddLast(cutPID2);} | |
440 | ||
441 | printf("CREATE INTERFACE AND CUTS\n"); | |
442 | AliCFManager* cfmgr1 = new AliCFManager(); | |
443 | // cfmgr1->SetNStepParticle(4); //05nov08 | |
444 | cfmgr1->SetParticleCutsList(AliCFManager::kPartGenCuts,mcList1); | |
445 | cfmgr1->SetParticleCutsList(AliCFManager::kPartAccCuts,accList1); | |
446 | cfmgr1->SetParticleCutsList(AliCFManager::kPartRecCuts,recList1); | |
447 | cfmgr1->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutList1); | |
448 | ||
449 | AliCFManager* cfmgr2 = new AliCFManager(); | |
450 | // cfmgr2->SetNStepParticle(4); //05nov08 | |
451 | cfmgr2->SetParticleCutsList(AliCFManager::kPartGenCuts,mcList2); | |
452 | cfmgr2->SetParticleCutsList(AliCFManager::kPartAccCuts,accList2); | |
453 | cfmgr2->SetParticleCutsList(AliCFManager::kPartRecCuts,recList2); | |
454 | cfmgr2->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutList2); | |
455 | ||
456 | //weights: | |
457 | TFile *weightsFile = NULL; | |
458 | TList *weightsList = NULL; | |
459 | ||
460 | if(useWeights) { | |
461 | //open the file with the weights: | |
462 | weightsFile = TFile::Open("weights.root","READ"); | |
463 | if(weightsFile) { | |
464 | //access the list which holds the histos with weigths: | |
465 | weightsList = (TList*)weightsFile->Get("weights"); | |
466 | } | |
467 | else { | |
468 | cout<<" WARNING: the file <weights.root> with weights from the previous run was not available."<<endl; | |
469 | break; | |
470 | } | |
471 | } | |
472 | ||
473 | ||
474 | if (LYZ2){ | |
475 | // read the input file from the first run | |
476 | TString inputFileNameLYZ2 = "outputLYZ1analysis" ; | |
477 | inputFileNameLYZ2 += type; | |
478 | inputFileNameLYZ2 += ".root"; | |
479 | cout<<"The input file is "<<inputFileNameLYZ2.Data()<<endl; | |
480 | TFile* fInputFileLYZ2 = new TFile(inputFileNameLYZ2.Data(),"READ"); | |
481 | if(!fInputFileLYZ2 || fInputFileLYZ2->IsZombie()) { | |
482 | cerr << " ERROR: NO First Run file... " << endl ; } | |
483 | else { | |
484 | TList* fInputListLYZ2 = (TList*)fInputFileLYZ2->Get("cobjLYZ1"); | |
485 | if (!fInputListLYZ2) {cout<<"list is NULL pointer!"<<endl;} | |
486 | } | |
487 | cout<<"LYZ2 input file/list read..."<<endl; | |
488 | } | |
489 | ||
490 | if (LYZEP) { | |
491 | // read the input file from the second LYZ run | |
492 | TString inputFileNameLYZEP = "outputLYZ2analysis" ; | |
493 | inputFileNameLYZEP += type; | |
494 | inputFileNameLYZEP += "_secondrun.root"; | |
495 | cout<<"The input file is "<<inputFileNameLYZEP.Data()<<endl; | |
496 | TFile* fInputFileLYZEP = new TFile(inputFileNameLYZEP.Data(),"READ"); | |
497 | if(!fInputFileLYZEP || fInputFileLYZEP->IsZombie()) { | |
498 | cerr << " ERROR: NO First Run file... " << endl ; } | |
499 | else { | |
500 | TList* fInputListLYZEP = (TList*)fInputFileLYZEP->Get("cobjLYZ2"); | |
501 | if (!fInputListLYZEP) {cout<<"list is NULL pointer!"<<endl;} | |
502 | }kTRUE; | |
503 | cout<<"LYZEP input file/list read..."<<endl; | |
504 | } | |
505 | ||
506 | //____________________________________________// | |
507 | // Make the analysis manager | |
508 | AliAnalysisManager *mgr = new AliAnalysisManager("TestManager"); | |
509 | ||
510 | if (type == "ESD"){ | |
511 | AliVEventHandler* esdH = new AliESDInputHandler; | |
512 | mgr->SetInputEventHandler(esdH); | |
513 | if (MCEP) { | |
514 | AliMCEventHandler *mc = new AliMCEventHandler(); | |
515 | mgr->SetMCtruthEventHandler(mc);} } | |
516 | ||
517 | if (type == "AOD"){ | |
518 | AliVEventHandler* aodH = new AliAODInputHandler; | |
519 | mgr->SetInputEventHandler(aodH); | |
520 | if (MCEP) { | |
521 | AliMCEventHandler *mc = new AliMCEventHandler(); | |
522 | mgr->SetMCtruthEventHandler(mc);} } | |
523 | ||
524 | if (type == "MC" || type == "ESDMC0" || type == "ESDMC1"){ | |
525 | AliVEventHandler* esdH = new AliESDInputHandler; | |
526 | mgr->SetInputEventHandler(esdH); | |
527 | ||
528 | AliMCEventHandler *mc = new AliMCEventHandler(); | |
529 | mgr->SetMCtruthEventHandler(mc); } | |
530 | ||
531 | //____________________________________________// | |
532 | // tasks | |
533 | if (SP){ | |
534 | if (QA) { AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",kTRUE); } | |
535 | else { AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",kFALSE); } | |
536 | taskSP->SetAnalysisType(type); | |
537 | taskSP->SetCFManager1(cfmgr1); | |
538 | taskSP->SetCFManager2(cfmgr2); | |
539 | if (QA) { | |
540 | taskSP->SetQAList1(qaIntSP); | |
541 | taskSP->SetQAList2(qaDiffSP); } | |
542 | mgr->AddTask(taskSP); | |
543 | } | |
544 | if (LYZ1){ | |
545 | if (QA) { AliAnalysisTaskLeeYangZeros *taskLYZ1 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kTRUE,kTRUE);} | |
546 | else { AliAnalysisTaskLeeYangZeros *taskLYZ1 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kTRUE,kFALSE);} | |
547 | taskLYZ1->SetAnalysisType(type); | |
548 | taskLYZ1->SetFirstRunLYZ(kTRUE); | |
549 | taskLYZ1->SetUseSumLYZ(kTRUE); | |
550 | taskLYZ1->SetCFManager1(cfmgr1); | |
551 | taskLYZ1->SetCFManager2(cfmgr2); | |
552 | if (QA) { | |
553 | taskLYZ1->SetQAList1(qaIntLYZ1); | |
554 | taskLYZ1->SetQAList2(qaDiffLYZ1);} | |
555 | mgr->AddTask(taskLYZ1); | |
556 | } | |
557 | if (LYZ2){ | |
558 | if (QA) { AliAnalysisTaskLeeYangZeros *taskLYZ2 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kFALSE,kTRUE);} | |
559 | else { AliAnalysisTaskLeeYangZeros *taskLYZ2 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kFALSE,kFALSE); } | |
560 | taskLYZ2->SetAnalysisType(type); | |
561 | taskLYZ2->SetFirstRunLYZ(kFALSE); | |
562 | taskLYZ2->SetUseSumLYZ(kTRUE); | |
563 | taskLYZ2->SetCFManager1(cfmgr1); | |
564 | taskLYZ2->SetCFManager2(cfmgr2); | |
565 | if (QA) { | |
566 | taskLYZ2->SetQAList1(qaIntLYZ2); | |
567 | taskLYZ2->SetQAList2(qaDiffLYZ2); } | |
568 | mgr->AddTask(taskLYZ2); | |
569 | } | |
570 | if (LYZEP){ | |
571 | if (QA) { AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane",kTRUE); } | |
572 | else { AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane",kFALSE); } | |
573 | taskLYZEP->SetAnalysisType(type); | |
574 | taskLYZEP->SetCFManager1(cfmgr1); | |
575 | taskLYZEP->SetCFManager2(cfmgr2); | |
576 | if (QA) { | |
577 | taskLYZEP->SetQAList1(qaIntLYZEP); | |
578 | taskLYZEP->SetQAList2(qaDiffLYZEP); } | |
579 | mgr->AddTask(taskLYZEP); | |
580 | } | |
581 | if (GFC){ | |
582 | if (QA) { AliAnalysisTaskCumulants *taskGFC = new AliAnalysisTaskCumulants("TaskCumulants",kTRUE);} | |
583 | else { AliAnalysisTaskCumulants *taskGFC = new AliAnalysisTaskCumulants("TaskCumulants",kFALSE);} | |
584 | taskGFC->SetAnalysisType(type); | |
585 | taskGFC->SetCFManager1(cfmgr1); | |
586 | taskGFC->SetCFManager2(cfmgr2); | |
587 | if (QA) { | |
588 | taskGFC->SetQAList1(qaIntGFC); | |
589 | taskGFC->SetQAList2(qaDiffGFC); } | |
590 | mgr->AddTask(taskGFC); | |
591 | } | |
592 | if (QC){ | |
593 | if (QA) { AliAnalysisTaskQCumulants *taskQC = new AliAnalysisTaskQCumulants("TaskQCumulants",kTRUE);} | |
594 | else { AliAnalysisTaskQCumulants *taskQC = new AliAnalysisTaskQCumulants("TaskQCumulants",kFALSE);} | |
595 | taskQC->SetAnalysisType(type); | |
596 | taskQC->SetCFManager1(cfmgr1); | |
597 | taskQC->SetCFManager2(cfmgr2); | |
598 | if (QA) { | |
599 | taskQC->SetQAList1(qaIntQC); | |
600 | taskQC->SetQAList2(qaDiffQC); } | |
601 | mgr->AddTask(taskQC); | |
602 | } | |
603 | if (FQD){ | |
604 | if (QA) { AliAnalysisTaskFittingQDistribution *taskFQD = new AliAnalysisTaskFittingQDistribution("TaskFittingQDistribution",kTRUE);} | |
605 | else { AliAnalysisTaskFittingQDistribution *taskFQD = new AliAnalysisTaskFittingQDistribution("TaskFittingQDistribution",kFALSE);} | |
606 | taskFQD->SetAnalysisType(type); | |
607 | taskFQD->SetCFManager1(cfmgr1); | |
608 | taskFQD->SetCFManager2(cfmgr2); | |
609 | if (QA) { | |
610 | taskFQD->SetQAList1(qaIntFQD); | |
611 | taskFQD->SetQAList2(qaDiffFQD); } | |
612 | mgr->AddTask(taskFQD); | |
613 | } | |
614 | if (MCEP){ | |
615 | if (QA) { AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane",kTRUE);} | |
616 | else { AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane",kFALSE);} | |
617 | taskMCEP->SetAnalysisType(type); | |
618 | taskMCEP->SetCFManager1(cfmgr1); | |
619 | taskMCEP->SetCFManager2(cfmgr2); | |
620 | if (QA) { | |
621 | taskMCEP->SetQAList1(qaIntMCEP); | |
622 | taskMCEP->SetQAList2(qaDiffMCEP); } | |
623 | mgr->AddTask(taskMCEP); | |
624 | } | |
625 | ||
626 | ||
627 | // Create containers for input/output | |
628 | AliAnalysisDataContainer *cinput1 = | |
629 | mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer); | |
630 | ||
631 | if (useWeights) { | |
632 | AliAnalysisDataContainer *cinputWeights = mgr->CreateContainer("cobjWeights",TList::Class(),AliAnalysisManager::kInputContainer); | |
633 | } | |
634 | ||
635 | if (LYZ2){ | |
636 | AliAnalysisDataContainer *cinputLYZ2 = mgr->CreateContainer("cobjLYZ2in",TList::Class(),AliAnalysisManager::kInputContainer); } | |
637 | if (LYZEP){ | |
638 | AliAnalysisDataContainer *cinputLYZEP = mgr->CreateContainer("cobjLYZEPin",TList::Class(),AliAnalysisManager::kInputContainer); } | |
639 | ||
640 | if(SP) { | |
641 | TString outputSP = "outputSPanalysis"; | |
642 | outputSP+= type; | |
643 | outputSP+= ".root"; | |
644 | AliAnalysisDataContainer *coutputSP = mgr->CreateContainer("cobjSP", TList::Class(),AliAnalysisManager::kOutputContainer,outputSP); | |
645 | } | |
646 | ||
647 | if(LYZ1) { | |
648 | TString outputLYZ1 = "outputLYZ1analysis"; | |
649 | outputLYZ1+= type; | |
650 | outputLYZ1+= "_firstrun.root"; | |
651 | AliAnalysisDataContainer *coutputLYZ1 = mgr->CreateContainer("cobjLYZ1", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1); | |
652 | } | |
653 | ||
654 | if(LYZ2) { | |
655 | TString outputLYZ2 = "outputLYZ2analysis"; | |
656 | outputLYZ2+= type; | |
657 | outputLYZ2+= "_secondrun.root"; | |
658 | AliAnalysisDataContainer *coutputLYZ2 = mgr->CreateContainer("cobjLYZ2", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2); | |
659 | } | |
660 | ||
661 | if(LYZEP) { | |
662 | TString outputLYZEP = "outputLYZEPanalysis"; | |
663 | outputLYZEP+= type; | |
664 | outputLYZEP+= ".root"; | |
665 | AliAnalysisDataContainer *coutputLYZEP = mgr->CreateContainer("cobjLYZEP", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZEP); | |
666 | } | |
667 | ||
668 | if(GFC) { | |
669 | TString outputGFC = "outputGFCanalysis"; | |
670 | outputGFC+= type; | |
671 | outputGFC+= ".root"; | |
672 | AliAnalysisDataContainer *coutputGFC = mgr->CreateContainer("cobjGFC", TList::Class(),AliAnalysisManager::kOutputContainer,outputGFC); | |
673 | } | |
674 | ||
675 | if(QC) { | |
676 | TString outputQC = "outputQCanalysis"; | |
677 | outputQC+= type; | |
678 | outputQC+= ".root"; | |
679 | AliAnalysisDataContainer *coutputQC = mgr->CreateContainer("cobjQC", TList::Class(),AliAnalysisManager::kOutputContainer,outputQC); | |
680 | } | |
681 | ||
682 | if(FQD) { | |
683 | TString outputFQD = "outputFQDanalysis"; | |
684 | outputFQD+= type; | |
685 | outputFQD+= ".root"; | |
686 | AliAnalysisDataContainer *coutputFQD = mgr->CreateContainer("cobjFQD", TList::Class(),AliAnalysisManager::kOutputContainer,outputFQD); | |
687 | } | |
688 | ||
689 | if(MCEP) { | |
690 | TString outputMCEP = "outputMCEPanalysis"; | |
691 | outputMCEP+= type; | |
692 | outputMCEP+= ".root"; | |
693 | AliAnalysisDataContainer *coutputMCEP = mgr->CreateContainer("cobjMCEP", TList::Class(),AliAnalysisManager::kOutputContainer,outputMCEP); | |
694 | } | |
695 | ||
696 | ||
697 | if (QA) { | |
698 | if(SP) { | |
699 | TString qaNameIntSP = "QAforInt_SP_"; | |
700 | qaNameIntSP += type; | |
701 | qaNameIntSP += ".root"; | |
702 | AliAnalysisDataContainer *coutputQA1SP = | |
703 | mgr->CreateContainer("QAintSP", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntSP); | |
704 | ||
705 | TString qaNameDiffSP = "QAforDiff_SP_"; | |
706 | qaNameDiffSP += type; | |
707 | qaNameDiffSP += ".root"; | |
708 | AliAnalysisDataContainer *coutputQA2SP = | |
709 | mgr->CreateContainer("QAdiffSP", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffSP); | |
710 | } | |
711 | if(LYZ1) { | |
712 | TString qaNameIntLYZ1 = "QAforInt_LYZ1_"; | |
713 | qaNameIntLYZ1 += type; | |
714 | qaNameIntLYZ1 += ".root"; | |
715 | AliAnalysisDataContainer *coutputQA1LYZ1 = | |
716 | mgr->CreateContainer("QAintLYZ1", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntLYZ1); | |
717 | ||
718 | TString qaNameDiffLYZ1 = "QAforDiff_LYZ1_"; | |
719 | qaNameDiffLYZ1 += type; | |
720 | qaNameDiffLYZ1 += ".root"; | |
721 | AliAnalysisDataContainer *coutputQA2LYZ1 = | |
722 | mgr->CreateContainer("QAdiffLYZ1", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffLYZ1); | |
723 | } | |
724 | if(LYZ2) { | |
725 | TString qaNameIntLYZ2 = "QAforInt_LYZ2_"; | |
726 | qaNameIntLYZ2 += type; | |
727 | qaNameIntLYZ2 += ".root"; | |
728 | AliAnalysisDataContainer *coutputQA1LYZ2 = | |
729 | mgr->CreateContainer("QAintLYZ2", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntLYZ2); | |
730 | ||
731 | TString qaNameDiffLYZ2 = "QAforDiff_LYZ2_"; | |
732 | qaNameDiffLYZ2 += type; | |
733 | qaNameDiffLYZ2 += ".root"; | |
734 | AliAnalysisDataContainer *coutputQA2LYZ2 = | |
735 | mgr->CreateContainer("QAdiffLYZ2", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffLYZ2); | |
736 | } | |
737 | if(LYZEP) { | |
738 | TString qaNameIntLYZEP = "QAforInt_LYZEP_"; | |
739 | qaNameIntLYZEP += type; | |
740 | qaNameIntLYZEP += ".root"; | |
741 | AliAnalysisDataContainer *coutputQA1LYZEP = | |
742 | mgr->CreateContainer("QAintLYZEP", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntLYZEP); | |
743 | ||
744 | TString qaNameDiffLYZEP = "QAforDiff_LYZEP_"; | |
745 | qaNameDiffLYZEP += type; | |
746 | qaNameDiffLYZEP += ".root"; | |
747 | AliAnalysisDataContainer *coutputQA2LYZEP = | |
748 | mgr->CreateContainer("QAdiffLYZEP", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffLYZEP); | |
749 | } | |
750 | if(GFC) { | |
751 | TString qaNameIntGFC = "QAforInt_GFC_"; | |
752 | qaNameIntGFC += type; | |
753 | qaNameIntGFC += ".root"; | |
754 | AliAnalysisDataContainer *coutputQA1GFC = | |
755 | mgr->CreateContainer("QAintGFC", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntGFC); | |
756 | ||
757 | TString qaNameDiffGFC = "QAforDiff_GFC_"; | |
758 | qaNameDiffGFC += type; | |
759 | qaNameDiffGFC += ".root"; | |
760 | AliAnalysisDataContainer *coutputQA2GFC = | |
761 | mgr->CreateContainer("QAdiffGFC", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffGFC); | |
762 | } | |
763 | if(QC) { | |
764 | TString qaNameIntQC = "QAforInt_QC_"; | |
765 | qaNameIntQC += type; | |
766 | qaNameIntQC += ".root"; | |
767 | AliAnalysisDataContainer *coutputQA1QC = | |
768 | mgr->CreateContainer("QAintQC", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntQC); | |
769 | ||
770 | TString qaNameDiffQC = "QAforDiff_QC_"; | |
771 | qaNameDiffQC += type; | |
772 | qaNameDiffQC += ".root"; | |
773 | AliAnalysisDataContainer *coutputQA2QC = | |
774 | mgr->CreateContainer("QAdiffQC", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffQC); | |
775 | } | |
776 | if(FQQ) { | |
777 | TString qaNameIntFQD = "QAforInt_FQD_"; | |
778 | qaNameIntFQD += type; | |
779 | qaNameIntFQD += ".root"; | |
780 | AliAnalysisDataContainer *coutputQA1FQD = | |
781 | mgr->CreateContainer("QAintFQD", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntFQD); | |
782 | ||
783 | TString qaNameDiffFQD = "QAforDiff_FQD_"; | |
784 | qaNameDiffFQD += type; | |
785 | qaNameDiffFQD += ".root"; | |
786 | AliAnalysisDataContainer *coutputQA2FQD = | |
787 | mgr->CreateContainer("QAdiffFQD", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffFQD); | |
788 | } | |
789 | if(MCEP) { | |
790 | TString qaNameIntMCEP = "QAforInt_MCEP_"; | |
791 | qaNameIntMCEP += type; | |
792 | qaNameIntMCEP += ".root"; | |
793 | AliAnalysisDataContainer *coutputQA1MCEP = | |
794 | mgr->CreateContainer("QAintMCEP", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameIntMCEP); | |
795 | ||
796 | TString qaNameDiffMCEP = "QAforDiff_MCEP_"; | |
797 | qaNameDiffMCEP += type; | |
798 | qaNameDiffMCEP += ".root"; | |
799 | AliAnalysisDataContainer *coutputQA2MCEP = | |
800 | mgr->CreateContainer("QAdiffMCEP", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiffMCEP); | |
801 | } | |
802 | } | |
803 | ||
804 | ||
805 | //____________________________________________// | |
806 | ||
807 | if (SP) { | |
808 | mgr->ConnectInput(taskSP,0,cinput1); | |
809 | mgr->ConnectOutput(taskSP,0,coutputSP); | |
810 | if (QA) { mgr->ConnectOutput(taskSP,1,coutputQA1SP); | |
811 | mgr->ConnectOutput(taskSP,2,coutputQA2SP); } | |
812 | } | |
813 | if (LYZ1) { | |
814 | mgr->ConnectInput(taskLYZ1,0,cinput1); | |
815 | mgr->ConnectOutput(taskLYZ1,0,coutputLYZ1); | |
816 | if (QA) { mgr->ConnectOutput(taskLYZ1,1,coutputQA1LYZ1); | |
817 | mgr->ConnectOutput(taskLYZ1,2,coutputQA2LYZ1); } | |
818 | } | |
819 | if (LYZ2) { | |
820 | mgr->ConnectInput(taskLYZ2,0,cinput1); | |
821 | mgr->ConnectInput(taskLYZ2,1,cinputLYZ2); | |
822 | mgr->ConnectOutput(taskLYZ2,0,coutputLYZ2); | |
823 | if (QA) { mgr->ConnectOutput(taskLYZ2,1,coutputQA1LYZ2); | |
824 | mgr->ConnectOutput(taskLYZ2,2,coutputQA2LYZ2); } | |
825 | cinputLYZ2->SetData(fInputListLYZ2); | |
826 | } | |
827 | if (LYZEP) { | |
828 | mgr->ConnectInput(taskLYZEP,0,cinput1); | |
829 | mgr->ConnectInput(taskLYZEP,1,cinputLYZEP); | |
830 | mgr->ConnectOutput(taskLYZEP,0,coutputLYZEP); | |
831 | if (QA) { mgr->ConnectOutput(taskLYZEP,1,coutputQA1LYZEP); | |
832 | mgr->ConnectOutput(taskLYZEP,2,coutputQA2LYZEP); } | |
833 | cinputLYZEP->SetData(fInputListLYZEP); | |
834 | } | |
835 | if (GFC) { | |
836 | mgr->ConnectInput(taskGFC,0,cinput1); | |
837 | mgr->ConnectOutput(taskGFC,0,coutputGFC); | |
838 | if (QA) { mgr->ConnectOutput(taskGFC,1,coutputQA1GFC); | |
839 | mgr->ConnectOutput(taskGFC,2,coutputQA2GFC); } | |
840 | } | |
841 | if (QC) { | |
842 | mgr->ConnectInput(taskQC,0,cinput1); | |
843 | mgr->ConnectOutput(taskQC,0,coutputQC); | |
844 | if (QA) { mgr->ConnectOutput(taskQC,1,coutputQA1QC); | |
845 | mgr->ConnectOutput(taskQC,2,coutputQA2QC); } | |
846 | if (useWeights) { | |
847 | mgr->ConnectInput(taskQC,1,cinputWeights); | |
848 | cinputWeights->SetData(weightsList); | |
849 | } | |
850 | } | |
851 | if (FQD) { | |
852 | mgr->ConnectInput(taskFQD,0,cinput1); | |
853 | mgr->ConnectOutput(taskFQD,0,coutputFQD); | |
854 | if (QA) { mgr->ConnectOutput(taskFQD,1,coutputQA1FQD); | |
855 | mgr->ConnectOutput(taskFQD,2,coutputQA2FQD); } | |
856 | if(useWeights) { | |
857 | mgr->ConnectInput(taskFQD,1,cinputWeights); | |
858 | cinputWeights->SetData(weightsList); | |
859 | } | |
860 | } | |
861 | if (MCEP) { | |
862 | mgr->ConnectInput(taskMCEP,0,cinput1); | |
863 | mgr->ConnectOutput(taskMCEP,0,coutputMCEP); | |
864 | if (QA) { mgr->ConnectOutput(taskMCEP,1,coutputQA1MCEP); | |
865 | mgr->ConnectOutput(taskMCEP,2,coutputQA2MCEP); } | |
866 | } | |
867 | ||
868 | if (!mgr->InitAnalysis()) return; | |
869 | mgr->PrintStatus(); | |
870 | // old way with a chain | |
871 | // mgr->StartAnalysis("proof",chain); | |
872 | mgr->StartAnalysis("proof",data,nRuns,offset); | |
873 | ||
874 | timer.Stop(); | |
875 | timer.Print(); | |
876 | } |