]>
Commit | Line | Data |
---|---|---|
d0e90fb2 | 1 | //This is the macro to include the FMD analysis in the train. |
2 | //It depends on two libraries: libFMDanalysis.so in AliRoot and | |
3 | //libPhysics.so in ROOT. It has been tested to work with the | |
4 | //example scripts in the ANALYSIS webpages. | |
5 | // Author: Hans Hjersing Dalsgaard, hans.dalsgaard@cern,ch | |
6 | ||
7 | ||
8 | AliFMDAnalysisTaskSE* AddTaskFMD() { | |
9 | ||
10 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
11 | if (!mgr) { | |
12 | Error("AddTaskESDFilter", "No analysis manager to connect to."); | |
13 | return NULL; | |
14 | } | |
15 | ||
16 | ||
17 | AliFMDAnalysisTaskSE *taskfmd = new AliFMDAnalysisTaskSE("TaskFMD"); | |
18 | mgr->AddTask(taskfmd); | |
19 | ||
20 | AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance(); | |
21 | pars->Init(); | |
8bba03a4 | 22 | pars->SetProcessPrimary(kTRUE); |
23 | pars->SetProcessHits(kFALSE); | |
24 | ||
25 | ||
26 | AliAnalysisDataContainer *cout_fmd = mgr->CreateContainer("BackgroundCorrected", TList::Class(), AliAnalysisManager::kOutputContainer,"fmdana.root"); | |
d0e90fb2 | 27 | mgr->ConnectInput(taskfmd, 0, mgr->GetCommonInputContainer()); |
28 | mgr->ConnectOutput(taskfmd, 1, cout_fmd); | |
29 | ||
30 | return taskfmd; | |
31 | } |