]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/macros/AddTaskPIDFlow.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FLOW / macros / AddTaskPIDFlow.C
1 class AliAnalysisDataContainer;
2 class AliFlowTrackCuts;
3 class AliFlowEventCuts;
4
5
6 void AddTaskPIDFlow(Int_t triggerSelectionString=AliVEvent::kMB,
7                                    Float_t etamin=-0.8,
8                                    Float_t etamax=0.8,
9                                    Float_t EtaGap=0.2,
10                                    TString fileNameBase="AnalysisResults",
11                                    TString uniqueStr="",
12                                    Int_t AODfilterBitRP = 272,
13                                    Int_t AODfilterBitPOI = 272,
14                                    Int_t charge=0,
15                                    Int_t MinTPCdedx = 10,
16                                    Int_t ncentrality = 2,
17                                    Bool_t doQA=kTRUE,
18                                    Bool_t isPID = kTRUE,
19                                    Bool_t UseQC = kFALSE,
20                                    Bool_t UseSP = kFALSE,
21                                    Bool_t UseSPSUB = kTRUE,
22                                    AliPID::EParticleType particleType=AliPID::kPion,
23                                    AliFlowTrackCuts::PIDsource sourcePID=AliFlowTrackCuts::kTOFbayesian) {
24     
25 // Define a range of the detector to exclude
26 Bool_t ExcludeRegion = kFALSE;
27 Double_t excludeEtaMin = -0.;
28 Double_t excludeEtaMax = 0.;
29 Double_t excludePhiMin = 0.;
30 Double_t excludePhiMax = 0.;
31    
32 //Define the range for eta subevents (for SP method)
33 Double_t minA = -0.8;//
34 Double_t maxA = 0.8;//
35 Double_t minB = -0.8;//
36 Double_t maxB = 0.8;//
37
38 // RUN SETTINGS
39 // Flow analysis method can be:(set to kTRUE or kFALSE)
40 Bool_t SPSUB    = UseSPSUB;
41 Bool_t SP       = UseSP;  // scalar product method (similar to eventplane method)
42 Bool_t QC       = UseQC;  // cumulants using Q vectors
43     
44 int centrMin[9] = {0,5,10,20,30,40,50,60,70};
45 int centrMax[9] = {5,10,20,30,40,50,60,70,80};
46 const int ncentr = ncentrality;
47     
48     
49 //---------Data selection----------
50 //kMC, kGlobal, kESD_TPConly, kESD_SPDtracklet
51 AliFlowTrackCuts::trackParameterType rptype = AliFlowTrackCuts::kTPCstandalone;
52 AliFlowTrackCuts::trackParameterType poitype = AliFlowTrackCuts::kTPCstandalone;
53     
54 //---------Parameter mixing--------
55 //kPure - no mixing, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt
56 AliFlowTrackCuts::trackParameterMix rpmix = AliFlowTrackCuts::kPure;
57 AliFlowTrackCuts::trackParameterMix poimix = AliFlowTrackCuts::kPure;
58     
59 const char* rptypestr = AliFlowTrackCuts::GetParamTypeName(rptype);
60 const char* poitypestr = AliFlowTrackCuts::GetParamTypeName(poitype);
61
62     
63 //===========================================================================
64 // EVENTS CUTS:
65 AliFlowEventCuts* cutsEvent[ncentr];
66 AliFlowTrackCuts* cutsRP[ncentr];
67 AliFlowTrackCuts* cutsPOI[ncentr];
68 TString outputSlotName[ncentr][4];
69 TString suffixName[ncentr];
70     
71 for(int icentr=0;icentr<ncentr;icentr++){
72     cutsEvent[icentr] = DefinecutsEvent();
73     //cutsEvent[icentr]->SetUsedDataset(is2011);
74     cutsEvent[icentr]->SetCentralityPercentileRange(centrMin[icentr],centrMax[icentr]);
75     cutsEvent[icentr]->SetCentralityPercentileMethod(AliFlowEventCuts::kV0);
76     //  cutsEvent->SetRefMultMethod(AliFlowEventCuts::kVZERO);
77     //cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kSPD1tracklets);
78     //cutsEvent->SetNContributorsRange(2);
79     cutsEvent[icentr]->SetPrimaryVertexZrange(-10.,10.);
80     cutsEvent[icentr]->SetQA(doQA);
81     cutsEvent[icentr]->SetCutTPCmultiplicityOutliers();
82     
83     
84     // RP TRACK CUTS:
85     cutsRP[icentr] = DefineRPcuts();
86     cutsRP[icentr]->SetParamType(rptype);
87     cutsRP[icentr]->SetParamMix(rpmix);
88     cutsRP[icentr]->SetPtRange(0.2,5.);
89     cutsRP[icentr]->SetEtaRange(etamin,etamax);
90     cutsRP[icentr]->SetMinNClustersTPC(70);
91     //  cutsRP->SetMinChi2PerClusterTPC(0.1);//
92     // cutsRP->SetMaxChi2PerClusterTPC(4.0);//
93     cutsRP[icentr]->SetMaxDCAToVertexXY(3.0);
94     cutsRP[icentr]->SetMaxDCAToVertexZ(3.0);
95     cutsRP[icentr]->SetAcceptKinkDaughters(kFALSE);
96     cutsRP[icentr]->SetMinimalTPCdedx(MinTPCdedx);
97     cutsRP[icentr]->SetAODfilterBit(AODfilterBitRP);
98     cutsRP[icentr]->SetQA(doQA);
99     
100     // POI TRACK CUTS:
101     cutsPOI[icentr] = DefinePOIcuts();
102     cutsPOI[icentr]->GetBayesianResponse()->ForceOldDedx(); // for 2010 data to use old TPC PID Response instead of the official one
103     cutsPOI[icentr]->SetParamType(poitype);
104     cutsPOI[icentr]->SetParamMix(poimix);
105     cutsPOI[icentr]->SetPtRange(0.2,5.);//
106     cutsPOI[icentr]->SetEtaRange(etamin,etamax);
107     //cutsPOI->SetRequireCharge(kTRUE);
108     //cutsPOI->SetPID(PdgRP);
109     cutsPOI[icentr]->SetMinNClustersTPC(70);
110     // cutsPOI->SetMinChi2PerClusterTPC(0.1); //
111     // cutsPOI->SetMaxChi2PerClusterTPC(4.0); //
112     //  cutsPOI->SetRequireITSRefit(kTRUE);
113     //  cutsPOI->SetRequireTPCRefit(kTRUE);
114     //  cutsPOI->SetMinNClustersITS(2);
115     //cutsPOI->SetMaxChi2PerClusterITS(1.e+09);
116     cutsPOI[icentr]->SetMaxDCAToVertexXY(3.0);
117     cutsPOI[icentr]->SetMaxDCAToVertexZ(3.0);
118     //cutsPOI->SetDCAToVertex2D(kTRUE);
119     //cutsPOI->SetMaxNsigmaToVertex(1.e+10);
120     //cutsPOI->SetRequireSigmaToVertex(kFALSE);
121     cutsPOI[icentr]->SetAcceptKinkDaughters(kFALSE);
122     if(isPID) cutsPOI[icentr]->SetPID(particleType, sourcePID);//particleType, sourcePID
123     if (charge!=0) cutsPOI[icentr]->SetCharge(charge);
124     //cutsPOI->SetAllowTOFmismatch(kFALSE);
125     cutsPOI[icentr]->SetRequireStrictTOFTPCagreement(kTRUE);
126     //iexample: francesco's tunig TPC Bethe Bloch for data:
127      cutsPOI[icentr]->SetMinimalTPCdedx(MinTPCdedx);
128     cutsPOI[icentr]->SetAODfilterBit(AODfilterBitPOI);
129     // cutsPOI->SetAODfilterBit(768);
130     cutsPOI[icentr]->SetQA(doQA);
131     cutsPOI[icentr]->SetPriors((centrMin[icentr]+centrMax[icentr])*0.5); // set priors and PID as a function of the centrality
132
133     //=====================================================================
134  
135     suffixName[icentr] = "highharmflow";
136     suffixName[icentr] += Form("%i_", centrMin[icentr]);
137     suffixName[icentr] += Form("%i_", centrMax[icentr]);
138     suffixName[icentr] += Form("%.f_", EtaGap*10);
139
140     if(isPID){
141         suffixName[icentr]+=AliFlowTrackCuts::PIDsourceName(sourcePID);
142         suffixName[icentr]+="_";
143         suffixName[icentr]+=AliPID::ParticleName(particleType);//particleType
144     }
145     else{
146         suffixName[icentr]+="AllCharged";
147     }
148     if (charge<0) suffixName[icentr]+="-";
149     if (charge>0) suffixName[icentr]+="+";
150
151
152     for(int harmonic=2;harmonic<6;harmonic++){  //for v2,v3,v4 and v5
153         outputSlotName[icentr][harmonic-2] = "";
154         outputSlotName[icentr][harmonic-2]+=uniqueStr;
155         outputSlotName[icentr][harmonic-2]+=Form("_v%i_",harmonic);
156         outputSlotName[icentr][harmonic-2]+=cutsRP[icentr]->GetName();
157         outputSlotName[icentr][harmonic-2]+="_";
158         outputSlotName[icentr][harmonic-2]+=cutsPOI[icentr]->GetName();
159         outputSlotName[icentr][harmonic-2]+=Form("_%i-",centrMin[icentr]);
160         outputSlotName[icentr][harmonic-2]+=Form("%i_",centrMax[icentr]);
161         
162         
163         if(isPID){
164             outputSlotName[icentr][harmonic-2]+=AliFlowTrackCuts::PIDsourceName(sourcePID);//sourcePID
165             outputSlotName[icentr][harmonic-2]+="_";
166             outputSlotName[icentr][harmonic-2]+=AliPID::ParticleName(particleType);//particleType
167         }
168         else{
169             outputSlotName[icentr][harmonic-2]+="AllCharged";
170         }
171         if (charge<0) outputSlotName[icentr][harmonic-2]+="-";
172         if (charge>0) outputSlotName[icentr][harmonic-2]+="+";
173             }
174 }
175     
176 TString fileName(fileNameBase);
177 fileName.Append(".root");
178
179  
180     
181 //====================================FLOWPACKAGE TASKS=========================//
182 AliAnalysisDataContainer *cinput1[ncentr];
183 AliAnalysisDataContainer *coutputFE[ncentr];
184 AliAnalysisDataContainer* coutputFEQA[ncentr];
185 AliAnalysisTaskFlowEvent *taskFE[ncentr];
186     
187 AliFlowTrackCuts *QC_POI[ncentr], *SP_POI[ncentr][2], *SP_POI_gap[ncentr][2]; // POIs
188     
189 TString outputQA[ncentr];
190
191 for (int icentr=0; icentr<ncentr; icentr++) {
192         
193     // Get the pointer to the existing analysis manager via the static access method.
194         //==============================================================================
195     AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
196     if (!mgr) {
197         Error("AddTaskFlowEvent", "No analysis manager to connect to.");
198         return NULL;
199     }
200         
201     // Check the analysis type using the event handlers connected to the analysis
202     // manager. The availability of MC handler can also be checked here.
203     //==============================================================================
204     if (!mgr->GetInputEventHandler()) {
205         ::Error("AddTaskFlowEvent", "This task requires an input event handler");
206         return NULL;
207     }
208
209     taskFE[icentr] = new AliAnalysisTaskFlowEvent(Form("TaskFlowEvent_%s",suffixName[icentr].Data()),"",doQA);
210     taskFE[icentr]->SelectCollisionCandidates(triggerSelectionString);
211 //    taskFE[icentr]->SetSubeventEtaRange(minA, maxA, minB, maxB);
212     mgr->AddTask(taskFE[icentr]);
213
214     // Pass cuts for RPs and POIs to the task:
215     taskFE[icentr]->SetCutsEvent(cutsEvent[icentr]);
216     taskFE[icentr]->SetCutsRP(cutsRP[icentr]);
217     taskFE[icentr]->SetCutsPOI(cutsPOI[icentr]);
218     if (cutsRP[icentr]->GetParamType()==AliFlowTrackCuts::kVZERO)
219     {
220         //TODO: since this is set in a static object all analyses in an analysis train
221         //will be affected.
222         taskFE[icentr]->SetHistWeightvsPhiMin(0.);
223         taskFE[icentr]->SetHistWeightvsPhiMax(200.);
224     }
225     cinput1[icentr] = mgr->GetCommonInputContainer();
226     
227     coutputFE[icentr] = mgr->CreateContainer(Form("FlowEvent_%s",suffixName[icentr].Data()),AliFlowEventSimple::Class(),AliAnalysisManager::kExchangeContainer);
228     mgr->ConnectInput(taskFE[icentr],0,cinput1[icentr]);
229     mgr->ConnectOutput(taskFE[icentr],1,coutputFE[icentr]);
230
231     if (taskFE[icentr]->GetQAOn()) {
232         outputQA[icentr] = fileName;
233         outputQA[icentr] += ":QA";
234         coutputFEQA[icentr] = mgr->CreateContainer(Form("QA_%s",suffixName[icentr].Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputQA[icentr]);
235         mgr->ConnectOutput(taskFE[icentr],2,coutputFEQA[icentr]);
236     }
237
238
239     //POIs for SP and QC method
240     //===========================================================================
241  
242     //half window for POIs
243     //=====================QC POI cuts
244     QC_POI[icentr] = new AliFlowTrackCuts(Form("Filter_%d",icentr));
245     QC_POI[icentr]->SetEtaRange( -0.8,+0.8 );
246     QC_POI[icentr]->GetBayesianResponse()->ForceOldDedx(); // for 2010 data to use old TPC PID Response instead of the official one
247     QC_POI[icentr]->SetParamType(poitype);
248 //    QC_POI[icentr]->SetParamMix(poimix);
249     QC_POI[icentr]->SetPtRange(0.2,5.);//
250     QC_POI[icentr]->SetMinNClustersTPC(70);
251     // SP_POI->SetMinChi2PerClusterTPC(0.1); //
252     // SP_POI->SetMaxChi2PerClusterTPC(4.0); //
253     //  SP_POI->SetRequireITSRefit(kTRUE);
254     //  SP_POI->SetRequireTPCRefit(kTRUE);
255     //  SP_POI->SetMinNClustersITS(2);
256     //  SP_POI->SetMaxChi2PerClusterITS(1.e+09);
257     QC_POI[icentr]->SetMaxDCAToVertexXY(3.0);
258     QC_POI[icentr]->SetMaxDCAToVertexZ(3.0);
259     //SP_POI->SetDCAToVertex2D(kTRUE);
260     //SP_POI->SetMaxNsigmaToVertex(1.e+10);
261     //SP_POI->SetRequireSigmaToVertex(kFALSE);
262     QC_POI[icentr]->SetAcceptKinkDaughters(kFALSE);
263     if(isPID) QC_POI[icentr]->SetPID(particleType, sourcePID);//particleType, sourcePID
264     if (charge!=0) QC_POI[icentr]->SetCharge(charge);
265     //SP_POI->SetAllowTOFmismatch(kFALSE);
266     QC_POI[icentr]->SetRequireStrictTOFTPCagreement(kTRUE);
267     QC_POI[icentr]->SetMinimalTPCdedx(MinTPCdedx);
268     QC_POI[icentr]->SetAODfilterBit(AODfilterBitPOI);
269     QC_POI[icentr]->SetQA(doQA);
270     QC_POI[icentr]->SetPriors((centrMin[icentr]+centrMax[icentr])*0.5);
271
272     //=======================SP POI Cuts
273     SP_POI[icentr][0] = new AliFlowTrackCuts(Form("Filterhf0_%d",icentr));
274     SP_POI[icentr][1] = new AliFlowTrackCuts(Form("Filterhf1_%d",icentr));
275     for(int hw=0;hw<2;hw++){
276         SP_POI[icentr][hw]->GetBayesianResponse()->ForceOldDedx(); // for 2010 data to use old TPC PID Response instead of the official one
277         SP_POI[icentr][hw]->SetParamType(poitype);
278         //      SP_POI[icentr][hw]->SetParamMix(poimix);
279         SP_POI[icentr][hw]->SetPtRange(0.2,5.);//
280         SP_POI[icentr][hw]->SetMinNClustersTPC(70);
281         // SP_POI->SetMinChi2PerClusterTPC(0.1); //
282         // SP_POI->SetMaxChi2PerClusterTPC(4.0); //
283         //  SP_POI->SetRequireITSRefit(kTRUE);
284         //  SP_POI->SetRequireTPCRefit(kTRUE);
285         //  SP_POI->SetMinNClustersITS(2);
286         //  SP_POI->SetMaxChi2PerClusterITS(1.e+09);
287         SP_POI[icentr][hw]->SetMaxDCAToVertexXY(3.0);
288         SP_POI[icentr][hw]->SetMaxDCAToVertexZ(3.0);
289         //SP_POI->SetDCAToVertex2D(kTRUE);
290         //SP_POI->SetMaxNsigmaToVertex(1.e+10);
291         //SP_POI->SetRequireSigmaToVertex(kFALSE);
292         SP_POI[icentr][hw]->SetAcceptKinkDaughters(kFALSE);
293         if(isPID) SP_POI[icentr][hw]->SetPID(particleType, sourcePID);//particleType, sourcePID
294         if (charge!=0) SP_POI[icentr][hw]->SetCharge(charge);
295         //SP_POI->SetAllowTOFmismatch(kFALSE);
296         SP_POI[icentr][hw]->SetRequireStrictTOFTPCagreement(kTRUE);
297         SP_POI[icentr][hw]->SetMinimalTPCdedx(MinTPCdedx);
298         SP_POI[icentr][hw]->SetAODfilterBit(AODfilterBitPOI);
299         SP_POI[icentr][hw]->SetQA(doQA);
300         SP_POI[icentr][hw]->SetPriors((centrMin[icentr]+centrMax[icentr])*0.5);
301     }
302
303
304     TString Species = "";
305     if(isPID) Species += AliPID::ParticleName(particleType);
306     else      Species += "Allcharged";
307
308     for(int harm=2;harm<6;harm++){
309
310         if(QC) {
311             AddQCmethod( "QC", fileName, rptypestr, outputSlotName[icentr][harm-2], triggerSelectionString, coutputFE[icentr],NULL, QC_POI[icentr],  harm); // QC TPC
312         }
313
314         if(SP) {
315
316             AddSPmethod( "SP", fileName, rptypestr,outputSlotName[icentr][harm-2], triggerSelectionString, coutputFE[icentr], cutsRP[icentr], SP_POI[icentr][0], "Qa", harm, etamin, etamax,0); // SP Qa
317             AddSPmethod( "SP", fileName, rptypestr, outputSlotName[icentr][harm-2], triggerSelectionString, coutputFE[icentr], cutsRP[icentr], SP_POI[icentr][1], "Qb", harm, etamin, etamax,0); // SP Qb
318         }
319         if(SPSUB){
320             AddSPmethod( "SP", fileName, rptypestr, outputSlotName[icentr][harm-2], triggerSelectionString, coutputFE[icentr], cutsRP[icentr], SP_POI[icentr][0], "Qa", harm, etamin, etamax, EtaGap); // SP Qa
321             AddSPmethod( "SP", fileName, rptypestr, outputSlotName[icentr][harm-2], triggerSelectionString, coutputFE[icentr], cutsRP[icentr], SP_POI[icentr][1], "Qb", harm, etamin, etamax, EtaGap); // SP Qb
322         }
323     }
324 }
325 }
326 //AddSPmthod
327 //AddQCmethod
328 //===========================================================================
329 //QC method
330 void AddQCmethod(char *name="",TString fileName="", TString rptypestr="", TString outputSlotName="", Int_t triggerSelectionString=0,AliAnalysisDataContainer* coutputFE,AliFlowTrackCuts* cutsRP, AliFlowTrackCuts* cutsPOI, Int_t harm=2) {
331     
332     AliAnalysisDataContainer *coutputQC;
333     AliAnalysisTaskQCumulants *taskQC;
334  
335     TString myNameQC = Form("%sv%i%s",name,harm,outputSlotName.Data());
336     AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
337     
338     AliAnalysisDataContainer *flowEvent = mgr->CreateContainer( Form("Filter_%s", myNameQC.Data()),
339                                                                 AliFlowEventSimple::Class(),
340                                                                 AliAnalysisManager::kExchangeContainer );
341     AliAnalysisTaskFilterFE *tskFilter = new AliAnalysisTaskFilterFE( Form("TaskFilter_%s",myNameQC.Data()),NULL, NULL);
342     mgr->AddTask(tskFilter);
343     mgr->ConnectInput( tskFilter,0,coutputFE);
344     mgr->ConnectOutput(tskFilter,1,flowEvent);
345     
346     taskQC = new AliAnalysisTaskQCumulants(Form("TaskQCumulants_%s",outputSlotName.Data()));
347     taskQC->SelectCollisionCandidates(triggerSelectionString);
348     taskQC->SetCalculateCumulantsVsM(kFALSE);
349     taskQC->SetnBinsMult(10000);
350     taskQC->SetMinMult(0.);
351     taskQC->SetMaxMult(10000.);
352     taskQC->SetHarmonic(harm);
353     taskQC->SetApplyCorrectionForNUA(kFALSE);
354     taskQC->SetFillMultipleControlHistograms(kFALSE);
355     
356     AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
357
358     TString outputQC = fileName;
359     outputQC += ":outputQCanalysis";
360     outputQC+= rptypestr;
361     
362     coutputQC = mgr->CreateContainer(Form("QC_%s",outputSlotName.Data()),
363                                         TList::Class(),AliAnalysisManager::kOutputContainer,outputQC);
364     mgr->AddTask(taskQC);
365     mgr->ConnectInput(taskQC,0,flowEvent);
366     mgr->ConnectOutput(taskQC,1,coutputQC);
367 }
368 //SPmethod
369
370 void AddSPmethod(char *name="", TString fileName="", TString rptypestr="",TString outputSlotName="", Int_t triggerSelectionString=0,AliAnalysisDataContainer* coutputFE, AliFlowTrackCuts* cutsRP,AliFlowTrackCuts* cutsPOI, char* Qvector, Int_t harm=2, Double_t etamin=-0.8, Double_t etamax=0.8, Double_t gap=0.0) {
371  
372     AliAnalysisDataContainer *coutputSP;
373     AliAnalysisTaskScalarProduct *taskSP;
374     
375     if(Qvector=="Qa"){
376         cutsPOI->SetEtaRange( +0.5*gap, +0.8 );
377     }
378     if(Qvector=="Qb"){
379         cutsPOI->SetEtaRange( -0.8,-0.5*gap );
380     }
381     
382     TString myNameSP = Form("%s_v%i_%s_%s_%.f",name,harm,Qvector,outputSlotName.Data(),gap*10);
383     AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
384     
385     AliAnalysisDataContainer *flowEvent = mgr->CreateContainer( Form("Filter_%s", myNameSP.Data()),
386                                                                 AliFlowEventSimple::Class(),
387                                                                 AliAnalysisManager::kExchangeContainer );
388     
389     AliAnalysisTaskFilterFE *tskFilter = new AliAnalysisTaskFilterFE( Form("TaskFilter_%s",myNameSP.Data()),
390                                                                      cutsRP, NULL);
391     tskFilter->SetSubeventEtaRange(etamin, -.5*gap, +.5*gap, etamax);
392     mgr->AddTask(tskFilter);
393     mgr->ConnectInput( tskFilter,0,coutputFE);
394     mgr->ConnectOutput(tskFilter,1,flowEvent);
395
396     
397     taskSP = new AliAnalysisTaskScalarProduct(Form("TaskScalarProduct_%s",outputSlotName.Data()),kFALSE);
398     taskSP->SetHarmonic(harm);
399     taskSP->SelectCollisionCandidates(triggerSelectionString);
400     taskSP->SetRelDiffMsub(1.0);
401     taskSP->SetTotalQvector(Qvector);
402     taskSP->SetApplyCorrectionForNUA(kTRUE);
403     
404     AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
405
406
407     TString outputSP = fileName;
408     outputSP += ":outputSPanalysis";
409     outputSP+= rptypestr;
410     coutputSP = mgr->CreateContainer(Form("SP_%s_%s_%.f",outputSlotName.Data(),Qvector,gap*10),
411                                         TList::Class(),AliAnalysisManager::kOutputContainer,outputSP);
412     mgr->AddTask(taskSP);
413     mgr->ConnectInput(taskSP,0,flowEvent);
414     mgr->ConnectOutput(taskSP,1,coutputSP);
415 }
416 AliFlowEventCuts* DefinecutsEvent(){
417     AliFlowEventCuts* cutsEvent = new AliFlowEventCuts("eventcuts");
418     return cutsEvent;
419 }
420 AliFlowTrackCuts* DefineRPcuts(){
421     AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts("TPConlyRP");
422     return cutsRP;
423 }
424 AliFlowTrackCuts* DefinePOIcuts(){
425     AliFlowTrackCuts* cutsPOI = new AliFlowTrackCuts("TPConlyPOI");
426     return cutsPOI;
427 }
428
429