]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/elossFitConfig.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / elossFitConfig.C
CommitLineData
717afa1a 1/**
2 * @file elossFitConfig.C
3 * @author Christian Holm Christensen <cholm@nbi.dk>
4 * @date Thu Aug 14 15:25:13 2014
5 *
6 * @brief Configure Energy loss fitter
7 *
8 * @ingroup pwglf_forward_scripts_tasks
9 *
10 */
11/**
12 * Configure ther energy loss fitter task
13 *
14 * @param task Task to configure
15 *
16 * @ingroup pwglf_forward_eloss
17 */
18void
19elossFitConfig(AliFMDEnergyFitterTask* task)
20{
21 if (!task) return;
22
23 Info("elossFitConfig", "Setting up task %s (%p)", task->GetName(), task);
24
25 // --- Event inspector ---------------------------------------------
26 // Set the number of SPD tracklets for which we consider the event a
27 // low flux event
28 task->GetEventInspector().SetLowFluxCut(1000);
29 // Set the maximum error on v_z [cm]
30 task->GetEventInspector().SetMaxVzErr(0.2);
31 // How to tag events as pile-up. Bit pattern of
32 //
33 // - 0x1: SPD multi-vertex
34 // - 0x2: Track multi-vertex
35 // - 0x4: Out-of-bunch
36 //
37 task->GetEventInspector().SetPileupFlags(0x7);
38
39 // --- ESD Fixer ---------------------------------------------------
40 // IF the noise correction is bigger than this, flag strip as dead
41 task->GetESDFixer().SetMaxNoiseCorrection(0.04);
42 // Dead region in FMD2i
43 task->GetESDFixer().AddDeadRegion(2, 'I', 16, 17, 256, 511);
44
45 // --- Energy loss fitter ------------------------------------------
46 // Set the eta axis to use - note, this overrides whatever is used
47 // by the rest of the algorithms - but only for the energy fitter
48 // algorithm.
49 task->GetEnergyFitter().SetEtaAxis(200, -4, 6);
50 // Set maximum energy loss to consider
51 task->GetEnergyFitter().SetMaxE(15);
52 // Set number of energy loss bins
53 task->GetEnergyFitter().SetNEbins(500);
54 // Set whether to use increasing bin sizes
55 task->GetEnergyFitter().SetUseIncreasingBins(true);
56 // Set whether to do fit the energy distributions
57 task->GetEnergyFitter().SetDoFits(kTRUE);
58 // Set whether to make the correction object
59 task->GetEnergyFitter().SetDoMakeObject(kTRUE);
60 // Set the low cut used for energy
61 task->GetEnergyFitter().SetLowCut(0.4);
62 // Set the number of bins to subtract from maximum of distributions
63 // to get the lower bound of the fit range
64 task->GetEnergyFitter().SetFitRangeBinWidth(4);
65 // Set the maximum number of landaus to try to fit (max 5)
66 task->GetEnergyFitter().SetNParticles(5);
67 // Set the minimum number of entries in the distribution before
68 // trying to fit to the data - 10K seems the absolute minimum
69 task->GetEnergyFitter().SetMinEntries(10000);
70 // Set reqularization cut
71 task->GetEnergyFitter().SetRegularizationCut(1e8);
72 // Check if we're to store the residuals. This can be one of
73 // AliFMDEnergyFitter::EResidualMethod:
74 //
75 // - AliFMDEnergyFitter::kNoResiduals - no residuals calculated
76 // - AliFMDEnergyFitter::kResidualSquareDifference
77 // - AliFMDEnergyFitter::kResidualScaledDifference
78 // - AliFMDEnergyFitter::kResidualDifference
79 //
80 AliFMDEnergyFitter::EResidualMethod rm = AliFMDEnergyFitter::kNoResiduals;
81 task->GetEnergyFitter().SetStoreResiduals(rm);
82
83 // --- Set limits on fits the energy -------------------------------
84 // DO NOT CHANGE THESE UNLESS YOU KNOW WHAT YOU ARE DOING
85 // Maximum relative error on parameters
86 // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
87 // Least weight to use
88 // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
89 // Maximum value of reduced chi^2
90 // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
91}
92//
93// EOF
94//