Updates to Trains. create a job-script to help
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / IdentifiedHighPt / lib / AliHighPtDeDxData.cxx
CommitLineData
4ebdd20e 1#include "AliHighPtDeDxData.h"
2
3#ifndef __IOSTREAM__
4#include <iostream>
5#endif
6
7#include <TRandom.h>
8
9using namespace std;
10
11ClassImp(AliHighPtDeDxData);
12
13//
14// AliHighPtDeDxData class
15//
16// This class contains the AliHighPtDeDxData information
17//
18
19//_________________________________________________________
20AliHighPtDeDxData::AliHighPtDeDxData():
21 AliHighPtDeDxBase(),
22 fDeDxPi(0x0),
23 fDeDxK(0x0),
24 fDeDxP(0x0),
25 fDeDxE(0x0),
26 fSigmaDeDx(0x0),
27 hDeltaPiVsPt(0x0),
28 hDeltaPiVsPtNeg(0x0),
29 hDeltaPiVsPtPos(0x0),
30 hDeltaPiVsPtPiGen(0x0),
31 hDeltaPiVsPtPiGenNeg(0x0),
32 hDeltaPiVsPtPiGenPos(0x0),
33 hDeltaPiVsPtKGen(0x0),
34 hDeltaPiVsPtKGenNeg(0x0),
35 hDeltaPiVsPtKGenPos(0x0),
36 hDeltaPiVsPtPGen(0x0),
37 hDeltaPiVsPtPGenNeg(0x0),
38 hDeltaPiVsPtPGenPos(0x0),
39 hDeltaPiVsPtEGen(0x0),
40 hDeltaPiVsPtEGenNeg(0x0),
41 hDeltaPiVsPtEGenPos(0x0),
42 hDeltaPiVsPtPiMc(0x0),
43 hDeltaPiVsPtPiMcNeg(0x0),
44 hDeltaPiVsPtPiMcPos(0x0),
45 hDeltaPiVsPtKMc(0x0),
46 hDeltaPiVsPtKMcNeg(0x0),
47 hDeltaPiVsPtKMcPos(0x0),
48 hDeltaPiVsPtPMc(0x0),
49 hDeltaPiVsPtPMcNeg(0x0),
50 hDeltaPiVsPtPMcPos(0x0),
51 hPtPi(0x0),
52 hPtK(0x0),
53 hPtP(0x0),
54 hPrimaryVsPidVsPt(0x0)
55{
56 // default constructor - do not use
57}
58
59//_________________________________________________________
60AliHighPtDeDxData::AliHighPtDeDxData(const char* name, const char* title):
61 AliHighPtDeDxBase(name, title),
62 fDeDxPi(0x0),
63 fDeDxK(0x0),
64 fDeDxP(0x0),
65 fDeDxE(0x0),
66 fSigmaDeDx(0x0),
67 hDeltaPiVsPt(0x0),
68 hDeltaPiVsPtNeg(0x0),
69 hDeltaPiVsPtPos(0x0),
70 hDeltaPiVsPtPiGen(0x0),
71 hDeltaPiVsPtPiGenNeg(0x0),
72 hDeltaPiVsPtPiGenPos(0x0),
73 hDeltaPiVsPtKGen(0x0),
74 hDeltaPiVsPtKGenNeg(0x0),
75 hDeltaPiVsPtKGenPos(0x0),
76 hDeltaPiVsPtPGen(0x0),
77 hDeltaPiVsPtPGenNeg(0x0),
78 hDeltaPiVsPtPGenPos(0x0),
79 hDeltaPiVsPtEGen(0x0),
80 hDeltaPiVsPtEGenNeg(0x0),
81 hDeltaPiVsPtEGenPos(0x0),
82 hDeltaPiVsPtPiMc(0x0),
83 hDeltaPiVsPtPiMcNeg(0x0),
84 hDeltaPiVsPtPiMcPos(0x0),
85 hDeltaPiVsPtKMc(0x0),
86 hDeltaPiVsPtKMcNeg(0x0),
87 hDeltaPiVsPtKMcPos(0x0),
88 hDeltaPiVsPtPMc(0x0),
89 hDeltaPiVsPtPMcNeg(0x0),
90 hDeltaPiVsPtPMcPos(0x0),
91 hPtPi(0x0),
92 hPtK(0x0),
93 hPtP(0x0),
94 hPrimaryVsPidVsPt(0x0)
95{
96 // named constructor
97}
98
99//_________________________________________________________
100AliHighPtDeDxData::~AliHighPtDeDxData()
101{
102 // delete fDeDxPi;
103 // delete fDeDxK;
104 // delete fDeDxP;
105 // delete fSigmaDeDx;
106 delete hDeltaPiVsPt;
107 delete hDeltaPiVsPtNeg;
108 delete hDeltaPiVsPtPos;
109 delete hDeltaPiVsPtPiGen;
110 delete hDeltaPiVsPtPiGenNeg;
111 delete hDeltaPiVsPtPiGenPos;
112 delete hDeltaPiVsPtKGen;
113 delete hDeltaPiVsPtKGenNeg;
114 delete hDeltaPiVsPtKGenPos;
115 delete hDeltaPiVsPtPGen;
116 delete hDeltaPiVsPtPGenNeg;
117 delete hDeltaPiVsPtPGenPos;
118 delete hDeltaPiVsPtEGen;
119 delete hDeltaPiVsPtEGenNeg;
120 delete hDeltaPiVsPtEGenPos;
121 delete hDeltaPiVsPtPiMc;
122 delete hDeltaPiVsPtPiMcNeg;
123 delete hDeltaPiVsPtPiMcPos;
124 delete hDeltaPiVsPtKMc;
125 delete hDeltaPiVsPtKMcNeg;
126 delete hDeltaPiVsPtKMcPos;
127 delete hDeltaPiVsPtPMc;
128 delete hDeltaPiVsPtPMcNeg;
129 delete hDeltaPiVsPtPMcPos;
130 delete hPtPi;
131 delete hPtK;
132 delete hPtP;
133 delete hPrimaryVsPidVsPt;
134}
135
136//_________________________________________________________
137void AliHighPtDeDxData::Init(Int_t nPtBins, Double_t* ptBins)
138{
139 //
140 // Create histograms and functions
141 //
142
143 //
144 // init base class
145 //
146 AliHighPtDeDxBase::Init(nPtBins, ptBins);
147
148 const Int_t nDeltaPiBins = 60;
149 const Double_t deltaPiLow = -30;
150 const Double_t deltaPiHigh = 30;
151
152 hDeltaPiVsPt = new TH2D("hDeltaPiVsPt", "dE/dx-<dE/dx>_{#pi} vs p_{T}; p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
153 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
154 hDeltaPiVsPt->Sumw2();
155 hDeltaPiVsPt->SetDirectory(0);
156
157 hDeltaPiVsPtNeg = new TH2D("hDeltaPiVsPtNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q < 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
158 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
159 hDeltaPiVsPtNeg->Sumw2();
160 hDeltaPiVsPtNeg->SetDirectory(0);
161
162 hDeltaPiVsPtPos = new TH2D("hDeltaPiVsPtPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q > 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
163 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
164 hDeltaPiVsPtPos->Sumw2();
165 hDeltaPiVsPtPos->SetDirectory(0);
166
167
168 //
169 // Generated pions
170 //
171
172 hDeltaPiVsPtPiGen = new TH2D("hDeltaPiVsPtPiGen", "dE/dx-<dE/dx>_{#pi} vs p_{T} (#pi gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
173 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
174 hDeltaPiVsPtPiGen->Sumw2();
175 hDeltaPiVsPtPiGen->SetDirectory(0);
176
177 hDeltaPiVsPtPiGenNeg = new TH2D("hDeltaPiVsPtPiGenNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q < 0) (#pi gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
178 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
179 hDeltaPiVsPtPiGenNeg->Sumw2();
180 hDeltaPiVsPtPiGenNeg->SetDirectory(0);
181
182 hDeltaPiVsPtPiGenPos = new TH2D("hDeltaPiVsPtPiGenPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q > 0) (#pi gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
183 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
184 hDeltaPiVsPtPiGenPos->Sumw2();
185 hDeltaPiVsPtPiGenPos->SetDirectory(0);
186
187 //
188 // Generated kaons
189 //
190
191 hDeltaPiVsPtKGen = new TH2D("hDeltaPiVsPtKGen", "dE/dx-<dE/dx>_{#pi} vs p_{T} (K gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
192 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
193 hDeltaPiVsPtKGen->Sumw2();
194 hDeltaPiVsPtKGen->SetDirectory(0);
195
196 hDeltaPiVsPtKGenNeg = new TH2D("hDeltaPiVsPtKGenNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q < 0) (K gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
197 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
198 hDeltaPiVsPtKGenNeg->Sumw2();
199 hDeltaPiVsPtKGenNeg->SetDirectory(0);
200
201 hDeltaPiVsPtKGenPos = new TH2D("hDeltaPiVsPtKGenPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q > 0) (K gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
202 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
203 hDeltaPiVsPtKGenPos->Sumw2();
204 hDeltaPiVsPtKGenPos->SetDirectory(0);
205
206 //
207 // Generated protons
208 //
209
210 hDeltaPiVsPtPGen = new TH2D("hDeltaPiVsPtPGen", "dE/dx-<dE/dx>_{#pi} vs p_{T} (p gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
211 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
212 hDeltaPiVsPtPGen->Sumw2();
213 hDeltaPiVsPtPGen->SetDirectory(0);
214
215 hDeltaPiVsPtPGenNeg = new TH2D("hDeltaPiVsPtPGenNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q < 0) (p gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
216 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
217 hDeltaPiVsPtPGenNeg->Sumw2();
218 hDeltaPiVsPtPGenNeg->SetDirectory(0);
219
220 hDeltaPiVsPtPGenPos = new TH2D("hDeltaPiVsPtPGenPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q > 0) (p gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
221 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
222 hDeltaPiVsPtPGenPos->Sumw2();
223 hDeltaPiVsPtPGenPos->SetDirectory(0);
224
225 //
226 // Generated electrons
227 //
228
229 hDeltaPiVsPtEGen = new TH2D("hDeltaPiVsPtEGen", "dE/dx-<dE/dx>_{#pi} vs p_{T} (e gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
230 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
231 hDeltaPiVsPtEGen->Sumw2();
232 hDeltaPiVsPtEGen->SetDirectory(0);
233
234 hDeltaPiVsPtEGenNeg = new TH2D("hDeltaPiVsPtEGenNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q < 0) (e gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
235 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
236 hDeltaPiVsPtEGenNeg->Sumw2();
237 hDeltaPiVsPtEGenNeg->SetDirectory(0);
238
239 hDeltaPiVsPtEGenPos = new TH2D("hDeltaPiVsPtEGenPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (q > 0) (e gen); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
240 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
241 hDeltaPiVsPtEGenPos->Sumw2();
242 hDeltaPiVsPtEGenPos->SetDirectory(0);
243
244 //
245 // MC
246 //
247 if(fIsMc) {
248 hDeltaPiVsPtPiMc = new TH2D("hDeltaPiVsPtPiMc", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
249 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
250 hDeltaPiVsPtPiMc->Sumw2();
251 hDeltaPiVsPtPiMc->SetDirectory(0);
252
253 hDeltaPiVsPtPiMcNeg = new TH2D("hDeltaPiVsPtPiMcNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC) (q < 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
254 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
255 hDeltaPiVsPtPiMcNeg->Sumw2();
256 hDeltaPiVsPtPiMcNeg->SetDirectory(0);
257
258 hDeltaPiVsPtPiMcPos = new TH2D("hDeltaPiVsPtPiMcPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC) (q > 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
259 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
260 hDeltaPiVsPtPiMcPos->Sumw2();
261 hDeltaPiVsPtPiMcPos->SetDirectory(0);
262
263 hDeltaPiVsPtKMc = new TH2D("hDeltaPiVsPtKMc", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
264 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
265 hDeltaPiVsPtKMc->Sumw2();
266 hDeltaPiVsPtKMc->SetDirectory(0);
267
268 hDeltaPiVsPtKMcNeg = new TH2D("hDeltaPiVsPtKMcNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC) (q < 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
269 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
270 hDeltaPiVsPtKMcNeg->Sumw2();
271 hDeltaPiVsPtKMcNeg->SetDirectory(0);
272
273 hDeltaPiVsPtKMcPos = new TH2D("hDeltaPiVsPtKMcPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC) (q > 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
274 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
275 hDeltaPiVsPtKMcPos->Sumw2();
276 hDeltaPiVsPtKMcPos->SetDirectory(0);
277
278 hDeltaPiVsPtPMc = new TH2D("hDeltaPiVsPtPMc", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
279 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
280 hDeltaPiVsPtPMc->Sumw2();
281 hDeltaPiVsPtPMc->SetDirectory(0);
282
283 hDeltaPiVsPtPMcNeg = new TH2D("hDeltaPiVsPtPMcNeg", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC) (q < 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
284 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
285 hDeltaPiVsPtPMcNeg->Sumw2();
286 hDeltaPiVsPtPMcNeg->SetDirectory(0);
287
288 hDeltaPiVsPtPMcPos = new TH2D("hDeltaPiVsPtPMcPos", "dE/dx-<dE/dx>_{#pi} vs p_{T} (MC) (q > 0); p_{T} [GeV/c]; dE/dx - <dE/dx>_{pi}",
289 nPtBins, ptBins, nDeltaPiBins, deltaPiLow, deltaPiHigh);
290 hDeltaPiVsPtPMcPos->Sumw2();
291 hDeltaPiVsPtPMcPos->SetDirectory(0);
292
293
294 const Int_t nPidBins = 7;
295 const Double_t pidBinSize = 1;
296 Double_t pidBins[nPidBins+1];
297
298 for(Int_t i = 0; i <= nPidBins; i++) {
299
300 pidBins[i] = pidBinSize*i - 0.5;
301 }
302
303 const Int_t nPrimaryBins = 2;
304 const Double_t primaryBinSize = 1;
305 Double_t primaryBins[nPrimaryBins+1];
306
307 for(Int_t i = 0; i <= nPrimaryBins; i++) {
308
309 primaryBins[i] = primaryBinSize*i - 0.5;
310 }
311
312 hPrimaryVsPidVsPt = new TH3D("hPrimaryVsPidVsPt", "primary status vs pid vs Pt; p_{T} [GeV/c]; Pid; Primary status",
313 nPtBins, ptBins, nPidBins, pidBins, nPrimaryBins, primaryBins);
314 }
315}
316
317//_________________________________________________________
318void AliHighPtDeDxData::FillTrackInfo(Float_t weight)
319{
320 AliHighPtDeDxBase::FillTrackInfo(weight);
321
322 const Double_t dedxPi = fDeDxPi->Eval(fTrackP);
323 const Double_t sigmaPi = fSigmaDeDx->Eval(dedxPi);
324
325 const Double_t dedxK = fDeDxK->Eval(fTrackP);
326 const Double_t sigmaK = fSigmaDeDx->Eval(dedxK);
327
328 const Double_t dedxP = fDeDxP->Eval(fTrackP);
329 const Double_t sigmaP = fSigmaDeDx->Eval(dedxP);
330
331 const Double_t dedxE = fDeDxE->Eval(fTrackP);
332 const Double_t sigmaE = fSigmaDeDx->Eval(dedxE);
333
334 hDeltaPiVsPt->Fill(fTrackPt, fTrackDeDx-dedxPi);
335 if(fTrackCharge<0)
336 hDeltaPiVsPtNeg->Fill(fTrackPt, fTrackDeDx-dedxPi);
337 else
338 hDeltaPiVsPtPos->Fill(fTrackPt, fTrackDeDx-dedxPi);
339
340 // Fill MC info
341 if(fIsMc) {
342
343 hPrimaryVsPidVsPt->Fill(fTrackPt, fTrackPidMc, fTrackPrimaryMc);
344 switch (fTrackPidMc) {
345
346 case 1: // pion
347 hDeltaPiVsPtPiMc->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
348 if(fTrackCharge<0)
349 hDeltaPiVsPtPiMcNeg->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
350 else
351 hDeltaPiVsPtPiMcPos->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
352 break;
353 case 2: // kaon
354 hDeltaPiVsPtKMc->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
355 if(fTrackCharge<0)
356 hDeltaPiVsPtKMcNeg->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
357 else
358 hDeltaPiVsPtKMcPos->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
359 break;
360 case 3: // proton
361 hDeltaPiVsPtPMc->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
362 if(fTrackCharge<0)
363 hDeltaPiVsPtPMcNeg->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
364 else
365 hDeltaPiVsPtPMcPos->Fill(fTrackPt, fTrackDeDx-dedxPi, weight);
366 break;
367 default:
368 break;
369 }
370 }
371
372
373 for(Int_t i = 0; i< 10; i++) {
374
375 const Double_t piShape = gRandom->Gaus(0, sigmaPi);
376 const Double_t kShape = gRandom->Gaus(dedxK - dedxPi, sigmaK);
377 const Double_t pShape = gRandom->Gaus(dedxP - dedxPi, sigmaP);
378 const Double_t eShape = gRandom->Gaus(dedxE - dedxPi, sigmaE);
379 hDeltaPiVsPtPiGen->Fill(fTrackPt, piShape);
380 hDeltaPiVsPtKGen->Fill(fTrackPt, kShape);
381 hDeltaPiVsPtPGen->Fill(fTrackPt, pShape);
382 hDeltaPiVsPtEGen->Fill(fTrackPt, eShape);
383 if(fTrackCharge<0) {
384
385 hDeltaPiVsPtPiGenNeg->Fill(fTrackPt, piShape);
386 hDeltaPiVsPtKGenNeg->Fill(fTrackPt, kShape);
387 hDeltaPiVsPtPGenNeg->Fill(fTrackPt, pShape);
388 hDeltaPiVsPtEGenNeg->Fill(fTrackPt, eShape);
389 } else {
390
391 hDeltaPiVsPtPiGenPos->Fill(fTrackPt, piShape);
392 hDeltaPiVsPtKGenPos->Fill(fTrackPt, kShape);
393 hDeltaPiVsPtPGenPos->Fill(fTrackPt, pShape);
394 hDeltaPiVsPtEGenPos->Fill(fTrackPt, eShape);
395 }
396 }
397}
398
399TH2D* AliHighPtDeDxData::GetHistDeltaPiVsPt(Int_t pid, Int_t charge)
400{
401 switch (pid) {
402
403 case 0:
404 if(charge==0)
405 return hDeltaPiVsPt;
406 else if(charge<0)
407 return hDeltaPiVsPtNeg;
408 else
409 return hDeltaPiVsPtPos;
410 break;
411 case 1:
412 if(charge==0)
413 return hDeltaPiVsPtPiGen;
414 else if(charge<0)
415 return hDeltaPiVsPtPiGenNeg;
416 else
417 return hDeltaPiVsPtPiGenPos;
418 break;
419 case 2:
420 if(charge==0)
421 return hDeltaPiVsPtKGen;
422 else if(charge<0)
423 return hDeltaPiVsPtKGenNeg;
424 else
425 return hDeltaPiVsPtKGenPos;
426 break;
427 case 3:
428 if(charge==0)
429 return hDeltaPiVsPtPGen;
430 else if(charge<0)
431 return hDeltaPiVsPtPGenNeg;
432 else
433 return hDeltaPiVsPtPGenPos;
434 break;
435 case 4:
436 if(charge==0)
437 return hDeltaPiVsPtEGen;
438 else if(charge<0)
439 return hDeltaPiVsPtEGenNeg;
440 else
441 return hDeltaPiVsPtEGenPos;
442 break;
443 default:
444 cout << "PID: " << pid << " not found" << endl;
445 break;
446 }
447 return 0;
448}
449
450TH2D* AliHighPtDeDxData::GetHistDeltaPiVsPtMc(Int_t pid, Int_t charge)
451{
452 switch (pid) {
453
454 case 1:
455 if(charge==0)
456 return hDeltaPiVsPtPiMc;
457 else if(charge<0)
458 return hDeltaPiVsPtPiMcNeg;
459 else
460 return hDeltaPiVsPtPiMcPos;
461 break;
462 case 2:
463 if(charge==0)
464 return hDeltaPiVsPtKMc;
465 else if(charge<0)
466 return hDeltaPiVsPtKMcNeg;
467 else
468 return hDeltaPiVsPtKMcPos;
469 break;
470 case 3:
471 if(charge==0)
472 return hDeltaPiVsPtPMc;
473 else if(charge<0)
474 return hDeltaPiVsPtPMcNeg;
475 else
476 return hDeltaPiVsPtPMcPos;
477 break;
478 default:
479 cout << "PID: " << pid << " not found" << endl;
480 break;
481 }
482 return 0;
483}