]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/ForwardAODConfig.C
2.76TeV pp MC energy loss fits from run 146859
[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;
f709afcf 34 if (task->IsA() == AliForwardMCMultiplicityTask::Class()) {
9ecab72f 35 Info("ForwardAODConfig", "Assuming Monte-Carlo input");
5bb5d1f6 36 mc = true;
f709afcf 37 }
5bb5d1f6 38
39#if 0
40 if (mc) {
41 AliForwardMCMultiplicityTask* mcTask =
42 static_cast<AliForwardMCMultiplicityTask*>(task);
43 mcTask->SetOnlyPrimary(true);
44 }
45#endif
f709afcf 46 Double_t nXi = 1; // mc ? 1 : .5;
5bb5d1f6 47 Bool_t includeSigma = true;
48
e1f47419 49 // --- Event inspector ---------------------------------------------
9d05ffeb 50 // Set the number of SPD tracklets for which we consider the event a
51 // low flux event
52 task->GetEventInspector().SetLowFluxCut(1000);
53 // Set the maximum error on v_z [cm]
54 task->GetEventInspector().SetMaxVzErr(0.2);
e1f47419 55
56 // --- Sharing filter ----------------------------------------------
9d05ffeb 57 // Set the low cut used for sharing - overrides settings in eloss fits
f709afcf 58 task->GetSharingFilter().SetLowCut(mc ? 0.15 : 0.2);
9d05ffeb 59 // Set the number of xi's (width of landau peak) to stop at
5bb5d1f6 60 task->GetSharingFilter().SetNXi(nXi);
61 // Set whether or not to include sigma in cut
62 task->GetSharingFilter().SetIncludeSigma(includeSigma);
63 // Enable use of angle corrected signals in the algorithm
64 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
e1f47419 65
66 // --- Density calculator
9d05ffeb 67 // Set the maximum number of particle to try to reconstruct
5bb5d1f6 68 task->GetDensityCalculator().SetMaxParticles(10);
9d05ffeb 69 // Wet whether to use poisson statistics to estimate N_ch
37079f20 70 task->GetDensityCalculator().SetUsePoisson(true);
9d05ffeb 71 // Set the lower multiplicity cut. Overrides setting in energy loss fits.
9ecab72f 72 task->GetDensityCalculator().SetMultCut(.3); //was 0.3
5bb5d1f6 73 // Set the lower per-ring multiplicity cuts
74 task->GetDensityCalculator().SetMultCuts(-1,-1,-1,-1,-1);
75 // USe this many times xi+sigma below MPV
76 task->GetDensityCalculator().SetNXi(nXi);
77 // Set whether or not to include sigma in cut
78 task->GetDensityCalculator().SetIncludeSigma(includeSigma);
79 // Set whether or not to use the phi acceptance
80 task->GetDensityCalculator().SetUsePhiAcceptance(true);
e1f47419 81
82 // --- Corrector ---------------------------------------------------
9d05ffeb 83 // Whether to use the secondary map correction
84 task->GetCorrections().SetUseSecondaryMap(true);
85 // Whether to use the vertex bias correction
86 task->GetCorrections().SetUseVertexBias(false);
87 // Whether to use the vertex bias correction
88 task->GetCorrections().SetUseAcceptance(true);
89 // Whether to use the merging efficiency correction
90 task->GetCorrections().SetUseMergingEfficiency(false);
e1f47419 91
92 // --- Histogram Collector -----------------------------------------
9d05ffeb 93 // Set the number of extra bins (beyond the secondary map border)
94 task->GetHistCollector().SetNCutBins(2);
95 // Set the correction cut, that is, when bins in the secondary map
96 // is smaller than this, they are considered empty
97 task->GetHistCollector().SetCorrectionCut(0.5);
e1f47419 98 // How to calculate the value of overlapping bins.
99 // Possible values are
100 // kStraightMean
101 // kStraightMeanNoZero
102 // kWeightedMean
103 // kLeastError
104 task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
105 // How to find the fiducial area of the secondary maps
106 // Possible values are
107 // kByCut Only bins larger that cut are trusted
108 // kDistance Only bins that are more than half the size of it neighbors
109 task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
110
111 // --- Debug -------------------------------------------------------
9d05ffeb 112 // Set the overall debug level (1: some output, 3: a lot of output)
113 task->SetDebug(0);
114 // Set the debug level of a single algorithm
5bb5d1f6 115 task->GetSharingFilter().SetDebug(0);
e1f47419 116
9d05ffeb 117 // --- Set limits on fits the energy -------------------------------
118 // Maximum relative error on parameters
119 AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
120 // Least weight to use
121 AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
122 // Maximum value of reduced chi^2
123 AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
124}
125//
126// EOF
127//