]>
Commit | Line | Data |
---|---|---|
96624385 | 1 | /** |
2 | * @file AddTaskForwardQA.C | |
3 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
4 | * @date Wed Mar 23 12:14:03 2011 | |
5 | * | |
56236b95 | 6 | * @brief Include the Forward QA task in a train. |
96624385 | 7 | * |
bd6f5206 | 8 | * @ingroup pwglf_forward_scripts_tasks |
96624385 | 9 | */ |
10 | /** | |
bd6f5206 | 11 | * @defgroup pwglf_forward_qa Quality Assurance |
290052e7 | 12 | * |
13 | * Code to deal with Quality Assurance | |
14 | * | |
bd6f5206 | 15 | * @ingroup pwglf_forward_topical |
96624385 | 16 | */ |
96624385 | 17 | /** |
56236b95 | 18 | * This is the macro to include the Forward QA task in a train. |
96624385 | 19 | * |
56236b95 | 20 | * @param mc Monte-carlo input |
21 | * @param useCent Use centrality | |
22 | * | |
290052e7 | 23 | * @return newly constructured task object |
24 | * | |
bd6f5206 | 25 | * @ingroup pwglf_forward_eloss |
96624385 | 26 | */ |
27 | AliAnalysisTask* | |
e2213ed5 | 28 | AddTaskForwardQA(Bool_t mc=false, Bool_t useCent=false) |
96624385 | 29 | { |
56236b95 | 30 | // --- Load libraries ---------------------------------------------- |
bd6f5206 | 31 | gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); |
96624385 | 32 | |
96624385 | 33 | // --- Make the task and add it to the manager --------------------- |
34 | AliForwardQATask* task = new AliForwardQATask("forwardQA"); | |
9b2f2e39 | 35 | |
36 | // --- Cuts -------------------------------------------------------- | |
a19faec0 | 37 | AliFMDMultCuts cHigh(AliFMDMultCuts::kLandauWidth, 2,2,2,2,2); |
38 | AliFMDMultCuts cLow(AliFMDMultCuts::kFixed,0.15); | |
39 | AliFMDMultCuts cDensity(AliFMDMultCuts::kLandauWidth, 4,4,4,4,4); | |
96624385 | 40 | |
41 | // --- Set parameters on the algorithms ---------------------------- | |
42 | // Set the number of SPD tracklets for which we consider the event a | |
43 | // low flux event | |
44 | task->GetEventInspector().SetLowFluxCut(1000); | |
45 | // Set the maximum error on v_z [cm] | |
46 | task->GetEventInspector().SetMaxVzErr(0.2); | |
9b2f2e39 | 47 | // Disable use of code from 1st Physics |
48 | task->GetEventInspector().SetUseFirstPhysicsVtx(kFALSE); | |
96624385 | 49 | |
50 | // --- Set parameters on energy loss fitter ------------------------ | |
51 | // Set the eta axis to use - note, this overrides whatever is used | |
52 | // by the rest of the algorithms - but only for the energy fitter | |
53 | // algorithm. | |
54 | task->GetEnergyFitter().SetEtaAxis(200, -4, 6); | |
55 | // Set maximum energy loss to consider | |
56 | task->GetEnergyFitter().SetMaxE(15); | |
57 | // Set number of energy loss bins | |
58 | task->GetEnergyFitter().SetNEbins(500); | |
59 | // Set whether to use increasing bin sizes | |
60 | task->GetEnergyFitter().SetUseIncreasingBins(true); | |
61 | // Set whether to do fit the energy distributions | |
62 | task->GetEnergyFitter().SetDoFits(kTRUE); | |
63 | // Set whether to make the correction object | |
64 | task->GetEnergyFitter().SetDoMakeObject(kFALSE); | |
65 | // Set the low cut used for energy | |
66 | task->GetEnergyFitter().SetLowCut(0.4); | |
67 | // Set the number of bins to subtract from maximum of distributions | |
68 | // to get the lower bound of the fit range | |
69 | task->GetEnergyFitter().SetFitRangeBinWidth(4); | |
70 | // Set the minimum number of entries in the distribution before | |
71 | // trying to fit to the data | |
72 | task->GetEnergyFitter().SetMinEntries(1000); | |
73 | ||
74 | // --- Sharing filter ---------------------------------------------- | |
75 | // Enable use of angle corrected signals in the algorithm | |
76 | task->GetSharingFilter().SetUseAngleCorrectedSignals(true); | |
77 | // Disable use of angle corrected signals in the algorithm | |
78 | task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false); | |
79 | // Enable use of angle corrected signals in the algorithm | |
9b2f2e39 | 80 | task->GetSharingFilter().SetHCuts(cHigh); |
9b2f2e39 | 81 | // Lower cuts from object |
82 | task->GetSharingFilter().SetLCuts(cLow); | |
a19faec0 | 83 | // Whether to use simple merging algorithm |
84 | task->GetSharingFilter().SetUseSimpleSharing(true); | |
85 | // Whether to allow for 3 strip hits - deprecated | |
86 | task->GetSharingFilter().SetAllow3Strips(false); | |
96624385 | 87 | |
88 | // --- Density calculator ------------------------------------------ | |
a19faec0 | 89 | // Least acceptable quality of ELoss fits |
90 | task->GetDensityCalculator().SetMinQuality(8); | |
96624385 | 91 | // Set the maximum number of particle to try to reconstruct |
9b2f2e39 | 92 | task->GetDensityCalculator().SetMaxParticles(3); |
96624385 | 93 | // Wet whether to use poisson statistics to estimate N_ch |
94 | task->GetDensityCalculator().SetUsePoisson(true); | |
9b2f2e39 | 95 | // How to lump for Poisson calculator - 64 strips, 4 regions |
a19faec0 | 96 | task->GetDensityCalculator().SetLumping(32,4); |
96624385 | 97 | // Set whether or not to include sigma in cut |
98 | task->GetDensityCalculator().SetCuts(cDensity); | |
a19faec0 | 99 | // Set the maximum ratio of outlier bins to the total number of bins |
100 | // task->GetDensityCalculator().SetMaxOutliers(.10); | |
101 | task->GetDensityCalculator().SetMaxOutliers(1.0);//Disable filter | |
96624385 | 102 | // Set whether or not to use the phi acceptance |
103 | // AliFMDDensityCalculator::kPhiNoCorrect | |
104 | // AliFMDDensityCalculator::kPhiCorrectNch | |
105 | // AliFMDDensityCalculator::kPhiCorrectELoss | |
a19faec0 | 106 | task->GetDensityCalculator() |
107 | .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch); | |
9b2f2e39 | 108 | |
96624385 | 109 | // --- Set limits on fits the energy ------------------------------- |
110 | // Maximum relative error on parameters | |
a19faec0 | 111 | // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12; |
96624385 | 112 | // Least weight to use |
a19faec0 | 113 | // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5; |
96624385 | 114 | // Maximum value of reduced chi^2 |
a19faec0 | 115 | // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20; |
9b2f2e39 | 116 | |
117 | // --- Debug ------------------------------------------------------- | |
118 | // Set the overall debug level (1: some output, 3: a lot of output) | |
a19faec0 | 119 | task->SetDebug(1); |
96624385 | 120 | |
121 | // --- Make the output container and connect it -------------------- | |
a19faec0 | 122 | task->Connect(AliAnalysisManager::GetCommonFileName(), "trending.root"); |
96624385 | 123 | |
96624385 | 124 | return task; |
125 | } | |
9b2f2e39 | 126 | // |
127 | // EOF | |
128 | // |