]>
Commit | Line | Data |
---|---|---|
fc6d3e14 | 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 | * | |
bd6f5206 | 8 | * @ingroup pwglf_forward_scripts_tasks |
fc6d3e14 | 9 | * |
10 | */ | |
11 | ||
12 | /** | |
13 | * Add a Central MC correction generator task to train | |
14 | * | |
15 | * | |
16 | * @return Added task | |
17 | * | |
bd6f5206 | 18 | * @ingroup pwglf_central_mc |
fc6d3e14 | 19 | */ |
20 | AliAnalysisTask* | |
bfab35d9 | 21 | AddTaskCentralMCCorr(Bool_t eff=false) |
fc6d3e14 | 22 | { |
56236b95 | 23 | // --- Load libraries ---------------------------------------------- |
bd6f5206 | 24 | gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); |
56236b95 | 25 | |
fc6d3e14 | 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 ------------------------------------------------ | |
c8b1a7db | 35 | AliCentralMCCorrectionsTask* task = |
36 | new AliCentralMCCorrectionsTask("CentralCorr"); | |
4a9f6ae6 | 37 | // This has to match the binning used in the AliAODCentralMult |
38 | // class. Currently, this is set to 20. | |
39 | task->SetNPhiBins(20); | |
bfab35d9 | 40 | task->SetEffectiveCorrection(eff); |
bcd522ff | 41 | // task->SetVertexAxis(40, -20., 20.); |
fc6d3e14 | 42 | |
43 | // --- create containers for input/output -------------------------- | |
c8b1a7db | 44 | task->Connect(0,0); |
fc6d3e14 | 45 | |
46 | return task; | |
47 | } | |
48 | // | |
49 | // EOF | |
50 | // |