]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/ForwardAODConfig.C
Added new dN/deta task to deal only with MC truth info
[u/mrichter/AliRoot.git] / PWG2 / 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 pwg2_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 pwg2_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     Info("ForwardAODConfig", "Assuming Monte-Carlo input");
36     mc = true;
37   }
38
39 #if 0 
40   if (mc) {
41     AliForwardMCMultiplicityTask* mcTask = 
42       static_cast<AliForwardMCMultiplicityTask*>(task);
43     mcTask->SetOnlyPrimary(true);
44   }
45 #endif
46   Double_t nXi = 1; // mc ? 1 : .5;
47   Bool_t   includeSigma = true;
48
49   // --- Event inspector ---------------------------------------------
50   // Set the number of SPD tracklets for which we consider the event a
51   // low flux event
52   task->GetEventInspector().SetLowFluxCut(1000); 
53   // Set the maximum error on v_z [cm]
54   task->GetEventInspector().SetMaxVzErr(0.2);
55
56   // --- Sharing filter ----------------------------------------------
57   // Set the low cut used for sharing - overrides settings in eloss fits
58   task->GetSharingFilter().SetLowCut(mc ? 0.15 : 0.2);
59   // Set the number of xi's (width of landau peak) to stop at 
60   task->GetSharingFilter().SetNXi(nXi);
61   // Set whether or not to include sigma in cut
62   task->GetSharingFilter().SetIncludeSigma(includeSigma);
63   // Enable use of angle corrected signals in the algorithm 
64   task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
65
66   // --- Density calculator 
67   // Set the maximum number of particle to try to reconstruct 
68   task->GetDensityCalculator().SetMaxParticles(10);
69   // Wet whether to use poisson statistics to estimate N_ch
70   task->GetDensityCalculator().SetUsePoisson(false);
71   // Set the lower multiplicity cut.  Overrides setting in energy loss fits.
72   task->GetDensityCalculator().SetMultCut(.3); //was 0.3
73   // Set the lower per-ring multiplicity cuts 
74   task->GetDensityCalculator().SetMultCuts(-1,-1,-1,-1,-1);
75   // USe this many times xi+sigma below MPV 
76   task->GetDensityCalculator().SetNXi(nXi);
77   // Set whether or not to include sigma in cut
78   task->GetDensityCalculator().SetIncludeSigma(includeSigma);
79   // Set whether or not to use the phi acceptance 
80   task->GetDensityCalculator().SetUsePhiAcceptance(true);
81
82   // --- Corrector ---------------------------------------------------
83   // Whether to use the secondary map correction
84   task->GetCorrections().SetUseSecondaryMap(true);
85   // Whether to use the vertex bias correction
86   task->GetCorrections().SetUseVertexBias(false);
87   // Whether to use the vertex bias correction
88   task->GetCorrections().SetUseAcceptance(true);
89   // Whether to use the merging efficiency correction 
90   task->GetCorrections().SetUseMergingEfficiency(false);
91
92   // --- Histogram Collector -----------------------------------------
93   // Set the number of extra bins (beyond the secondary map border) 
94   task->GetHistCollector().SetNCutBins(2);
95   // Set the correction cut, that is, when bins in the secondary map 
96   // is smaller than this, they are considered empty 
97   task->GetHistCollector().SetCorrectionCut(0.5);
98   // How to calculate the value of overlapping bins. 
99   // Possible values are 
100   //    kStraightMean 
101   //    kStraightMeanNoZero 
102   //    kWeightedMean 
103   //    kLeastError 
104   task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
105   // How to find the fiducial area of the secondary maps 
106   // Possible values are 
107   //   kByCut    Only bins larger that cut are trusted 
108   //   kDistance Only bins that are more than half the size of it neighbors
109   task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
110
111   // --- Debug -------------------------------------------------------
112   // Set the overall debug level (1: some output, 3: a lot of output)
113   task->SetDebug(0);
114   // Set the debug level of a single algorithm 
115   task->GetSharingFilter().SetDebug(0);
116
117   // --- Set limits on fits the energy -------------------------------
118   // Maximum relative error on parameters 
119   AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
120   // Least weight to use 
121   AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
122   // Maximum value of reduced chi^2 
123   AliFMDCorrELossFit::ELossFit::fgMaxChi2nu   = 20;
124 }
125 //
126 // EOF
127 //