]>
Commit | Line | Data |
---|---|---|
f97ea980 | 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(); | |
22 | pars->SetProcessPrimary(kFALSE); | |
23 | pars->SetProcessHits(kFALSE); | |
24 | pars->SetEnergy(AliFMDAnaParameters::k900); | |
675620bc | 25 | pars->SetCentralTriggerSelection(kTRUE); |
26 | ||
f97ea980 | 27 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
28 | outputfile += Form(":%s",pars->GetDndetaAnalysisName()); | |
29 | ||
30 | AliAnalysisDataContainer *cout_fmd = mgr->CreateContainer("BackgroundCorrected", TList::Class(), AliAnalysisManager::kOutputContainer,outputfile); | |
31 | mgr->ConnectInput(taskfmd, 0, mgr->GetCommonInputContainer()); | |
32 | mgr->ConnectOutput(taskfmd, 1, cout_fmd); | |
33 | ||
34 | return taskfmd; | |
35 | } |