- Disentangle masks effect from trigger chamber efficiency estimation.
[u/mrichter/AliRoot.git] / MUON / AddTaskMuonReAlign.C
CommitLineData
4d610fd5 1/// \ingroup macros
2/// \file AddTaskMuonReAlign.C
3/// \brief Macro to add an AliMUONReAlignTask to an analysis train
4///
5/// \author Javier Castillo, CEA/Saclay - Irfu/SPhN
6
7AliMUONReAlignTask *AddTaskMuonReAlign()
8{
9/// Creates a filter task and adds it to the analysis manager.
10
11 // Get the pointer to the existing analysis manager via the static access method.
12 //==============================================================================
13 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
14 if (!mgr) {
15 ::Error("AddTaskMuonReAlign", "No analysis manager to connect to.");
16 return NULL;
17 }
18
19 // This task requires an ESD input handler.
20 // Check this using the analysis manager.
21 //===============================================================================
22 TString type = mgr->GetInputEventHandler()->GetDataType();
23 if (!type.Contains("ESD")) {
24 ::Error("AddTaskMuonReAlign", "ESD filtering task needs the manager to have an ESD input handler.");
25 return NULL;
26 }
27
28 // Create the task, add it to the manager and configure it.
29 //===========================================================================
30 // Muons
31 AliMUONReAlignTask *muonrealign = new AliMUONReAlignTask("Muon realign");
32 mgr->AddTask(muonrealign);
33
34// // Cuts on primary tracks
35// AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Standard");
36// esdTrackCutsL->SetMinNClustersTPC(50);
37
38// AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
39// trackFilter->AddCuts(esdTrackCutsL);
40
41// muonalign->SetTrackFilter(trackFilter);
42
43
44
45 // Create ONLY the output containers for the data produced by the task.
46 // Get and connect other common input/output containers via the manager as below
47 //==============================================================================
48 AliAnalysisDataContainer *treeOut = mgr->CreateContainer("output", TTree::Class(), AliAnalysisManager::kOutputContainer, "clusterInfo.root");
49 mgr->ConnectInput (muonrealign, 0, mgr->GetCommonInputContainer());
50 mgr->ConnectOutput (muonrealign, 0, treeOut);
51 return muonrealign;
52}