1 AliAnalysisTaskTrigChEff *AddTaskMTRchamberEfficiency(Bool_t useGhosts = kFALSE)
4 // Task for the determination of the MUON trigger chamber efficiency
6 // stocco@subatech.in2p3.fr
10 // Get the pointer to the existing analysis manager via the static access method.
11 //==============================================================================
12 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
14 ::Error("AddTaskMTRchamberEfficiency", "No analysis manager to connect to.");
18 // Check the analysis type using the event handlers connected to the analysis manager.
19 //==============================================================================
20 if (!mgr->GetInputEventHandler()) {
21 ::Error("AliAnalysisTaskTrigChEff", "This task requires an input event handler");
26 AliAnalysisTaskTrigChEff* taskTrigChEff = new AliAnalysisTaskTrigChEff("TriggerChamberEfficiency");
27 taskTrigChEff->SetUseGhostTracks(useGhosts);
29 mgr->AddTask(taskTrigChEff);
32 // Create containers for input/output
33 AliAnalysisDataContainer *cOutputTrigChEff = mgr->CreateContainer("triggerChamberEff", TList::Class(), AliAnalysisManager::kOutputContainer, "MUON.TriggerEfficiencyMap.root");
36 mgr->ConnectInput(taskTrigChEff,0,mgr->GetCommonInputContainer());
38 mgr->ConnectOutput(taskTrigChEff,1,cOutputTrigChEff);