]>
Commit | Line | Data |
---|---|---|
93329510 | 1 | ///////////////////////////////////////////////////////////////////////////////////////////// |
2 | // | |
3 | // AddTask* macro for flow analysis | |
4 | // Creates a Flow Event task and adds it to the analysis manager. | |
5 | // Sets the cuts using the correction framework (CORRFW) classes. | |
6 | // Also creates Flow Analysis tasks and connects them to the output of the flow event task. | |
7 | // | |
8 | ///////////////////////////////////////////////////////////////////////////////////////////// | |
9 | ||
7a01f4a7 | 10 | // Define the range for eta subevents (for SP method) |
11 | Double_t minA = -0.9; | |
12 | Double_t maxA = -0.01; | |
13 | Double_t minB = 0.01; | |
14 | Double_t maxB = 0.9; | |
93329510 | 15 | |
f6cf97c1 | 16 | // use physics selection class |
40c24aa8 | 17 | Bool_t UsePhysicsSelection = kTRUE; |
f6cf97c1 | 18 | |
93329510 | 19 | // SETTING THE CUTS |
20 | ||
c0ed6325 | 21 | //----------Event selection---------- |
22 | Bool_t UseMultCutforESD = kTRUE; | |
23 | //Bool_t UseMultCutforESD = kFALSE; | |
24 | const Int_t multminESD = 1; //used for CORRFW cuts | |
3828db44 | 25 | const Int_t multmaxESD = 1000000; //used for CORRFW cuts |
f01e9bfe | 26 | |
40ca990b | 27 | Bool_t requireVtxCuts = kTRUE; |
28 | Double_t vertexXmin = -1.0; | |
29 | Double_t vertexXmax = 1.0; | |
30 | Double_t vertexYmin = -1.0; | |
31 | Double_t vertexYmax = 1.0; | |
32 | Double_t vertexZmin = -15.0; //-1.e99; | |
33 | Double_t vertexZmax = 15.0; //1.e99; | |
34 | ||
ea456d37 | 35 | //Bool_t UseMultCut = kFALSE; |
f6cf97c1 | 36 | Bool_t UseMultCut = kTRUE; |
c0ed6325 | 37 | const Int_t multmin = 10; //used for AliFlowEventSimple (to set the centrality) |
29195b69 | 38 | const Int_t multmax = 10000; //used for AliFlowEventSimple (to set the centrality) |
c0ed6325 | 39 | //const Int_t multmin = 10; //used for AliFlowEventSimple (to set the centrality) |
40 | //const Int_t multmax = 1000000; //used for AliFlowEventSimple (to set the centrality) | |
47d5b28f | 41 | |
94cd9888 | 42 | |
c0ed6325 | 43 | //----------For RP selection---------- |
44 | //KINEMATICS (on generated and reconstructed tracks) | |
45 | Bool_t UseKineforRP = kTRUE; | |
46 | const Double_t ptminRP = 0.0; | |
47 | const Double_t ptmaxRP = 10.0; | |
48 | const Double_t etaminRP = -0.9; | |
49 | const Double_t etamaxRP = 0.9; | |
50 | const Int_t chargeRP = 1; //not used | |
51 | ||
52 | //PID (on generated and reconstructed tracks) | |
93329510 | 53 | Bool_t UsePIDforRP = kFALSE; |
c0ed6325 | 54 | const Int_t PdgRP = 211; |
55 | ||
56 | //TRACK QUALITY (on reconstructed tracks only) | |
57 | //see /CORRFW/AliCFTrackQualityCuts class | |
58 | Bool_t UseTrackQualityforRP = kTRUE; | |
59 | const Int_t minClustersTpcRP = 80; //default = -1; | |
60 | const Double_t maxChi2PerClusterTpcRP = 3.5; //default = 1.e+09; | |
61 | const UShort_t minDedxClusterTpcRP = 0; | |
62 | const Int_t minClustersItsRP = 2; //panos | |
63 | const Double_t maxChi2PerClusterItsRP = 1.e+09; | |
64 | const Int_t minClustersTrdRP = -1; | |
65 | const Int_t minTrackletTrdRP = -1; | |
66 | const Int_t minTrackletTrdPidRP = -1; | |
67 | const Double_t maxChi2PerClusterTrdRP = 1.e+09; | |
68 | const ULong_t statusRP = AliESDtrack::kTPCrefit; //AliESDtrack::kTPCrefit & AliESDtrack::kITSrefit | |
69 | ||
70 | //PRIMARY (on reconstructed tracks only) | |
71 | //see /CORRFW/AliCFTrackIsPrimaryCuts class | |
72 | Bool_t UsePrimariesforRP = kTRUE; | |
73 | const Bool_t spdVertexRP = kFALSE; | |
74 | const Bool_t tpcVertexRP = kFALSE; | |
75 | const Float_t minDcaToVertexXyRP = 0.; | |
76 | const Float_t minDcaToVertexZRP = 0.; | |
77 | const Float_t maxDcaToVertexXyRP = 2.4; //default = 1.e+10; //2.4; | |
78 | const Float_t maxDcaToVertexZRP = 3.2; //default = 1.e+10; //3.2; | |
79 | const Bool_t dcaToVertex2dRP = kFALSE; //default = kFALSE; | |
80 | const Bool_t absDcaToVertexRP = kTRUE; //default = kTRUE; | |
81 | const Double_t minNSigmaToVertexRP = 0.; | |
82 | const Double_t maxNSigmaToVertexRP = 1.e+10; //3.; //1.e+10 | |
83 | const Double_t maxSigmaDcaXySP = 1.e+10; | |
84 | const Double_t maxSigmaDcaZSP = 1.e+10; | |
85 | const Bool_t requireSigmaToVertexSP = kFALSE; | |
86 | const Bool_t acceptKinkDaughtersSP = kFALSE; //default = kTRUE; | |
87 | ||
88 | //ACCEPTANCE (on generated tracks only : AliMCParticle) | |
89 | //see /CORRFW/AliCFAcceptanceCuts class | |
90 | Bool_t UseAcceptanceforRP = kFALSE; | |
91 | const Int_t minTrackrefsItsRP = 0;//3; | |
92 | const Int_t minTrackrefsTpcRP = 0;//2; | |
93 | const Int_t minTrackrefsTrdRP = 0; | |
94 | const Int_t minTrackrefsTofRP = 0; | |
95 | const Int_t minTrackrefsMuonRP = 0; | |
96 | //default for all is 0 | |
97 | ||
98 | //----------For POI selection---------- | |
99 | //KINEMATICS (on generated and reconstructed tracks) | |
100 | Bool_t UseKineforPOI = kTRUE; | |
101 | const Double_t ptminPOI = 0.0; | |
102 | const Double_t ptmaxPOI = 10.0; | |
103 | const Double_t etaminPOI = -0.9; | |
104 | const Double_t etamaxPOI = 0.9; | |
105 | const Int_t chargePOI = 1; //not used | |
106 | ||
107 | //PID (on generated and reconstructed tracks) | |
93329510 | 108 | Bool_t UsePIDforPOI = kFALSE; |
c0ed6325 | 109 | const Int_t PdgPOI = 321; |
93329510 | 110 | |
c0ed6325 | 111 | //TRACK QUALITY (on reconstructed tracks only) |
112 | //see /CORRFW/AliCFTrackQualityCuts class | |
113 | Bool_t UseTrackQualityforPOI = kTRUE; | |
114 | const Int_t minClustersTpcPOI = 80; | |
115 | const Double_t maxChi2PerClusterTpcPOI = 3.5; | |
116 | const UShort_t minDedxClusterTpcPOI = 0; | |
117 | const Int_t minClustersItsPOI = 2; | |
118 | const Double_t maxChi2PerClusterItsPOI = 1.e+09; | |
119 | const Int_t minClustersTrdPOI = -1; | |
120 | const Int_t minTrackletTrdPOI = -1; | |
121 | const Int_t minTrackletTrdPidPOI = -1; | |
122 | const Double_t maxChi2PerClusterTrdPOI = 1.e+09; | |
123 | const ULong_t statusPOI = AliESDtrack::kTPCrefit; | |
124 | ||
125 | //PRIMARY (on reconstructed tracks only) | |
126 | //see /CORRFW/AliCFTrackIsPrimaryCuts class | |
127 | Bool_t UsePrimariesforPOI = kTRUE; | |
128 | const Bool_t spdVertexPOI = kFALSE; | |
129 | const Bool_t tpcVertexPOI = kFALSE; | |
130 | const Float_t minDcaToVertexXyPOI = 0.; | |
131 | const Float_t minDcaToVertexZPOI = 0.; | |
132 | const Float_t maxDcaToVertexXyPOI = 2.4; | |
133 | const Float_t maxDcaToVertexZPOI = 3.2; | |
134 | const Bool_t dcaToVertex2dPOI = kFALSE; | |
135 | const Bool_t absDcaToVertexPOI = kTRUE; | |
136 | const Double_t minNSigmaToVertexPOI = 0.; | |
137 | const Double_t maxNSigmaToVertexPOI = 1.e+10; | |
138 | const Double_t maxSigmaDcaXyPOI = 1.e+10; | |
139 | const Double_t maxSigmaDcaZPOI = 1.e+10; | |
140 | const Bool_t requireSigmaToVertexPOI = kFALSE; | |
141 | const Bool_t acceptKinkDaughtersPOI = kFALSE; | |
142 | ||
143 | //ACCEPTANCE (on generated tracks only : AliMCParticle) | |
144 | //see /CORRFW/AliCFAcceptanceCuts class | |
145 | Bool_t UseAcceptanceforPOI = kFALSE; | |
146 | const Int_t minTrackrefsItsPOI = 3; | |
147 | const Int_t minTrackrefsTpcPOI = 2; | |
148 | const Int_t minTrackrefsTrdPOI = 0; | |
149 | const Int_t minTrackrefsTofPOI = 0; | |
150 | const Int_t minTrackrefsMuonPOI = 0; | |
151 | ||
152 | ||
153 | //----------For Adding Flow to the Event---------- | |
47d5b28f | 154 | const Bool_t AddToEvent = kFALSE; |
c0ed6325 | 155 | Double_t ellipticFlow = 0.05; |
47d5b28f | 156 | |
93329510 | 157 | |
158 | AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA, Bool_t* WEIGHTS) | |
159 | { | |
160 | //boleans for the methods | |
c741f5d0 | 161 | Bool_t SP = METHODS[0]; |
162 | Bool_t LYZ1SUM = METHODS[1]; | |
163 | Bool_t LYZ1PROD = METHODS[2]; | |
164 | Bool_t LYZ2SUM = METHODS[3]; | |
165 | Bool_t LYZ2PROD = METHODS[4]; | |
166 | Bool_t LYZEP = METHODS[5]; | |
167 | Bool_t GFC = METHODS[6]; | |
168 | Bool_t QC = METHODS[7]; | |
169 | Bool_t FQD = METHODS[8]; | |
67a6b178 | 170 | Bool_t MCEP = METHODS[9]; |
171 | Bool_t MH = METHODS[10]; | |
172 | Bool_t NL = METHODS[11]; | |
93329510 | 173 | //for using weights |
174 | Bool_t useWeights = WEIGHTS[0] || WEIGHTS[1] || WEIGHTS[2]; | |
175 | if (useWeights) cout<<"Weights are used"<<endl; | |
176 | else cout<<"Weights are not used"<<endl; | |
177 | ||
178 | ||
179 | // Get the pointer to the existing analysis manager via the static access method. | |
180 | //============================================================================== | |
181 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
182 | if (!mgr) { | |
183 | Error("AddTaskFlowEvent", "No analysis manager to connect to."); | |
184 | return NULL; | |
185 | } | |
186 | ||
187 | // Check the analysis type using the event handlers connected to the analysis | |
188 | // manager. The availability of MC handler cann also be checked here. | |
189 | //============================================================================== | |
190 | if (!mgr->GetInputEventHandler()) { | |
191 | ::Error("AddTaskFlowEvent", "This task requires an input event handler"); | |
192 | return NULL; | |
193 | } | |
194 | ||
195 | // Open external input files | |
196 | //=========================================================================== | |
197 | //weights: | |
198 | TFile *weightsFile = NULL; | |
199 | TList *weightsList = NULL; | |
200 | ||
201 | if(useWeights) { | |
202 | //open the file with the weights: | |
203 | weightsFile = TFile::Open("weights.root","READ"); | |
204 | if(weightsFile) { | |
205 | //access the list which holds the histos with weigths: | |
206 | weightsList = (TList*)weightsFile->Get("weights"); | |
207 | } | |
208 | else { | |
209 | cout<<" WARNING: the file <weights.root> with weights from the previous run was not available."<<endl; | |
210 | break; | |
211 | } | |
212 | } | |
213 | ||
40ca990b | 214 | //LYZ2 |
215 | if (LYZ2SUM || LYZ2PROD) { | |
216 | //read the outputfile of the first run | |
217 | TString outputFileName = "AnalysisResults1.root"; | |
218 | TString pwd(gSystem->pwd()); | |
219 | pwd+="/"; | |
220 | pwd+=outputFileName.Data(); | |
221 | TFile *outputFile = NULL; | |
222 | if(gSystem->AccessPathName(pwd.Data(),kFileExists)) { | |
223 | cout<<"WARNING: You do not have an output file:"<<endl; | |
224 | cout<<" "<<pwd.Data()<<endl; | |
225 | exit(0); | |
226 | } else { | |
227 | outputFile = TFile::Open(pwd.Data(),"READ"); | |
c741f5d0 | 228 | } |
40ca990b | 229 | |
230 | if (LYZ2SUM){ | |
231 | // read the output directory from LYZ1SUM | |
232 | TString inputFileNameLYZ2SUM = "outputLYZ1SUManalysis" ; | |
233 | inputFileNameLYZ2SUM += type; | |
234 | cout<<"The input directory is "<<inputFileNameLYZ2SUM.Data()<<endl; | |
235 | TFile* fInputFileLYZ2SUM = (TFile*)outputFile->FindObjectAny(inputFileNameLYZ2SUM.Data()); | |
236 | if(!fInputFileLYZ2SUM || fInputFileLYZ2SUM->IsZombie()) { | |
237 | cerr << " ERROR: To run LYZ2SUM you need the output file from LYZ1SUM. This file is not there! Please run LYZ1SUM first." << endl ; | |
238 | break; | |
239 | } | |
240 | else { | |
241 | TList* fInputListLYZ2SUM = (TList*)fInputFileLYZ2SUM->Get("cobjLYZ1SUM"); | |
242 | if (!fInputListLYZ2SUM) {cout<<"list is NULL pointer!"<<endl;} | |
243 | } | |
244 | cout<<"LYZ2SUM input file/list read..."<<endl; | |
c0ed6325 | 245 | } |
40ca990b | 246 | |
247 | if (LYZ2PROD){ | |
248 | // read the output directory from LYZ1PROD | |
249 | TString inputFileNameLYZ2PROD = "outputLYZ1PRODanalysis" ; | |
250 | inputFileNameLYZ2PROD += type; | |
251 | cout<<"The input directory is "<<inputFileNameLYZ2PROD.Data()<<endl; | |
252 | TFile* fInputFileLYZ2PROD = (TFile*)outputFile->FindObjectAny(inputFileNameLYZ2PROD.Data()); | |
253 | if(!fInputFileLYZ2PROD || fInputFileLYZ2PROD->IsZombie()) { | |
254 | cerr << " ERROR: To run LYZ2PROD you need the output file from LYZ1PROD. This file is not there! Please run LYZ1PROD first." << endl ; | |
255 | break; | |
256 | } | |
257 | else { | |
258 | TList* fInputListLYZ2PROD = (TList*)fInputFileLYZ2PROD->Get("cobjLYZ1PROD"); | |
259 | if (!fInputListLYZ2PROD) {cout<<"list is NULL pointer!"<<endl;} | |
260 | } | |
261 | cout<<"LYZ2PROD input file/list read..."<<endl; | |
c0ed6325 | 262 | } |
93329510 | 263 | } |
40ca990b | 264 | |
265 | ||
93329510 | 266 | if (LYZEP) { |
40ca990b | 267 | //read the outputfile of the second run |
268 | TString outputFileName = "AnalysisResults2.root"; | |
269 | TString pwd(gSystem->pwd()); | |
270 | pwd+="/"; | |
271 | pwd+=outputFileName.Data(); | |
272 | TFile *outputFile = NULL; | |
273 | if(gSystem->AccessPathName(pwd.Data(),kFileExists)) { | |
274 | cout<<"WARNING: You do not have an output file:"<<endl; | |
275 | cout<<" "<<pwd.Data()<<endl; | |
276 | exit(0); | |
277 | } else { | |
278 | outputFile = TFile::Open(pwd.Data(),"READ"); | |
279 | } | |
280 | ||
c741f5d0 | 281 | // read the output file from LYZ2SUM |
282 | TString inputFileNameLYZEP = "outputLYZ2SUManalysis" ; | |
93329510 | 283 | inputFileNameLYZEP += type; |
93329510 | 284 | cout<<"The input file is "<<inputFileNameLYZEP.Data()<<endl; |
40ca990b | 285 | TFile* fInputFileLYZEP = (TFile*)outputFile->FindObjectAny(inputFileNameLYZEP.Data()); |
93329510 | 286 | if(!fInputFileLYZEP || fInputFileLYZEP->IsZombie()) { |
5b40431d | 287 | cerr << " ERROR: To run LYZEP you need the output file from LYZ2SUM. This file is not there! Please run LYZ2SUM first." << endl ; |
93329510 | 288 | break; |
289 | } | |
290 | else { | |
c741f5d0 | 291 | TList* fInputListLYZEP = (TList*)fInputFileLYZEP->Get("cobjLYZ2SUM"); |
93329510 | 292 | if (!fInputListLYZEP) {cout<<"list is NULL pointer!"<<endl;} |
293 | } | |
294 | cout<<"LYZEP input file/list read..."<<endl; | |
295 | } | |
40ca990b | 296 | |
93329510 | 297 | |
298 | ||
299 | // Create the task, add it to the manager. | |
300 | //=========================================================================== | |
301 | AliAnalysisTaskFlowEvent *taskFE = NULL; | |
302 | if (QA) { | |
47d5b28f | 303 | if(AddToEvent) { |
304 | taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",kTRUE,1); | |
c0ed6325 | 305 | taskFE->SetEllipticFlowValue(ellipticFlow); } //TEST |
47d5b28f | 306 | else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",kTRUE); } |
93329510 | 307 | taskFE->SetAnalysisType(type); |
c0ed6325 | 308 | if (UseMultCut) { |
309 | taskFE->SetMinMult(multmin); | |
f6cf97c1 | 310 | taskFE->SetMaxMult(multmax); |
311 | } | |
7a01f4a7 | 312 | taskFE->SetSubeventEtaRange(minA, maxA, minB, maxB); |
f6cf97c1 | 313 | if (UsePhysicsSelection) { |
314 | taskFE->SelectCollisionCandidates(); | |
315 | cout<<"Using Physics Selection"<<endl; | |
316 | } | |
93329510 | 317 | mgr->AddTask(taskFE); |
318 | } | |
319 | else { | |
f6cf97c1 | 320 | if(AddToEvent) { |
321 | taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",kFALSE,1); | |
322 | taskFE->SetEllipticFlowValue(ellipticFlow); } //TEST | |
323 | else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",kFALSE); } | |
93329510 | 324 | taskFE->SetAnalysisType(type); |
c0ed6325 | 325 | if (UseMultCut) { |
326 | taskFE->SetMinMult(multmin); | |
f6cf97c1 | 327 | taskFE->SetMaxMult(multmax); |
328 | } | |
329 | taskFE->SetSubeventEtaRange(minA, maxA, minB, maxB); | |
330 | if (UsePhysicsSelection) { | |
331 | taskFE->SelectCollisionCandidates(); | |
332 | cout<<"Using Physics Selection"<<endl; | |
333 | } | |
93329510 | 334 | mgr->AddTask(taskFE); |
335 | } | |
336 | ||
337 | // Create cuts using the correction framework (CORRFW) | |
338 | //=========================================================================== | |
339 | if (QA){ | |
340 | //Set TList for the QA histograms | |
341 | TList* qaRP = new TList(); | |
342 | TList* qaPOI = new TList(); | |
343 | } | |
344 | ||
c0ed6325 | 345 | //----------Event cuts---------- |
94cd9888 | 346 | AliCFEventGenCuts* mcEventCuts = new AliCFEventGenCuts("mcEventCuts","MC-level event cuts"); |
f01e9bfe | 347 | mcEventCuts->SetNTracksCut(multminESD,multmaxESD); |
40ca990b | 348 | mcEventCuts->SetRequireVtxCuts(requireVtxCuts); |
349 | mcEventCuts->SetVertexXCut(vertexXmin, vertexXmax); | |
350 | mcEventCuts->SetVertexYCut(vertexYmin, vertexYmax); | |
351 | mcEventCuts->SetVertexZCut(vertexZmin, vertexZmax); | |
94cd9888 | 352 | if (QA) { |
353 | mcEventCuts->SetQAOn(qaRP); | |
354 | } | |
355 | AliCFEventRecCuts* recEventCuts = new AliCFEventRecCuts("recEventCuts","rec-level event cuts"); | |
f01e9bfe | 356 | recEventCuts->SetNTracksCut(multminESD,multmaxESD); |
40ca990b | 357 | recEventCuts->SetRequireVtxCuts(requireVtxCuts); |
358 | recEventCuts->SetVertexXCut(vertexXmin, vertexXmax); | |
359 | recEventCuts->SetVertexYCut(vertexYmin, vertexYmax); | |
360 | recEventCuts->SetVertexZCut(vertexZmin, vertexZmax); | |
94cd9888 | 361 | if (QA) { |
362 | recEventCuts->SetQAOn(qaRP); | |
363 | } | |
c0ed6325 | 364 | |
365 | //----------Cuts for RP---------- | |
366 | //KINEMATICS (MC and reconstructed) | |
367 | AliCFTrackKineCuts* mcKineCutsRP = new AliCFTrackKineCuts("mcKineCutsRP","MC-level kinematic cuts"); | |
368 | mcKineCutsRP->SetPtRange(ptminRP,ptmaxRP); | |
369 | mcKineCutsRP->SetEtaRange(etaminRP,etamaxRP); | |
370 | //mcKineCutsRP->SetChargeMC(chargeRP); | |
93329510 | 371 | if (QA) { |
c0ed6325 | 372 | mcKineCutsRP->SetQAOn(qaRP); |
93329510 | 373 | } |
374 | ||
c0ed6325 | 375 | AliCFTrackKineCuts *recKineCutsRP = new AliCFTrackKineCuts("recKineCutsRP","rec-level kine cuts"); |
376 | recKineCutsRP->SetPtRange(ptminRP,ptmaxRP); | |
377 | recKineCutsRP->SetEtaRange(etaminRP,etamaxRP); | |
378 | //recKineCutsRP->SetChargeRec(chargeRP); | |
93329510 | 379 | if (QA) { |
c0ed6325 | 380 | recKineCutsRP->SetQAOn(qaRP); |
93329510 | 381 | } |
c0ed6325 | 382 | |
383 | //PID (MC and reconstructed) | |
384 | AliCFParticleGenCuts* mcGenCutsRP = new AliCFParticleGenCuts("mcGenCutsRP","MC particle generation cuts for RP"); | |
385 | mcGenCutsRP->SetRequireIsPrimary(); | |
386 | if (UsePIDforRP) {mcGenCutsRP->SetRequirePdgCode(PdgRP);} | |
93329510 | 387 | if (QA) { |
c0ed6325 | 388 | mcGenCutsRP->SetQAOn(qaRP); |
93329510 | 389 | } |
390 | ||
c0ed6325 | 391 | int n_species = AliPID::kSPECIES ; |
392 | Double_t* prior = new Double_t[n_species]; | |
393 | ||
394 | prior[0] = 0.0244519 ; | |
395 | prior[1] = 0.0143988 ; | |
396 | prior[2] = 0.805747 ; | |
397 | prior[3] = 0.0928785 ; | |
398 | prior[4] = 0.0625243 ; | |
399 | ||
400 | AliCFTrackCutPid* cutPidRP = NULL; | |
401 | if(UsePIDforRP) { | |
402 | cutPidRP = new AliCFTrackCutPid("cutPidRP","ESD_PID for RP") ; | |
403 | cutPidRP->SetPriors(prior); | |
404 | cutPidRP->SetProbabilityCut(0.0); | |
405 | cutPidRP->SetDetectors("TPC TOF"); | |
406 | switch(TMath::Abs(PDG1)) { | |
407 | case 11 : cutPidRP->SetParticleType(AliPID::kElectron, kTRUE); break; | |
408 | case 13 : cutPidRP->SetParticleType(AliPID::kMuon , kTRUE); break; | |
409 | case 211 : cutPidRP->SetParticleType(AliPID::kPion , kTRUE); break; | |
410 | case 321 : cutPidRP->SetParticleType(AliPID::kKaon , kTRUE); break; | |
411 | case 2212 : cutPidRP->SetParticleType(AliPID::kProton , kTRUE); break; | |
412 | default : printf("UNDEFINED PID\n"); break; | |
413 | } | |
414 | if (QA) { | |
415 | cutPidRP->SetQAOn(qaRP); | |
416 | } | |
93329510 | 417 | } |
418 | ||
c0ed6325 | 419 | //TRACK QUALITY |
420 | AliCFTrackQualityCuts *recQualityCutsRP = new AliCFTrackQualityCuts("recQualityCutsRP","rec-level quality cuts"); | |
421 | recQualityCutsRP->SetMinNClusterTPC(minClustersTpcRP); | |
422 | //recQualityCutsRP->SetMinFoundClusterTPC(minFoundClustersTpcRP); //only for internal TPC QA | |
423 | recQualityCutsRP->SetMaxChi2PerClusterTPC(maxChi2PerClusterTpcRP); | |
424 | recQualityCutsRP->SetMinNdEdxClusterTPC(minDedxClusterTpcRP); //to reject secondaries | |
425 | ||
426 | recQualityCutsRP->SetMinNClusterITS(minClustersItsRP); | |
427 | recQualityCutsRP->SetMaxChi2PerClusterITS(maxChi2PerClusterItsRP); | |
428 | ||
429 | recQualityCutsRP->SetMinNClusterTRD(minClustersTrdRP); | |
430 | recQualityCutsRP->SetMinNTrackletTRD(minTrackletTrdRP); | |
431 | recQualityCutsRP->SetMinNTrackletTRDpid(minTrackletTrdPidRP); | |
432 | recQualityCutsRP->SetMaxChi2PerTrackletTRD(maxChi2PerClusterTrdRP); | |
433 | recQualityCutsRP->SetStatus(statusRP); | |
93329510 | 434 | if (QA) { |
c0ed6325 | 435 | recQualityCutsRP->SetQAOn(qaRP); |
93329510 | 436 | } |
c0ed6325 | 437 | |
438 | /* | |
439 | //How to set this? | |
440 | void SetMaxCovDiagonalElements(Float_t c1=1.e+09, Float_t c2=1.e+09, Float_t c3=1.e+09, Float_t c4=1.e+09, Float_t c5=1.e+09) | |
441 | {fCovariance11Max=c1;fCovariance22Max=c2;fCovariance33Max=c3;fCovariance44Max=c4;fCovariance55Max=c5;} | |
442 | */ | |
443 | ||
444 | //PRIMARIES | |
445 | AliCFTrackIsPrimaryCuts *recIsPrimaryCutsRP = new AliCFTrackIsPrimaryCuts("recIsPrimaryCutsRP","rec-level isPrimary cuts"); | |
446 | recIsPrimaryCutsRP->UseSPDvertex(spdVertexRP); | |
447 | recIsPrimaryCutsRP->UseTPCvertex(tpcVertexRP); | |
448 | recIsPrimaryCutsRP->SetMinDCAToVertexXY(minDcaToVertexXyRP); | |
449 | recIsPrimaryCutsRP->SetMinDCAToVertexZ(minDcaToVertexZRP); | |
450 | recIsPrimaryCutsRP->SetMaxDCAToVertexXY(maxDcaToVertexXyRP); | |
451 | recIsPrimaryCutsRP->SetMaxDCAToVertexZ(maxDcaToVertexZRP); | |
452 | recIsPrimaryCutsRP->SetDCAToVertex2D(dcaToVertex2dRP); | |
453 | recIsPrimaryCutsRP->SetAbsDCAToVertex(absDcaToVertexRP); | |
454 | recIsPrimaryCutsRP->SetMinNSigmaToVertex(minNSigmaToVertexRP); | |
455 | recIsPrimaryCutsRP->SetMaxNSigmaToVertex(maxNSigmaToVertexRP); | |
456 | recIsPrimaryCutsRP->SetMaxSigmaDCAxy(maxSigmaDcaXySP); | |
457 | recIsPrimaryCutsRP->SetMaxSigmaDCAz(maxSigmaDcaZSP); | |
458 | recIsPrimaryCutsRP->SetRequireSigmaToVertex(requireSigmaToVertexSP); | |
459 | recIsPrimaryCutsRP->SetAcceptKinkDaughters(acceptKinkDaughtersSP); | |
93329510 | 460 | if (QA) { |
c0ed6325 | 461 | recIsPrimaryCutsRP->SetQAOn(qaRP); |
93329510 | 462 | } |
463 | ||
c0ed6325 | 464 | //ACCEPTANCE |
465 | AliCFAcceptanceCuts *mcAccCutsRP = new AliCFAcceptanceCuts("mcAccCutsRP","MC acceptance cuts"); | |
466 | mcAccCutsRP->SetMinNHitITS(minTrackrefsItsRP); | |
467 | mcAccCutsRP->SetMinNHitTPC(minTrackrefsTpcRP); | |
468 | mcAccCutsRP->SetMinNHitTRD(minTrackrefsTrdRP); | |
469 | mcAccCutsRP->SetMinNHitTOF(minTrackrefsTofRP); | |
470 | mcAccCutsRP->SetMinNHitMUON(minTrackrefsMuonRP); | |
93329510 | 471 | if (QA) { |
c0ed6325 | 472 | mcAccCutsRP->SetQAOn(qaRP); |
93329510 | 473 | } |
c0ed6325 | 474 | |
93329510 | 475 | |
c0ed6325 | 476 | //----------Cuts for POI---------- |
477 | //KINEMATICS (MC and reconstructed) | |
478 | AliCFTrackKineCuts* mcKineCutsPOI = new AliCFTrackKineCuts("mcKineCutsPOI","MC-level kinematic cuts"); | |
479 | mcKineCutsPOI->SetPtRange(ptminPOI,ptmaxPOI); | |
480 | mcKineCutsPOI->SetEtaRange(etaminPOI,etamaxPOI); | |
481 | //mcKineCutsPOI->SetChargeMC(chargePOI); | |
93329510 | 482 | if (QA) { |
c0ed6325 | 483 | mcKineCutsPOI->SetQAOn(qaPOI); |
93329510 | 484 | } |
485 | ||
c0ed6325 | 486 | AliCFTrackKineCuts *recKineCutsPOI = new AliCFTrackKineCuts("recKineCutsPOI","rec-level kine cuts"); |
487 | recKineCutsPOI->SetPtRange(ptminPOI,ptmaxPOI); | |
488 | recKineCutsPOI->SetEtaRange(etaminPOI,etamaxPOI); | |
489 | //recKineCutsPOI->SetChargeRec(chargePOI); | |
93329510 | 490 | if (QA) { |
c0ed6325 | 491 | recKineCutsPOI->SetQAOn(qaPOI); |
93329510 | 492 | } |
493 | ||
c0ed6325 | 494 | //PID (MC and reconstructed) |
495 | AliCFParticleGenCuts* mcGenCutsPOI = new AliCFParticleGenCuts("mcGenCutsPOI","MC particle generation cuts for POI"); | |
496 | mcGenCutsPOI->SetRequireIsPrimary(); | |
497 | if (UsePIDforPOI) {mcGenCutsPOI->SetRequirePdgCode(PdgPOI);} | |
93329510 | 498 | if (QA) { |
c0ed6325 | 499 | mcGenCutsPOI->SetQAOn(qaPOI); |
93329510 | 500 | } |
c0ed6325 | 501 | |
502 | AliCFTrackCutPid* cutPidPOI = NULL; | |
93329510 | 503 | if (UsePIDforPOI) { |
c0ed6325 | 504 | cutPidPOI = new AliCFTrackCutPid("cutPidPOI","ESD_PID for POI") ; |
505 | cutPidPOI->SetPriors(prior); | |
506 | cutPidPOI->SetProbabilityCut(0.0); | |
507 | cutPidPOI->SetDetectors("TPC TOF"); | |
93329510 | 508 | switch(TMath::Abs(PDG2)) { |
c0ed6325 | 509 | case 11 : cutPidPOI->SetParticleType(AliPID::kElectron, kTRUE); break; |
510 | case 13 : cutPidPOI->SetParticleType(AliPID::kMuon , kTRUE); break; | |
511 | case 211 : cutPidPOI->SetParticleType(AliPID::kPion , kTRUE); break; | |
512 | case 321 : cutPidPOI->SetParticleType(AliPID::kKaon , kTRUE); break; | |
513 | case 2212 : cutPidPOI->SetParticleType(AliPID::kProton , kTRUE); break; | |
93329510 | 514 | default : printf("UNDEFINED PID\n"); break; |
515 | } | |
516 | if (QA) { | |
c0ed6325 | 517 | cutPidPOI->SetQAOn(qaPOI); |
93329510 | 518 | } |
519 | } | |
c0ed6325 | 520 | |
521 | //TRACK QUALITY | |
522 | AliCFTrackQualityCuts *recQualityCutsPOI = new AliCFTrackQualityCuts("recQualityCutsPOI","rec-level quality cuts"); | |
523 | recQualityCutsPOI->SetMinNClusterTPC(minClustersTpcPOI); | |
524 | //recQualityCutsPOI->SetMinFoundClusterTPC(minFoundClustersTpcPOI); //only for internal TPC QA | |
525 | recQualityCutsPOI->SetMaxChi2PerClusterTPC(maxChi2PerClusterTpcPOI); | |
526 | recQualityCutsPOI->SetMinNdEdxClusterTPC(minDedxClusterTpcPOI); //to reject secondaries | |
527 | ||
528 | recQualityCutsPOI->SetMinNClusterITS(minClustersItsPOI); | |
529 | recQualityCutsPOI->SetMaxChi2PerClusterITS(maxChi2PerClusterItsPOI); | |
530 | ||
531 | recQualityCutsPOI->SetMinNClusterTRD(minClustersTrdPOI); | |
532 | recQualityCutsPOI->SetMinNTrackletTRD(minTrackletTrdPOI); | |
533 | recQualityCutsPOI->SetMinNTrackletTRDpid(minTrackletTrdPidPOI); | |
534 | recQualityCutsPOI->SetMaxChi2PerTrackletTRD(maxChi2PerClusterTrdPOI); | |
535 | recQualityCutsPOI->SetStatus(statusPOI); | |
536 | if (QA) { | |
537 | recQualityCutsPOI->SetQAOn(qaPOI); | |
538 | } | |
539 | ||
540 | //PRIMARIES | |
541 | AliCFTrackIsPrimaryCuts *recIsPrimaryCutsPOI = new AliCFTrackIsPrimaryCuts("recIsPrimaryCutsPOI","rec-level isPrimary cuts"); | |
542 | recIsPrimaryCutsPOI->UseSPDvertex(spdVertexPOI); | |
543 | recIsPrimaryCutsPOI->UseTPCvertex(tpcVertexPOI); | |
544 | recIsPrimaryCutsPOI->SetMinDCAToVertexXY(minDcaToVertexXyPOI); | |
545 | recIsPrimaryCutsPOI->SetMinDCAToVertexZ(minDcaToVertexZPOI); | |
546 | recIsPrimaryCutsPOI->SetMaxDCAToVertexXY(maxDcaToVertexXyPOI); | |
547 | recIsPrimaryCutsPOI->SetMaxDCAToVertexZ(maxDcaToVertexZPOI); | |
548 | recIsPrimaryCutsPOI->SetDCAToVertex2D(dcaToVertex2dPOI); | |
549 | recIsPrimaryCutsPOI->SetAbsDCAToVertex(absDcaToVertexPOI); | |
550 | recIsPrimaryCutsPOI->SetMinNSigmaToVertex(minNSigmaToVertexPOI); | |
551 | recIsPrimaryCutsPOI->SetMaxNSigmaToVertex(maxNSigmaToVertexPOI); | |
552 | recIsPrimaryCutsPOI->SetMaxSigmaDCAxy(maxSigmaDcaXyPOI); | |
553 | recIsPrimaryCutsPOI->SetMaxSigmaDCAz(maxSigmaDcaZPOI); | |
554 | recIsPrimaryCutsPOI->SetRequireSigmaToVertex(requireSigmaToVertexPOI); | |
555 | recIsPrimaryCutsPOI->SetAcceptKinkDaughters(acceptKinkDaughtersPOI); | |
556 | if (QA) { | |
557 | recIsPrimaryCutsPOI->SetQAOn(qaPOI); | |
558 | } | |
559 | ||
560 | //ACCEPTANCE | |
561 | AliCFAcceptanceCuts *mcAccCutsPOI = new AliCFAcceptanceCuts("mcAccCutsPOI","MC acceptance cuts"); | |
562 | mcAccCutsPOI->SetMinNHitITS(minTrackrefsItsPOI); | |
563 | mcAccCutsPOI->SetMinNHitTPC(minTrackrefsTpcPOI); | |
564 | mcAccCutsPOI->SetMinNHitTRD(minTrackrefsTrdPOI); | |
565 | mcAccCutsPOI->SetMinNHitTOF(minTrackrefsTofPOI); | |
566 | mcAccCutsPOI->SetMinNHitMUON(minTrackrefsMuonPOI); | |
567 | if (QA) { | |
568 | mcAccCutsPOI->SetQAOn(qaPOI); | |
569 | } | |
570 | ||
571 | ||
93329510 | 572 | |
c0ed6325 | 573 | //----------Create Cut Lists---------- |
94cd9888 | 574 | printf("CREATE EVENT CUTS\n"); |
c0ed6325 | 575 | TObjArray* mcEventList = new TObjArray(0); |
40ca990b | 576 | if (UseMultCutforESD) mcEventList->AddLast(mcEventCuts);//cut on mult and vertex |
94cd9888 | 577 | |
578 | TObjArray* recEventList = new TObjArray(0); | |
40ca990b | 579 | if (UseMultCutforESD) recEventList->AddLast(recEventCuts);//cut on mult and vertex |
94cd9888 | 580 | |
93329510 | 581 | printf("CREATE MC KINE CUTS\n"); |
c0ed6325 | 582 | TObjArray* mcListRP = new TObjArray(0); |
583 | if (UseKineforRP) mcListRP->AddLast(mcKineCutsRP); //cut on pt/eta/phi | |
584 | mcListRP->AddLast(mcGenCutsRP); //cut on primary and if (UsePIDforRP) MC PID | |
93329510 | 585 | |
c0ed6325 | 586 | TObjArray* mcListPOI = new TObjArray(0); |
587 | if (UseKineforPOI) mcListPOI->AddLast(mcKineCutsPOI); //cut on pt/eta/phi | |
588 | mcListPOI->AddLast(mcGenCutsPOI); //cut on primary and if (UsePIDforPOI) MC PID | |
93329510 | 589 | |
c0ed6325 | 590 | printf("CREATE MC ACCEPTANCE CUTS\n"); |
591 | TObjArray* accListRP = new TObjArray(0) ; | |
592 | if (UseAcceptanceforRP) accListRP->AddLast(mcAccCutsRP); //cut on number of track references | |
93329510 | 593 | |
c0ed6325 | 594 | TObjArray* accListPOI = new TObjArray(0) ; |
595 | if (UseAcceptanceforPOI) accListPOI->AddLast(mcAccCutsPOI); //cut on number of track references | |
93329510 | 596 | |
c0ed6325 | 597 | printf("CREATE ESD RECONSTRUCTION CUTS\n"); |
598 | TObjArray* recListRP = new TObjArray(0) ; | |
599 | if (UseKineforRP) recListRP->AddLast(recKineCutsRP); //cut on pt/eta/phi | |
600 | if (UseTrackQualityforRP) recListRP->AddLast(recQualityCutsRP); | |
601 | if (UsePrimariesforRP) recListRP->AddLast(recIsPrimaryCutsRP); //cut if it is a primary | |
93329510 | 602 | |
c0ed6325 | 603 | TObjArray* recListPOI = new TObjArray(0) ; |
604 | if (UseKineforPOI) recListPOI->AddLast(recKineCutsPOI); //cut on pt/eta/phi | |
605 | if (UseTrackQualityforPOI) recListPOI->AddLast(recQualityCutsPOI); | |
606 | if (UsePrimariesforPOI) recListPOI->AddLast(recIsPrimaryCutsPOI); //cut if it is a primary | |
93329510 | 607 | |
c0ed6325 | 608 | printf("CREATE ESD PID CUTS\n"); |
609 | TObjArray* fPIDCutListRP = new TObjArray(0) ; | |
610 | if(UsePIDforRP) {fPIDCutListRP->AddLast(cutPidRP);} //cut on ESD PID | |
93329510 | 611 | |
c0ed6325 | 612 | TObjArray* fPIDCutListPOI = new TObjArray(0) ; |
613 | if (UsePIDforPOI) {fPIDCutListPOI->AddLast(cutPidPOI);} //cut on ESD PID | |
93329510 | 614 | |
c0ed6325 | 615 | |
616 | //----------Add Cut Lists to the CF Manager---------- | |
93329510 | 617 | printf("CREATE INTERFACE AND CUTS\n"); |
c0ed6325 | 618 | AliCFManager* cfmgrRP = new AliCFManager(); |
619 | cfmgrRP->SetNStepEvent(3); | |
620 | cfmgrRP->SetEventCutsList(AliCFManager::kEvtGenCuts,mcEventList); | |
621 | cfmgrRP->SetEventCutsList(AliCFManager::kEvtRecCuts,recEventList); | |
622 | cfmgrRP->SetNStepParticle(4); | |
623 | cfmgrRP->SetParticleCutsList(AliCFManager::kPartGenCuts,mcListRP); | |
624 | cfmgrRP->SetParticleCutsList(AliCFManager::kPartAccCuts,accListRP); | |
625 | cfmgrRP->SetParticleCutsList(AliCFManager::kPartRecCuts,recListRP); | |
626 | cfmgrRP->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutListRP); | |
93329510 | 627 | |
c0ed6325 | 628 | AliCFManager* cfmgrPOI = new AliCFManager(); |
629 | cfmgrPOI->SetNStepEvent(3); | |
630 | cfmgrPOI->SetEventCutsList(AliCFManager::kEvtGenCuts,mcEventList); | |
631 | cfmgrPOI->SetEventCutsList(AliCFManager::kEvtRecCuts,recEventList); | |
632 | cfmgrPOI->SetNStepParticle(4); | |
633 | cfmgrPOI->SetParticleCutsList(AliCFManager::kPartGenCuts,mcListPOI); | |
634 | cfmgrPOI->SetParticleCutsList(AliCFManager::kPartAccCuts,accListPOI); | |
635 | cfmgrPOI->SetParticleCutsList(AliCFManager::kPartRecCuts,recListPOI); | |
636 | cfmgrPOI->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutListPOI); | |
93329510 | 637 | |
638 | if (QA) { | |
639 | taskFE->SetQAList1(qaRP); | |
640 | taskFE->SetQAList2(qaPOI); | |
641 | } | |
c0ed6325 | 642 | taskFE->SetCFManager1(cfmgrRP); |
643 | taskFE->SetCFManager2(cfmgrPOI); | |
93329510 | 644 | |
645 | ||
646 | ||
647 | // Create the analysis tasks, add them to the manager. | |
648 | //=========================================================================== | |
649 | if (SP){ | |
29195b69 | 650 | AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",WEIGHTS[0]); |
93329510 | 651 | mgr->AddTask(taskSP); |
652 | } | |
c741f5d0 | 653 | if (LYZ1SUM){ |
654 | AliAnalysisTaskLeeYangZeros *taskLYZ1SUM = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosSUM",kTRUE); | |
655 | taskLYZ1SUM->SetFirstRunLYZ(kTRUE); | |
656 | taskLYZ1SUM->SetUseSumLYZ(kTRUE); | |
657 | mgr->AddTask(taskLYZ1SUM); | |
658 | } | |
659 | if (LYZ1PROD){ | |
660 | AliAnalysisTaskLeeYangZeros *taskLYZ1PROD = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosPROD",kTRUE); | |
661 | taskLYZ1PROD->SetFirstRunLYZ(kTRUE); | |
662 | taskLYZ1PROD->SetUseSumLYZ(kFALSE); | |
663 | mgr->AddTask(taskLYZ1PROD); | |
664 | } | |
665 | if (LYZ2SUM){ | |
666 | AliAnalysisTaskLeeYangZeros *taskLYZ2SUM = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosSUM",kFALSE); | |
667 | taskLYZ2SUM->SetFirstRunLYZ(kFALSE); | |
668 | taskLYZ2SUM->SetUseSumLYZ(kTRUE); | |
669 | mgr->AddTask(taskLYZ2SUM); | |
670 | } | |
671 | if (LYZ2PROD){ | |
672 | AliAnalysisTaskLeeYangZeros *taskLYZ2PROD = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosPROD",kFALSE); | |
673 | taskLYZ2PROD->SetFirstRunLYZ(kFALSE); | |
674 | taskLYZ2PROD->SetUseSumLYZ(kFALSE); | |
675 | mgr->AddTask(taskLYZ2PROD); | |
93329510 | 676 | } |
677 | if (LYZEP){ | |
678 | AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane"); | |
679 | mgr->AddTask(taskLYZEP); | |
680 | } | |
681 | if (GFC){ | |
682 | AliAnalysisTaskCumulants *taskGFC = new AliAnalysisTaskCumulants("TaskCumulants",useWeights); | |
683 | taskGFC->SetUsePhiWeights(WEIGHTS[0]); | |
684 | taskGFC->SetUsePtWeights(WEIGHTS[1]); | |
685 | taskGFC->SetUseEtaWeights(WEIGHTS[2]); | |
686 | mgr->AddTask(taskGFC); | |
687 | } | |
688 | if (QC){ | |
689 | AliAnalysisTaskQCumulants *taskQC = new AliAnalysisTaskQCumulants("TaskQCumulants",useWeights); | |
690 | taskQC->SetUsePhiWeights(WEIGHTS[0]); | |
691 | taskQC->SetUsePtWeights(WEIGHTS[1]); | |
692 | taskQC->SetUseEtaWeights(WEIGHTS[2]); | |
693 | mgr->AddTask(taskQC); | |
694 | } | |
695 | if (FQD){ | |
696 | AliAnalysisTaskFittingQDistribution *taskFQD = new AliAnalysisTaskFittingQDistribution("TaskFittingQDistribution",kFALSE); | |
697 | taskFQD->SetUsePhiWeights(WEIGHTS[0]); | |
698 | mgr->AddTask(taskFQD); | |
699 | } | |
700 | if (MCEP){ | |
701 | AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane"); | |
702 | mgr->AddTask(taskMCEP); | |
703 | } | |
67a6b178 | 704 | if (MH){ |
705 | AliAnalysisTaskMixedHarmonics *taskMH = new AliAnalysisTaskMixedHarmonics("TaskMixedHarmonics",useWeights); | |
706 | taskMH->SetCorrelatorInteger(1); | |
707 | taskMH->SetNoOfMultipicityBins(10); | |
708 | taskMH->SetMultipicityBinWidth(2); | |
709 | taskMH->SetMinMultiplicity(3); | |
710 | taskMH->SetCorrectForDetectorEffects(kTRUE); | |
711 | //taskMH->SetUsePhiWeights(WEIGHTS[0]); | |
712 | //taskMH->SetUsePtWeights(WEIGHTS[1]); | |
713 | //taskMH->SetUseEtaWeights(WEIGHTS[2]); | |
714 | mgr->AddTask(taskMH); | |
715 | } | |
716 | if (NL){ | |
717 | AliAnalysisTaskNestedLoops *taskNL = new AliAnalysisTaskNestedLoops("TaskNestedLoops",useWeights); | |
718 | //taskNL->SetUsePhiWeights(WEIGHTS[0]); | |
719 | //taskNL->SetUsePtWeights(WEIGHTS[1]); | |
720 | //taskNL->SetUseEtaWeights(WEIGHTS[2]); | |
721 | mgr->AddTask(taskNL); | |
722 | } | |
723 | ||
93329510 | 724 | // Create the output container for the data produced by the task |
725 | // Connect to the input and output containers | |
726 | //=========================================================================== | |
727 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); | |
728 | AliAnalysisDataContainer *coutputFE = mgr->CreateContainer("cobjFlowEventSimple", AliFlowEventSimple::Class(),AliAnalysisManager::kExchangeContainer); | |
729 | mgr->ConnectInput(taskFE,0,cinput1); | |
f6cf97c1 | 730 | mgr->ConnectOutput(taskFE,1,coutputFE); |
93329510 | 731 | |
732 | if (QA) { | |
47d5b28f | 733 | TString qaNameRPFE = AliAnalysisManager::GetCommonFileName(); |
734 | qaNameRPFE += ":QAforRP_FE_"; | |
93329510 | 735 | qaNameRPFE += type; |
47d5b28f | 736 | |
737 | AliAnalysisDataContainer *coutputQA1FE = | |
738 | mgr->CreateContainer("QARPFE", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameRPFE); | |
93329510 | 739 | |
47d5b28f | 740 | TString qaNamePOIFE = AliAnalysisManager::GetCommonFileName(); |
741 | qaNamePOIFE += ":QAforPOI_FE_"; | |
93329510 | 742 | qaNamePOIFE += type; |
47d5b28f | 743 | |
744 | AliAnalysisDataContainer *coutputQA2FE = | |
745 | mgr->CreateContainer("QAPOIFE", TList::Class(),AliAnalysisManager::kOutputContainer,qaNamePOIFE); | |
746 | ||
f6cf97c1 | 747 | mgr->ConnectOutput(taskFE,2,coutputQA1FE); |
748 | mgr->ConnectOutput(taskFE,3,coutputQA2FE); | |
93329510 | 749 | } |
750 | ||
751 | // Create the output containers for the data produced by the analysis tasks | |
752 | // Connect to the input and output containers | |
753 | //=========================================================================== | |
754 | if (useWeights) { | |
755 | AliAnalysisDataContainer *cinputWeights = mgr->CreateContainer("cobjWeights",TList::Class(),AliAnalysisManager::kInputContainer); | |
756 | } | |
757 | ||
758 | if(SP) { | |
47d5b28f | 759 | TString outputSP = AliAnalysisManager::GetCommonFileName(); |
760 | outputSP += ":outputSPanalysis"; | |
93329510 | 761 | outputSP+= type; |
47d5b28f | 762 | |
763 | AliAnalysisDataContainer *coutputSP = mgr->CreateContainer("cobjSP", TList::Class(),AliAnalysisManager::kOutputContainer,outputSP); | |
93329510 | 764 | mgr->ConnectInput(taskSP,0,coutputFE); |
ea456d37 | 765 | mgr->ConnectOutput(taskSP,1,coutputSP); |
29195b69 | 766 | if (WEIGHTS[0]) { |
767 | mgr->ConnectInput(taskSP,1,cinputWeights); | |
768 | cinputWeights->SetData(weightsList); | |
769 | } | |
93329510 | 770 | } |
c741f5d0 | 771 | if(LYZ1SUM) { |
47d5b28f | 772 | TString outputLYZ1SUM = AliAnalysisManager::GetCommonFileName(); |
773 | outputLYZ1SUM += ":outputLYZ1SUManalysis"; | |
c741f5d0 | 774 | outputLYZ1SUM+= type; |
47d5b28f | 775 | |
776 | AliAnalysisDataContainer *coutputLYZ1SUM = mgr->CreateContainer("cobjLYZ1SUM", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1SUM); | |
c741f5d0 | 777 | mgr->ConnectInput(taskLYZ1SUM,0,coutputFE); |
47d5b28f | 778 | mgr->ConnectOutput(taskLYZ1SUM,0,coutputLYZ1SUM); |
c741f5d0 | 779 | } |
780 | if(LYZ1PROD) { | |
47d5b28f | 781 | TString outputLYZ1PROD = AliAnalysisManager::GetCommonFileName(); |
782 | outputLYZ1PROD += ":outputLYZ1PRODanalysis"; | |
c741f5d0 | 783 | outputLYZ1PROD+= type; |
47d5b28f | 784 | |
785 | AliAnalysisDataContainer *coutputLYZ1PROD = mgr->CreateContainer("cobjLYZ1PROD", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1PROD); | |
c741f5d0 | 786 | mgr->ConnectInput(taskLYZ1PROD,0,coutputFE); |
787 | mgr->ConnectOutput(taskLYZ1PROD,0,coutputLYZ1PROD); | |
788 | } | |
789 | if(LYZ2SUM) { | |
790 | AliAnalysisDataContainer *cinputLYZ2SUM = mgr->CreateContainer("cobjLYZ2SUMin",TList::Class(),AliAnalysisManager::kInputContainer); | |
47d5b28f | 791 | TString outputLYZ2SUM = AliAnalysisManager::GetCommonFileName(); |
792 | outputLYZ2SUM += ":outputLYZ2SUManalysis"; | |
c741f5d0 | 793 | outputLYZ2SUM+= type; |
47d5b28f | 794 | |
795 | AliAnalysisDataContainer *coutputLYZ2SUM = mgr->CreateContainer("cobjLYZ2SUM", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2SUM); | |
c741f5d0 | 796 | mgr->ConnectInput(taskLYZ2SUM,0,coutputFE); |
797 | mgr->ConnectInput(taskLYZ2SUM,1,cinputLYZ2SUM); | |
47d5b28f | 798 | mgr->ConnectOutput(taskLYZ2SUM,0,coutputLYZ2SUM); |
c741f5d0 | 799 | cinputLYZ2SUM->SetData(fInputListLYZ2SUM); |
800 | } | |
801 | if(LYZ2PROD) { | |
802 | AliAnalysisDataContainer *cinputLYZ2PROD = mgr->CreateContainer("cobjLYZ2PRODin",TList::Class(),AliAnalysisManager::kInputContainer); | |
47d5b28f | 803 | TString outputLYZ2PROD = AliAnalysisManager::GetCommonFileName(); |
804 | outputLYZ2PROD += ":outputLYZ2PRODanalysis"; | |
c741f5d0 | 805 | outputLYZ2PROD+= type; |
47d5b28f | 806 | |
807 | AliAnalysisDataContainer *coutputLYZ2PROD = mgr->CreateContainer("cobjLYZ2PROD", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2PROD); | |
c741f5d0 | 808 | mgr->ConnectInput(taskLYZ2PROD,0,coutputFE); |
809 | mgr->ConnectInput(taskLYZ2PROD,1,cinputLYZ2PROD); | |
47d5b28f | 810 | mgr->ConnectOutput(taskLYZ2PROD,0,coutputLYZ2PROD); |
c741f5d0 | 811 | cinputLYZ2PROD->SetData(fInputListLYZ2PROD); |
93329510 | 812 | } |
813 | if(LYZEP) { | |
814 | AliAnalysisDataContainer *cinputLYZEP = mgr->CreateContainer("cobjLYZEPin",TList::Class(),AliAnalysisManager::kInputContainer); | |
47d5b28f | 815 | TString outputLYZEP = AliAnalysisManager::GetCommonFileName(); |
816 | outputLYZEP += ":outputLYZEPanalysis"; | |
93329510 | 817 | outputLYZEP+= type; |
47d5b28f | 818 | |
819 | AliAnalysisDataContainer *coutputLYZEP = mgr->CreateContainer("cobjLYZEP", TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZEP); | |
93329510 | 820 | mgr->ConnectInput(taskLYZEP,0,coutputFE); |
821 | mgr->ConnectInput(taskLYZEP,1,cinputLYZEP); | |
47d5b28f | 822 | mgr->ConnectOutput(taskLYZEP,0,coutputLYZEP); |
93329510 | 823 | cinputLYZEP->SetData(fInputListLYZEP); |
824 | } | |
825 | if(GFC) { | |
47d5b28f | 826 | TString outputGFC = AliAnalysisManager::GetCommonFileName(); |
827 | outputGFC += ":outputGFCanalysis"; | |
93329510 | 828 | outputGFC+= type; |
47d5b28f | 829 | |
830 | AliAnalysisDataContainer *coutputGFC = mgr->CreateContainer("cobjGFC", TList::Class(),AliAnalysisManager::kOutputContainer,outputGFC); | |
93329510 | 831 | mgr->ConnectInput(taskGFC,0,coutputFE); |
2ed70edf | 832 | mgr->ConnectOutput(taskGFC,1,coutputGFC); |
93329510 | 833 | if (useWeights) { |
834 | mgr->ConnectInput(taskGFC,1,cinputWeights); | |
835 | cinputWeights->SetData(weightsList); | |
836 | } | |
837 | } | |
838 | if(QC) { | |
47d5b28f | 839 | TString outputQC = AliAnalysisManager::GetCommonFileName(); |
840 | outputQC += ":outputQCanalysis"; | |
93329510 | 841 | outputQC+= type; |
47d5b28f | 842 | |
843 | AliAnalysisDataContainer *coutputQC = mgr->CreateContainer("cobjQC", TList::Class(),AliAnalysisManager::kOutputContainer,outputQC); | |
93329510 | 844 | mgr->ConnectInput(taskQC,0,coutputFE); |
2ed70edf | 845 | mgr->ConnectOutput(taskQC,1,coutputQC); |
93329510 | 846 | if (useWeights) { |
847 | mgr->ConnectInput(taskQC,1,cinputWeights); | |
848 | cinputWeights->SetData(weightsList); | |
2ed70edf | 849 | } |
93329510 | 850 | } |
851 | if(FQD) { | |
47d5b28f | 852 | TString outputFQD = AliAnalysisManager::GetCommonFileName(); |
853 | outputFQD += ":outputFQDanalysis"; | |
93329510 | 854 | outputFQD+= type; |
47d5b28f | 855 | |
856 | AliAnalysisDataContainer *coutputFQD = mgr->CreateContainer("cobjFQD", TList::Class(),AliAnalysisManager::kOutputContainer,outputFQD); | |
93329510 | 857 | mgr->ConnectInput(taskFQD,0,coutputFE); |
2ed70edf | 858 | mgr->ConnectOutput(taskFQD,1,coutputFQD); |
93329510 | 859 | if(useWeights) { |
860 | mgr->ConnectInput(taskFQD,1,cinputWeights); | |
861 | cinputWeights->SetData(weightsList); | |
862 | } | |
863 | } | |
864 | if(MCEP) { | |
47d5b28f | 865 | TString outputMCEP = AliAnalysisManager::GetCommonFileName(); |
866 | outputMCEP += ":outputMCEPanalysis"; | |
93329510 | 867 | outputMCEP+= type; |
47d5b28f | 868 | |
869 | AliAnalysisDataContainer *coutputMCEP = mgr->CreateContainer("cobjMCEP", TList::Class(),AliAnalysisManager::kOutputContainer,outputMCEP); | |
93329510 | 870 | mgr->ConnectInput(taskMCEP,0,coutputFE); |
47d5b28f | 871 | mgr->ConnectOutput(taskMCEP,0,coutputMCEP); |
93329510 | 872 | } |
67a6b178 | 873 | if(MH) { |
874 | TString outputMH = AliAnalysisManager::GetCommonFileName(); | |
875 | outputMH += ":outputMHanalysis"; | |
876 | outputMH += type; | |
877 | ||
878 | AliAnalysisDataContainer *coutputMH = mgr->CreateContainer("cobjMH", TList::Class(),AliAnalysisManager::kOutputContainer,outputMH); | |
879 | mgr->ConnectInput(taskMH,0,coutputFE); | |
880 | mgr->ConnectOutput(taskMH,1,coutputMH); | |
881 | //if (useWeights) { | |
882 | // mgr->ConnectInput(taskMH,1,cinputWeights); | |
883 | // cinputWeights->SetData(weightsList); | |
884 | //} | |
885 | } | |
886 | if(NL) { | |
887 | TString outputNL = AliAnalysisManager::GetCommonFileName(); | |
888 | outputNL += ":outputNLanalysis"; | |
889 | outputNL += type; | |
890 | ||
891 | AliAnalysisDataContainer *coutputNL = mgr->CreateContainer("cobjNL", TList::Class(),AliAnalysisManager::kOutputContainer,outputNL); | |
892 | mgr->ConnectInput(taskNL,0,coutputFE); | |
893 | mgr->ConnectOutput(taskNL,1,coutputNL); | |
894 | //if (useWeights) { | |
895 | // mgr->ConnectInput(taskNL,1,cinputWeights); | |
896 | // cinputWeights->SetData(weightsList); | |
897 | //} | |
898 | } | |
93329510 | 899 | |
900 | // Return analysis task | |
901 | //=========================================================================== | |
902 | return taskFE; | |
903 | ||
904 | ||
905 | ||
906 | } | |
907 | ||
908 | ||
909 | ||
910 | ||
911 |