]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/ForwardAODConfig.C
Fixes for coverity checks.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / ForwardAODConfig.C
CommitLineData
ffca499d 1/**
2 * @file ForwardAODConfig.C
3 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
4 * @date Wed Mar 23 13:56:02 2011
5 *
6 * @brief
7 *
8 * @ingroup pwg2_forward_scripts_tasks
9 *
10 */
9d05ffeb 11/**
12 * Configuration script for forward multiplicity task.
13 *
14 * You can copy this to your working directory or to some other
e1f47419 15 * directory up-front in your ROOT macro path, and edit it to suit your
9d05ffeb 16 * needs.
17 *
ffca499d 18 * @ingroup pwg2_forward_aod
9d05ffeb 19 */
20void
21ForwardAODConfig(AliForwardMultiplicityBase* task)
22{
23 if (!task) return;
24
25 Info("ForwardAODConfig", "Setting up task %s (%p)", task->GetName(), task);
e1f47419 26
27 // --- General parameters ------------------------------------------
9d05ffeb 28 // Whether to enable low flux specific code
29 task->SetEnableLowFlux(kFALSE);
e1f47419 30
5bb5d1f6 31 // Would like to use dynamic cast but CINT interprets that as a
32 // static cast - sigh!
33 Bool_t mc = false;
1bd766f2 34 if (task->IsA() == AliForwardMCMultiplicityTask::Class())
5bb5d1f6 35 mc = true;
1bd766f2 36
5bb5d1f6 37#if 0
38 if (mc) {
39 AliForwardMCMultiplicityTask* mcTask =
40 static_cast<AliForwardMCMultiplicityTask*>(task);
41 mcTask->SetOnlyPrimary(true);
42 }
43#endif
1bd766f2 44 Double_t nXi = mc ? 2 : 2; //HHD test
45 Bool_t includeSigma = false; //true;
5bb5d1f6 46
1bd766f2 47 AliFMDMultCuts cSharing;
48 //c.SetNXi(mc ? 1 : 1);
49 //c.SetIncludeSigma(true);
50 //c.SetMPVFraction(0.5);
1bd766f2 51 Double_t factor = 1.;
52 //if(mc) factor = 1.15;
1bd766f2 53 cSharing.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
54
55 AliFMDMultCuts cDensity;
56 //c2.SetNXi(mc ? 1 : 1);
57 // c2.SetIncludeSigma(false);
58 //c2.SetMPVFraction(0.5);
59 //Double_t factor = 1.2;
60 cDensity.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
61
62
e1f47419 63 // --- Event inspector ---------------------------------------------
9d05ffeb 64 // Set the number of SPD tracklets for which we consider the event a
65 // low flux event
66 task->GetEventInspector().SetLowFluxCut(1000);
67 // Set the maximum error on v_z [cm]
68 task->GetEventInspector().SetMaxVzErr(0.2);
e1f47419 69
70 // --- Sharing filter ----------------------------------------------
9d05ffeb 71 // Set the low cut used for sharing - overrides settings in eloss fits
1bd766f2 72 // Float_t factor = 1.;
73 //if(mc) factor = 1.2;
74 //task->GetSharingFilter().SetLowCut(0.3*factor);
5bb5d1f6 75 // Enable use of angle corrected signals in the algorithm
76 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
1bd766f2 77 // Disable use of angle corrected signals in the algorithm
f7cfc454 78 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
1bd766f2 79 // Enable use of angle corrected signals in the algorithm
1bd766f2 80 task->GetSharingFilter().GetHCuts().SetMultCuts(-1);
81 // Set the number of xi's (width of landau peak) to stop at
82 task->GetSharingFilter().GetHCuts().SetNXi(nXi);
83 // Set whether or not to include sigma in cut
84 task->GetSharingFilter().GetHCuts().SetIncludeSigma(includeSigma);
85 // Enable use of angle corrected signals in the algorithm
86 task->GetSharingFilter().SetLCuts(cSharing);
87
88
9b2f2e39 89 // --- Density calculator ------------------------------------------
9d05ffeb 90 // Set the maximum number of particle to try to reconstruct
5bb5d1f6 91 task->GetDensityCalculator().SetMaxParticles(10);
9d05ffeb 92 // Wet whether to use poisson statistics to estimate N_ch
37079f20 93 task->GetDensityCalculator().SetUsePoisson(true);
5bb5d1f6 94 // Set whether or not to include sigma in cut
1bd766f2 95 task->GetDensityCalculator().SetCuts(cDensity);
96
56236b95 97 // Set whether or not to use the phi acceptance
98 // AliFMDDensityCalculator::kPhiNoCorrect
99 // AliFMDDensityCalculator::kPhiCorrectNch
100 // AliFMDDensityCalculator::kPhiCorrectELoss
101 task->GetDensityCalculator()
102 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
e1f47419 103
104 // --- Corrector ---------------------------------------------------
9d05ffeb 105 // Whether to use the secondary map correction
106 task->GetCorrections().SetUseSecondaryMap(true);
107 // Whether to use the vertex bias correction
108 task->GetCorrections().SetUseVertexBias(false);
109 // Whether to use the vertex bias correction
110 task->GetCorrections().SetUseAcceptance(true);
111 // Whether to use the merging efficiency correction
112 task->GetCorrections().SetUseMergingEfficiency(false);
e1f47419 113
114 // --- Histogram Collector -----------------------------------------
9d05ffeb 115 // Set the number of extra bins (beyond the secondary map border)
116 task->GetHistCollector().SetNCutBins(2);
117 // Set the correction cut, that is, when bins in the secondary map
118 // is smaller than this, they are considered empty
119 task->GetHistCollector().SetCorrectionCut(0.5);
e1f47419 120 // How to calculate the value of overlapping bins.
121 // Possible values are
122 // kStraightMean
123 // kStraightMeanNoZero
124 // kWeightedMean
125 // kLeastError
126 task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
127 // How to find the fiducial area of the secondary maps
128 // Possible values are
129 // kByCut Only bins larger that cut are trusted
130 // kDistance Only bins that are more than half the size of it neighbors
131 task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
132
133 // --- Debug -------------------------------------------------------
9d05ffeb 134 // Set the overall debug level (1: some output, 3: a lot of output)
135 task->SetDebug(0);
136 // Set the debug level of a single algorithm
5bb5d1f6 137 task->GetSharingFilter().SetDebug(0);
e1f47419 138
9d05ffeb 139 // --- Set limits on fits the energy -------------------------------
140 // Maximum relative error on parameters
141 AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
142 // Least weight to use
143 AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
144 // Maximum value of reduced chi^2
145 AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
146}
147//
148// EOF
149//