]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AddTaskForwardMCCorr.C
Updates
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AddTaskForwardMCCorr.C
1 /**
2  * @file   AddTaskForwardMCCorr.C
3  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
4  * @date   Tue Apr 26 09:56:39 2011
5  * 
6  * @brief  
7  * 
8  * 
9  * @ingroup pwglf_forward_scripts_tasks
10  */
11 /** 
12  * Add a Forward MC correction generator task to train 
13  * 
14  * 
15  * @return Added task 
16  *
17  * @ingroup pwglf_forward_mc
18  */
19 AliAnalysisTask*
20 AddTaskForwardMCCorr()
21 {
22   // --- Load libraries ----------------------------------------------
23   gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
24
25   // --- Creating the manager and handlers ---------------------------
26   AliAnalysisManager *mgr  = AliAnalysisManager::GetAnalysisManager();
27   if (!mgr->GetMCtruthEventHandler()) { 
28     Error("AddTaskCentralMCCorr", 
29           "No MC input handler defined - cannot continue");
30     return 0;
31   }
32
33   // --- Add our task ------------------------------------------------
34   AliForwardMCCorrectionsTask* task = 
35     new AliForwardMCCorrectionsTask("ForwardCorr");
36   task->GetTrackDensity().SetDebug(false);
37   AliFMDMCTrackDensity& dn = 
38     static_cast<AliFMDMCTrackDensity&>(task->GetTrackDensity());
39   dn.SetMaxConsequtiveStrips(3);
40   //  task->SetVertexAxis(40, -20., 20.);
41   
42   // --- connect input/output ----------------------------------------
43   task->Connect(0, 0);
44
45   return task;
46 }
47 //
48 // EOF
49 //