]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/AddTaskForwardQA.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AddTaskForwardQA.C
CommitLineData
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 */
27AliAnalysisTask*
e2213ed5 28AddTaskForwardQA(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 --------------------------------------------------------
e140afb9 37 // Note, the absolute lowest signal to consider - ever -
38 // irrespective of MC or real data, is 0.15. Signals below this
39 // will contain remenants of the pedestal (yes, the width of the
40 // pedestal is small, but there are many _many_ channels with only
41 // pedestal value in them, so the absolute number of high-value
42 // pedestal signals is large - despite the low probablity).
43 AliFMDMultCuts cSharingLow(AliFMDMultCuts::kFixed,0.15);
44 AliFMDMultCuts cSharingHigh(AliFMDMultCuts::kLandauSigmaWidth,1);
45 AliFMDMultCuts cDensity(AliFMDMultCuts::kLandauSigmaWidth,1);
46
96624385 47 // --- Set parameters on the algorithms ----------------------------
48 // Set the number of SPD tracklets for which we consider the event a
49 // low flux event
50 task->GetEventInspector().SetLowFluxCut(1000);
51 // Set the maximum error on v_z [cm]
52 task->GetEventInspector().SetMaxVzErr(0.2);
9b2f2e39 53 // Disable use of code from 1st Physics
54 task->GetEventInspector().SetUseFirstPhysicsVtx(kFALSE);
96624385 55
56 // --- Set parameters on energy loss fitter ------------------------
57 // Set the eta axis to use - note, this overrides whatever is used
58 // by the rest of the algorithms - but only for the energy fitter
59 // algorithm.
60 task->GetEnergyFitter().SetEtaAxis(200, -4, 6);
61 // Set maximum energy loss to consider
62 task->GetEnergyFitter().SetMaxE(15);
63 // Set number of energy loss bins
64 task->GetEnergyFitter().SetNEbins(500);
65 // Set whether to use increasing bin sizes
66 task->GetEnergyFitter().SetUseIncreasingBins(true);
67 // Set whether to do fit the energy distributions
68 task->GetEnergyFitter().SetDoFits(kTRUE);
69 // Set whether to make the correction object
70 task->GetEnergyFitter().SetDoMakeObject(kFALSE);
71 // Set the low cut used for energy
72 task->GetEnergyFitter().SetLowCut(0.4);
73 // Set the number of bins to subtract from maximum of distributions
74 // to get the lower bound of the fit range
75 task->GetEnergyFitter().SetFitRangeBinWidth(4);
76 // Set the minimum number of entries in the distribution before
77 // trying to fit to the data
78 task->GetEnergyFitter().SetMinEntries(1000);
79
80 // --- Sharing filter ----------------------------------------------
81 // Enable use of angle corrected signals in the algorithm
82 task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
83 // Disable use of angle corrected signals in the algorithm
84 task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
85 // Enable use of angle corrected signals in the algorithm
e140afb9 86 task->GetSharingFilter().SetHCuts(cSharingHigh);
9b2f2e39 87 // Lower cuts from object
e140afb9 88 task->GetSharingFilter().SetLCuts(cSharingLow);
a19faec0 89 // Whether to use simple merging algorithm
90 task->GetSharingFilter().SetUseSimpleSharing(true);
91 // Whether to allow for 3 strip hits - deprecated
92 task->GetSharingFilter().SetAllow3Strips(false);
96624385 93
94 // --- Density calculator ------------------------------------------
a19faec0 95 // Least acceptable quality of ELoss fits
96 task->GetDensityCalculator().SetMinQuality(8);
96624385 97 // Set the maximum number of particle to try to reconstruct
9b2f2e39 98 task->GetDensityCalculator().SetMaxParticles(3);
96624385 99 // Wet whether to use poisson statistics to estimate N_ch
100 task->GetDensityCalculator().SetUsePoisson(true);
9b2f2e39 101 // How to lump for Poisson calculator - 64 strips, 4 regions
a19faec0 102 task->GetDensityCalculator().SetLumping(32,4);
96624385 103 // Set whether or not to include sigma in cut
104 task->GetDensityCalculator().SetCuts(cDensity);
a19faec0 105 // Set the maximum ratio of outlier bins to the total number of bins
106 // task->GetDensityCalculator().SetMaxOutliers(.10);
107 task->GetDensityCalculator().SetMaxOutliers(1.0);//Disable filter
96624385 108 // Set whether or not to use the phi acceptance
109 // AliFMDDensityCalculator::kPhiNoCorrect
110 // AliFMDDensityCalculator::kPhiCorrectNch
111 // AliFMDDensityCalculator::kPhiCorrectELoss
a19faec0 112 task->GetDensityCalculator()
113 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
9b2f2e39 114
96624385 115 // --- Set limits on fits the energy -------------------------------
116 // Maximum relative error on parameters
a19faec0 117 // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
96624385 118 // Least weight to use
a19faec0 119 // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
96624385 120 // Maximum value of reduced chi^2
a19faec0 121 // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
9b2f2e39 122
123 // --- Debug -------------------------------------------------------
124 // Set the overall debug level (1: some output, 3: a lot of output)
a19faec0 125 task->SetDebug(1);
96624385 126
127 // --- Make the output container and connect it --------------------
a19faec0 128 task->Connect(AliAnalysisManager::GetCommonFileName(), "trending.root");
96624385 129
96624385 130 return task;
131}
9b2f2e39 132//
133// EOF
134//