]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/ForwardAODConfig.C
Merge branch 'workdir'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / ForwardAODConfig.C
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  * 
8  * @ingroup pwglf_forward_scripts_tasks
9  * 
10  */
11 /**
12  * Configuration script for forward multiplicity task.  
13  *
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
16  * needs.
17  * 
18  * @param task  Task to configure 
19  *
20  * @ingroup pwglf_forward_aod
21  */
22 void
23 ForwardAODConfig(AliForwardMultiplicityBase* task)
24 {
25   if (!task) return;
26
27   Info("ForwardAODConfig", "Setting up task %s (%p)", task->GetName(), task);
28
29   // --- General parameters ------------------------------------------
30   // Whether to enable low flux specific code 
31   task->SetEnableLowFlux(kFALSE);
32
33   // --- Cuts --------------------------------------------------------
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());
37   // Double_t nXi          = 2; 
38   // Bool_t   includeSigma = false; //true;
39   // Sharing cut
40   AliFMDMultCuts cSharingLow;
41   Double_t factor = 1.;
42   cSharingLow.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
43   // Sharing cut
44   AliFMDMultCuts cSharingHigh;
45   cSharingHigh.SetMultCuts(-1);
46   cSharingHigh.SetNXi(0); // Was 2
47   cSharingHigh.SetIncludeSigma(false);
48   cSharingHigh.SetMPVFraction(0.6); 
49   // Density cut
50   AliFMDMultCuts cDensity;
51   // cDensity.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
52   cDensity.SetMultCuts(-1);
53   cDensity.SetMPVFraction(0.6); // Was .7
54   
55   // --- Event inspector ---------------------------------------------
56   // Set the number of SPD tracklets for which we consider the event a
57   // low flux event
58   task->GetEventInspector().SetLowFluxCut(1000); 
59   // Set the maximum error on v_z [cm]
60   task->GetEventInspector().SetMaxVzErr(0.2);
61   // Least number of constributors to 2nd pile-up vertex
62   task->GetEventInspector().SetMinPileupContributors(3);
63   // Least distance from primary to 2nd pile-up vertex (cm)
64   task->GetEventInspector().SetMinPileupDistance(.8);
65   // V0-AND triggered events flagged as NSD 
66   task->GetEventInspector().SetUseV0AndForNSD(false);
67   // Use primary vertex selection from 1st physics WG
68   task->GetEventInspector().SetUseFirstPhysicsVtx(false);
69   // Use satellite collisions
70   task->GetEventInspector().SetUseDisplacedVertices(false);
71   // Which centrality estimator to use 
72   task->GetEventInspector().SetCentralityMethod("V0M");
73
74   // --- Sharing filter ----------------------------------------------
75   // If the following is uncommented, then the merging of shared
76   // signals is disabled completely
77   // task->GetSharingFilter().SetDisableMerging(true);
78   // Enable use of angle corrected signals in the algorithm 
79   task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
80   // Disable use of angle corrected signals in the algorithm 
81   task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
82   // Whether to use simple merging algorithm
83   task->GetSharingFilter().SetUseSimpleSharing(true);
84   // Whether to allow for 3 strip hits 
85   task->GetSharingFilter().SetAllow3Strips(!mc);
86   // Do not cut fixed/hard on multiplicity 
87   // task->GetSharingFilter().GetHCuts().SetMultCuts(-1);
88   // Set the number of xi's (width of landau peak) to stop at 
89   // task->GetSharingFilter().GetHCuts().SetNXi(nXi);
90   // Set whether or not to include sigma in cut
91   // task->GetSharingFilter().GetHCuts().SetIncludeSigma(includeSigma);
92   // Set upper sharing cut 
93   task->GetSharingFilter().SetHCuts(cSharingHigh);
94   // Enable use of angle corrected signals in the algorithm 
95   task->GetSharingFilter().SetLCuts(cSharingLow);
96   // If true, consider AliESDFMD::kInvalidMult as a zero signal.  This
97   // has the unfortunate side effect, that we cannot use the
98   // on-the-fly calculation of the phi acceptance.  
99   // 
100   // *IMPORTANT*
101   // 
102   // Before revision 43711 of AliFMDReconstructor, all strips with no
103   // signal where set to kInvalidMult.  From revision 43711 (Release
104   // 4-19-Rev-09) empty strips that are not marked as bad have a
105   // signal of 0 (zero).  That means, that for any reconstruction done
106   // with releases prior to 4-19-Rev-09 this flag _must_ be defined as
107   // true. 
108   // 
109   // The unfortunate side effect mentioned above is especially cruel
110   // in this case, since we would benefit a lot from this setting for
111   // that data.  However, one can add dead strips here using
112   // AliFMDSharingFilter::AddDeadStrip or
113   // AliFMDSharingFilter::AddDeadRegion to remedy the situation, since
114   // strips added explicitly here are always ignored.  In the future,
115   // the acceptance maker script should generate the list
116   // automaticallu.
117   //
118   // LHC10c-900Gev is effected up-to and including pass3 
119   // LHC10c-7TeV is effected up-to and including pass2
120   // LHC10c-CPass0 should be OK, but has limited statistics 
121   // LHC10c_11a_FMD should be OK, but has few runs  
122   task->GetSharingFilter().SetInvalidIsEmpty(false);
123   // Dead region in FMD2i
124   task->GetSharingFilter().AddDeadRegion(2, 'I', 16, 17, 256, 511);  
125   // One can add extra dead strips from a script like 
126   // 
127   //   void deadstrips(AliFMDSharingFilter* filter)
128   //   {
129   //     filter->AddDead(...);
130   //     // ... and so on 
131   //   }
132   //
133   // and then do here 
134   // 
135   // task->GetSharingFilter().AddDead("deadstrips.C");
136    
137   // --- Density calculator ------------------------------------------
138   // Set the maximum number of particle to try to reconstruct 
139   task->GetDensityCalculator().SetMaxParticles(10);
140   // Wet whether to use poisson statistics to estimate N_ch
141   task->GetDensityCalculator().SetUsePoisson(true);
142   // Set whether or not to include sigma in cut
143   task->GetDensityCalculator().SetCuts(cDensity);
144   // Set lumping (nEta,nPhi)
145   task->GetDensityCalculator().SetLumping(32,4);
146   // Recalculate phi taking (x,y) offset of IP into account 
147   task->GetDensityCalculator().SetRecalculatePhi(true);
148   // Least acceptable quality of ELoss fits
149   task->GetDensityCalculator().SetMinQuality(8);
150   // Set the maximum ratio of outlier bins to the total number of bins
151   task->GetDensityCalculator().SetMaxOutliers(.10);
152   // Set the maximum relative diviation between N_ch from Eloss and Poisson
153   task->GetDensityCalculator().SetOutlierCut(0.5);
154   // Set whether or not to use the phi acceptance
155   //   AliFMDDensityCalculator::kPhiNoCorrect
156   //   AliFMDDensityCalculator::kPhiCorrectNch
157   //   AliFMDDensityCalculator::kPhiCorrectELoss
158   task->GetDensityCalculator()
159     .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
160
161   // --- Corrector ---------------------------------------------------
162   // Whether to use the secondary map correction
163   task->GetCorrections().SetUseSecondaryMap(true);
164   // Whether to use the vertex bias correction (deprecated)
165   task->GetCorrections().SetUseVertexBias(false);
166   // Whether to use the acceptance correction from dead-strips (deprecated)
167   task->GetCorrections().SetUseAcceptance(false);
168   // Whether to use the merging efficiency correction  (deprecated)
169   task->GetCorrections().SetUseMergingEfficiency(false);
170
171   // --- Histogram Collector -----------------------------------------
172   // Set the number of extra bins (beyond the secondary map border) 
173   task->GetHistCollector().SetNCutBins(2);
174   // Set the correction cut, that is, when bins in the secondary map 
175   // is smaller than this, they are considered empty 
176   task->GetHistCollector().SetCorrectionCut(0.5);
177   // How to calculate the value of overlapping bins. 
178   // Possible values are 
179   //    kStraightMean 
180   //    kStraightMeanNoZero 
181   //    kWeightedMean 
182   //    kLeastError 
183   //    kSum
184   //    kPreferInner
185   //    kPreferOuter
186   task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
187   // How to find the fiducial area of the secondary maps 
188   // Possible values are 
189   //   kByCut    Only bins larger that cut are trusted 
190   //   kDistance Only bins that are more than half the size of it neighbors
191   task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
192   // Additional diagnostics output - off by default
193   // 
194   // If this option is enabled, then the summed per-vertex, per-ring
195   // d2N/detadphi histograms will be stored in the output, as well as
196   // copies of the secondary maps
197   // task->GetHistCollector().SetMakeBGHitMaps(true);
198   //
199   // If this option is enabled, then a 3D histogram will be made for
200   // each ring, summing dN/deta for each centrality bin.
201   // task->GetHistCollector().SetMakeCentralitySums(true);
202
203   // --- Eventplane Finder -------------------------------------------
204   task->GetEventPlaneFinder().SetUsePhiWeights(false);
205
206   // --- Ring AOD output ---------------------------------------------
207   // If set to true, then 5 additional branches will be created on the
208   // output AOD - one for each FMD ring.  The branches each contain a
209   // TH2D object of the (primary) charged particle multiplicity per
210   // (eta,phi)-bin in that event 
211   // task->SetStorePerRing(true);
212
213   // --- Set limits on fits the energy -------------------------------
214   // DO NOT CHANGE THESE UNLESS YOU KNOW WHAT YOU ARE DOING
215   // Maximum relative error on parameters 
216   // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
217   // Least weight to use 
218   // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
219   // Maximum value of reduced chi^2 
220   // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu   = 10;
221
222   // --- Debug -------------------------------------------------------
223   // Set the overall debug level (1: some output, 3: a lot of output)
224   // task->SetDebug(0);
225   // Set the debug level of a single algorithm 
226   // task->GetSharingFilter().SetDebug(3);
227 }
228 //
229 // EOF
230 //