]>
Commit | Line | Data |
---|---|---|
1 | /** | |
2 | * @file AddTaskFMDELoss.C | |
3 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
4 | * @date Wed Mar 23 12:14:03 2011 | |
5 | * | |
6 | * @brief | |
7 | * | |
8 | * | |
9 | * @ingroup pwglf_forward_scripts_tasks | |
10 | */ | |
11 | /** | |
12 | * @defgroup pwglf_forward_eloss Energy Loss Fits | |
13 | * | |
14 | * Fitting the energy loss @f$\Delta/\Delta_{mip}@f$ spectra | |
15 | * | |
16 | * @ingroup pwglf_forward_topical | |
17 | */ | |
18 | ||
19 | /** | |
20 | * This is the macro to include the FMD energy fitter in a train. | |
21 | * | |
22 | * @param mc Assume MC input | |
23 | * @param useCent Use centrality information | |
24 | * @param onlyMB Only collect statistics for MB (INEL) events | |
25 | * @param debug Debug level | |
26 | * @param residuals If set, also do residuals | |
27 | * | |
28 | * @return Newly created task | |
29 | * | |
30 | * @ingroup pwglf_forward_eloss | |
31 | */ | |
32 | AliAnalysisTask* | |
33 | AddTaskFMDELoss(Bool_t mc, | |
34 | Bool_t onlyMB=false, | |
35 | const Char_t* config="elossFitConfig.C", | |
36 | const Char_t* corrs="") | |
37 | { | |
38 | // --- Load libraries ---------------------------------------------- | |
39 | gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); | |
40 | ||
41 | // --- Get analysis manager ---------------------------------------- | |
42 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
43 | if (!mgr) { | |
44 | Error("AddTaskFMDELoss", "No analysis manager to connect to."); | |
45 | return NULL; | |
46 | } | |
47 | ||
48 | // --- Set alternative corrections path ---------------------------- | |
49 | AliForwardCorrectionManager& cm = AliForwardCorrectionManager::Instance(); | |
50 | if (corrs && corrs[0] != '\0') cm.SetPrefix(corrs); | |
51 | ||
52 | // --- Make the task and add it to the manager --------------------- | |
53 | AliFMDEnergyFitterTask* task = new AliFMDEnergyFitterTask("ForwardELoss"); | |
54 | // --- Set parameters on the algorithms ---------------------------- | |
55 | task->Configure(config); | |
56 | ||
57 | // For MC input we explicitly disable the noise correction | |
58 | if (mc) task->GetESDFixer().SetRecoNoiseFactor(4); | |
59 | ||
60 | // --- General ----------------------------------------------------- | |
61 | // If set, only collect statistics for MB. This is to prevent a | |
62 | // bias when looping over data where the MB trigger is downscaled. | |
63 | task->SetOnlyMB(onlyMB); | |
64 | ||
65 | // --- Make the output container and connect it -------------------- | |
66 | task->Connect(0,0); | |
67 | ||
68 | Printf("Returning task %p", task); | |
69 | return task; | |
70 | } | |
71 | // | |
72 | // EOF | |
73 | // |