]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/ForwardAODConfig.C
Fixed references from PWG2 -> PWGLF - very efficiently done using ETags.
[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  * @ingroup pwglf_forward_aod
19  */
20 void
21 ForwardAODConfig(AliForwardMultiplicityBase* task)
22 {
23   if (!task) return;
24
25   Info("ForwardAODConfig", "Setting up task %s (%p)", task->GetName(), task);
26
27   // --- General parameters ------------------------------------------
28   // Whether to enable low flux specific code 
29   task->SetEnableLowFlux(kFALSE);
30
31   // Would like to use dynamic cast but CINT interprets that as a 
32   // static cast - sigh!
33   Bool_t mc = false;
34   if (task->IsA() == AliForwardMCMultiplicityTask::Class()) 
35     mc = true;
36   
37 #if 0 
38   if (mc) {
39     AliForwardMCMultiplicityTask* mcTask = 
40       static_cast<AliForwardMCMultiplicityTask*>(task);
41     mcTask->SetOnlyPrimary(true);
42   }
43 #endif
44   Double_t nXi = mc ? 2 : 2;   //HHD test
45   Bool_t   includeSigma = false; //true;
46
47   AliFMDMultCuts cSharing;
48   //c.SetNXi(mc ? 1 : 1);
49   //c.SetIncludeSigma(true);
50   //c.SetMPVFraction(0.5);
51   Double_t factor = 1.;
52   //if(mc) factor = 1.15;
53   cSharing.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
54  
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);
61   
62   
63   // --- Event inspector ---------------------------------------------
64   // Set the number of SPD tracklets for which we consider the event a
65   // low flux event
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);
77
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);
99   
100    
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);
118
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);
128
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 
137   //    kStraightMean 
138   //    kStraightMeanNoZero 
139   //    kWeightedMean 
140   //    kLeastError 
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);
147
148   // --- Debug -------------------------------------------------------
149   // Set the overall debug level (1: some output, 3: a lot of output)
150   task->SetDebug(0);
151   // Set the debug level of a single algorithm 
152   task->GetSharingFilter().SetDebug(0);
153
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;
161 }
162 //
163 // EOF
164 //