]>
Commit | Line | Data |
---|---|---|
6b91e8c0 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // Add task B2 | |
17 | // author: Eulogio Serradilla <eulogio.serradilla@cern.ch> | |
18 | ||
7421dabb | 19 | Double_t GetMeanNtrk(const TString& period, Double_t eta); |
20 | Double_t GetNSDMeanNtrk(const TString& period, Double_t eta); | |
6b91e8c0 | 21 | |
68a84436 | 22 | AliAnalysisTaskB2* AddTaskB2( const TString& species |
23 | , const TString& containername | |
f4d6dd11 | 24 | , const TString& trksel |
25 | , Int_t pidProc | |
26 | , const TString& periodname | |
68a84436 | 27 | , Bool_t simulation = kFALSE |
28 | , Bool_t heavyIons = kFALSE | |
f4d6dd11 | 29 | , Double_t maxDCAxy = 1 |
30 | , Double_t maxDCAz = 2 | |
68a84436 | 31 | , Double_t maxEta = 0.8 |
32 | , Double_t maxY = 0.5 | |
f4d6dd11 | 33 | , Double_t minKNOmult = -10 |
34 | , Double_t maxKNOmult = 10000 | |
68a84436 | 35 | , Bool_t V0AND = kFALSE |
7421dabb | 36 | , const TString& ztag = "" |
68a84436 | 37 | , Double_t maxVz = 10 |
5b88d60e | 38 | , const TString& binSize = "" |
f4d6dd11 | 39 | , Double_t minCentrality = 0 |
40 | , Double_t maxCentrality = 20 | |
41 | , Double_t minM2 = 2. | |
42 | , Double_t maxM2 = 6.) | |
6b91e8c0 | 43 | { |
44 | // | |
45 | // Create, configure and add the analysis task to the analysis manager | |
46 | // | |
47 | using namespace std; | |
48 | ||
49 | // sample config | |
50 | ||
51 | const Double_t kMaxVx = 1.; | |
52 | const Double_t kMaxVy = 1.; | |
6b91e8c0 | 53 | |
6b91e8c0 | 54 | const Double_t kMaxNSigma = 3.; |
55 | ||
56 | const Int_t kMaxNSigmaITS = 3; | |
57 | const Int_t kMaxNSigmaTPC = 3; | |
58 | const Int_t kMaxNSigmaTOF = 3; | |
59 | const Int_t kMinTPCnCls = 70; | |
60 | ||
61 | TString period = periodname; | |
62 | period.ToLower(); | |
63 | ||
64 | // Get pointer to the existing analysis manager | |
65 | ||
66 | AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager(); | |
67 | if (!mgr) | |
68 | { | |
69 | cerr << "AddTaskB2: no analysis manager to connect to" << endl; | |
70 | return 0; | |
71 | } | |
72 | ||
73 | if (!mgr->GetInputEventHandler()) | |
74 | { | |
75 | cerr << "AddTaskB2: this task requires an input event handler" << endl; | |
76 | return 0; | |
77 | } | |
78 | ||
79 | // Create and configure the task | |
80 | ||
68a84436 | 81 | AliAnalysisTaskB2* task = new AliAnalysisTaskB2(Form("B2.%s",containername.Data())); |
6b91e8c0 | 82 | |
83 | task->SetParticleSpecies(species); | |
84 | task->SetSimulation(simulation); | |
85 | task->SetHeavyIons(heavyIons); | |
86 | task->SetV0ANDtrigger(V0AND); | |
87 | ||
88 | task->SetMaxNSigmaITS(kMaxNSigmaITS); | |
89 | task->SetMaxNSigmaTPC(kMaxNSigmaTPC); | |
90 | task->SetMaxNSigmaTOF(kMaxNSigmaTOF); | |
91 | ||
7421dabb | 92 | Double_t meanNtrk = V0AND ? GetNSDMeanNtrk(period, maxEta) : GetMeanNtrk(period, maxEta); |
f4d6dd11 | 93 | |
94 | task->SetMeanNtrk(meanNtrk); | |
6b91e8c0 | 95 | task->SetKNOmultInterval(minKNOmult, maxKNOmult); |
96 | task->SetVertexXInterval(-kMaxVx, kMaxVx); | |
97 | task->SetVertexYInterval(-kMaxVy, kMaxVy); | |
68a84436 | 98 | task->SetVertexZInterval(-maxVz, maxVz); |
6b91e8c0 | 99 | |
052278a6 | 100 | task->SetEtaInterval(-maxEta, maxEta); |
101 | task->SetRapidityInterval(-maxY, maxY); | |
f4d6dd11 | 102 | task->SetM2Interval(minM2, maxM2); |
f3e91ba1 | 103 | |
6b91e8c0 | 104 | task->SetCentralityInterval(minCentrality, maxCentrality); |
105 | ||
106 | if(period=="lhc11a_wsdd" || period=="lhc11a_wosdd") | |
107 | { | |
108 | task->SetNoFastOnlyTrigger(); | |
109 | } | |
110 | ||
111 | // histograms | |
112 | ||
113 | gROOT->LoadMacro("$ALICE_ROOT/PWGLF/SPECTRA/Nuclei/B2/macros/CreateHistograms.C"); | |
114 | ||
5b88d60e | 115 | AliLnHistoMap* hMap = CreateHistograms(species, binSize, simulation, maxDCAxy, maxEta, maxY, heavyIons); |
6b91e8c0 | 116 | |
117 | task->SetHistogramMap(hMap); | |
118 | ||
119 | // track selection criteria | |
120 | ||
121 | gROOT->LoadMacro("$ALICE_ROOT/PWGLF/SPECTRA/Nuclei/B2/macros/TrackCuts.C"); | |
122 | ||
68a84436 | 123 | AliESDtrackCuts* trkCuts = TrackCuts(task, trksel, maxDCAxy, maxDCAz, kMaxNSigma, kMinTPCnCls, maxEta); |
6b91e8c0 | 124 | task->SetESDtrackCuts(trkCuts); |
125 | ||
126 | // PID | |
127 | ||
128 | gROOT->LoadMacro("$ALICE_ROOT/PWGLF/SPECTRA/Nuclei/B2/macros/BetheBlochParams.C"); | |
129 | ||
130 | Double_t bethe[5]; | |
131 | BetheBlochParams(bethe, period); | |
132 | ||
133 | gROOT->LoadMacro("$ALICE_ROOT/PWGLF/SPECTRA/Nuclei/B2/macros/PriorProbabilities.C"); | |
134 | ||
135 | Double_t prob[9]; | |
7421dabb | 136 | PriorProbabilities(prob, period, trksel, ztag); |
6b91e8c0 | 137 | |
138 | AliLnID* lnID = new AliLnID(); | |
139 | ||
140 | lnID->SetTPCBetheBlochParams(bethe); | |
141 | lnID->SetPriorProbabilities(prob); | |
142 | lnID->SetPidProcedure(pidProc); | |
143 | ||
ec499c6d | 144 | if(!simulation) lnID->SetTPCChargeCorrection(2.3); |
145 | ||
6b91e8c0 | 146 | task->SetPID(lnID); |
147 | ||
148 | // Add task to the manager | |
149 | ||
150 | mgr->AddTask(task); | |
151 | ||
152 | // input and output containers | |
153 | ||
68a84436 | 154 | AliAnalysisDataContainer* output = mgr->CreateContainer(containername.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:AliAnalysisTaskB2", AliAnalysisManager::GetCommonFileName())); |
6b91e8c0 | 155 | |
156 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
b2c24401 | 157 | mgr->ConnectOutput(task, 1, output); |
6b91e8c0 | 158 | |
159 | return task; | |
160 | } | |
161 | ||
7421dabb | 162 | Double_t GetMeanNtrk(const TString& period, Double_t eta) |
6b91e8c0 | 163 | { |
164 | // | |
7421dabb | 165 | // average track multiplicity <Ntrk> for the given period and eta |
6b91e8c0 | 166 | // |
7421dabb | 167 | if(TMath::Abs(eta) > 0.51) // |eta|<0.8 |
168 | { | |
9011f7dd | 169 | if(period =="lhc10b") return 9.68887; // pass3 |
5b88d60e | 170 | if(period =="lhc10c") return 9.66970; // pass3 |
7421dabb | 171 | if(period =="lhc10d") return 9.47466; // pass2 |
9011f7dd | 172 | if(period =="lhc10e") return 9.55678; // pass2 |
173 | ||
174 | // MC | |
5b88d60e | 175 | if(period =="lhc10f6a") return 7.15259; |
176 | if(period =="lhc10e21") return 7.69483; | |
7421dabb | 177 | } |
178 | else // |eta|<0.5 | |
179 | { | |
180 | if(period =="lhc10c900") return 3.70158; // pass3 | |
181 | if(period =="lhc10b_pass2") return 9.86258; | |
182 | if(period =="lhc10c_pass2") return 9.61402; | |
183 | if(period =="lhc10b") return 5.96104; // pass3 | |
184 | if(period =="lhc10c") return 5.94719; // pass3 | |
185 | if(period =="lhc10d") return 5.82333; // pass2 | |
186 | if(period =="lhc10e") return 5.89367; // pass2 | |
187 | if(period =="lhc11a_wosdd") return 4.28597; // pass3 | |
188 | if(period =="lhc11a_wsdd") return 4.69927; // pass4 | |
189 | ||
190 | // MC | |
191 | if(period =="lhc10e13") return 3.13712; | |
192 | if(period =="lhc10f6a") return 4.41362; | |
193 | if(period =="lhc10e21") return 4.74991; | |
194 | if(period =="lhc11e3a_plus_wosdd") return 3.37669; | |
195 | if(period =="lhc11e3a_plus_wsdd") return 3.47885; | |
196 | ||
197 | if(period =="lhc12a5a") return 29.264; | |
198 | if(period =="lhc12a5bb") return 31.0288; | |
199 | if(period =="lhc12a5bc") return 30.6888; | |
200 | if(period =="lhc12a5bd") return 30.3528; | |
201 | if(period =="lhc12a5be") return 29.9859; | |
202 | if(period =="lhc12a5c_wsdd") return 27.5981; | |
203 | } | |
204 | ||
205 | cerr << "Warning in GetMeanNtrk: no <Ntrk> for period " << period << " and |eta| < " << eta << endl; | |
f4d6dd11 | 206 | |
207 | return 1; | |
208 | } | |
209 | ||
7421dabb | 210 | Double_t GetNSDMeanNtrk(const TString& period, Double_t eta) |
f4d6dd11 | 211 | { |
212 | // | |
7421dabb | 213 | // average track multiplicity <Ntrk> for the given period and eta |
f4d6dd11 | 214 | // (NSD events) |
215 | // | |
7421dabb | 216 | if(TMath::Abs(eta) > 0.51) // |eta|<0.8 |
217 | { | |
9011f7dd | 218 | if(period =="lhc10b") return 10.0630; // pass3 |
5b88d60e | 219 | if(period =="lhc10c") return 10.0292; // pass3 |
7421dabb | 220 | if(period =="lhc10d") return 9.77129; // pass2 |
9011f7dd | 221 | if(period =="lhc10e") return 9.90511; // pass2 |
222 | ||
223 | // MC | |
5b88d60e | 224 | if(period =="lhc10f6a") return 7.5087; |
225 | if(period =="lhc10e21") return 7.91423; | |
7421dabb | 226 | } |
227 | else // |eta|<0.5 | |
228 | { | |
229 | if(period =="lhc10c900") return 3.84362; // pass3 | |
230 | if(period =="lhc10b") return 6.18470; // pass3 | |
231 | if(period =="lhc10c") return 6.16175; // pass3 | |
232 | if(period =="lhc10d") return 6.03108; // pass2 | |
233 | if(period =="lhc10e") return 6.10384; // pass2 | |
234 | if(period =="lhc11a_wosdd") return 4.40312; // pass3 | |
235 | if(period =="lhc11a_wsdd") return 4.87609; // pass4 | |
236 | ||
237 | // MC | |
238 | if(period =="lhc10e13") return 3.33273; | |
239 | if(period =="lhc10f6a") return 4.80771; | |
240 | if(period =="lhc10e21") return 4.91967; | |
241 | if(period =="lhc11e3a_plus_wosdd") return 3.4774; | |
242 | if(period =="lhc11e3a_plus_wsdd") return 3.6467; | |
243 | ||
244 | if(period =="lhc12a5a") return 29.3414; | |
245 | if(period =="lhc12a5bb") return 31.1514; | |
246 | if(period =="lhc12a5bc") return 30.7877; | |
247 | if(period =="lhc12a5bd") return 30.4706; | |
248 | if(period =="lhc12a5be") return 30.1013; | |
249 | if(period =="lhc12a5c_wsdd") return 27.6921; | |
250 | } | |
251 | ||
252 | cerr << "Warning in GetNSDMeanNtrk: no <Ntrk> for period " << period << " and |eta| < " << eta << endl; | |
6b91e8c0 | 253 | |
254 | return 1; | |
255 | } |