improved the macro to extract PID perf (automaticly through a new macro)
[u/mrichter/AliRoot.git] / PWGPP / pid / AddTaskPhiBayes.C
CommitLineData
9c668341 1AliAnalysisTask *AddTaskPhiBayes(Bool_t ismc=kFALSE,Bool_t qa=kTRUE,Int_t filterbit=16,Int_t typeCol=2){
a8ad4709 2
3 //get the current analysis manager
4 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5 if (!mgr) {
6 Error("No manager found in AddTaskVZERO. Why?");
7 return 0;
8 }
9 // currently don't accept AOD input
10 if (!mgr->GetInputEventHandler()->InheritsFrom(AliAODInputHandler::Class())) {
11 Error("AddTaskPhiBayes","This task works only with AOD input!");
12 return 0;
13 }
14
15 //========= Add tender to the ANALYSIS manager and set default storage =====
16 char mytaskName[100];
17 snprintf(mytaskName,100,"AliAnalysisTaskPhiBayes.cxx");
18
19 AliAnalysisTaskPhiBayes *task = new AliAnalysisTaskPhiBayes(mytaskName);
20 if(ismc) task->SetMC();
21 if(qa) task->SetQA();
22 task->SetEtaCut(0.8);
23 task->SetFilterBit(filterbit);
9c668341 24 task->SetTypeCollisions(typeCol);
a8ad4709 25
26 mgr->AddTask(task);
27
28 //Attach input to my tasks
29 AliAnalysisDataContainer *cinput = mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer);
30 mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
31
32 // Attach output to my tasks
33 AliAnalysisDataContainer *cOutputL= mgr->CreateContainer("contPhiBayes1",TList::Class(), AliAnalysisManager::kOutputContainer, AliAnalysisManager::GetCommonFileName());
34 mgr->ConnectOutput(task, 1, cOutputL);
35
36 AliAnalysisDataContainer *cOutputL2= mgr->CreateContainer("contPhiBayes2",TList::Class(), AliAnalysisManager::kOutputContainer, AliAnalysisManager::GetCommonFileName());
37 mgr->ConnectOutput(task, 2, cOutputL2);
38
39 AliAnalysisDataContainer *cOutputL3= mgr->CreateContainer("contPhiBayes3",TList::Class(), AliAnalysisManager::kOutputContainer, AliAnalysisManager::GetCommonFileName());
40 mgr->ConnectOutput(task, 3, cOutputL3);
41
42 return task;
43}
44