2 * @file AddTaskForwardQA.C
3 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
4 * @date Wed Mar 23 12:14:03 2011
6 * @brief Include the Forward QA task in a train.
8 * @ingroup pwglf_forward_scripts_tasks
11 * @defgroup pwglf_forward_qa Quality Assurance
13 * Code to deal with Quality Assurance
15 * @ingroup pwglf_forward_topical
18 * This is the macro to include the Forward QA task in a train.
20 * @param mc Monte-carlo input
21 * @param useCent Use centrality
23 * @return newly constructured task object
25 * @ingroup pwglf_forward_eloss
28 AddTaskForwardQA(Bool_t mc=false, Bool_t useCent=false)
30 // --- Load libraries ----------------------------------------------
31 gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
33 // --- Make the task and add it to the manager ---------------------
34 AliForwardQATask* task = new AliForwardQATask("forwardQA");
36 // --- Cuts --------------------------------------------------------
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);
41 // --- Set parameters on the algorithms ----------------------------
42 // Set the number of SPD tracklets for which we consider the event a
44 task->GetEventInspector().SetLowFluxCut(1000);
45 // Set the maximum error on v_z [cm]
46 task->GetEventInspector().SetMaxVzErr(0.2);
47 // Disable use of code from 1st Physics
48 task->GetEventInspector().SetUseFirstPhysicsVtx(kFALSE);
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
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);
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
80 task->GetSharingFilter().SetHCuts(cHigh);
81 // Lower cuts from object
82 task->GetSharingFilter().SetLCuts(cLow);
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);
88 // --- Density calculator ------------------------------------------
89 // Least acceptable quality of ELoss fits
90 task->GetDensityCalculator().SetMinQuality(8);
91 // Set the maximum number of particle to try to reconstruct
92 task->GetDensityCalculator().SetMaxParticles(3);
93 // Wet whether to use poisson statistics to estimate N_ch
94 task->GetDensityCalculator().SetUsePoisson(true);
95 // How to lump for Poisson calculator - 64 strips, 4 regions
96 task->GetDensityCalculator().SetLumping(32,4);
97 // Set whether or not to include sigma in cut
98 task->GetDensityCalculator().SetCuts(cDensity);
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
102 // Set whether or not to use the phi acceptance
103 // AliFMDDensityCalculator::kPhiNoCorrect
104 // AliFMDDensityCalculator::kPhiCorrectNch
105 // AliFMDDensityCalculator::kPhiCorrectELoss
106 task->GetDensityCalculator()
107 .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);
109 // --- Set limits on fits the energy -------------------------------
110 // Maximum relative error on parameters
111 // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
112 // Least weight to use
113 // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
114 // Maximum value of reduced chi^2
115 // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20;
117 // --- Debug -------------------------------------------------------
118 // Set the overall debug level (1: some output, 3: a lot of output)
121 // --- Make the output container and connect it --------------------
122 task->Connect(AliAnalysisManager::GetCommonFileName(), "trending.root");