]>
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 |
12 | * @ingroup pwglf_forward_topical | |
96624385 | 13 | */ |
96624385 | 14 | /** |
56236b95 | 15 | * This is the macro to include the Forward QA task in a train. |
96624385 | 16 | * |
56236b95 | 17 | * @param mc Monte-carlo input |
18 | * @param useCent Use centrality | |
19 | * | |
bd6f5206 | 20 | * @ingroup pwglf_forward_eloss |
96624385 | 21 | */ |
22 | AliAnalysisTask* | |
e2213ed5 | 23 | AddTaskForwardQA(Bool_t mc=false, Bool_t useCent=false) |
96624385 | 24 | { |
56236b95 | 25 | // --- Load libraries ---------------------------------------------- |
bd6f5206 | 26 | gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); |
96624385 | 27 | |
56236b95 | 28 | // --- Get analysis manager ---------------------------------------- |
96624385 | 29 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
30 | if (!mgr) { | |
31 | Error("AddTaskForwardQA", "No analysis manager to connect to."); | |
32 | return NULL; | |
33 | } | |
34 | ||
35 | // --- Make the task and add it to the manager --------------------- | |
36 | AliForwardQATask* task = new AliForwardQATask("forwardQA"); | |
96624385 | 37 | mgr->AddTask(task); |
38 | ||
9b2f2e39 | 39 | |
40 | // --- Cuts -------------------------------------------------------- | |
41 | // Old style cuts | |
96624385 | 42 | Double_t nXi = mc ? 2 : 2; //HHD test |
43 | Bool_t includeSigma = false; //true; | |
9b2f2e39 | 44 | // High cuts for sharing filter |
45 | AliFMDMultCuts cHigh; | |
46 | cHigh.SetMPVFraction(0.7); | |
47 | cHigh.SetMultCuts(-1); | |
48 | // Low cuts for sharing and density calculator | |
49 | AliFMDMultCuts cLow; | |
50 | cLow.SetMultCuts(0.1, 0.1, 0.12, 0.1, 0.12); | |
51 | // Density cuts | |
96624385 | 52 | AliFMDMultCuts cDensity; |
9b2f2e39 | 53 | cDensity.SetMPVFraction(0.7); |
54 | cDensity.SetMultCuts(-1); | |
55 | ||
96624385 | 56 | |
57 | // --- Set parameters on the algorithms ---------------------------- | |
58 | // Set the number of SPD tracklets for which we consider the event a | |
59 | // low flux event | |
60 | task->GetEventInspector().SetLowFluxCut(1000); | |
61 | // Set the maximum error on v_z [cm] | |
62 | task->GetEventInspector().SetMaxVzErr(0.2); | |
9b2f2e39 | 63 | // Disable use of code from 1st Physics |
64 | task->GetEventInspector().SetUseFirstPhysicsVtx(kFALSE); | |
96624385 | 65 | |
66 | // --- Set parameters on energy loss fitter ------------------------ | |
67 | // Set the eta axis to use - note, this overrides whatever is used | |
68 | // by the rest of the algorithms - but only for the energy fitter | |
69 | // algorithm. | |
70 | task->GetEnergyFitter().SetEtaAxis(200, -4, 6); | |
71 | // Set maximum energy loss to consider | |
72 | task->GetEnergyFitter().SetMaxE(15); | |
73 | // Set number of energy loss bins | |
74 | task->GetEnergyFitter().SetNEbins(500); | |
75 | // Set whether to use increasing bin sizes | |
76 | task->GetEnergyFitter().SetUseIncreasingBins(true); | |
77 | // Set whether to do fit the energy distributions | |
78 | task->GetEnergyFitter().SetDoFits(kTRUE); | |
79 | // Set whether to make the correction object | |
80 | task->GetEnergyFitter().SetDoMakeObject(kFALSE); | |
81 | // Set the low cut used for energy | |
82 | task->GetEnergyFitter().SetLowCut(0.4); | |
83 | // Set the number of bins to subtract from maximum of distributions | |
84 | // to get the lower bound of the fit range | |
85 | task->GetEnergyFitter().SetFitRangeBinWidth(4); | |
86 | // Set the minimum number of entries in the distribution before | |
87 | // trying to fit to the data | |
88 | task->GetEnergyFitter().SetMinEntries(1000); | |
89 | ||
90 | // --- Sharing filter ---------------------------------------------- | |
91 | // Enable use of angle corrected signals in the algorithm | |
92 | task->GetSharingFilter().SetUseAngleCorrectedSignals(true); | |
93 | // Disable use of angle corrected signals in the algorithm | |
94 | task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false); | |
95 | // Enable use of angle corrected signals in the algorithm | |
9b2f2e39 | 96 | task->GetSharingFilter().SetHCuts(cHigh); |
97 | // Multiplicity cut | |
98 | // task->GetSharingFilter().GetHCuts().SetMultCuts(-1); | |
96624385 | 99 | // Set the number of xi's (width of landau peak) to stop at |
9b2f2e39 | 100 | // task->GetSharingFilter().GetHCuts().SetNXi(nXi); |
96624385 | 101 | // Set whether or not to include sigma in cut |
9b2f2e39 | 102 | // task->GetSharingFilter().GetHCuts().SetIncludeSigma(includeSigma); |
103 | // Lower cuts from object | |
104 | task->GetSharingFilter().SetLCuts(cLow); | |
105 | // Use simplified sharing algorithm | |
106 | task->GetSharingFilter().SetUseSimpleSharing(kTRUE); | |
96624385 | 107 | |
108 | // --- Density calculator ------------------------------------------ | |
109 | // Set the maximum number of particle to try to reconstruct | |
9b2f2e39 | 110 | task->GetDensityCalculator().SetMaxParticles(3); |
96624385 | 111 | // Wet whether to use poisson statistics to estimate N_ch |
112 | task->GetDensityCalculator().SetUsePoisson(true); | |
9b2f2e39 | 113 | // How to lump for Poisson calculator - 64 strips, 4 regions |
114 | task->GetDensityCalculator().SetLumping(64,4); | |
96624385 | 115 | // Set whether or not to include sigma in cut |
116 | task->GetDensityCalculator().SetCuts(cDensity); | |
117 | // Set whether or not to use the phi acceptance | |
118 | // AliFMDDensityCalculator::kPhiNoCorrect | |
119 | // AliFMDDensityCalculator::kPhiCorrectNch | |
120 | // AliFMDDensityCalculator::kPhiCorrectELoss | |
9b2f2e39 | 121 | task->GetDensityCalculator(). |
122 | SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiNoCorrect); | |
123 | ||
96624385 | 124 | // --- Set limits on fits the energy ------------------------------- |
125 | // Maximum relative error on parameters | |
126 | AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12; | |
127 | // Least weight to use | |
128 | AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5; | |
129 | // Maximum value of reduced chi^2 | |
130 | AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20; | |
9b2f2e39 | 131 | |
132 | // --- Debug ------------------------------------------------------- | |
133 | // Set the overall debug level (1: some output, 3: a lot of output) | |
134 | task->SetDebug(3); | |
96624385 | 135 | |
136 | // --- Make the output container and connect it -------------------- | |
137 | // TString outputfile = ; | |
bd6f5206 | 138 | // outputfile += ":PWGLFforwardDnDeta"; |
96624385 | 139 | // Form(":%s",pars->GetDndetaAnalysisName()); |
140 | AliAnalysisDataContainer* histOut = | |
141 | mgr->CreateContainer("Forward", TList::Class(), | |
142 | AliAnalysisManager::kOutputContainer, | |
143 | AliAnalysisManager::GetCommonFileName()); | |
144 | AliAnalysisDataContainer *output = | |
145 | mgr->CreateContainer("ForwardResults", TList::Class(), | |
146 | AliAnalysisManager::kParamContainer, | |
9b2f2e39 | 147 | "trending.root"); |
148 | // AliAnalysisManager::GetCommonFileName()); | |
96624385 | 149 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); |
150 | mgr->ConnectOutput(task, 1, histOut); | |
151 | mgr->ConnectOutput(task, 2, output); | |
152 | ||
96624385 | 153 | return task; |
154 | } | |
9b2f2e39 | 155 | // |
156 | // EOF | |
157 | // |