]>
Commit | Line | Data |
---|---|---|
7c42aabc | 1 | AliAnalysisTaskPi0Flow* AddTaskPHOSPi0Flow (const char* name = "PHOSPi0Flow", |
2 | const char* options = "", | |
5734822e | 3 | UInt_t offlineTriggerMask = AliVEvent::kCentral ) |
ee78a099 | 4 | { |
5 | //Add a task AliAnalysisTaskPi0Flow to the analysis train | |
6 | //Author: Henrik Qvigstad | |
7 | /* $Id$ */ | |
8 | ||
9 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
10 | if (!mgr) { | |
11 | ::Error("AddTaskPHOSPi0Flow", "No analysis manager to connect to"); | |
12 | return NULL; | |
13 | } | |
14 | ||
15 | if (!mgr->GetInputEventHandler()) { | |
16 | ::Error("AddTaskPHOSPi0Flow", "This task requires an input event handler"); | |
17 | return NULL; | |
18 | } | |
19 | ||
20 | AliAnalysisTaskPi0Flow* task = new AliAnalysisTaskPi0Flow("PHOSPi0Flow"); | |
6ec40e8c | 21 | |
ee78a099 | 22 | // Reduce binning for reduece memory footprint |
b83d077c | 23 | const int nbins = 3; |
581877c9 | 24 | Double_t cbin[nbins+1] = {0., 10., 40., 80.}; |
25 | TArrayD tbin(nbins+1, cbin); | |
581877c9 | 26 | Int_t nMixed[nbins] = {4, 20, 50}; |
27 | TArrayI tNMixed(nbins, nMixed); | |
85394e40 | 28 | task->SetCentralityBinning(tbin, tNMixed); |
581877c9 | 29 | |
ee78a099 | 30 | //task->SetEventMixingRPBinning(9); |
31 | //task->SetMixingArraysLength(10); | |
5734822e | 32 | task->SelectCollisionCandidates(offlineTriggerMask); |
ee78a099 | 33 | |
ee78a099 | 34 | |
6ec40e8c | 35 | mgr->AddTask(task); |
ee78a099 | 36 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() ); |
6ec40e8c | 37 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("PHOSPi0FlowCoutput1", TList::Class(), AliAnalysisManager::kOutputContainer, |
7c42aabc | 38 | Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name) ); |
6ec40e8c | 39 | mgr->ConnectOutput(task, 1, coutput1); |
ee78a099 | 40 | |
41 | return task; | |
42 | } |