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);
44 Double_t nXi = mc ? 2 : 2; //HHD test
45 Bool_t includeSigma = false; //true;
47 AliFMDMultCuts cSharing;
48 //c.SetNXi(mc ? 1 : 1);
49 //c.SetIncludeSigma(true);
50 //c.SetMPVFraction(0.5);
52 //if(mc) factor = 1.15;
53 cSharing.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
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);
63 // --- Event inspector ---------------------------------------------
64 // Set the number of SPD tracklets for which we consider the event a
66 task->GetEventInspector().SetLowFluxCut(1000);
67 // Set the maximum error on v_z [cm]
68 task->GetEventInspector().SetMaxVzErr(0.2);
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);
78 // --- Sharing filter ----------------------------------------------
79 // Set the low cut used for sharing - overrides settings in eloss fits
80 // Float_t factor = 1.;
81 //if(mc) factor = 1.2;
82 //task->GetSharingFilter().SetLowCut(0.3*factor);
83 // Enable use of angle corrected signals in the algorithm
84 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
85 // Disable use of angle corrected signals in the algorithm
86 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
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
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);
101 // --- Density calculator ------------------------------------------
102 // Set the maximum number of particle to try to reconstruct
103 task->GetDensityCalculator().SetMaxParticles(10);
104 // Wet whether to use poisson statistics to estimate N_ch
105 task->GetDensityCalculator().SetUsePoisson(true);
106 // Set to use the running average in Poisson
107 task->GetDensityCalculator().SetUseRunningAverage(false);
108 // Set whether or not to include sigma in cut
109 task->GetDensityCalculator().SetCuts(cDensity);
110 // Set lumping (nEta,nPhi)
111 task->GetDensityCalculator().SetLumping(32,4);
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);
119 // --- Corrector ---------------------------------------------------
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);
129 // --- Histogram Collector -----------------------------------------
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);
135 // How to calculate the value of overlapping bins.
136 // Possible values are
138 // kStraightMeanNoZero
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);
148 // --- Debug -------------------------------------------------------
149 // Set the overall debug level (1: some output, 3: a lot of output)
151 // Set the debug level of a single algorithm
152 task->GetSharingFilter().SetDebug(0);
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;