Updates to scripts. Mostly documentation and some new functionalities
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / ForwardAODConfig.C
CommitLineData
9d05ffeb 1/**
ffca499d 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 */
11/**
9d05ffeb 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);
51
52 Double_t factor = 1.;
53 //if(mc) factor = 1.15;
54
55 cSharing.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
56
57 AliFMDMultCuts cDensity;
58 //c2.SetNXi(mc ? 1 : 1);
59 // c2.SetIncludeSigma(false);
60 //c2.SetMPVFraction(0.5);
61 //Double_t factor = 1.2;
62 cDensity.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
63
64
e1f47419 65 // --- Event inspector ---------------------------------------------
9d05ffeb 66 // Set the number of SPD tracklets for which we consider the event a
67 // low flux event
68 task->GetEventInspector().SetLowFluxCut(1000);
69 // Set the maximum error on v_z [cm]
70 task->GetEventInspector().SetMaxVzErr(0.2);
e1f47419 71
72 // --- Sharing filter ----------------------------------------------
9d05ffeb 73 // Set the low cut used for sharing - overrides settings in eloss fits
1bd766f2 74 // Float_t factor = 1.;
75 //if(mc) factor = 1.2;
76 //task->GetSharingFilter().SetLowCut(0.3*factor);
5bb5d1f6 77 // Enable use of angle corrected signals in the algorithm
78 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
1bd766f2 79 // Disable use of angle corrected signals in the algorithm
f7cfc454 80 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
1bd766f2 81 // Enable use of angle corrected signals in the algorithm
82
83 task->GetSharingFilter().GetHCuts().SetMultCuts(-1);
84 // Set the number of xi's (width of landau peak) to stop at
85 task->GetSharingFilter().GetHCuts().SetNXi(nXi);
86 // Set whether or not to include sigma in cut
87 task->GetSharingFilter().GetHCuts().SetIncludeSigma(includeSigma);
88 // Enable use of angle corrected signals in the algorithm
89 task->GetSharingFilter().SetLCuts(cSharing);
90
91
e1f47419 92 // --- Density calculator
9d05ffeb 93 // Set the maximum number of particle to try to reconstruct
5bb5d1f6 94 task->GetDensityCalculator().SetMaxParticles(10);
9d05ffeb 95 // Wet whether to use poisson statistics to estimate N_ch
37079f20 96 task->GetDensityCalculator().SetUsePoisson(true);
1bd766f2 97
5bb5d1f6 98 // Set whether or not to include sigma in cut
1bd766f2 99 task->GetDensityCalculator().SetCuts(cDensity);
100
56236b95 101 // Set whether or not to use the phi acceptance
102 // AliFMDDensityCalculator::kPhiNoCorrect
103 // AliFMDDensityCalculator::kPhiCorrectNch
104 // AliFMDDensityCalculator::kPhiCorrectELoss
105 task->GetDensityCalculator()
106 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
e1f47419 107
108 // --- Corrector ---------------------------------------------------
9d05ffeb 109 // Whether to use the secondary map correction
110 task->GetCorrections().SetUseSecondaryMap(true);
111 // Whether to use the vertex bias correction
112 task->GetCorrections().SetUseVertexBias(false);
113 // Whether to use the vertex bias correction
114 task->GetCorrections().SetUseAcceptance(true);
115 // Whether to use the merging efficiency correction
116 task->GetCorrections().SetUseMergingEfficiency(false);
e1f47419 117
118 // --- Histogram Collector -----------------------------------------
9d05ffeb 119 // Set the number of extra bins (beyond the secondary map border)
120 task->GetHistCollector().SetNCutBins(2);
121 // Set the correction cut, that is, when bins in the secondary map
122 // is smaller than this, they are considered empty
123 task->GetHistCollector().SetCorrectionCut(0.5);
e1f47419 124 // How to calculate the value of overlapping bins.
125 // Possible values are
126 // kStraightMean
127 // kStraightMeanNoZero
128 // kWeightedMean
129 // kLeastError
130 task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
131 // How to find the fiducial area of the secondary maps
132 // Possible values are
133 // kByCut Only bins larger that cut are trusted
134 // kDistance Only bins that are more than half the size of it neighbors
135 task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
136
137 // --- Debug -------------------------------------------------------
9d05ffeb 138 // Set the overall debug level (1: some output, 3: a lot of output)
139 task->SetDebug(0);
140 // Set the debug level of a single algorithm
5bb5d1f6 141 task->GetSharingFilter().SetDebug(0);
e1f47419 142
9d05ffeb 143 // --- Set limits on fits the energy -------------------------------
144 // Maximum relative error on parameters
145 AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
146 // Least weight to use
147 AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
148 // Maximum value of reduced chi^2
149 AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
150}
151//
152// EOF
153//