2 * @file ForwardAODConfig.C
3 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
4 * @date Wed Mar 23 13:56:02 2011
8 * @ingroup pwglf_forward_scripts_tasks
12 * Configuration script for forward multiplicity task.
14 * You can copy this to your working directory or to some other
15 * directory up-front in your ROOT macro path, and edit it to suit your
18 * @param task Task to configure
20 * @ingroup pwglf_forward_aod
23 ForwardAODConfig(AliForwardMultiplicityBase* task)
27 Info("ForwardAODConfig", "Setting up task %s (%p)", task->GetName(), task);
29 // --- General parameters ------------------------------------------
30 // Whether to enable low flux specific code
31 task->SetEnableLowFlux(kFALSE);
33 // Would like to use dynamic cast but CINT interprets that as a
34 // static cast - sigh!
36 if (task->IsA() == AliForwardMCMultiplicityTask::Class())
41 AliForwardMCMultiplicityTask* mcTask =
42 static_cast<AliForwardMCMultiplicityTask*>(task);
43 mcTask->SetOnlyPrimary(true);
47 Double_t nXi = mc ? 2 : 2; //HHD test
48 Bool_t includeSigma = false; //true;
50 AliFMDMultCuts cSharing;
51 //c.SetNXi(mc ? 1 : 1);
52 //c.SetIncludeSigma(true);
53 //c.SetMPVFraction(0.5);
55 //if(mc) factor = 1.15;
56 cSharing.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
58 AliFMDMultCuts cDensity;
59 //c2.SetNXi(mc ? 1 : 1);
60 // c2.SetIncludeSigma(false);
61 //c2.SetMPVFraction(0.5);
62 //Double_t factor = 1.2;
63 cDensity.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
66 // --- Event inspector ---------------------------------------------
67 // Set the number of SPD tracklets for which we consider the event a
69 task->GetEventInspector().SetLowFluxCut(1000);
70 // Set the maximum error on v_z [cm]
71 task->GetEventInspector().SetMaxVzErr(0.2);
72 // Least number of constributors to 2nd pile-up vertex
73 task->GetEventInspector().SetMinPileupContributors(3);
74 // Least distance from primary to 2nd pile-up vertex (cm)
75 task->GetEventInspector().SetMinPileupDistance(.8);
76 // V0-AND triggered events flagged as NSD
77 task->GetEventInspector().SetUseV0AndForNSD(true);
78 // Use primary vertex selection from 1st physics WG
79 // task->GetEventInspector().SetUseFirstPhysicsVtx(true);
81 // --- Sharing filter ----------------------------------------------
82 // Set the low cut used for sharing - overrides settings in eloss fits
83 // Float_t factor = 1.;
84 //if(mc) factor = 1.2;
85 //task->GetSharingFilter().SetLowCut(0.3*factor);
86 // Enable use of angle corrected signals in the algorithm
87 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
88 // Disable use of angle corrected signals in the algorithm
89 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
90 // Whether to use simple merging algorithm
91 task->GetSharingFilter().SetUseSimpleSharing(true);
92 // Whether to allow for 3 strip hits
93 task->GetSharingFilter().SetAllow3Strips(true);
94 // Do not cut fixed/hard on multiplicity
95 task->GetSharingFilter().GetHCuts().SetMultCuts(-1);
96 // Set the number of xi's (width of landau peak) to stop at
97 task->GetSharingFilter().GetHCuts().SetNXi(nXi);
98 // Set whether or not to include sigma in cut
99 task->GetSharingFilter().GetHCuts().SetIncludeSigma(includeSigma);
100 // Enable use of angle corrected signals in the algorithm
101 task->GetSharingFilter().SetLCuts(cSharing);
104 // --- Density calculator ------------------------------------------
105 // Set the maximum number of particle to try to reconstruct
106 task->GetDensityCalculator().SetMaxParticles(10);
107 // Wet whether to use poisson statistics to estimate N_ch
108 task->GetDensityCalculator().SetUsePoisson(true);
109 // Set to use the running average in Poisson
110 // task->GetDensityCalculator().SetUseRunningAverage(false);
111 // Set whether or not to include sigma in cut
112 task->GetDensityCalculator().SetCuts(cDensity);
113 // Set lumping (nEta,nPhi)
114 task->GetDensityCalculator().SetLumping(32,4);
115 // Set whether or not to use the phi acceptance
116 // AliFMDDensityCalculator::kPhiNoCorrect
117 // AliFMDDensityCalculator::kPhiCorrectNch
118 // AliFMDDensityCalculator::kPhiCorrectELoss
119 task->GetDensityCalculator()
120 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
122 // --- Corrector ---------------------------------------------------
123 // Whether to use the secondary map correction
124 task->GetCorrections().SetUseSecondaryMap(true);
125 // Whether to use the vertex bias correction
126 task->GetCorrections().SetUseVertexBias(false);
127 // Whether to use the vertex bias correction
128 task->GetCorrections().SetUseAcceptance(true);
129 // Whether to use the merging efficiency correction
130 task->GetCorrections().SetUseMergingEfficiency(false);
132 // --- Histogram Collector -----------------------------------------
133 // Set the number of extra bins (beyond the secondary map border)
134 task->GetHistCollector().SetNCutBins(2);
135 // Set the correction cut, that is, when bins in the secondary map
136 // is smaller than this, they are considered empty
137 task->GetHistCollector().SetCorrectionCut(0.5);
138 // How to calculate the value of overlapping bins.
139 // Possible values are
141 // kStraightMeanNoZero
144 task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
145 // How to find the fiducial area of the secondary maps
146 // Possible values are
147 // kByCut Only bins larger that cut are trusted
148 // kDistance Only bins that are more than half the size of it neighbors
149 task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
151 // --- Debug -------------------------------------------------------
152 // Set the overall debug level (1: some output, 3: a lot of output)
153 // task->SetDebug(0);
154 // Set the debug level of a single algorithm
155 // task->GetSharingFilter().SetDebug(3);
157 // --- Eventplane Finder -------------------------------------------
158 task->GetEventPlaneFinder().SetUsePhiWeights(false);
160 // --- Set limits on fits the energy -------------------------------
161 // Maximum relative error on parameters
162 AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
163 // Least weight to use
164 AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
165 // Maximum value of reduced chi^2
166 AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;