]>
Commit | Line | Data |
---|---|---|
1 | /** | |
2 | * @file AddTaskCentralMCCorr.C | |
3 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
4 | * @date Tue Apr 26 09:55:29 2011 | |
5 | * | |
6 | * @brief | |
7 | * | |
8 | * @ingroup pwglf_forward_scripts_tasks | |
9 | * | |
10 | */ | |
11 | ||
12 | /** | |
13 | * Add a Central MC correction generator task to train | |
14 | * | |
15 | * | |
16 | * @return Added task | |
17 | * | |
18 | * @ingroup pwglf_central_mc | |
19 | */ | |
20 | AliAnalysisTask* | |
21 | AddTaskCentralMCCorr(Bool_t eff=false) | |
22 | { | |
23 | // --- Load libraries ---------------------------------------------- | |
24 | gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); | |
25 | ||
26 | // --- Creating the manager and handlers --------------------------- | |
27 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
28 | if (!mgr->GetMCtruthEventHandler()) { | |
29 | Error("AddTaskCentralMCCorr", | |
30 | "No MC input handler defined - cannot continue"); | |
31 | return 0; | |
32 | } | |
33 | ||
34 | // --- Add our task ------------------------------------------------ | |
35 | AliCentralMCCorrectionsTask* task = | |
36 | new AliCentralMCCorrectionsTask("CentralCorr"); | |
37 | // This has to match the binning used in the AliAODCentralMult | |
38 | // class. Currently, this is set to 20. | |
39 | task->SetNPhiBins(20); | |
40 | task->SetEffectiveCorrection(eff); | |
41 | // task->SetVertexAxis(40, -20., 20.); | |
42 | ||
43 | // --- create containers for input/output -------------------------- | |
44 | task->Connect(0,0); | |
45 | ||
46 | return task; | |
47 | } | |
48 | // | |
49 | // EOF | |
50 | // |