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