test commit
[u/mrichter/AliRoot.git] / PWGCF / FLOW / macros / AddTaskJetFlowMC.C
CommitLineData
24373b38 1///////////////////////////////////////////////////////////////////////////////
2// AddTaskJetFlowToyMC //
3// Author: Redmer A. Bertens, Utrecht University, 2013, rbertens@cern.ch //
4///////////////////////////////////////////////////////////////////////////////
7fb83101 5
6/* AddTask macro for jet flow toy mc task
7 * task uses an afterburner to tune vn in the pico track
8 * selection which can be used by a jet finder
9 * note that this task does not generate MC particles, it changes
10 * the azimuthal distribution of already available tracks
11*/
12
24373b38 13class AliAnalysisDataContainer;
14class AliAnalysisTaskJetFlowMC;
15
16AliAnalysisTaskJetFlowMC* AddTaskJetFlowMC(
17 const char *outputTracks = "JetFlowToyMC",
18 const char *inputTracks = "PicoTracks",
19 const char *name ="AliAnalysisTaskJetFlowMC"
20 )
21{
22 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
23 if (!mgr) return 0x0;
24 if (!mgr->GetInputEventHandler()) return 0x0;
25 TString fileName = AliAnalysisManager::GetCommonFileName();
26 fileName += ":";
27 fileName += name;
28 // create the task
29 AliAnalysisTaskJetFlowMC *eTask = new AliAnalysisTaskJetFlowMC(name);
30 eTask->SetTracksOutName(outputTracks);
31 eTask->SetTracksInName(inputTracks);
32 // connect input and output
33 mgr->AddTask(eTask);
34 mgr->ConnectInput (eTask, 0, mgr->GetCommonInputContainer());
35 mgr->ConnectOutput (eTask, 1, mgr->CreateContainer(Form("%s_container", fileName.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, fileName.Data()));
36 return eTask;
37}