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