]>
Commit | Line | Data |
---|---|---|
29f50363 | 1 | AliAnalysisTaskTrigChEff *AddTaskMTRchamberEfficiency(Bool_t useGhosts = kFALSE) |
2 | { | |
3 | // | |
4 | // Task for the determination of the MUON trigger chamber efficiency | |
5 | // | |
6 | // stocco@subatech.in2p3.fr | |
7 | // | |
8 | ||
9 | ||
10 | // Get the pointer to the existing analysis manager via the static access method. | |
11 | //============================================================================== | |
12 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
13 | if (!mgr) { | |
14 | ::Error("AddTask", "No analysis manager to connect to."); | |
15 | return NULL; | |
16 | } | |
17 | ||
18 | // Create the task | |
19 | AliAnalysisTaskTrigChEff* taskTrigChEff = new AliAnalysisTaskTrigChEff("TriggerChamberEfficiency"); | |
20 | taskTrigChEff->SetUseGhostTracks(useGhosts); | |
21 | // Add to the manager | |
22 | mgr->AddTask(taskTrigChEff); | |
23 | ||
24 | // | |
25 | // Create containers for input/output | |
26 | AliAnalysisDataContainer *cOutputTrigChEff = mgr->CreateContainer("triggerChamberEff", TList::Class(), AliAnalysisManager::kOutputContainer, "MUON.TriggerEfficiencyMap.root"); | |
27 | ||
28 | // Attach input | |
29 | mgr->ConnectInput(taskTrigChEff,0,mgr->GetCommonInputContainer()); | |
30 | // Attach output | |
31 | mgr->ConnectOutput(taskTrigChEff,0,cOutputTrigChEff); | |
32 | ||
33 | return taskTrigChEff; | |
34 | } |