]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/ForwardAODConfig.C
Updates to Trains. create a job-script to help
[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
45   Double_t nXi = mc ? 2 : 2;   //HHD test
46   Bool_t   includeSigma = false; //true;
47
48   AliFMDMultCuts cSharing;
49   //c.SetNXi(mc ? 1 : 1);
50   //c.SetIncludeSigma(true);
51   //c.SetMPVFraction(0.5);
52   Double_t factor = 1.;
53   //if(mc) factor = 1.15;
54   cSharing.SetMultCuts(0.3, 0.3, 0.3, 0.3, 0.3);
55  
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);
62   
63   
64   // --- Event inspector ---------------------------------------------
65   // Set the number of SPD tracklets for which we consider the event a
66   // low flux event
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);
78
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);
100   
101    
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);
119
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);
129
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 
138   //    kStraightMean 
139   //    kStraightMeanNoZero 
140   //    kWeightedMean 
141   //    kLeastError 
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);
148
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);
154
155   // --- Eventplane Finder -------------------------------------------
156   task->GetEventPlaneFinder().SetUsePhiWeights(false);
157
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;
165 }
166 //
167 // EOF
168 //