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 // --- Check for MC ------------------------------------------------
34 // Would like to use dynamic cast but CINT interprets that as a
35 // static cast - sigh!
36 Bool_t mc = (task->IsA()==AliForwardMCMultiplicityTask::Class());
38 // --- Cuts --------------------------------------------------------
39 // Note, the absolute lowest signal to consider - ever -
40 // irrespective of MC or real data, is 0.15. Signals below this
41 // will contain remenants of the pedestal (yes, the width of the
42 // pedestal is small, but there are many _many_ channels with only
43 // pedestal value in them, so the absolute number of high-value
44 // pedestal signals is large - despite the low probablity).
45 AliFMDMultCuts cSharingLow(AliFMDMultCuts::kFixed,0.15);
46 AliFMDMultCuts cSharingHigh(AliFMDMultCuts::kLandauSigmaWidth,1);
47 AliFMDMultCuts cDensity(AliFMDMultCuts::kLandauSigmaWidth,1);
49 // --- Event inspector ---------------------------------------------
50 // Set the number of SPD tracklets for which we consider the event a
52 task->GetEventInspector().SetLowFluxCut(1000);
53 // Set the maximum error on v_z [cm]
54 task->GetEventInspector().SetMaxVzErr(0.2);
55 // Least number of constributors to 2nd pile-up vertex
56 task->GetEventInspector().SetMinPileupContributors(3);
57 // Least distance from primary to 2nd pile-up vertex (cm)
58 task->GetEventInspector().SetMinPileupDistance(.8);
59 // V0-AND triggered events flagged as NSD
60 task->GetEventInspector().SetUseV0AndForNSD(false);
61 // Set the kind of vertex to look for. Can be one of
63 // - kNormal: SPD vertex
64 // - kpA2012: Selection tuned for 2012 pA data
65 // - kpA2013: Selection tuned for 2013 pA data
66 // - kPWGUD: Selection used by 'first physics'
67 // - kDisplaced: Satellite collisions, with kNormal fall-back
69 task->GetEventInspector().SetVertexMethod(AliFMDEventInspector::kNormal);
70 // Which centrality estimator to use
71 task->GetEventInspector().SetCentralityMethod("V0M");
73 // --- ESD fixer ---------------------------------------------------
74 // Sets the noise factor that was used during reconstruction. If
75 // this is set to 4 or more, then this correction will be disabled.
76 task->GetESDFixer().SetRecoNoiseFactor(1);
77 // IF the noise correction is bigger than this, flag strip as dead
78 task->GetESDFixer().SetMaxNoiseCorrection(0.05);
79 // Sets whether to recalculate eta
80 task->GetESDFixer().SetRecalculateEta(false);
81 // If true, consider AliESDFMD::kInvalidMult as a zero signal. This
82 // has the unfortunate side effect, that we cannot use the
83 // on-the-fly calculation of the phi acceptance.
87 // Before revision 43711 of AliFMDReconstructor, all strips with no
88 // signal where set to kInvalidMult. From revision 43711 (Release
89 // 4-19-Rev-09) empty strips that are not marked as bad have a
90 // signal of 0 (zero). That means, that for any reconstruction done
91 // with releases prior to 4-19-Rev-09 this flag _must_ be defined as
94 // The unfortunate side effect mentioned above is especially cruel
95 // in this case, since we would benefit a lot from this setting for
96 // that data. However, one can add dead strips here using
97 // AliFMDSharingFilter::AddDeadStrip or
98 // AliFMDSharingFilter::AddDeadRegion to remedy the situation, since
99 // strips added explicitly here are always ignored. In the future,
100 // the acceptance maker script should generate the list
103 // LHC10c-900Gev is effected up-to and including pass3
104 // LHC10c-7TeV is effected up-to and including pass2
105 // LHC10c-CPass0 should be OK, but has limited statistics
106 // LHC10c_11a_FMD should be OK, but has few runs
107 task->GetESDFixer().SetInvalidIsEmpty(false);
108 // Dead region in FMD2i
109 task->GetESDFixer().AddDeadRegion(2, 'I', 16, 17, 256, 511);
110 // One can add extra dead strips from a script like
112 // void deadstrips(AliFMDSharingFilter* filter)
114 // filter->AddDead(...);
120 // task->GetESDFixer().AddDead("deadstrips.C");
122 // --- Sharing filter ----------------------------------------------
123 // If the following is set to true, then the merging of shared
124 // signals is disabled completely
125 // task->GetSharingFilter().SetMergingDisabled(false);
126 // Enable use of angle corrected signals in the algorithm
127 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
128 // Ignore the ESD information when angle correcting.
132 // This is to counter a known issue with AliESDFMD with ClassDef
133 // version < 4, where the angle correction flag is incorrectly set.
134 // A fix is coming to AliESDFMD to handle it directly in the class.
135 // Only set the flag below to true if you know it to be necessary for
137 task->GetSharingFilter().SetIgnoreESDWhenAngleCorrecting(false);
138 // Disable use of angle corrected signals in the algorithm
139 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
140 // Whether to use simple merging algorithm
141 task->GetSharingFilter().SetUseSimpleSharing(true);
142 // Whether to allow for 3 strip hits - deprecated
143 task->GetSharingFilter().SetAllow3Strips(false);
144 // Set upper sharing cut
145 task->GetSharingFilter().SetHCuts(cSharingHigh);
146 // Enable use of angle corrected signals in the algorithm
147 task->GetSharingFilter().SetLCuts(cSharingLow);
149 // --- Density calculator ------------------------------------------
150 // Set the maximum number of particle to try to reconstruct
151 task->GetDensityCalculator().SetMaxParticles(10);
152 // Wet whether to use poisson statistics to estimate N_ch
153 task->GetDensityCalculator().SetUsePoisson(true);
154 // Set whether or not to include sigma in cut
155 task->GetDensityCalculator().SetCuts(cDensity);
156 // Set lumping (nEta,nPhi)
157 task->GetDensityCalculator().SetLumping(32,4);
158 // Recalculate phi taking (x,y) offset of IP into account
159 task->GetDensityCalculator().SetRecalculatePhi(true);
160 // Least acceptable quality of ELoss fits
161 task->GetDensityCalculator().SetMinQuality(8);
162 // Set the maximum ratio of outlier bins to the total number of bins
163 // task->GetDensityCalculator().SetMaxOutliers(.10);
164 task->GetDensityCalculator().SetMaxOutliers(1.0);//Disable filter
165 // Set the maximum relative diviation between N_ch from Eloss and Poisson
166 task->GetDensityCalculator().SetOutlierCut(0.5);
167 // Set whether or not to use the phi acceptance
168 // AliFMDDensityCalculator::kPhiNoCorrect
169 // AliFMDDensityCalculator::kPhiCorrectNch
170 // AliFMDDensityCalculator::kPhiCorrectELoss
171 task->GetDensityCalculator()
172 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
174 // --- Corrector ---------------------------------------------------
175 // Whether to use the secondary map correction
176 task->GetCorrections().SetUseSecondaryMap(true);
177 // Whether to use the vertex bias correction (deprecated)
178 task->GetCorrections().SetUseVertexBias(false);
179 // Whether to use the acceptance correction from dead-strips (deprecated)
180 task->GetCorrections().SetUseAcceptance(false);
181 // Whether to use the merging efficiency correction (deprecated)
182 task->GetCorrections().SetUseMergingEfficiency(false);
184 // --- Histogram Collector -----------------------------------------
185 // Set the number of extra bins (beyond the secondary map border)
186 task->GetHistCollector().SetNCutBins(2);
187 // Set the correction cut, that is, when bins in the secondary map
188 // is smaller than this, they are considered empty
189 task->GetHistCollector().SetCorrectionCut(0.5);
190 // How to calculate the value of overlapping bins.
191 // Possible values are
193 // kStraightMeanNoZero
199 task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
200 // How to find the fiducial area of the secondary maps
201 // Possible values are
202 // kByCut Only bins larger that cut are trusted
203 // kDistance Only bins that are more than half the size of it neighbors
204 task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
205 // Additional diagnostics output - off by default
207 // If this option is enabled, then the summed per-vertex, per-ring
208 // d2N/detadphi histograms will be stored in the output, as well as
209 // copies of the secondary maps
210 task->GetHistCollector().SetMakeBGHitMaps(false);
212 // If this option is enabled, then a 3D histogram will be made for
213 // each ring, summing dN/deta for each centrality bin.
214 task->GetHistCollector().SetMakeCentralitySums(false);
216 // --- Eventplane Finder -------------------------------------------
217 task->GetEventPlaneFinder().SetUsePhiWeights(false);
219 // --- Ring AOD output ---------------------------------------------
220 // If set to true, then 5 additional branches will be created on the
221 // output AOD - one for each FMD ring. The branches each contain a
222 // TH2D object of the (primary) charged particle multiplicity per
223 // (eta,phi)-bin in that event
224 task->SetStorePerRing(false);
226 // --- Set limits on fits the energy -------------------------------
227 // DO NOT CHANGE THESE UNLESS YOU KNOW WHAT YOU ARE DOING
228 // Maximum relative error on parameters
229 // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
230 // Least weight to use
231 // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
232 // Maximum value of reduced chi^2
233 // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 10;
235 // --- Debug -------------------------------------------------------
236 // Set the overall debug level (1: some output, 3: a lot of output)
237 // task->SetDebug(0);
238 // Set the debug level of a single algorithm
239 // task->GetSharingFilter().SetDebug(3);