]>
Commit | Line | Data |
---|---|---|
7c1a1f1d | 1 | /** |
2 | * @defgroup pwg2_forward_scripts Scripts used in the analysis | |
3 | * | |
4 | * @ingroup pwg2_forward | |
5 | */ | |
6 | /** | |
7 | * @file | |
8 | * @ingroup pwg2_forward_scripts | |
9 | * | |
10 | */ | |
7e4038b5 | 11 | /** |
12 | * This is the macro to include the Forward multiplicity in a train. | |
13 | * | |
7c1a1f1d | 14 | * @ingroup pwg2_forward_scripts |
7e4038b5 | 15 | */ |
2d68d438 | 16 | AliAnalysisTask* |
e797efbb | 17 | AddTaskFMD(Bool_t mc) |
7e4038b5 | 18 | { |
19 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
20 | if (!mgr) { | |
21 | Error("AddTaskFMD", "No analysis manager to connect to."); | |
22 | return NULL; | |
23 | } | |
24 | ||
6b908a3f | 25 | // --- Make the task and add it to the manager --------------------- |
e797efbb | 26 | AliForwardMultiplicityBase* task = 0; |
27 | if (mc) task = new AliForwardMCMultiplicityTask("FMD"); | |
28 | else task = new AliForwardMultiplicityTask("FMD"); | |
6b908a3f | 29 | mgr->AddTask(task); |
30 | ||
0bd4b00f | 31 | // Whether to enable low flux specific code |
32 | task->SetEnableLowFlux(kFALSE); | |
6b908a3f | 33 | // Set the number of SPD tracklets for which we consider the event a |
34 | // low flux event | |
35 | task->GetEventInspector().SetLowFluxCut(1000); | |
36 | // Set the maximum error on v_z [cm] | |
37 | task->GetEventInspector().SetMaxVzErr(0.2); | |
38 | // Set the eta axis to use - note, this overrides whatever is used | |
39 | // by the rest of the algorithms - but only for the energy fitter | |
40 | // algorithm. | |
41 | task->GetEnergyFitter().SetEtaAxis(200, -4, 6); | |
c389303e | 42 | // Set maximum energy loss to consider |
43 | task->GetEnergyFitter().SetMaxE(10); | |
44 | // Set number of energy loss bins | |
45 | task->GetEnergyFitter().SetNEbins(300); | |
46 | // Set whether to use increasing bin sizes | |
47 | task->GetEnergyFitter().SetUseIncreasingBins(true); | |
48 | // Set whether to do fit the energy distributions | |
0bd4b00f | 49 | task->GetEnergyFitter().SetDoFits(kFALSE); |
50 | // Set whether to make the correction object | |
51 | task->GetEnergyFitter().SetDoMakeObject(kFALSE); | |
6b908a3f | 52 | // Set the low cut used for energy |
53 | task->GetEnergyFitter().SetLowCut(0.4); | |
54 | // Set the number of bins to subtract from maximum of distributions | |
55 | // to get the lower bound of the fit range | |
c389303e | 56 | task->GetEnergyFitter().SetFitRangeBinWidth(4); |
6b908a3f | 57 | // Set the maximum number of landaus to try to fit (max 5) |
c389303e | 58 | task->GetEnergyFitter().SetNParticles(5); |
6b908a3f | 59 | // Set the minimum number of entries in the distribution before |
60 | // trying to fit to the data | |
61 | task->GetEnergyFitter().SetMinEntries(1000); | |
0bd4b00f | 62 | // Set the low cut used for sharing - overrides settings in eloss fits |
81eda625 | 63 | task->GetSharingFilter().SetLowCut(0.3); |
0bd4b00f | 64 | // Set the number of xi's (width of landau peak) to stop at |
65 | task->GetSharingFilter().SetNXi(1); | |
66 | // Set the maximum number of particle to try to reconstruct | |
67 | task->GetDensityCalculator().SetMaxParticles(2); | |
68 | // Set the lower multiplicity cut. Overrides setting in energy loss fits. | |
81eda625 | 69 | task->GetDensityCalculator().SetMultCut(0.3); |
70 | // Whether to use the merging efficiency correction | |
1174780f | 71 | task->GetCorrections().SetUseMergingEfficiency(false); |
6b908a3f | 72 | // Set the number of extra bins (beyond the secondary map border) |
e333578d | 73 | task->GetHistCollector().SetNCutBins(2); |
6b908a3f | 74 | // Set the correction cut, that is, when bins in the secondary map |
75 | // is smaller than this, they are considered empty | |
e333578d | 76 | task->GetHistCollector().SetCorrectionCut(0.5); |
6b908a3f | 77 | // Set the overall debug level (1: some output, 3: a lot of output) |
78 | task->SetDebug(0); | |
79 | // Set the debug level of a single algorithm | |
0bd4b00f | 80 | // task->GetEventInspector().SetDebug(4); |
81 | // --- Set limits on fits the energy ------------------------------- | |
82 | // Maximum relative error on parameters | |
83 | AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12; | |
84 | // Least weight to use | |
85 | AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5; | |
86 | // Maximum value of reduced chi^2 | |
87 | AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 5; | |
88 | ||
7e4038b5 | 89 | |
0bd4b00f | 90 | // --- Make the output container and connect it -------------------- |
7e4038b5 | 91 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
0bd4b00f | 92 | // outputfile += ":PWG2forwardDnDeta"; |
93 | // Form(":%s",pars->GetDndetaAnalysisName()); | |
7e4038b5 | 94 | AliAnalysisDataContainer* histOut = |
95 | mgr->CreateContainer("Forward", TList::Class(), | |
96 | AliAnalysisManager::kOutputContainer,outputfile); | |
7e4038b5 | 97 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); |
98 | mgr->ConnectOutput(task, 1, histOut); | |
99 | ||
100 | return task; | |
101 | } |