]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/ForwardAODConfig.C
Fixed references from PWG2 -> PWGLF - very efficiently done using ETags.
[u/mrichter/AliRoot.git] / PWGLF / 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 *
bd6f5206 8 * @ingroup pwglf_forward_scripts_tasks
ffca499d 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 *
bd6f5206 18 * @ingroup pwglf_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);
e6463868 69 // Least number of constributors to 2nd pile-up vertex
70 task->GetEventInspector().SetMinPileupContributors(3);
71 // Least distance from primary to 2nd pile-up vertex (cm)
72 task->GetEventInspector().SetMinPileupDistance(.8);
73 // V0-AND triggered events flagged as NSD
74 task->GetEventInspector().SetUseV0AndForNSD(false);
75 // Use primary vertex selection from 1st physics WG
76 task->GetEventInspector().SetUseFirstPhysicsVertex(false);
e1f47419 77
78 // --- Sharing filter ----------------------------------------------
9d05ffeb 79 // Set the low cut used for sharing - overrides settings in eloss fits
1bd766f2 80 // Float_t factor = 1.;
81 //if(mc) factor = 1.2;
82 //task->GetSharingFilter().SetLowCut(0.3*factor);
5bb5d1f6 83 // Enable use of angle corrected signals in the algorithm
84 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
1bd766f2 85 // Disable use of angle corrected signals in the algorithm
f7cfc454 86 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
e6463868 87 // Whether to use simple merging algorithm
88 task->GetSharingFilter().SetUseSimpleSharing(false);
89 // Whether to allow for 3 strip hits
90 task->GetSharingFilter().SetAllow3Strips(true);
91 // Do not cut fixed/hard on multiplicity
1bd766f2 92 task->GetSharingFilter().GetHCuts().SetMultCuts(-1);
93 // Set the number of xi's (width of landau peak) to stop at
94 task->GetSharingFilter().GetHCuts().SetNXi(nXi);
95 // Set whether or not to include sigma in cut
96 task->GetSharingFilter().GetHCuts().SetIncludeSigma(includeSigma);
97 // Enable use of angle corrected signals in the algorithm
98 task->GetSharingFilter().SetLCuts(cSharing);
99
100
9b2f2e39 101 // --- Density calculator ------------------------------------------
9d05ffeb 102 // Set the maximum number of particle to try to reconstruct
5bb5d1f6 103 task->GetDensityCalculator().SetMaxParticles(10);
9d05ffeb 104 // Wet whether to use poisson statistics to estimate N_ch
37079f20 105 task->GetDensityCalculator().SetUsePoisson(true);
e6463868 106 // Set to use the running average in Poisson
107 task->GetDensityCalculator().SetUseRunningAverage(false);
5bb5d1f6 108 // Set whether or not to include sigma in cut
1bd766f2 109 task->GetDensityCalculator().SetCuts(cDensity);
e6463868 110 // Set lumping (nEta,nPhi)
111 task->GetDensityCalculator().SetLumping(32,4);
56236b95 112 // Set whether or not to use the phi acceptance
113 // AliFMDDensityCalculator::kPhiNoCorrect
114 // AliFMDDensityCalculator::kPhiCorrectNch
115 // AliFMDDensityCalculator::kPhiCorrectELoss
116 task->GetDensityCalculator()
117 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
e1f47419 118
119 // --- Corrector ---------------------------------------------------
9d05ffeb 120 // Whether to use the secondary map correction
121 task->GetCorrections().SetUseSecondaryMap(true);
122 // Whether to use the vertex bias correction
123 task->GetCorrections().SetUseVertexBias(false);
124 // Whether to use the vertex bias correction
125 task->GetCorrections().SetUseAcceptance(true);
126 // Whether to use the merging efficiency correction
127 task->GetCorrections().SetUseMergingEfficiency(false);
e1f47419 128
129 // --- Histogram Collector -----------------------------------------
9d05ffeb 130 // Set the number of extra bins (beyond the secondary map border)
131 task->GetHistCollector().SetNCutBins(2);
132 // Set the correction cut, that is, when bins in the secondary map
133 // is smaller than this, they are considered empty
134 task->GetHistCollector().SetCorrectionCut(0.5);
e1f47419 135 // How to calculate the value of overlapping bins.
136 // Possible values are
137 // kStraightMean
138 // kStraightMeanNoZero
139 // kWeightedMean
140 // kLeastError
141 task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
142 // How to find the fiducial area of the secondary maps
143 // Possible values are
144 // kByCut Only bins larger that cut are trusted
145 // kDistance Only bins that are more than half the size of it neighbors
146 task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
147
148 // --- Debug -------------------------------------------------------
9d05ffeb 149 // Set the overall debug level (1: some output, 3: a lot of output)
150 task->SetDebug(0);
151 // Set the debug level of a single algorithm
5bb5d1f6 152 task->GetSharingFilter().SetDebug(0);
e1f47419 153
9d05ffeb 154 // --- Set limits on fits the energy -------------------------------
155 // Maximum relative error on parameters
156 AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
157 // Least weight to use
158 AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
159 // Maximum value of reduced chi^2
160 AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
161}
162//
163// EOF
164//