]>
Commit | Line | Data |
---|---|---|
daf66719 | 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 | ||
10 | // Define the range for eta subevents (for SP method) | |
daf66719 | 11 | Double_t minA = -0.9; |
12 | Double_t maxA = -0.5; | |
13 | Double_t minB = 0.5; | |
14 | Double_t maxB = 0.9; | |
15 | ||
16 | // AFTERBURNER | |
17 | Bool_t useAfterBurner=kFALSE; | |
18 | Double_t v1=0.0; | |
19 | Double_t v2=0.0; | |
20 | Double_t v3=0.0; | |
21 | Double_t v4=0.0; | |
22 | Int_t numberOfTrackClones=0; //non-flow | |
23 | ||
24 | // Define a range of the detector to exclude | |
25 | Bool_t ExcludeRegion = kFALSE; | |
26 | Double_t excludeEtaMin = -0.; | |
27 | Double_t excludeEtaMax = 0.; | |
28 | Double_t excludePhiMin = 0.; | |
29 | Double_t excludePhiMax = 0.; | |
30 | ||
31 | // use physics selection class | |
32 | Bool_t UsePhysicsSelection = kTRUE; | |
33 | ||
daf66719 | 34 | |
d178bd1f | 35 | // RUN SETTINGS |
36 | // Flow analysis method can be:(set to kTRUE or kFALSE) | |
37 | Bool_t MCEP = kTRUE; // correlation with Monte Carlo reaction plane | |
38 | Bool_t SP = kTRUE; // scalar product method (similar to eventplane method) | |
39 | Bool_t GFC = kTRUE; // cumulants based on generating function | |
40 | Bool_t QC = kTRUE; // cumulants using Q vectors | |
41 | Bool_t FQD = kTRUE; // fit of the distribution of the Q vector (only integrated v) | |
42 | Bool_t LYZ1SUM = kTRUE; // Lee Yang Zeroes using sum generating function (integrated v) | |
43 | Bool_t LYZ1PROD = kTRUE; // Lee Yang Zeroes using product generating function (integrated v) | |
44 | Bool_t LYZ2SUM = kFALSE; // Lee Yang Zeroes using sum generating function (second pass differential v) | |
45 | Bool_t LYZ2PROD = kFALSE; // Lee Yang Zeroes using product generating function (second pass differential v) | |
46 | Bool_t LYZEP = kFALSE; // Lee Yang Zeroes Event plane using sum generating function (gives eventplane + weight) | |
47 | Bool_t MH = kTRUE; // azimuthal correlators in mixed harmonics | |
48 | Bool_t NL = kFALSE; // nested loops (for instance distribution of phi1-phi2 for all distinct pairs) | |
49 | ||
50 | Bool_t METHODS[] = {SP,LYZ1SUM,LYZ1PROD,LYZ2SUM,LYZ2PROD,LYZEP,GFC,QC,FQD,MCEP,MH,NL}; | |
51 | ||
52 | // Boolean to use/not use weights for the Q vector | |
53 | Bool_t WEIGHTS[] = {kFALSE,kFALSE,kFALSE}; //Phi, v'(pt), v'(eta) | |
daf66719 | 54 | |
d178bd1f | 55 | // SETTING THE CUTS |
daf66719 | 56 | |
03d364db | 57 | //---------Data selection---------- |
12b2b8bc | 58 | //kMC, kGlobal, kESD_TPConly, kESD_SPDtracklet |
59 | AliFlowTrackCuts::trackParameterType rptype = AliFlowTrackCuts::kGlobal; | |
60 | AliFlowTrackCuts::trackParameterType poitype = AliFlowTrackCuts::kGlobal; | |
daf66719 | 61 | |
03d364db | 62 | //---------Parameter mixing-------- |
63 | //kPure - no mixing, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt | |
64 | AliFlowTrackCuts::trackParameterMix rpmix = AliFlowTrackCuts::kPure; | |
65 | AliFlowTrackCuts::trackParameterMix poimix = AliFlowTrackCuts::kPure; | |
66 | ||
67 | ||
27b5ccf2 | 68 | const char* rptypestr = AliFlowTrackCuts::GetParamTypeName(rptype); |
69 | const char* poitypestr = AliFlowTrackCuts::GetParamTypeName(poitype); | |
d178bd1f | 70 | |
71 | void AddTaskFlowCentrality( Int_t refMultMin=0, | |
59dab33a | 72 | Int_t refMultMax=1e10, |
73 | TString fileName="AnalysisResults.root" ) | |
daf66719 | 74 | { |
d178bd1f | 75 | |
76 | //=========================================================================== | |
77 | printf("CREATE CUTS\n"); | |
0a91110b | 78 | cout << "Used for RP: "<< rptypestr << endl; |
79 | cout << "Used for POI: "<< poitypestr << endl; | |
d178bd1f | 80 | // EVENTS CUTS: |
81 | AliFlowEventCuts* cutsEvent = new AliFlowEventCuts(); | |
82 | cutsEvent->SetRefMultRange(refMultMin,refMultMax); | |
03d364db | 83 | //cutsEvent->SetRefMultMethod(AliFlowEventCuts::kTPConly); |
84 | cutsEvent->SetRefMultMethod(AliFlowEventCuts::kSPDtracklets); | |
d178bd1f | 85 | |
86 | // RP TRACK CUTS: | |
87 | AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts(); | |
0a91110b | 88 | cutsRP->SetParamType(rptype); |
03d364db | 89 | cutsRP->SetParamMix(rpmix); |
d178bd1f | 90 | cutsRP->SetPtRange(0.2,10.); |
91 | cutsRP->SetEtaRange(-0.7,0.7); | |
92 | cutsRP->SetRequireCharge(kTRUE); | |
93 | //cutsRP->SetCharge(chargeRP); | |
94 | //cutsRP->SetPID(PdgRP); | |
95 | cutsRP->SetMinNClustersTPC(80); | |
96 | cutsRP->SetMaxChi2PerClusterTPC(4.0); | |
97 | cutsRP->SetMinNClustersITS(2); | |
98 | //cutsRP->SetMaxChi2PerClusterITS(1.e+09); | |
99 | cutsRP->SetMaxDCAToVertexXY(2.4); | |
100 | cutsRP->SetMaxDCAToVertexZ(3.2); | |
101 | cutsRP->SetDCAToVertex2D(kFALSE); | |
102 | cutsRP->SetMaxNsigmaToVertex(1.e+10); | |
103 | cutsRP->SetRequireSigmaToVertex(kFALSE); | |
104 | cutsRP->SetAcceptKinkDaughters(kFALSE); | |
105 | ||
106 | // POI TRACK CUTS: | |
107 | AliFlowTrackCuts* cutsPOI = new AliFlowTrackCuts(); | |
0a91110b | 108 | cutsPOI->SetParamType(poitype); |
03d364db | 109 | cutsPOI->SetParamMix(poimix); |
d178bd1f | 110 | cutsPOI->SetPtRange(0.2,10.); |
111 | cutsPOI->SetEtaRange(-0.7,0.7); | |
112 | cutsPOI->SetRequireCharge(kTRUE); | |
113 | //cutsPOI->SetCharge(chargeRP); | |
114 | //cutsPOI->SetPID(PdgRP); | |
115 | cutsPOI->SetMinNClustersTPC(80); | |
116 | cutsPOI->SetMaxChi2PerClusterTPC(4.0); | |
117 | cutsPOI->SetMinNClustersITS(2); | |
118 | //cutsPOI->SetMaxChi2PerClusterITS(1.e+09); | |
119 | cutsPOI->SetMaxDCAToVertexXY(2.4); | |
120 | cutsPOI->SetMaxDCAToVertexZ(3.2); | |
121 | cutsPOI->SetDCAToVertex2D(kFALSE); | |
122 | cutsPOI->SetMaxNsigmaToVertex(1.e+10); | |
123 | cutsPOI->SetRequireSigmaToVertex(kFALSE); | |
124 | cutsPOI->SetAcceptKinkDaughters(kFALSE); | |
125 | ||
126 | ||
daf66719 | 127 | Bool_t useWeights = WEIGHTS[0] || WEIGHTS[1] || WEIGHTS[2]; |
128 | if (useWeights) cout<<"Weights are used"<<endl; | |
129 | else cout<<"Weights are not used"<<endl; | |
d178bd1f | 130 | |
daf66719 | 131 | // Get the pointer to the existing analysis manager via the static access method. |
132 | //============================================================================== | |
133 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
134 | if (!mgr) { | |
135 | Error("AddTaskFlowEvent", "No analysis manager to connect to."); | |
136 | return NULL; | |
d178bd1f | 137 | } |
daf66719 | 138 | |
139 | // Check the analysis type using the event handlers connected to the analysis | |
59dab33a | 140 | // manager. The availability of MC handler can also be checked here. |
daf66719 | 141 | //============================================================================== |
142 | if (!mgr->GetInputEventHandler()) { | |
143 | ::Error("AddTaskFlowEvent", "This task requires an input event handler"); | |
144 | return NULL; | |
145 | } | |
d178bd1f | 146 | |
daf66719 | 147 | // Open external input files |
148 | //=========================================================================== | |
149 | //weights: | |
150 | TFile *weightsFile = NULL; | |
151 | TList *weightsList = NULL; | |
152 | ||
153 | if(useWeights) { | |
154 | //open the file with the weights: | |
155 | weightsFile = TFile::Open("weights.root","READ"); | |
156 | if(weightsFile) { | |
157 | //access the list which holds the histos with weigths: | |
158 | weightsList = (TList*)weightsFile->Get("weights"); | |
159 | } | |
160 | else { | |
161 | cout<<" WARNING: the file <weights.root> with weights from the previous run was not available."<<endl; | |
162 | break; | |
163 | } | |
164 | } | |
d178bd1f | 165 | |
daf66719 | 166 | //LYZ2 |
167 | if (LYZ2SUM || LYZ2PROD) { | |
168 | //read the outputfile of the first run | |
169 | TString outputFileName = "AnalysisResults1.root"; | |
170 | TString pwd(gSystem->pwd()); | |
171 | pwd+="/"; | |
172 | pwd+=outputFileName.Data(); | |
173 | TFile *outputFile = NULL; | |
174 | if(gSystem->AccessPathName(pwd.Data(),kFileExists)) { | |
175 | cout<<"WARNING: You do not have an output file:"<<endl; | |
176 | cout<<" "<<pwd.Data()<<endl; | |
177 | exit(0); | |
d178bd1f | 178 | } else { outputFile = TFile::Open(pwd.Data(),"READ");} |
daf66719 | 179 | |
180 | if (LYZ2SUM){ | |
181 | // read the output directory from LYZ1SUM | |
182 | TString inputFileNameLYZ2SUM = "outputLYZ1SUManalysis" ; | |
12b2b8bc | 183 | inputFileNameLYZ2SUM += rptypestr; |
daf66719 | 184 | cout<<"The input directory is "<<inputFileNameLYZ2SUM.Data()<<endl; |
185 | TFile* fInputFileLYZ2SUM = (TFile*)outputFile->FindObjectAny(inputFileNameLYZ2SUM.Data()); | |
186 | if(!fInputFileLYZ2SUM || fInputFileLYZ2SUM->IsZombie()) { | |
187 | cerr << " ERROR: To run LYZ2SUM you need the output file from LYZ1SUM. This file is not there! Please run LYZ1SUM first." << endl ; | |
188 | break; | |
189 | } | |
190 | else { | |
191 | TList* fInputListLYZ2SUM = (TList*)fInputFileLYZ2SUM->Get("cobjLYZ1SUM"); | |
192 | if (!fInputListLYZ2SUM) {cout<<"list is NULL pointer!"<<endl;} | |
193 | } | |
194 | cout<<"LYZ2SUM input file/list read..."<<endl; | |
195 | } | |
196 | ||
197 | if (LYZ2PROD){ | |
198 | // read the output directory from LYZ1PROD | |
199 | TString inputFileNameLYZ2PROD = "outputLYZ1PRODanalysis" ; | |
12b2b8bc | 200 | inputFileNameLYZ2PROD += rptypestr; |
daf66719 | 201 | cout<<"The input directory is "<<inputFileNameLYZ2PROD.Data()<<endl; |
202 | TFile* fInputFileLYZ2PROD = (TFile*)outputFile->FindObjectAny(inputFileNameLYZ2PROD.Data()); | |
203 | if(!fInputFileLYZ2PROD || fInputFileLYZ2PROD->IsZombie()) { | |
204 | cerr << " ERROR: To run LYZ2PROD you need the output file from LYZ1PROD. This file is not there! Please run LYZ1PROD first." << endl ; | |
205 | break; | |
206 | } | |
207 | else { | |
208 | TList* fInputListLYZ2PROD = (TList*)fInputFileLYZ2PROD->Get("cobjLYZ1PROD"); | |
209 | if (!fInputListLYZ2PROD) {cout<<"list is NULL pointer!"<<endl;} | |
210 | } | |
211 | cout<<"LYZ2PROD input file/list read..."<<endl; | |
212 | } | |
213 | } | |
214 | ||
daf66719 | 215 | if (LYZEP) { |
216 | //read the outputfile of the second run | |
217 | TString outputFileName = "AnalysisResults2.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"); | |
228 | } | |
d178bd1f | 229 | |
daf66719 | 230 | // read the output file from LYZ2SUM |
231 | TString inputFileNameLYZEP = "outputLYZ2SUManalysis" ; | |
12b2b8bc | 232 | inputFileNameLYZEP += rptypestr; |
daf66719 | 233 | cout<<"The input file is "<<inputFileNameLYZEP.Data()<<endl; |
234 | TFile* fInputFileLYZEP = (TFile*)outputFile->FindObjectAny(inputFileNameLYZEP.Data()); | |
235 | if(!fInputFileLYZEP || fInputFileLYZEP->IsZombie()) { | |
236 | cerr << " ERROR: To run LYZEP you need the output file from LYZ2SUM. This file is not there! Please run LYZ2SUM first." << endl ; | |
237 | break; | |
238 | } | |
239 | else { | |
240 | TList* fInputListLYZEP = (TList*)fInputFileLYZEP->Get("cobjLYZ2SUM"); | |
241 | if (!fInputListLYZEP) {cout<<"list is NULL pointer!"<<endl;} | |
242 | } | |
243 | cout<<"LYZEP input file/list read..."<<endl; | |
244 | } | |
245 | ||
246 | ||
247 | // Create the FMD task and add it to the manager | |
248 | //=========================================================================== | |
12b2b8bc | 249 | if (rptypestr == "FMD") { |
daf66719 | 250 | AliFMDAnalysisTaskSE *taskfmd = NULL; |
12b2b8bc | 251 | if (rptypestr == "FMD") { |
daf66719 | 252 | taskfmd = new AliFMDAnalysisTaskSE("TaskFMD"); |
253 | mgr->AddTask(taskfmd); | |
d178bd1f | 254 | |
daf66719 | 255 | AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance(); |
256 | pars->Init(); | |
257 | pars->SetProcessPrimary(kTRUE); //for MC only | |
258 | pars->SetProcessHits(kFALSE); | |
d178bd1f | 259 | |
daf66719 | 260 | //pars->SetRealData(kTRUE); //for real data |
261 | //pars->SetProcessPrimary(kFALSE); //for real data | |
daf66719 | 262 | } |
263 | } | |
264 | ||
daf66719 | 265 | // Create the task, add it to the manager. |
266 | //=========================================================================== | |
267 | AliAnalysisTaskFlowEvent *taskFE = NULL; | |
daf66719 | 268 | |
d178bd1f | 269 | if(useAfterBurner) |
daf66719 | 270 | { |
12b2b8bc | 271 | taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent","",kFALSE,1); |
daf66719 | 272 | taskFE->SetFlow(v1,v2,v3,v4); |
273 | taskFE->SetNonFlowNumberOfTrackClones(numberOfTrackClones); | |
274 | taskFE->SetAfterburnerOn(); | |
275 | } | |
12b2b8bc | 276 | else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent","",kFALSE); } |
d178bd1f | 277 | if (ExcludeRegion) { |
278 | taskFE->DefineDeadZone(excludeEtaMin, excludeEtaMax, excludePhiMin, excludePhiMax); | |
59dab33a | 279 | } |
d178bd1f | 280 | taskFE->SetSubeventEtaRange(minA, maxA, minB, maxB); |
281 | if (UsePhysicsSelection) { | |
282 | taskFE->SelectCollisionCandidates(); | |
283 | cout<<"Using Physics Selection"<<endl; | |
daf66719 | 284 | } |
d178bd1f | 285 | mgr->AddTask(taskFE); |
59dab33a | 286 | |
d178bd1f | 287 | // Pass cuts for RPs and POIs to the task: |
288 | taskFE->SetCutsEvent(cutsEvent); | |
289 | ||
59dab33a | 290 | // Pass cuts for RPs and POIs to the task: |
291 | taskFE->SetCutsRP(cutsRP); | |
292 | taskFE->SetCutsPOI(cutsPOI); | |
d178bd1f | 293 | |
294 | ||
daf66719 | 295 | |
296 | // Create the analysis tasks, add them to the manager. | |
297 | //=========================================================================== | |
298 | if (SP){ | |
299 | AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",WEIGHTS[0]); | |
300 | taskSP->SetRelDiffMsub(1.0); | |
301 | taskSP->SetApplyCorrectionForNUA(kFALSE); | |
302 | mgr->AddTask(taskSP); | |
303 | } | |
304 | if (LYZ1SUM){ | |
305 | AliAnalysisTaskLeeYangZeros *taskLYZ1SUM = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosSUM",kTRUE); | |
306 | taskLYZ1SUM->SetFirstRunLYZ(kTRUE); | |
307 | taskLYZ1SUM->SetUseSumLYZ(kTRUE); | |
308 | mgr->AddTask(taskLYZ1SUM); | |
309 | } | |
310 | if (LYZ1PROD){ | |
311 | AliAnalysisTaskLeeYangZeros *taskLYZ1PROD = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosPROD",kTRUE); | |
312 | taskLYZ1PROD->SetFirstRunLYZ(kTRUE); | |
313 | taskLYZ1PROD->SetUseSumLYZ(kFALSE); | |
314 | mgr->AddTask(taskLYZ1PROD); | |
315 | } | |
316 | if (LYZ2SUM){ | |
317 | AliAnalysisTaskLeeYangZeros *taskLYZ2SUM = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosSUM",kFALSE); | |
318 | taskLYZ2SUM->SetFirstRunLYZ(kFALSE); | |
319 | taskLYZ2SUM->SetUseSumLYZ(kTRUE); | |
320 | mgr->AddTask(taskLYZ2SUM); | |
321 | } | |
322 | if (LYZ2PROD){ | |
323 | AliAnalysisTaskLeeYangZeros *taskLYZ2PROD = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZerosPROD",kFALSE); | |
324 | taskLYZ2PROD->SetFirstRunLYZ(kFALSE); | |
325 | taskLYZ2PROD->SetUseSumLYZ(kFALSE); | |
326 | mgr->AddTask(taskLYZ2PROD); | |
327 | } | |
328 | if (LYZEP){ | |
329 | AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane"); | |
330 | mgr->AddTask(taskLYZEP); | |
331 | } | |
332 | if (GFC){ | |
333 | AliAnalysisTaskCumulants *taskGFC = new AliAnalysisTaskCumulants("TaskCumulants",useWeights); | |
334 | taskGFC->SetUsePhiWeights(WEIGHTS[0]); | |
335 | taskGFC->SetUsePtWeights(WEIGHTS[1]); | |
336 | taskGFC->SetUseEtaWeights(WEIGHTS[2]); | |
337 | mgr->AddTask(taskGFC); | |
338 | } | |
339 | if (QC){ | |
340 | AliAnalysisTaskQCumulants *taskQC = new AliAnalysisTaskQCumulants("TaskQCumulants",useWeights); | |
341 | taskQC->SetUsePhiWeights(WEIGHTS[0]); | |
342 | taskQC->SetUsePtWeights(WEIGHTS[1]); | |
343 | taskQC->SetUseEtaWeights(WEIGHTS[2]); | |
344 | taskQC->SetnBinsMult(10000); | |
345 | taskQC->SetMinMult(0.); | |
346 | taskQC->SetMaxMult(10000.); | |
347 | mgr->AddTask(taskQC); | |
348 | } | |
349 | if (FQD){ | |
350 | AliAnalysisTaskFittingQDistribution *taskFQD = new AliAnalysisTaskFittingQDistribution("TaskFittingQDistribution",kFALSE); | |
351 | taskFQD->SetUsePhiWeights(WEIGHTS[0]); | |
352 | taskFQD->SetqMin(0.); | |
353 | taskFQD->SetqMax(1000.); | |
354 | taskFQD->SetqNbins(10000); | |
355 | mgr->AddTask(taskFQD); | |
356 | } | |
357 | if (MCEP){ | |
358 | AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane"); | |
359 | mgr->AddTask(taskMCEP); | |
360 | } | |
361 | if (MH){ | |
362 | AliAnalysisTaskMixedHarmonics *taskMH = new AliAnalysisTaskMixedHarmonics("TaskMixedHarmonics",useWeights); | |
363 | taskMH->SetHarmonic(1); // n in cos[n(phi1+phi2-2phi3)] and cos[n(psi1+psi2-2phi3)] | |
364 | taskMH->SetNoOfMultipicityBins(10); | |
365 | taskMH->SetMultipicityBinWidth(2); | |
366 | taskMH->SetMinMultiplicity(3); | |
367 | taskMH->SetCorrectForDetectorEffects(kTRUE); | |
368 | taskMH->SetEvaluateDifferential3pCorrelator(kFALSE); // evaluate <<cos[n(psi1+psi2-2phi3)]>> (Remark: two nested loops) | |
369 | taskMH->SetOppositeChargesPOI(kFALSE); // POIs psi1 and psi2 in cos[n(psi1+psi2-2phi3)] will have opposite charges | |
370 | mgr->AddTask(taskMH); | |
371 | } | |
372 | if (NL){ | |
373 | AliAnalysisTaskNestedLoops *taskNL = new AliAnalysisTaskNestedLoops("TaskNestedLoops",useWeights); | |
374 | taskNL->SetHarmonic(1); // n in cos[n(phi1+phi2-2phi3)] and cos[n(psi1+psi2-2phi3)] | |
375 | taskNL->SetEvaluateNestedLoopsForRAD(kTRUE); // RAD = Relative Angle Distribution | |
376 | taskNL->SetEvaluateNestedLoopsForMH(kTRUE); // evalaute <<cos[n(phi1+phi2-2phi3)]>> (Remark: three nested loops) | |
377 | taskNL->SetEvaluateDifferential3pCorrelator(kFALSE); // evaluate <<cos[n(psi1+psi2-2phi3)]>> (Remark: three nested loops) | |
378 | taskNL->SetOppositeChargesPOI(kFALSE); // POIs psi1 and psi2 in cos[n(psi1+psi2-2phi3)] will have opposite charges | |
379 | mgr->AddTask(taskNL); | |
380 | } | |
381 | ||
382 | // Create the output container for the data produced by the task | |
383 | // Connect to the input and output containers | |
384 | //=========================================================================== | |
385 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); | |
386 | ||
12b2b8bc | 387 | if (rptypestr == "FMD") { |
daf66719 | 388 | AliAnalysisDataContainer *coutputFMD = |
d178bd1f | 389 | mgr->CreateContainer(Form("BackgroundCorrected_%s",fileName.Data()), TList::Class(), AliAnalysisManager::kExchangeContainer); |
daf66719 | 390 | //input and output taskFMD |
391 | mgr->ConnectInput(taskfmd, 0, cinput1); | |
392 | mgr->ConnectOutput(taskfmd, 1, coutputFMD); | |
393 | //input into taskFE | |
394 | mgr->ConnectInput(taskFE,1,coutputFMD); | |
395 | } | |
396 | ||
397 | AliAnalysisDataContainer *coutputFE = | |
398 | mgr->CreateContainer(Form("cobjFlowEventSimple_%s",fileName.Data()), AliFlowEventSimple::Class(),AliAnalysisManager::kExchangeContainer); | |
399 | mgr->ConnectInput(taskFE,0,cinput1); | |
400 | mgr->ConnectOutput(taskFE,1,coutputFE); | |
d178bd1f | 401 | |
daf66719 | 402 | |
403 | // Create the output containers for the data produced by the analysis tasks | |
404 | // Connect to the input and output containers | |
405 | //=========================================================================== | |
406 | if (useWeights) { | |
d178bd1f | 407 | AliAnalysisDataContainer *cinputWeights = mgr->CreateContainer(Form("cobjWeights_%s",fileName.Data()), |
408 | TList::Class(),AliAnalysisManager::kInputContainer); | |
daf66719 | 409 | } |
410 | ||
411 | if(SP) { | |
412 | TString outputSP = fileName; | |
413 | outputSP += ":outputSPanalysis"; | |
12b2b8bc | 414 | outputSP+= rptypestr; |
d178bd1f | 415 | AliAnalysisDataContainer *coutputSP = mgr->CreateContainer(Form("cobjSP_%s",fileName.Data()), |
416 | TList::Class(),AliAnalysisManager::kOutputContainer,outputSP); | |
daf66719 | 417 | mgr->ConnectInput(taskSP,0,coutputFE); |
418 | mgr->ConnectOutput(taskSP,1,coutputSP); | |
419 | if (WEIGHTS[0]) { | |
420 | mgr->ConnectInput(taskSP,1,cinputWeights); | |
421 | cinputWeights->SetData(weightsList); | |
d178bd1f | 422 | } |
daf66719 | 423 | } |
424 | if(LYZ1SUM) { | |
425 | TString outputLYZ1SUM = fileName; | |
426 | outputLYZ1SUM += ":outputLYZ1SUManalysis"; | |
12b2b8bc | 427 | outputLYZ1SUM+= rptypestr; |
d178bd1f | 428 | AliAnalysisDataContainer *coutputLYZ1SUM = mgr->CreateContainer(Form("cobjLYZ1SUM_%s",fileName.Data()), |
429 | TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1SUM); | |
430 | mgr->ConnectInput(taskLYZ1SUM,0,coutputFE); | |
431 | mgr->ConnectOutput(taskLYZ1SUM,1,coutputLYZ1SUM); | |
daf66719 | 432 | } |
433 | if(LYZ1PROD) { | |
434 | TString outputLYZ1PROD = fileName; | |
435 | outputLYZ1PROD += ":outputLYZ1PRODanalysis"; | |
12b2b8bc | 436 | outputLYZ1PROD+= rptypestr; |
d178bd1f | 437 | AliAnalysisDataContainer *coutputLYZ1PROD = mgr->CreateContainer(Form("cobjLYZ1PROD_%s",fileName.Data()), |
438 | TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1PROD); | |
daf66719 | 439 | mgr->ConnectInput(taskLYZ1PROD,0,coutputFE); |
440 | mgr->ConnectOutput(taskLYZ1PROD,1,coutputLYZ1PROD); | |
441 | } | |
442 | if(LYZ2SUM) { | |
d178bd1f | 443 | AliAnalysisDataContainer *cinputLYZ2SUM = mgr->CreateContainer(Form("cobjLYZ2SUMin_%s",fileName.Data()), |
444 | TList::Class(),AliAnalysisManager::kInputContainer); | |
daf66719 | 445 | TString outputLYZ2SUM = fileName; |
446 | outputLYZ2SUM += ":outputLYZ2SUManalysis"; | |
12b2b8bc | 447 | outputLYZ2SUM+= rptypestr; |
daf66719 | 448 | |
d178bd1f | 449 | AliAnalysisDataContainer *coutputLYZ2SUM = mgr->CreateContainer(Form("cobjLYZ2SUM_%s",fileName.Data()), |
450 | TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2SUM); | |
daf66719 | 451 | mgr->ConnectInput(taskLYZ2SUM,0,coutputFE); |
452 | mgr->ConnectInput(taskLYZ2SUM,1,cinputLYZ2SUM); | |
453 | mgr->ConnectOutput(taskLYZ2SUM,1,coutputLYZ2SUM); | |
454 | cinputLYZ2SUM->SetData(fInputListLYZ2SUM); | |
455 | } | |
456 | if(LYZ2PROD) { | |
d178bd1f | 457 | AliAnalysisDataContainer *cinputLYZ2PROD = mgr->CreateContainer(Form("cobjLYZ2PRODin_%s",fileName.Data()), |
458 | TList::Class(),AliAnalysisManager::kInputContainer); | |
daf66719 | 459 | TString outputLYZ2PROD = fileName; |
460 | outputLYZ2PROD += ":outputLYZ2PRODanalysis"; | |
12b2b8bc | 461 | outputLYZ2PROD+= rptypestr; |
daf66719 | 462 | |
d178bd1f | 463 | AliAnalysisDataContainer *coutputLYZ2PROD = mgr->CreateContainer(Form("cobjLYZ2PROD_%s",fileName.Data()), |
464 | TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2PROD); | |
daf66719 | 465 | mgr->ConnectInput(taskLYZ2PROD,0,coutputFE); |
466 | mgr->ConnectInput(taskLYZ2PROD,1,cinputLYZ2PROD); | |
467 | mgr->ConnectOutput(taskLYZ2PROD,1,coutputLYZ2PROD); | |
468 | cinputLYZ2PROD->SetData(fInputListLYZ2PROD); | |
469 | } | |
470 | if(LYZEP) { | |
d178bd1f | 471 | AliAnalysisDataContainer *cinputLYZEP = mgr->CreateContainer(Form("cobjLYZEPin_%s",fileName.Data()), |
472 | TList::Class(),AliAnalysisManager::kInputContainer); | |
daf66719 | 473 | TString outputLYZEP = fileName; |
474 | outputLYZEP += ":outputLYZEPanalysis"; | |
12b2b8bc | 475 | outputLYZEP+= rptypestr; |
daf66719 | 476 | |
d178bd1f | 477 | AliAnalysisDataContainer *coutputLYZEP = mgr->CreateContainer(Form("cobjLYZEP_%s",fileName.Data()), |
478 | TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZEP); | |
daf66719 | 479 | mgr->ConnectInput(taskLYZEP,0,coutputFE); |
480 | mgr->ConnectInput(taskLYZEP,1,cinputLYZEP); | |
481 | mgr->ConnectOutput(taskLYZEP,1,coutputLYZEP); | |
482 | cinputLYZEP->SetData(fInputListLYZEP); | |
483 | } | |
484 | if(GFC) { | |
485 | TString outputGFC = fileName; | |
486 | outputGFC += ":outputGFCanalysis"; | |
12b2b8bc | 487 | outputGFC+= rptypestr; |
daf66719 | 488 | |
d178bd1f | 489 | AliAnalysisDataContainer *coutputGFC = mgr->CreateContainer(Form("cobjGFC_%s",fileName.Data()), |
490 | TList::Class(),AliAnalysisManager::kOutputContainer,outputGFC); | |
daf66719 | 491 | mgr->ConnectInput(taskGFC,0,coutputFE); |
492 | mgr->ConnectOutput(taskGFC,1,coutputGFC); | |
493 | if (useWeights) { | |
494 | mgr->ConnectInput(taskGFC,1,cinputWeights); | |
495 | cinputWeights->SetData(weightsList); | |
496 | } | |
497 | } | |
498 | if(QC) { | |
499 | TString outputQC = fileName; | |
500 | outputQC += ":outputQCanalysis"; | |
12b2b8bc | 501 | outputQC+= rptypestr; |
daf66719 | 502 | |
d178bd1f | 503 | AliAnalysisDataContainer *coutputQC = mgr->CreateContainer(Form("cobjQC_%s",fileName.Data()), |
504 | TList::Class(),AliAnalysisManager::kOutputContainer,outputQC); | |
daf66719 | 505 | mgr->ConnectInput(taskQC,0,coutputFE); |
506 | mgr->ConnectOutput(taskQC,1,coutputQC); | |
507 | if (useWeights) { | |
508 | mgr->ConnectInput(taskQC,1,cinputWeights); | |
509 | cinputWeights->SetData(weightsList); | |
d178bd1f | 510 | } |
daf66719 | 511 | } |
512 | if(FQD) { | |
513 | TString outputFQD = fileName; | |
514 | outputFQD += ":outputFQDanalysis"; | |
12b2b8bc | 515 | outputFQD+= rptypestr; |
daf66719 | 516 | |
d178bd1f | 517 | AliAnalysisDataContainer *coutputFQD = mgr->CreateContainer(Form("cobjFQD_%s",fileName.Data()), |
518 | TList::Class(),AliAnalysisManager::kOutputContainer,outputFQD); | |
daf66719 | 519 | mgr->ConnectInput(taskFQD,0,coutputFE); |
520 | mgr->ConnectOutput(taskFQD,1,coutputFQD); | |
521 | if(useWeights) { | |
522 | mgr->ConnectInput(taskFQD,1,cinputWeights); | |
523 | cinputWeights->SetData(weightsList); | |
524 | } | |
525 | } | |
526 | if(MCEP) { | |
527 | TString outputMCEP = fileName; | |
528 | outputMCEP += ":outputMCEPanalysis"; | |
12b2b8bc | 529 | outputMCEP+= rptypestr; |
daf66719 | 530 | |
d178bd1f | 531 | AliAnalysisDataContainer *coutputMCEP = mgr->CreateContainer(Form("cobjMCEP_%s",fileName.Data()), |
532 | TList::Class(),AliAnalysisManager::kOutputContainer,outputMCEP); | |
533 | mgr->ConnectInput(taskMCEP,0,coutputFE); | |
daf66719 | 534 | mgr->ConnectOutput(taskMCEP,1,coutputMCEP); |
535 | } | |
536 | if(MH) { | |
537 | TString outputMH = fileName; | |
538 | outputMH += ":outputMHanalysis"; | |
12b2b8bc | 539 | outputMH += rptypestr; |
daf66719 | 540 | |
d178bd1f | 541 | AliAnalysisDataContainer *coutputMH = mgr->CreateContainer(Form("cobjMH_%s",fileName.Data()), |
542 | TList::Class(),AliAnalysisManager::kOutputContainer,outputMH); | |
daf66719 | 543 | mgr->ConnectInput(taskMH,0,coutputFE); |
544 | mgr->ConnectOutput(taskMH,1,coutputMH); | |
545 | //if (useWeights) { | |
546 | // mgr->ConnectInput(taskMH,1,cinputWeights); | |
547 | // cinputWeights->SetData(weightsList); | |
548 | //} | |
549 | } | |
550 | if(NL) { | |
551 | TString outputNL = fileName; | |
552 | outputNL += ":outputNLanalysis"; | |
12b2b8bc | 553 | outputNL += rptypestr; |
d178bd1f | 554 | |
555 | AliAnalysisDataContainer *coutputNL = mgr->CreateContainer(Form("cobjNL_%s",fileName.Data()), | |
556 | TList::Class(),AliAnalysisManager::kOutputContainer,outputNL); | |
557 | mgr->ConnectInput(taskNL,0,coutputFE); | |
558 | mgr->ConnectOutput(taskNL,1,coutputNL); | |
daf66719 | 559 | //if (useWeights) { |
560 | // mgr->ConnectInput(taskNL,1,cinputWeights); | |
561 | // cinputWeights->SetData(weightsList); | |
562 | //} | |
563 | } | |
daf66719 | 564 | } |
565 | ||
566 | ||
567 | ||
568 | ||
569 |