]>
Commit | Line | Data |
---|---|---|
734d2c12 | 1 | /************************************************************************** |
2 | * Author: Panos Christakoglou. * | |
3 | * Contributors are mentioned in the code where appropriate. * | |
4 | * * | |
5 | * Permission to use, copy, modify and distribute this software and its * | |
6 | * documentation strictly for non-commercial purposes is hereby granted * | |
7 | * without fee, provided that the above copyright notice appears in all * | |
8 | * copies and that both the copyright notice and this permission notice * | |
9 | * appear in the supporting documentation. The authors make no claims * | |
10 | * about the suitability of this software for any purpose. It is * | |
11 | * provided "as is" without express or implied warranty. * | |
12 | **************************************************************************/ | |
13 | ||
14 | /* $Id$ */ | |
15 | ||
16 | //----------------------------------------------------------------- | |
17 | // AliProtonAnalysis class | |
18 | // This is the class to deal with the proton analysis | |
dd3fa486 | 19 | // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch |
734d2c12 | 20 | //----------------------------------------------------------------- |
21 | #include <Riostream.h> | |
22 | #include <TFile.h> | |
23 | #include <TSystem.h> | |
aafecd8b | 24 | #include <TF1.h> |
37cb8683 | 25 | #include <TH3F.h> |
251e4034 | 26 | #include <TH2D.h> |
734d2c12 | 27 | #include <TH1D.h> |
3f6d0c08 | 28 | #include <TH1I.h> |
e4358d7f | 29 | #include <TParticle.h> |
735cc63d | 30 | #include <TList.h> |
734d2c12 | 31 | |
2b748670 | 32 | #include <AliExternalTrackParam.h> |
ee4ca40d | 33 | #include <AliAODEvent.h> |
734d2c12 | 34 | #include <AliESDEvent.h> |
73aba974 | 35 | //#include <AliLog.h> |
ee4ca40d | 36 | #include <AliPID.h> |
e4358d7f | 37 | #include <AliStack.h> |
39f2a708 | 38 | #include <AliCFContainer.h> |
39 | #include <AliCFEffGrid.h> | |
251e4034 | 40 | #include <AliCFDataGrid.h> |
ff672838 | 41 | #include <AliTPCPIDResponse.h> |
42 | #include <AliESDpid.h> | |
73aba974 | 43 | class AliLog; |
44 | class AliESDVertex; | |
45 | ||
46 | #include "AliProtonAnalysis.h" | |
47 | #include "AliProtonAnalysisBase.h" | |
e4358d7f | 48 | |
734d2c12 | 49 | ClassImp(AliProtonAnalysis) |
50 | ||
51 | //____________________________________________________________________// | |
52 | AliProtonAnalysis::AliProtonAnalysis() : | |
0ab648ea | 53 | TObject(), fProtonAnalysisBase(0), |
734d2c12 | 54 | fNBinsY(0), fMinY(0), fMaxY(0), |
55 | fNBinsPt(0), fMinPt(0), fMaxPt(0), | |
251e4034 | 56 | fProtonContainer(0), fAntiProtonContainer(0), |
71a67ee1 | 57 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
58 | fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0), | |
ce9d2201 | 59 | fHistEventStats(0), fYRatioInPtBinsList(0), |
251e4034 | 60 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
61 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
62 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
63 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 64 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 65 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
7deb716b | 66 | fHistCorrectionForCrossSectionYPtProtons(0), |
67 | fHistCorrectionForCrossSectionYPtAntiProtons(0), | |
68 | fHistCorrectionForCrossSectionFlag(kFALSE), | |
437dd627 | 69 | fHistYPtCorrectionForCutsProtons(0), fHistYPtCorrectionForCutsAntiProtons(0), |
70 | fCorrectForCutsFlag(kFALSE), | |
207a5280 | 71 | fHistYPtCorrectionForTrackingProtons(0), |
72 | fHistYPtCorrectionForTrackingAntiProtons(0), | |
73 | fCorrectForTrackingFlag(kFALSE), | |
437dd627 | 74 | fHistYPtCorrectionForFeedDownProtons(0), |
75 | fHistYPtCorrectionForFeedDownAntiProtons(0), | |
76 | fCorrectForFeedDownFlag(kFALSE), | |
2c60f603 | 77 | fHistYPtCorrectionForSecondaries(0), fCorrectForSecondariesFlag(kFALSE), |
735cc63d | 78 | fGlobalQAList(0), fQA2DList(0), |
79 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
80 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
81 | fInitQAFlag(kFALSE) { | |
734d2c12 | 82 | //Default constructor |
734d2c12 | 83 | } |
84 | ||
85 | //____________________________________________________________________// | |
0ab648ea | 86 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, |
87 | Float_t fLowY, Float_t fHighY, | |
88 | Int_t nbinsPt, | |
89 | Float_t fLowPt, Float_t fHighPt) : | |
90 | TObject(), fProtonAnalysisBase(0), | |
734d2c12 | 91 | fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY), |
92 | fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt), | |
251e4034 | 93 | fProtonContainer(0), fAntiProtonContainer(0), |
ce9d2201 | 94 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
71a67ee1 | 95 | fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0), |
ce9d2201 | 96 | fHistEventStats(0), fYRatioInPtBinsList(0), |
251e4034 | 97 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
98 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
99 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
100 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 101 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 102 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
7deb716b | 103 | fHistCorrectionForCrossSectionYPtProtons(0), |
104 | fHistCorrectionForCrossSectionYPtAntiProtons(0), | |
105 | fHistCorrectionForCrossSectionFlag(kFALSE), | |
437dd627 | 106 | fHistYPtCorrectionForCutsProtons(0), fHistYPtCorrectionForCutsAntiProtons(0), |
107 | fCorrectForCutsFlag(kFALSE), | |
207a5280 | 108 | fHistYPtCorrectionForTrackingProtons(0), |
109 | fHistYPtCorrectionForTrackingAntiProtons(0), | |
110 | fCorrectForTrackingFlag(kFALSE), | |
437dd627 | 111 | fHistYPtCorrectionForFeedDownProtons(0), |
112 | fHistYPtCorrectionForFeedDownAntiProtons(0), | |
113 | fCorrectForFeedDownFlag(kFALSE), | |
2c60f603 | 114 | fHistYPtCorrectionForSecondaries(0), fCorrectForSecondariesFlag(kFALSE), |
735cc63d | 115 | fGlobalQAList(0), fQA2DList(0), |
116 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
117 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
118 | fInitQAFlag(kFALSE) { | |
734d2c12 | 119 | //Default constructor |
f203beb9 | 120 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
121 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
122 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
3f6d0c08 | 123 | |
0ab648ea | 124 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", |
125 | fNBinsY,fMinY,fMaxY, | |
126 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 127 | fHistYPtProtons->SetStats(kTRUE); |
0ab648ea | 128 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
129 | if(fProtonAnalysisBase->GetEtaMode()) | |
130 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
131 | else | |
132 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 133 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); |
134 | ||
0ab648ea | 135 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", |
136 | fNBinsY,fMinY,fMaxY, | |
137 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 138 | fHistYPtAntiProtons->SetStats(kTRUE); |
0ab648ea | 139 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
140 | if(fProtonAnalysisBase->GetEtaMode()) | |
141 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
142 | else | |
143 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 144 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); |
251e4034 | 145 | |
71a67ee1 | 146 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
147 | fNBinsY,fMinY,fMaxY, | |
148 | fNBinsPt,fMinPt,fMaxPt); | |
149 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
150 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
151 | if(fProtonAnalysisBase->GetEtaMode()) | |
152 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
153 | else | |
154 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
155 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
156 | ||
157 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
158 | "Antiprotons", | |
159 | fNBinsY,fMinY,fMaxY, | |
160 | fNBinsPt,fMinPt,fMaxPt); | |
161 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
162 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
163 | if(fProtonAnalysisBase->GetEtaMode()) | |
164 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
165 | else | |
166 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
167 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
168 | ||
251e4034 | 169 | //setting up the containers |
170 | Int_t iBin[2]; | |
171 | iBin[0] = nbinsY; | |
172 | iBin[1] = nbinsPt; | |
173 | Double_t *binLimY = new Double_t[nbinsY+1]; | |
174 | Double_t *binLimPt = new Double_t[nbinsPt+1]; | |
175 | //values for bin lower bounds | |
176 | for(Int_t i = 0; i <= nbinsY; i++) | |
177 | binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i; | |
178 | for(Int_t i = 0; i <= nbinsPt; i++) | |
179 | binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i; | |
180 | ||
181 | fProtonContainer = new AliCFContainer("containerProtons", | |
182 | "container for protons", | |
2f1c0f45 | 183 | kNSteps,2,iBin); |
0ab648ea | 184 | fProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta |
251e4034 | 185 | fProtonContainer->SetBinLimits(1,binLimPt); //pT |
186 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
187 | "container for antiprotons", | |
2f1c0f45 | 188 | kNSteps,2,iBin); |
0ab648ea | 189 | fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta |
251e4034 | 190 | fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT |
e56f08ed | 191 | |
192 | //Initialize the QA | |
193 | if(!fInitQAFlag) InitQA(); | |
734d2c12 | 194 | } |
195 | ||
4acc9d4d | 196 | //____________________________________________________________________// |
197 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Double_t *gY, | |
198 | Int_t nbinsPt,Double_t *gPt) : | |
199 | TObject(), fProtonAnalysisBase(0), | |
200 | fNBinsY(nbinsY), fMinY(gY[0]), fMaxY(gY[nbinsY]), | |
201 | fNBinsPt(nbinsPt), fMinPt(gPt[0]), fMaxPt(gPt[nbinsPt]), | |
202 | fProtonContainer(0), fAntiProtonContainer(0), | |
ce9d2201 | 203 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
71a67ee1 | 204 | fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0), |
ce9d2201 | 205 | fHistEventStats(0), fYRatioInPtBinsList(0), |
4acc9d4d | 206 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
207 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
208 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
209 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 210 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 211 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
7deb716b | 212 | fHistCorrectionForCrossSectionYPtProtons(0), |
213 | fHistCorrectionForCrossSectionYPtAntiProtons(0), | |
214 | fHistCorrectionForCrossSectionFlag(kFALSE), | |
437dd627 | 215 | fHistYPtCorrectionForCutsProtons(0), fHistYPtCorrectionForCutsAntiProtons(0), |
216 | fCorrectForCutsFlag(kFALSE), | |
207a5280 | 217 | fHistYPtCorrectionForTrackingProtons(0), |
218 | fHistYPtCorrectionForTrackingAntiProtons(0), | |
219 | fCorrectForTrackingFlag(kFALSE), | |
437dd627 | 220 | fHistYPtCorrectionForFeedDownProtons(0), |
221 | fHistYPtCorrectionForFeedDownAntiProtons(0), | |
222 | fCorrectForFeedDownFlag(kFALSE), | |
2c60f603 | 223 | fHistYPtCorrectionForSecondaries(0), fCorrectForSecondariesFlag(kFALSE), |
735cc63d | 224 | fGlobalQAList(0), fQA2DList(0), |
225 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
226 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
227 | fInitQAFlag(kFALSE) { | |
4acc9d4d | 228 | //Default constructor |
f203beb9 | 229 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
230 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
231 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
4acc9d4d | 232 | |
233 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", | |
234 | fNBinsY,gY,fNBinsPt,gPt); | |
235 | fHistYPtProtons->SetStats(kTRUE); | |
236 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
237 | if(fProtonAnalysisBase->GetEtaMode()) | |
238 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
239 | else | |
240 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
241 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
242 | ||
243 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", | |
244 | fNBinsY,gY,fNBinsPt,gPt); | |
245 | fHistYPtAntiProtons->SetStats(kTRUE); | |
246 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
247 | if(fProtonAnalysisBase->GetEtaMode()) | |
248 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
249 | else | |
250 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
251 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
252 | ||
71a67ee1 | 253 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
254 | fNBinsY,fMinY,fMaxY, | |
255 | fNBinsPt,fMinPt,fMaxPt); | |
256 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
257 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
258 | if(fProtonAnalysisBase->GetEtaMode()) | |
259 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
260 | else | |
261 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
262 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
263 | ||
264 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
265 | "Antiprotons", | |
266 | fNBinsY,fMinY,fMaxY, | |
267 | fNBinsPt,fMinPt,fMaxPt); | |
268 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
269 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
270 | if(fProtonAnalysisBase->GetEtaMode()) | |
271 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
272 | else | |
273 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
274 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
275 | ||
4acc9d4d | 276 | //setting up the containers |
277 | Int_t iBin[2]; | |
278 | iBin[0] = nbinsY; | |
279 | iBin[1] = nbinsPt; | |
280 | fProtonContainer = new AliCFContainer("containerProtons", | |
281 | "container for protons", | |
2f1c0f45 | 282 | kNSteps,2,iBin); |
4acc9d4d | 283 | fProtonContainer->SetBinLimits(0,gY); //rapidity or eta |
284 | fProtonContainer->SetBinLimits(1,gPt); //pT | |
285 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
286 | "container for antiprotons", | |
2f1c0f45 | 287 | kNSteps,2,iBin); |
4acc9d4d | 288 | fAntiProtonContainer->SetBinLimits(0,gY); //rapidity or eta |
289 | fAntiProtonContainer->SetBinLimits(1,gPt); //pT | |
e56f08ed | 290 | |
291 | //Initialize the QA | |
292 | if(!fInitQAFlag) InitQA(); | |
4acc9d4d | 293 | } |
294 | ||
734d2c12 | 295 | //____________________________________________________________________// |
296 | AliProtonAnalysis::~AliProtonAnalysis() { | |
297 | //Default destructor | |
0ab648ea | 298 | if(fProtonAnalysisBase) delete fProtonAnalysisBase; |
299 | ||
39f2a708 | 300 | if(fHistEvents) delete fHistEvents; |
301 | if(fHistYPtProtons) delete fHistYPtProtons; | |
302 | if(fHistYPtAntiProtons) delete fHistYPtAntiProtons; | |
71a67ee1 | 303 | if(fHistYPtProtonsCorrected) delete fHistYPtProtonsCorrected; |
304 | if(fHistYPtAntiProtonsCorrected) delete fHistYPtAntiProtonsCorrected; | |
52b04cf9 | 305 | if(fHistEventStats) delete fHistEventStats; |
ce9d2201 | 306 | if(fYRatioInPtBinsList) delete fYRatioInPtBinsList; |
307 | ||
251e4034 | 308 | if(fProtonContainer) delete fProtonContainer; |
309 | if(fAntiProtonContainer) delete fAntiProtonContainer; | |
310 | ||
251e4034 | 311 | if(fEffGridListProtons) delete fEffGridListProtons; |
cdb3530f | 312 | if(fCorrectionListProtons2D) delete fCorrectionListProtons2D; |
313 | if(fEfficiencyListProtons1D) delete fEfficiencyListProtons1D; | |
314 | if(fCorrectionListProtons1D) delete fCorrectionListProtons1D; | |
251e4034 | 315 | if(fEffGridListAntiProtons) delete fEffGridListAntiProtons; |
cdb3530f | 316 | if(fCorrectionListAntiProtons2D) delete fCorrectionListAntiProtons2D; |
317 | if(fEfficiencyListAntiProtons1D) delete fEfficiencyListAntiProtons1D; | |
318 | if(fCorrectionListAntiProtons1D) delete fCorrectionListAntiProtons1D; | |
251e4034 | 319 | if(fCorrectProtons) delete fCorrectProtons; |
320 | if(fCorrectAntiProtons) delete fCorrectAntiProtons; | |
336ea0ff | 321 | if(fHistEfficiencyYPtProtons) delete fHistEfficiencyYPtProtons; |
322 | if(fHistEfficiencyYPtAntiProtons) delete fHistEfficiencyYPtAntiProtons; | |
7deb716b | 323 | if(fHistCorrectionForCrossSectionYPtProtons) delete fHistCorrectionForCrossSectionYPtProtons; |
324 | if(fHistCorrectionForCrossSectionYPtAntiProtons) delete fHistCorrectionForCrossSectionYPtAntiProtons; | |
437dd627 | 325 | if(fHistYPtCorrectionForCutsProtons) delete fHistYPtCorrectionForCutsProtons; |
326 | if(fHistYPtCorrectionForCutsAntiProtons) delete fHistYPtCorrectionForCutsAntiProtons; | |
207a5280 | 327 | if(fHistYPtCorrectionForTrackingProtons) delete fHistYPtCorrectionForTrackingProtons; |
328 | if(fHistYPtCorrectionForTrackingAntiProtons) delete fHistYPtCorrectionForTrackingAntiProtons; | |
437dd627 | 329 | if(fHistYPtCorrectionForFeedDownProtons) delete fHistYPtCorrectionForFeedDownProtons; |
330 | if(fHistYPtCorrectionForFeedDownAntiProtons) delete fHistYPtCorrectionForFeedDownAntiProtons; | |
2c60f603 | 331 | if(fHistYPtCorrectionForSecondaries) delete fHistYPtCorrectionForSecondaries; |
735cc63d | 332 | |
333 | //QA lists | |
334 | if(fGlobalQAList) delete fGlobalQAList; | |
335 | if(fQA2DList) delete fQA2DList; | |
336 | if(fQAProtonsAcceptedList) delete fQAProtonsAcceptedList; | |
337 | if(fQAProtonsRejectedList) delete fQAProtonsRejectedList; | |
338 | if(fQAAntiProtonsAcceptedList) delete fQAAntiProtonsAcceptedList; | |
339 | if(fQAAntiProtonsRejectedList) delete fQAAntiProtonsRejectedList; | |
734d2c12 | 340 | } |
341 | ||
342 | //____________________________________________________________________// | |
251e4034 | 343 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, |
344 | Float_t fLowY, Float_t fHighY, | |
345 | Int_t nbinsPt, | |
346 | Float_t fLowPt, Float_t fHighPt) { | |
9cd594db | 347 | //Initializes the histograms |
734d2c12 | 348 | fNBinsY = nbinsY; |
349 | fMinY = fLowY; | |
350 | fMaxY = fHighY; | |
351 | fNBinsPt = nbinsPt; | |
352 | fMinPt = fLowPt; | |
353 | fMaxPt = fHighPt; | |
354 | ||
f203beb9 | 355 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
356 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
357 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
3f6d0c08 | 358 | |
0ab648ea | 359 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", |
360 | fNBinsY,fMinY,fMaxY, | |
361 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 362 | fHistYPtProtons->SetStats(kTRUE); |
0ab648ea | 363 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
364 | if(fProtonAnalysisBase->GetEtaMode()) | |
365 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
366 | else | |
367 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 368 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); |
369 | ||
0ab648ea | 370 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", |
371 | fNBinsY,fMinY,fMaxY, | |
372 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 373 | fHistYPtAntiProtons->SetStats(kTRUE); |
0ab648ea | 374 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
375 | if(fProtonAnalysisBase->GetEtaMode()) | |
376 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
377 | else | |
378 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 379 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); |
251e4034 | 380 | |
71a67ee1 | 381 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
382 | fNBinsY,fMinY,fMaxY, | |
383 | fNBinsPt,fMinPt,fMaxPt); | |
384 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
385 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
386 | if(fProtonAnalysisBase->GetEtaMode()) | |
387 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
388 | else | |
389 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
390 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
391 | ||
392 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
393 | "Antiprotons", | |
394 | fNBinsY,fMinY,fMaxY, | |
395 | fNBinsPt,fMinPt,fMaxPt); | |
396 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
397 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
398 | if(fProtonAnalysisBase->GetEtaMode()) | |
399 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
400 | else | |
401 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
402 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
403 | ||
251e4034 | 404 | //setting up the containers |
405 | Int_t iBin[2]; | |
406 | iBin[0] = nbinsY; | |
407 | iBin[1] = nbinsPt; | |
408 | Double_t *binLimY = new Double_t[nbinsY+1]; | |
409 | Double_t *binLimPt = new Double_t[nbinsPt+1]; | |
410 | //values for bin lower bounds | |
411 | for(Int_t i = 0; i <= nbinsY; i++) | |
412 | binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i; | |
413 | for(Int_t i = 0; i <= nbinsPt; i++) | |
414 | binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i; | |
415 | ||
416 | fProtonContainer = new AliCFContainer("containerProtons", | |
417 | "container for protons", | |
2f1c0f45 | 418 | kNSteps,2,iBin); |
251e4034 | 419 | fProtonContainer->SetBinLimits(0,binLimY); //rapidity |
420 | fProtonContainer->SetBinLimits(1,binLimPt); //pT | |
421 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
422 | "container for antiprotons", | |
2f1c0f45 | 423 | kNSteps,2,iBin); |
251e4034 | 424 | fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity |
425 | fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT | |
e56f08ed | 426 | |
427 | //Initialize the QA | |
428 | if(!fInitQAFlag) InitQA(); | |
734d2c12 | 429 | } |
430 | ||
4acc9d4d | 431 | //____________________________________________________________________// |
432 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Double_t *gY, | |
433 | Int_t nbinsPt, Double_t *gPt) { | |
434 | //Initializes the histograms using asymmetric values - global tracking | |
435 | fNBinsY = nbinsY; | |
436 | fMinY = gY[0]; | |
437 | fMaxY = gY[nbinsY]; | |
438 | fNBinsPt = nbinsPt; | |
439 | fMinPt = gPt[0]; | |
440 | fMaxPt = gPt[nbinsPt]; | |
441 | ||
f203beb9 | 442 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
443 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
444 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
4acc9d4d | 445 | |
446 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", | |
447 | fNBinsY,gY,fNBinsPt,gPt); | |
448 | fHistYPtProtons->SetStats(kTRUE); | |
449 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
450 | if(fProtonAnalysisBase->GetEtaMode()) | |
451 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
452 | else | |
453 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
454 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
455 | ||
456 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", | |
457 | fNBinsY,gY,fNBinsPt,gPt); | |
458 | fHistYPtAntiProtons->SetStats(kTRUE); | |
459 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
460 | if(fProtonAnalysisBase->GetEtaMode()) | |
461 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
462 | else | |
463 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
464 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
465 | ||
71a67ee1 | 466 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
467 | fNBinsY,gY,fNBinsPt,gPt); | |
468 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
469 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
470 | if(fProtonAnalysisBase->GetEtaMode()) | |
471 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
472 | else | |
473 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
474 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
475 | ||
476 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
477 | "Antiprotons", | |
478 | fNBinsY,gY,fNBinsPt,gPt); | |
479 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
480 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
481 | if(fProtonAnalysisBase->GetEtaMode()) | |
482 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
483 | else | |
484 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
485 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
486 | ||
4acc9d4d | 487 | //setting up the containers |
488 | Int_t iBin[2]; | |
489 | iBin[0] = nbinsY; | |
490 | iBin[1] = nbinsPt; | |
491 | ||
492 | fProtonContainer = new AliCFContainer("containerProtons", | |
493 | "container for protons", | |
2f1c0f45 | 494 | kNSteps,2,iBin); |
4acc9d4d | 495 | fProtonContainer->SetBinLimits(0,gY); //rapidity |
496 | fProtonContainer->SetBinLimits(1,gPt); //pT | |
497 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
498 | "container for antiprotons", | |
2f1c0f45 | 499 | kNSteps,2,iBin); |
4acc9d4d | 500 | fAntiProtonContainer->SetBinLimits(0,gY); //rapidity |
501 | fAntiProtonContainer->SetBinLimits(1,gPt); //pT | |
e56f08ed | 502 | |
503 | //Initialize the QA | |
504 | if(!fInitQAFlag) InitQA(); | |
4acc9d4d | 505 | } |
506 | ||
734d2c12 | 507 | //____________________________________________________________________// |
2b748670 | 508 | Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) { |
9cd594db | 509 | //Read the containers from the existing file |
2b748670 | 510 | Bool_t status = kTRUE; |
511 | ||
734d2c12 | 512 | TFile *file = TFile::Open(filename); |
2b748670 | 513 | if(!file) { |
514 | cout<<"Could not find the input file "<<filename<<endl; | |
515 | status = kFALSE; | |
516 | } | |
517 | ||
0ab648ea | 518 | TList *list = (TList *)file->Get("outputList"); |
2b748670 | 519 | if(list) { |
520 | cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl; | |
251e4034 | 521 | fHistYPtProtons = (TH2D *)list->At(0); |
522 | fHistYPtAntiProtons = (TH2D *)list->At(1); | |
3f6d0c08 | 523 | fHistEvents = (TH1I *)list->At(2); |
251e4034 | 524 | fProtonContainer = (AliCFContainer *)list->At(3); |
525 | fAntiProtonContainer = (AliCFContainer *)list->At(4); | |
52b04cf9 | 526 | fHistEventStats = (TH1F *)list->At(5); |
2b748670 | 527 | } |
528 | else if(!list) { | |
529 | cout<<"Retrieving objects from the file... "<<endl; | |
251e4034 | 530 | fHistYPtProtons = (TH2D *)file->Get("fHistYPtProtons"); |
531 | fHistYPtAntiProtons = (TH2D *)file->Get("fHistYPtAntiProtons"); | |
3f6d0c08 | 532 | fHistEvents = (TH1I *)file->Get("fHistEvents"); |
251e4034 | 533 | fProtonContainer = (AliCFContainer *)file->Get("containerProtons"); |
534 | fAntiProtonContainer = (AliCFContainer *)file->Get("containerAntiProtons"); | |
52b04cf9 | 535 | fHistEventStats = (TH1F *)file->Get("fHistEventStats"); |
2b748670 | 536 | } |
251e4034 | 537 | if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents) |
52b04cf9 | 538 | ||(!fProtonContainer)||(!fAntiProtonContainer)||(!fHistEventStats)) { |
2b748670 | 539 | cout<<"Input containers were not found!!!"<<endl; |
540 | status = kFALSE; | |
541 | } | |
542 | else { | |
3e23254a | 543 | //fHistYPtProtons = fProtonContainer->ShowProjection(0,1,0); |
544 | //fHistYPtAntiProtons = fAntiProtonContainer->ShowProjection(0,1,0); | |
545 | fHistYPtProtons->Sumw2(); | |
546 | fHistYPtAntiProtons->Sumw2(); | |
2b748670 | 547 | } |
548 | ||
549 | return status; | |
734d2c12 | 550 | } |
551 | ||
ce9d2201 | 552 | //____________________________________________________________________// |
553 | TList *AliProtonAnalysis::GetYRatioHistogramsInPtBins() { | |
554 | //Returns a TList obkect with the eta (or y) dependent ratios for each | |
555 | //pT bin taken from the 2D histograms (not from the containers) | |
556 | fYRatioInPtBinsList = new TList(); | |
557 | ||
558 | //Protons | |
559 | TH1D *gHistYProtons[100]; | |
560 | TString title; | |
561 | for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) { | |
562 | title = "gHistYProtons_PtBin"; title += iBin; | |
563 | gHistYProtons[iBin] = (TH1D *)fHistYPtProtons->ProjectionX(title.Data(), | |
564 | iBin, | |
71a67ee1 | 565 | iBin,"b"); |
ce9d2201 | 566 | gHistYProtons[iBin]->Sumw2(); |
567 | } | |
568 | ||
569 | //Antiprotons | |
570 | TH1D *gHistYAntiProtons[100]; | |
571 | for(Int_t iBin = 1; iBin <= fHistYPtAntiProtons->GetNbinsY(); iBin++) { | |
572 | title = "gHistYAntiProtons_PtBin"; title += iBin; | |
573 | gHistYAntiProtons[iBin] = (TH1D *)fHistYPtAntiProtons->ProjectionX(title.Data(), | |
574 | iBin, | |
71a67ee1 | 575 | iBin,"b"); |
ce9d2201 | 576 | gHistYAntiProtons[iBin]->Sumw2(); |
577 | } | |
578 | ||
579 | Double_t pTmin = fHistYPtProtons->GetYaxis()->GetXmin(); | |
580 | Double_t pTStep = (fHistYPtProtons->GetYaxis()->GetXmax() - fHistYPtProtons->GetYaxis()->GetXmin())/fHistYPtProtons->GetNbinsY(); | |
581 | Double_t pTmax = pTmin + pTStep; | |
582 | //Ratio | |
583 | TH1D *gHistYRatio[100]; | |
584 | for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) { | |
585 | title = "gHistYRatio_PtBin"; title += iBin; | |
586 | gHistYRatio[iBin] = new TH1D(title.Data(),"", | |
587 | fHistYPtProtons->GetNbinsX(), | |
588 | fHistYPtProtons->GetXaxis()->GetXmin(), | |
589 | fHistYPtProtons->GetXaxis()->GetXmax()); | |
590 | title = "Pt: "; title += pTmin; title += " - "; title += pTmax; | |
591 | gHistYRatio[iBin]->SetTitle(title.Data()); | |
592 | gHistYRatio[iBin]->GetYaxis()->SetTitle("#bar{p}/p"); | |
593 | gHistYRatio[iBin]->GetXaxis()->SetTitle(fHistYPtProtons->GetXaxis()->GetTitle()); | |
594 | gHistYRatio[iBin]->Divide(gHistYAntiProtons[iBin], | |
71a67ee1 | 595 | gHistYProtons[iBin],1.0,1.0,"b"); |
ce9d2201 | 596 | fYRatioInPtBinsList->Add(gHistYRatio[iBin]); |
597 | pTmin += pTStep; | |
598 | pTmax += pTStep; | |
599 | } | |
600 | ||
601 | return fYRatioInPtBinsList; | |
602 | } | |
603 | ||
734d2c12 | 604 | //____________________________________________________________________// |
605 | TH1D *AliProtonAnalysis::GetProtonYHistogram() { | |
9cd594db | 606 | //Get the y histogram for protons |
3f6d0c08 | 607 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
251e4034 | 608 | |
f203beb9 | 609 | //TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),""); |
8d64ac62 | 610 | TH1D *fYProtons = fProtonContainer->ShowProjection(0,kStepInPhaseSpace); //variable-step |
251e4034 | 611 | |
734d2c12 | 612 | fYProtons->SetStats(kFALSE); |
3f6d0c08 | 613 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 614 | fYProtons->SetTitle("dN/dy protons"); |
615 | fYProtons->SetMarkerStyle(kFullCircle); | |
616 | fYProtons->SetMarkerColor(4); | |
3f6d0c08 | 617 | if(nAnalyzedEvents > 0) |
251e4034 | 618 | fYProtons->Scale(1./nAnalyzedEvents); |
619 | ||
734d2c12 | 620 | return fYProtons; |
621 | } | |
622 | ||
623 | //____________________________________________________________________// | |
624 | TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() { | |
9cd594db | 625 | //Get the y histogram for antiprotons |
3f6d0c08 | 626 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 627 | |
f203beb9 | 628 | //TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),""); |
8d64ac62 | 629 | TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,kStepInPhaseSpace);//variable-step |
251e4034 | 630 | |
734d2c12 | 631 | fYAntiProtons->SetStats(kFALSE); |
3f6d0c08 | 632 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 633 | fYAntiProtons->SetTitle("dN/dy antiprotons"); |
634 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
635 | fYAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 636 | if(nAnalyzedEvents > 0) |
637 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 638 | |
639 | return fYAntiProtons; | |
640 | } | |
641 | ||
642 | //____________________________________________________________________// | |
643 | TH1D *AliProtonAnalysis::GetProtonPtHistogram() { | |
9cd594db | 644 | //Get the Pt histogram for protons |
3f6d0c08 | 645 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 646 | |
f203beb9 | 647 | //TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); |
8d64ac62 | 648 | TH1D *fPtProtons = fProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step |
251e4034 | 649 | |
734d2c12 | 650 | fPtProtons->SetStats(kFALSE); |
3f6d0c08 | 651 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 652 | fPtProtons->SetTitle("dN/dPt protons"); |
653 | fPtProtons->SetMarkerStyle(kFullCircle); | |
654 | fPtProtons->SetMarkerColor(4); | |
3f6d0c08 | 655 | if(nAnalyzedEvents > 0) |
656 | fPtProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 657 | |
658 | return fPtProtons; | |
659 | } | |
660 | ||
661 | //____________________________________________________________________// | |
662 | TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() { | |
9cd594db | 663 | //Get the Pt histogram for antiprotons |
3f6d0c08 | 664 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 665 | |
f203beb9 | 666 | //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); |
8d64ac62 | 667 | TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step |
251e4034 | 668 | |
734d2c12 | 669 | fPtAntiProtons->SetStats(kFALSE); |
3f6d0c08 | 670 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 671 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); |
672 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
673 | fPtAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 674 | if(nAnalyzedEvents > 0) |
675 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 676 | |
677 | return fPtAntiProtons; | |
678 | } | |
679 | ||
251e4034 | 680 | //____________________________________________________________________// |
681 | TH1D *AliProtonAnalysis::GetProtonCorrectedYHistogram() { | |
9cd594db | 682 | //Get the corrected y histogram for protons |
251e4034 | 683 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
684 | ||
71a67ee1 | 685 | TH1D *fYProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionX("fYProtons",1,fHistYPtProtons->GetYaxis()->GetNbins(),"e"); |
336ea0ff | 686 | //TH1D *fYProtons = fCorrectProtons->Project(0); //0: rapidity |
251e4034 | 687 | |
688 | fYProtons->SetStats(kFALSE); | |
689 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); | |
690 | fYProtons->GetXaxis()->SetTitle("y"); | |
691 | fYProtons->SetTitle("dN/dy protons"); | |
692 | fYProtons->SetMarkerStyle(kFullCircle); | |
693 | fYProtons->SetMarkerColor(4); | |
694 | if(nAnalyzedEvents > 0) | |
695 | fYProtons->Scale(1./nAnalyzedEvents); | |
696 | ||
697 | return fYProtons; | |
698 | } | |
699 | ||
700 | //____________________________________________________________________// | |
701 | TH1D *AliProtonAnalysis::GetAntiProtonCorrectedYHistogram() { | |
9cd594db | 702 | //Get the corrected y histogram for antiprotons |
251e4034 | 703 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
336ea0ff | 704 | |
71a67ee1 | 705 | TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionX("fYAntiProtons",1,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"e"); |
336ea0ff | 706 | //TH1D *fYAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity |
251e4034 | 707 | |
708 | fYAntiProtons->SetStats(kFALSE); | |
709 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); | |
710 | fYAntiProtons->GetXaxis()->SetTitle("y"); | |
711 | fYAntiProtons->SetTitle("dN/dy protons"); | |
712 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
713 | fYAntiProtons->SetMarkerColor(4); | |
714 | if(nAnalyzedEvents > 0) | |
715 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
716 | ||
717 | return fYAntiProtons; | |
718 | } | |
719 | ||
720 | //____________________________________________________________________// | |
721 | TH1D *AliProtonAnalysis::GetProtonCorrectedPtHistogram() { | |
9cd594db | 722 | //Get the corrected Pt histogram for protons |
251e4034 | 723 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
724 | ||
37567742 | 725 | //TH1D *fPtProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionY("fPtProtons",2,fHistYPtProtons->GetXaxis()->GetNbins()-1,"e"); |
726 | TH1D *fPtProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionY("fPtProtons",3,7,"e"); //3,7: |y| < 0.5 | |
336ea0ff | 727 | //TH1D *fPtProtons = fCorrectProtons->Project(0); //0: rapidity |
251e4034 | 728 | |
729 | fPtProtons->SetStats(kFALSE); | |
730 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); | |
731 | fPtProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
732 | fPtProtons->SetTitle("dN/dPt protons"); | |
733 | fPtProtons->SetMarkerStyle(kFullCircle); | |
734 | fPtProtons->SetMarkerColor(4); | |
735 | if(nAnalyzedEvents > 0) | |
736 | fPtProtons->Scale(1./nAnalyzedEvents); | |
737 | ||
738 | return fPtProtons; | |
739 | } | |
740 | ||
741 | //____________________________________________________________________// | |
742 | TH1D *AliProtonAnalysis::GetAntiProtonCorrectedPtHistogram() { | |
9cd594db | 743 | //Get the corrected Pt histogram for antiprotons |
251e4034 | 744 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
745 | ||
37567742 | 746 | //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionY("fPtAntiProtons",2,fHistYPtAntiProtons->GetXaxis()->GetNbins()-1,"e"); |
747 | TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionY("fPtAntiProtons",3,7,"e"); //3,7: |y| < 0.5 | |
336ea0ff | 748 | //TH1D *fPtAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity |
251e4034 | 749 | |
750 | fPtAntiProtons->SetStats(kFALSE); | |
751 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); | |
752 | fPtAntiProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
753 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); | |
754 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
755 | fPtAntiProtons->SetMarkerColor(4); | |
756 | if(nAnalyzedEvents > 0) | |
757 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
758 | ||
759 | return fPtAntiProtons; | |
760 | } | |
761 | ||
734d2c12 | 762 | //____________________________________________________________________// |
763 | TH1D *AliProtonAnalysis::GetYRatioHistogram() { | |
3e23254a | 764 | //Returns the rapidity dependence of the ratio (uncorrected) |
734d2c12 | 765 | TH1D *fYProtons = GetProtonYHistogram(); |
766 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
767 | ||
768 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 769 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0,"e"); |
734d2c12 | 770 | hRatioY->SetMarkerStyle(kFullCircle); |
771 | hRatioY->SetMarkerColor(4); | |
772 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
773 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
774 | hRatioY->GetXaxis()->SetTitle("y"); | |
775 | hRatioY->GetXaxis()->SetTitleColor(1); | |
776 | hRatioY->SetStats(kFALSE); | |
777 | ||
778 | return hRatioY; | |
779 | } | |
780 | ||
3e23254a | 781 | //____________________________________________________________________// |
336ea0ff | 782 | TH1D *AliProtonAnalysis::GetYRatioCorrectedHistogram() { |
783 | //TH2D *gCorrectionProtons, | |
784 | //TH2D *gCorrectionAntiProtons) { | |
3e23254a | 785 | //Returns the rapidity dependence of the ratio (corrected) |
336ea0ff | 786 | //fHistYPtProtons->Multiply(gCorrectionProtons); |
787 | TH1D *fYProtons = GetProtonCorrectedYHistogram(); | |
788 | //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons); | |
789 | TH1D *fYAntiProtons = GetAntiProtonCorrectedYHistogram(); | |
3e23254a | 790 | |
791 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 792 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0,"e"); |
3e23254a | 793 | hRatioY->SetMarkerStyle(kFullCircle); |
794 | hRatioY->SetMarkerColor(4); | |
795 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
796 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
797 | hRatioY->GetXaxis()->SetTitle("y"); | |
798 | hRatioY->GetXaxis()->SetTitleColor(1); | |
799 | hRatioY->SetStats(kFALSE); | |
800 | ||
801 | return hRatioY; | |
802 | } | |
803 | ||
734d2c12 | 804 | //____________________________________________________________________// |
805 | TH1D *AliProtonAnalysis::GetPtRatioHistogram() { | |
3e23254a | 806 | //Returns the pT dependence of the ratio (uncorrected) |
734d2c12 | 807 | TH1D *fPtProtons = GetProtonPtHistogram(); |
808 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
809 | ||
810 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 811 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0,"e"); |
734d2c12 | 812 | hRatioPt->SetMarkerStyle(kFullCircle); |
813 | hRatioPt->SetMarkerColor(4); | |
814 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
815 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
816 | hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
817 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
818 | hRatioPt->SetStats(kFALSE); | |
819 | ||
820 | return hRatioPt; | |
821 | } | |
822 | ||
3e23254a | 823 | //____________________________________________________________________// |
336ea0ff | 824 | TH1D *AliProtonAnalysis::GetPtRatioCorrectedHistogram() { |
825 | //TH2D *gCorrectionProtons, | |
826 | //TH2D *gCorrectionAntiProtons) { | |
3e23254a | 827 | //Returns the Pt dependence of the ratio (corrected) |
336ea0ff | 828 | //fHistYPtProtons->Multiply(gCorrectionProtons); |
829 | TH1D *fPtProtons = GetProtonCorrectedPtHistogram(); | |
830 | //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons); | |
831 | TH1D *fPtAntiProtons = GetAntiProtonCorrectedPtHistogram(); | |
3e23254a | 832 | |
833 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 834 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0,"e"); |
3e23254a | 835 | hRatioPt->SetMarkerStyle(kFullCircle); |
836 | hRatioPt->SetMarkerColor(4); | |
837 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
838 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
839 | hRatioPt->GetXaxis()->SetTitle("y"); | |
840 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
841 | hRatioPt->SetStats(kFALSE); | |
842 | ||
843 | return hRatioPt; | |
844 | } | |
845 | ||
734d2c12 | 846 | //____________________________________________________________________// |
847 | TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() { | |
3e23254a | 848 | //Returns the rapidity dependence of the asymmetry (uncorrected) |
734d2c12 | 849 | TH1D *fYProtons = GetProtonYHistogram(); |
850 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
851 | ||
852 | TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
853 | hsum->Add(fYProtons,fYAntiProtons,1.0,1.0); | |
854 | ||
855 | TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
856 | hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0); | |
857 | ||
858 | TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 859 | hAsymmetryY->Divide(hdiff,hsum,2.0,1.,"e"); |
734d2c12 | 860 | hAsymmetryY->SetMarkerStyle(kFullCircle); |
861 | hAsymmetryY->SetMarkerColor(4); | |
862 | hAsymmetryY->GetYaxis()->SetTitle("A_{p}"); | |
863 | hAsymmetryY->GetYaxis()->SetTitleOffset(1.4); | |
864 | hAsymmetryY->GetXaxis()->SetTitle("y"); | |
865 | hAsymmetryY->GetXaxis()->SetTitleColor(1); | |
866 | hAsymmetryY->SetStats(kFALSE); | |
867 | ||
868 | return hAsymmetryY; | |
869 | } | |
870 | ||
871 | //____________________________________________________________________// | |
872 | TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() { | |
3e23254a | 873 | //Returns the pT dependence of the asymmetry (uncorrected) |
734d2c12 | 874 | TH1D *fPtProtons = GetProtonPtHistogram(); |
875 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
876 | ||
877 | TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
878 | hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0); | |
879 | ||
880 | TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
881 | hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0); | |
882 | ||
883 | TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 884 | hAsymmetryPt->Divide(hdiff,hsum,2.0,1.,"e"); |
734d2c12 | 885 | hAsymmetryPt->SetMarkerStyle(kFullCircle); |
886 | hAsymmetryPt->SetMarkerColor(4); | |
887 | hAsymmetryPt->GetYaxis()->SetTitle("A_{p}"); | |
888 | hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4); | |
889 | hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
890 | hAsymmetryPt->GetXaxis()->SetTitleColor(1); | |
891 | hAsymmetryPt->SetStats(kFALSE); | |
892 | ||
893 | return hAsymmetryPt; | |
894 | } | |
895 | ||
896 | //____________________________________________________________________// | |
6667f3a7 | 897 | void AliProtonAnalysis::Analyze(AliESDEvent* esd, |
898 | const AliESDVertex *vertex) { | |
e4358d7f | 899 | //Main analysis part - ESD |
0ab648ea | 900 | Int_t nTracks = 0; |
901 | Int_t nIdentifiedProtons = 0, nIdentifiedAntiProtons = 0; | |
902 | Int_t nSurvivedProtons = 0, nSurvivedAntiProtons = 0; | |
ff672838 | 903 | |
904 | //=========================================// | |
905 | //Aleph parametrization | |
906 | Double_t fAlephParameters[5]; | |
907 | if(fProtonAnalysisBase->GetMCAnalysisMode()) { | |
908 | fAlephParameters[0] = 2.15898e+00/50.; | |
909 | fAlephParameters[1] = 1.75295e+01; | |
910 | fAlephParameters[2] = 3.40030e-09; | |
911 | fAlephParameters[3] = 1.96178e+00; | |
912 | fAlephParameters[4] = 3.91720e+00; | |
913 | } | |
914 | else { | |
915 | fAlephParameters[0] = 0.0283086; | |
916 | fAlephParameters[1] = 2.63394e+01; | |
917 | fAlephParameters[2] = 5.04114e-11; | |
918 | fAlephParameters[3] = 2.12543e+00; | |
919 | fAlephParameters[4] = 4.88663e+00; | |
920 | } | |
921 | AliESDpid *fESDpid = new AliESDpid(); | |
922 | AliTPCPIDResponse tpcResponse = fESDpid->GetTPCResponse(); | |
923 | tpcResponse.SetBetheBlochParameters(fAlephParameters[0],fAlephParameters[1],fAlephParameters[2],fAlephParameters[3],fAlephParameters[4]); | |
924 | //=========================================// | |
0ab648ea | 925 | |
f203beb9 | 926 | fHistEvents->Fill(1); //number of analyzed events |
251e4034 | 927 | Double_t containerInput[2] ; |
9cd594db | 928 | Double_t gPt = 0.0, gP = 0.0; |
afc2ac17 | 929 | Float_t dcaXY = 0.0, dcaZ = 0.0; |
930 | ||
0ab648ea | 931 | nTracks = esd->GetNumberOfTracks(); |
932 | for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) { | |
6667f3a7 | 933 | AliESDtrack* track = esd->GetTrack(iTracks); |
df1e8a78 | 934 | AliESDtrack trackTPC; |
2b748670 | 935 | |
32a2ebb6 | 936 | //in case it's a TPC only track relate it to the proper vertex |
0ab648ea | 937 | /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC) { |
df1e8a78 | 938 | Float_t p[2],cov[3]; |
939 | track->GetImpactParametersTPC(p,cov); | |
940 | if (p[0]==0 && p[1]==0) | |
6667f3a7 | 941 | track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig); |
df1e8a78 | 942 | if (!track->FillTPCOnlyTrack(trackTPC)) { |
32a2ebb6 | 943 | continue; |
df1e8a78 | 944 | } |
945 | track = &trackTPC ; | |
0ab648ea | 946 | }*/ |
df1e8a78 | 947 | |
37cb8683 | 948 | Int_t fIdxInt[200]; |
949 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
950 | Int_t npointsTPCdEdx = track->GetTPCsignalN(); | |
4de4661f | 951 | Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance. |
71a67ee1 | 952 | Double_t dca3D = 0.0; |
37cb8683 | 953 | |
0ab648ea | 954 | if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) { |
955 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
956 | if(!tpcTrack) continue; | |
957 | gPt = tpcTrack->Pt(); | |
b8cca027 | 958 | //gP = tpcTrack->P(); |
959 | gP = track->GetInnerParam()->P(); | |
4de4661f | 960 | tpcTrack->PropagateToDCA(vertex, |
961 | esd->GetMagneticField(), | |
962 | 100.,dca,cov); | |
71a67ee1 | 963 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + |
964 | TMath::Power(dca[1],2)); | |
4de4661f | 965 | |
e56f08ed | 966 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { |
30f87a5b | 967 | if(fProtonAnalysisBase->IsAccepted(track)) { |
4de4661f | 968 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 969 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
970 | ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(), | |
4de4661f | 971 | tpcTrack->Phi()*180./TMath::Pi(), |
972 | npointsTPCdEdx); | |
ff672838 | 973 | ((TH3F *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(), |
4de4661f | 974 | tpcTrack->Phi()*180./TMath::Pi(), |
975 | nClustersTPC); | |
ff672838 | 976 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, |
4de4661f | 977 | tpcTrack->Phi()*180./TMath::Pi(), |
978 | npointsTPCdEdx); | |
ff672838 | 979 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, |
4de4661f | 980 | tpcTrack->Phi()*180./TMath::Pi(), |
981 | nClustersTPC); | |
f0e42d04 | 982 | if(track->Charge() > 0) |
983 | ((TH2F *)(fQA2DList->At(20)))->Fill(gP,track->GetTPCsignal()); | |
984 | if(track->Charge() < 0) | |
985 | ((TH2F *)(fQA2DList->At(21)))->Fill(gP,track->GetTPCsignal()); | |
e56f08ed | 986 | }//quality cuts |
987 | }//primary cuts | |
4de4661f | 988 | |
989 | if(fProtonAnalysisBase->IsProton(track)) { | |
990 | //Step: kStepIdentified | |
991 | if(fProtonAnalysisBase->GetEtaMode()) | |
992 | containerInput[0] = tpcTrack->Eta(); | |
993 | else | |
994 | containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(), | |
995 | tpcTrack->Py(), | |
996 | tpcTrack->Pz()); | |
997 | containerInput[1] = gPt; | |
998 | if(tpcTrack->Charge() > 0) { | |
735cc63d | 999 | nIdentifiedProtons += 1; |
4de4661f | 1000 | fProtonContainer->Fill(containerInput,kStepIdentified); |
1001 | }//protons | |
1002 | else if(tpcTrack->Charge() < 0) { | |
735cc63d | 1003 | nIdentifiedAntiProtons += 1; |
4de4661f | 1004 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); |
1005 | }//protons | |
1006 | ||
1007 | //Step: kStepIsPrimary | |
1008 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1009 | if(tpcTrack->Charge() > 0) | |
1010 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1011 | else if(tpcTrack->Charge() < 0) | |
e56f08ed | 1012 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); |
4de4661f | 1013 | |
1014 | FillQA(esd,vertex,track); | |
1015 | ||
1016 | //Step: kStepSurvived | |
30f87a5b | 1017 | if(fProtonAnalysisBase->IsAccepted(track)) { |
e56f08ed | 1018 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 1019 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
1020 | ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(), | |
e56f08ed | 1021 | tpcTrack->Phi()*180./TMath::Pi(), |
1022 | npointsTPCdEdx); | |
ff672838 | 1023 | ((TH3F *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(), |
e56f08ed | 1024 | tpcTrack->Phi()*180./TMath::Pi(), |
1025 | nClustersTPC); | |
ff672838 | 1026 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, |
e56f08ed | 1027 | tpcTrack->Phi()*180./TMath::Pi(), |
1028 | npointsTPCdEdx); | |
ff672838 | 1029 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, |
e56f08ed | 1030 | tpcTrack->Phi()*180./TMath::Pi(), |
1031 | nClustersTPC); | |
e56f08ed | 1032 | |
4de4661f | 1033 | if(tpcTrack->Charge() > 0) { |
1034 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1035 | ((TH2F *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(), |
4de4661f | 1036 | tpcTrack->Phi()*180./TMath::Pi()); |
7deb716b | 1037 | if(fProtonAnalysisBase->GetEtaMode()) { |
1038 | ((TH3F *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(), | |
1039 | tpcTrack->Pt(), | |
3770a478 | 1040 | dca[0]); |
7deb716b | 1041 | ((TH3F *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(), |
1042 | tpcTrack->Pt(), | |
3770a478 | 1043 | dca[1]); |
7deb716b | 1044 | ((TH3F *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(), |
1045 | tpcTrack->Pt(), | |
1046 | TMath::Abs(dca3D)); | |
1047 | } | |
1048 | else { | |
1049 | ((TH3F *)(fQA2DList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1050 | tpcTrack->Pt(), | |
3770a478 | 1051 | dca[0]); |
7deb716b | 1052 | ((TH3F *)(fQA2DList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1053 | tpcTrack->Pt(), | |
3770a478 | 1054 | dca[1]); |
7deb716b | 1055 | ((TH3F *)(fQA2DList->At(18)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1056 | tpcTrack->Pt(), | |
1057 | TMath::Abs(dca3D)); | |
1058 | } | |
4de4661f | 1059 | }//protons |
1060 | else if(tpcTrack->Charge() < 0) { | |
1061 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1062 | ((TH2F *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(), |
4de4661f | 1063 | tpcTrack->Phi()*180./TMath::Pi()); |
7deb716b | 1064 | if(fProtonAnalysisBase->GetEtaMode()) { |
1065 | ((TH3F *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(), | |
1066 | tpcTrack->Pt(), | |
3770a478 | 1067 | dca[0]); |
7deb716b | 1068 | ((TH3F *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(), |
1069 | tpcTrack->Pt(), | |
3770a478 | 1070 | dca[1]); |
7deb716b | 1071 | ((TH3F *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(), |
1072 | tpcTrack->Pt(), | |
1073 | TMath::Abs(dca3D)); | |
1074 | } | |
1075 | else { | |
1076 | ((TH3F *)(fQA2DList->At(16)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1077 | tpcTrack->Pt(), | |
3770a478 | 1078 | dca[0]); |
7deb716b | 1079 | ((TH3F *)(fQA2DList->At(17)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1080 | tpcTrack->Pt(), | |
3770a478 | 1081 | dca[1]); |
7deb716b | 1082 | ((TH3F *)(fQA2DList->At(19)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1083 | tpcTrack->Pt(), | |
1084 | TMath::Abs(dca3D)); | |
1085 | } | |
4de4661f | 1086 | }//antiprotons |
1087 | ||
1088 | //Step: kStepInPhaseSpace | |
1089 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1090 | if(tpcTrack->Charge() > 0) { | |
1091 | nSurvivedProtons += 1; | |
1092 | fHistYPtProtons->Fill(containerInput[0], | |
1093 | containerInput[1]); | |
1094 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1095 | }//protons | |
1096 | else if(tpcTrack->Charge() < 0) { | |
1097 | nSurvivedAntiProtons += 1; | |
1098 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1099 | containerInput[1]); | |
1100 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1101 | }//antiprotons | |
1102 | }//Step: kStepInPhaseSpace | |
1103 | }//Step: kStepSurvived | |
1104 | }//Step: kStepIsPrimary | |
1105 | }//Step: kStepIdentified | |
0ab648ea | 1106 | }//TPC only tracks |
afc2ac17 | 1107 | if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kFullHybrid) { |
1108 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
1109 | if(!tpcTrack) continue; | |
1110 | ||
1111 | AliExternalTrackParam cParam; | |
1112 | /*Double_t phi = tpcTrack->Phi(); | |
1113 | Double_t eta = tpcTrack->Eta(); | |
1114 | Double_t gPx = tpcTrack->Px(); | |
1115 | Double_t gPy = tpcTrack->Py(); | |
1116 | Double_t gPz = tpcTrack->Pz();*/ | |
1117 | gPt = tpcTrack->Pt(); | |
1118 | //gP = tpcTrack->P(); | |
1119 | gP = track->GetInnerParam()->P(); | |
1120 | track->RelateToVertex(vertex, | |
1121 | esd->GetMagneticField(), | |
1122 | 100.,&cParam); | |
1123 | track->GetImpactParameters(dcaXY,dcaZ); | |
1124 | dca[0] = dcaXY; dca[1] = dcaZ; | |
1125 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + | |
1126 | TMath::Power(dca[1],2)); | |
1127 | ||
1128 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1129 | if(fProtonAnalysisBase->IsAccepted(track)) { | |
1130 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); | |
1131 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); | |
1132 | ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(), | |
1133 | tpcTrack->Phi()*180./TMath::Pi(), | |
1134 | npointsTPCdEdx); | |
1135 | ((TH3F *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(), | |
1136 | tpcTrack->Phi()*180./TMath::Pi(), | |
1137 | nClustersTPC); | |
1138 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, | |
1139 | tpcTrack->Phi()*180./TMath::Pi(), | |
1140 | npointsTPCdEdx); | |
1141 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, | |
1142 | tpcTrack->Phi()*180./TMath::Pi(), | |
1143 | nClustersTPC); | |
f0e42d04 | 1144 | if(track->Charge() > 0) |
1145 | ((TH2F *)(fQA2DList->At(20)))->Fill(gP,track->GetTPCsignal()); | |
1146 | if(track->Charge() < 0) | |
1147 | ((TH2F *)(fQA2DList->At(21)))->Fill(gP,track->GetTPCsignal()); | |
afc2ac17 | 1148 | }//quality cuts |
1149 | }//primary cuts | |
1150 | ||
1151 | if(fProtonAnalysisBase->IsProton(track)) { | |
1152 | //Step: kStepIdentified | |
1153 | if(fProtonAnalysisBase->GetEtaMode()) | |
1154 | containerInput[0] = tpcTrack->Eta(); | |
1155 | else | |
1156 | containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(), | |
1157 | tpcTrack->Py(), | |
1158 | tpcTrack->Pz()); | |
1159 | containerInput[1] = gPt; | |
1160 | if(tpcTrack->Charge() > 0) { | |
1161 | nIdentifiedProtons += 1; | |
1162 | fProtonContainer->Fill(containerInput,kStepIdentified); | |
1163 | }//protons | |
1164 | else if(tpcTrack->Charge() < 0) { | |
1165 | nIdentifiedAntiProtons += 1; | |
1166 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); | |
1167 | }//protons | |
1168 | ||
1169 | //Step: kStepIsPrimary | |
1170 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1171 | if(tpcTrack->Charge() > 0) | |
1172 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1173 | else if(tpcTrack->Charge() < 0) | |
1174 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1175 | ||
1176 | FillQA(esd,vertex,track); | |
1177 | ||
1178 | //Step: kStepSurvived | |
1179 | if(fProtonAnalysisBase->IsAccepted(track)) { | |
1180 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); | |
1181 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); | |
1182 | ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(), | |
1183 | tpcTrack->Phi()*180./TMath::Pi(), | |
1184 | npointsTPCdEdx); | |
1185 | ((TH3F *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(), | |
1186 | tpcTrack->Phi()*180./TMath::Pi(), | |
1187 | nClustersTPC); | |
1188 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, | |
1189 | tpcTrack->Phi()*180./TMath::Pi(), | |
1190 | npointsTPCdEdx); | |
1191 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, | |
1192 | tpcTrack->Phi()*180./TMath::Pi(), | |
1193 | nClustersTPC); | |
1194 | ||
1195 | if(tpcTrack->Charge() > 0) { | |
1196 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
1197 | ((TH2F *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(), | |
1198 | tpcTrack->Phi()*180./TMath::Pi()); | |
1199 | if(fProtonAnalysisBase->GetEtaMode()) { | |
1200 | ((TH3F *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(), | |
1201 | tpcTrack->Pt(), | |
3770a478 | 1202 | dca[0]); |
afc2ac17 | 1203 | ((TH3F *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(), |
1204 | tpcTrack->Pt(), | |
3770a478 | 1205 | dca[1]); |
afc2ac17 | 1206 | ((TH3F *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(), |
1207 | tpcTrack->Pt(), | |
1208 | TMath::Abs(dca3D)); | |
1209 | } | |
1210 | else { | |
1211 | ((TH3F *)(fQA2DList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1212 | tpcTrack->Pt(), | |
3770a478 | 1213 | dca[0]); |
afc2ac17 | 1214 | ((TH3F *)(fQA2DList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1215 | tpcTrack->Pt(), | |
3770a478 | 1216 | dca[1]); |
afc2ac17 | 1217 | ((TH3F *)(fQA2DList->At(18)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1218 | tpcTrack->Pt(), | |
1219 | TMath::Abs(dca3D)); | |
1220 | } | |
1221 | }//protons | |
1222 | else if(tpcTrack->Charge() < 0) { | |
1223 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
1224 | ((TH2F *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(), | |
1225 | tpcTrack->Phi()*180./TMath::Pi()); | |
1226 | if(fProtonAnalysisBase->GetEtaMode()) { | |
1227 | ((TH3F *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(), | |
1228 | tpcTrack->Pt(), | |
3770a478 | 1229 | dca[0]); |
afc2ac17 | 1230 | ((TH3F *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(), |
1231 | tpcTrack->Pt(), | |
3770a478 | 1232 | dca[1]); |
afc2ac17 | 1233 | ((TH3F *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(), |
1234 | tpcTrack->Pt(), | |
1235 | TMath::Abs(dca3D)); | |
1236 | } | |
1237 | else { | |
1238 | ((TH3F *)(fQA2DList->At(16)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1239 | tpcTrack->Pt(), | |
3770a478 | 1240 | dca[0]); |
afc2ac17 | 1241 | ((TH3F *)(fQA2DList->At(17)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1242 | tpcTrack->Pt(), | |
3770a478 | 1243 | dca[1]); |
afc2ac17 | 1244 | ((TH3F *)(fQA2DList->At(19)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1245 | tpcTrack->Pt(), | |
1246 | TMath::Abs(dca3D)); | |
1247 | } | |
1248 | }//antiprotons | |
1249 | ||
1250 | //Step: kStepInPhaseSpace | |
1251 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1252 | if(tpcTrack->Charge() > 0) { | |
1253 | nSurvivedProtons += 1; | |
1254 | fHistYPtProtons->Fill(containerInput[0], | |
1255 | containerInput[1]); | |
1256 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1257 | }//protons | |
1258 | else if(tpcTrack->Charge() < 0) { | |
1259 | nSurvivedAntiProtons += 1; | |
1260 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1261 | containerInput[1]); | |
1262 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1263 | }//antiprotons | |
1264 | }//Step: kStepInPhaseSpace | |
1265 | }//Step: kStepSurvived | |
1266 | }//Step: kStepIsPrimary | |
1267 | }//Step: kStepIdentified | |
1268 | }//Full hybrid | |
0ab648ea | 1269 | else if(fProtonAnalysisBase->GetAnalysisMode() == AliProtonAnalysisBase::kGlobal) { |
1270 | gPt = track->Pt(); | |
b8cca027 | 1271 | //gP = track->P(); |
1272 | gP = track->GetInnerParam()->P(); | |
1273 | ||
4de4661f | 1274 | track->PropagateToDCA(vertex, |
1275 | esd->GetMagneticField(), | |
1276 | 100.,dca,cov); | |
71a67ee1 | 1277 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + |
1278 | TMath::Power(dca[1],2)); | |
1279 | ||
4de4661f | 1280 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { |
30f87a5b | 1281 | if(fProtonAnalysisBase->IsAccepted(track)) { |
4de4661f | 1282 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 1283 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
1284 | ((TH3F *)(fQA2DList->At(4)))->Fill(track->Eta(), | |
4de4661f | 1285 | track->Phi()*180./TMath::Pi(), |
1286 | npointsTPCdEdx); | |
ff672838 | 1287 | ((TH3F *)(fQA2DList->At(6)))->Fill(track->Eta(), |
4de4661f | 1288 | track->Phi()*180./TMath::Pi(), |
1289 | nClustersTPC); | |
ff672838 | 1290 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, |
4de4661f | 1291 | track->Phi()*180./TMath::Pi(), |
1292 | npointsTPCdEdx); | |
ff672838 | 1293 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, |
4de4661f | 1294 | track->Phi()*180./TMath::Pi(), |
1295 | nClustersTPC); | |
f0e42d04 | 1296 | if(track->Charge() > 0) |
1297 | ((TH2F *)(fQA2DList->At(20)))->Fill(gP,track->GetTPCsignal()); | |
1298 | if(track->Charge() < 0) | |
1299 | ((TH2F *)(fQA2DList->At(21)))->Fill(gP,track->GetTPCsignal()); | |
e56f08ed | 1300 | }//quality cuts |
1301 | }//primary cuts | |
4de4661f | 1302 | |
1303 | if(fProtonAnalysisBase->IsProton(track)) { | |
1304 | //Step: kStepIdentified | |
1305 | if(fProtonAnalysisBase->GetEtaMode()) | |
1306 | containerInput[0] = track->Eta(); | |
1307 | else | |
1308 | containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(), | |
1309 | track->Py(), | |
1310 | track->Pz()); | |
1311 | containerInput[1] = gPt; | |
1312 | if(track->Charge() > 0) { | |
0ab648ea | 1313 | nIdentifiedProtons += 1; |
4de4661f | 1314 | fProtonContainer->Fill(containerInput,kStepIdentified); |
1315 | }//protons | |
1316 | else if(track->Charge() < 0) { | |
0ab648ea | 1317 | nIdentifiedAntiProtons += 1; |
4de4661f | 1318 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); |
1319 | }//protons | |
1320 | ||
1321 | //Step: kStepIsPrimary | |
1322 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1323 | if(track->Charge() > 0) | |
1324 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1325 | else if(track->Charge() < 0) | |
e56f08ed | 1326 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); |
4de4661f | 1327 | |
1328 | FillQA(esd,vertex,track); | |
1329 | ||
1330 | //Step: kStepSurvived | |
30f87a5b | 1331 | if(fProtonAnalysisBase->IsAccepted(track)) { |
e56f08ed | 1332 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 1333 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
1334 | ((TH3F *)(fQA2DList->At(5)))->Fill(track->Eta(), | |
e56f08ed | 1335 | track->Phi()*180./TMath::Pi(), |
1336 | npointsTPCdEdx); | |
ff672838 | 1337 | ((TH3F *)(fQA2DList->At(7)))->Fill(track->Eta(), |
e56f08ed | 1338 | track->Phi()*180./TMath::Pi(), |
1339 | nClustersTPC); | |
ff672838 | 1340 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, |
e56f08ed | 1341 | track->Phi()*180./TMath::Pi(), |
1342 | npointsTPCdEdx); | |
ff672838 | 1343 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, |
e56f08ed | 1344 | track->Phi()*180./TMath::Pi(), |
1345 | nClustersTPC); | |
e56f08ed | 1346 | |
4de4661f | 1347 | if(track->Charge() > 0) { |
1348 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1349 | ((TH2F *)(fQA2DList->At(12)))->Fill(track->Eta(), |
4de4661f | 1350 | track->Phi()*180./TMath::Pi()); |
7deb716b | 1351 | if(fProtonAnalysisBase->GetEtaMode()) { |
1352 | ((TH3F *)(fQA2DList->At(14)))->Fill(track->Eta(), | |
1353 | track->Pt(), | |
3770a478 | 1354 | dca[0]); |
7deb716b | 1355 | ((TH3F *)(fQA2DList->At(15)))->Fill(track->Eta(), |
1356 | track->Pt(), | |
3770a478 | 1357 | dca[1]); |
7deb716b | 1358 | ((TH3F *)(fQA2DList->At(18)))->Fill(track->Eta(), |
1359 | track->Pt(), | |
1360 | TMath::Abs(dca3D)); | |
1361 | ||
1362 | } | |
1363 | else { | |
1364 | ((TH3F *)(fQA2DList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), | |
1365 | track->Pt(), | |
3770a478 | 1366 | dca[0]); |
7deb716b | 1367 | ((TH3F *)(fQA2DList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1368 | track->Pt(), | |
3770a478 | 1369 | dca[1]); |
7deb716b | 1370 | ((TH3F *)(fQA2DList->At(18)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1371 | track->Pt(), | |
1372 | TMath::Abs(dca3D)); | |
1373 | } | |
4de4661f | 1374 | }//protons |
1375 | else if(track->Charge() < 0) { | |
1376 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1377 | ((TH2F *)(fQA2DList->At(13)))->Fill(track->Eta(), |
4de4661f | 1378 | track->Phi()*180./TMath::Pi()); |
7deb716b | 1379 | if(fProtonAnalysisBase->GetEtaMode()) { |
1380 | ((TH3F *)(fQA2DList->At(16)))->Fill(track->Eta(), | |
1381 | track->Pt(), | |
3770a478 | 1382 | dca[0]); |
7deb716b | 1383 | ((TH3F *)(fQA2DList->At(17)))->Fill(track->Eta(), |
1384 | track->Pt(), | |
3770a478 | 1385 | dca[1]); |
7deb716b | 1386 | ((TH3F *)(fQA2DList->At(19)))->Fill(track->Eta(), |
1387 | track->Pt(), | |
1388 | TMath::Abs(dca3D)); | |
1389 | } | |
1390 | else { | |
1391 | ((TH3F *)(fQA2DList->At(16)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), | |
1392 | track->Pt(), | |
3770a478 | 1393 | dca[0]); |
7deb716b | 1394 | ((TH3F *)(fQA2DList->At(17)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1395 | track->Pt(), | |
3770a478 | 1396 | dca[1]); |
7deb716b | 1397 | ((TH3F *)(fQA2DList->At(19)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1398 | track->Pt(), | |
1399 | TMath::Abs(dca3D)); | |
1400 | } | |
4de4661f | 1401 | }//antiprotons |
1402 | ||
1403 | //Step: kStepInPhaseSpace | |
1404 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1405 | if(track->Charge() > 0) { | |
1406 | nSurvivedProtons += 1; | |
1407 | fHistYPtProtons->Fill(containerInput[0], | |
1408 | containerInput[1]); | |
1409 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1410 | }//protons | |
1411 | else if(track->Charge() < 0) { | |
1412 | nSurvivedAntiProtons += 1; | |
1413 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1414 | containerInput[1]); | |
1415 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1416 | }//antiprotons | |
1417 | }//Step: kStepInPhaseSpace | |
1418 | }//Step: kStepSurvived | |
1419 | }//Step: kStepIsPrimary | |
1420 | }//Step: kStepIdentified | |
1421 | }//Global tracking | |
734d2c12 | 1422 | }//track loop |
0ab648ea | 1423 | |
f203beb9 | 1424 | if((nIdentifiedProtons > 0)||(nIdentifiedAntiProtons > 0)) |
1425 | fHistEvents->Fill(2); //number of analyzed events with at least one (anti)proton | |
1426 | ||
0ab648ea | 1427 | if(fProtonAnalysisBase->GetDebugMode()) |
1428 | Printf("Initial number of tracks: %d | Identified (anti)protons: %d - %d | Survived (anti)protons: %d - %d",nTracks,nIdentifiedProtons,nIdentifiedAntiProtons,nSurvivedProtons,nSurvivedAntiProtons); | |
734d2c12 | 1429 | } |
1430 | ||
ee4ca40d | 1431 | //____________________________________________________________________// |
9cd594db | 1432 | void AliProtonAnalysis::Analyze(AliAODEvent* const fAOD) { |
e4358d7f | 1433 | //Main analysis part - AOD |
f203beb9 | 1434 | fHistEvents->Fill(1); //number of analyzed events |
0ab648ea | 1435 | Int_t nTracks = fAOD->GetNumberOfTracks(); |
1436 | for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) { | |
ee4ca40d | 1437 | AliAODTrack* track = fAOD->GetTrack(iTracks); |
9cd594db | 1438 | Double_t gPt = track->Pt(); |
1439 | Double_t gP = track->P(); | |
ee4ca40d | 1440 | |
1441 | //pid | |
1442 | Double_t probability[10]; | |
1443 | track->GetPID(probability); | |
1444 | Double_t rcc = 0.0; | |
0ab648ea | 1445 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP); |
ee4ca40d | 1446 | if(rcc == 0.0) continue; |
738619fd | 1447 | Double_t w[10]; |
0ab648ea | 1448 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP)/rcc; |
ee4ca40d | 1449 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w); |
1450 | if(fParticleType == 4) { | |
251e4034 | 1451 | if(track->Charge() > 0) |
9cd594db | 1452 | fHistYPtProtons->Fill(track->Y(fParticleType),gPt); |
251e4034 | 1453 | else if(track->Charge() < 0) |
9cd594db | 1454 | fHistYPtAntiProtons->Fill(track->Y(fParticleType),gPt); |
ee4ca40d | 1455 | }//proton check |
1456 | }//track loop | |
1457 | } | |
1458 | ||
e4358d7f | 1459 | //____________________________________________________________________// |
9cd594db | 1460 | void AliProtonAnalysis::Analyze(AliStack* const stack, |
da8c4c1c | 1461 | Bool_t iInclusive) { |
e4358d7f | 1462 | //Main analysis part - MC |
f203beb9 | 1463 | fHistEvents->Fill(1); //number of analyzed events |
3e23254a | 1464 | |
1465 | Int_t nParticles = 0; | |
1466 | //inclusive protons - | |
1467 | if(iInclusive) nParticles = stack->GetNtrack(); | |
1468 | else nParticles = stack->GetNprimary(); | |
1469 | ||
1470 | for(Int_t i = 0; i < nParticles; i++) { | |
e4358d7f | 1471 | TParticle *particle = stack->Particle(i); |
55f9a666 | 1472 | if(!particle) continue; |
537afcc3 | 1473 | |
da8c4c1c | 1474 | //in case of inclusive protons reject the secondaries from hadronic inter. |
1475 | if(particle->GetUniqueID() == 13) continue; | |
1476 | ||
537afcc3 | 1477 | if(TMath::Abs(particle->Eta()) > 1.0) continue; |
1478 | if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue; | |
0ab648ea | 1479 | if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue; |
537afcc3 | 1480 | |
e4358d7f | 1481 | Int_t pdgcode = particle->GetPdgCode(); |
0ab648ea | 1482 | if(pdgcode == 2212) fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(), |
1483 | particle->Py(), | |
1484 | particle->Pz()), | |
e4358d7f | 1485 | particle->Pt()); |
0ab648ea | 1486 | if(pdgcode == -2212) fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(), |
1487 | particle->Py(), | |
1488 | particle->Pz()), | |
e4358d7f | 1489 | particle->Pt()); |
251e4034 | 1490 | }//particle loop |
e4358d7f | 1491 | } |
1492 | ||
3f6d0c08 | 1493 | //____________________________________________________________________// |
1494 | Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) { | |
1495 | //calculates the mean value of the ratio/asymmetry within \pm edge | |
336ea0ff | 1496 | Double_t sum = 0.0, sumError = 0.0; |
3f6d0c08 | 1497 | Int_t nentries = 0; |
1498 | //calculate the mean | |
336ea0ff | 1499 | for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) { |
1500 | Double_t x = hist->GetBinCenter(i); | |
1501 | Double_t y = hist->GetBinContent(i); | |
3f6d0c08 | 1502 | if(TMath::Abs(x) < edge) { |
1503 | sum += y; | |
336ea0ff | 1504 | sumError += TMath::Power(hist->GetBinError(i),2); |
3f6d0c08 | 1505 | nentries += 1; |
1506 | } | |
a3bc43fb | 1507 | //Printf("eta: %lf - sum: %lf - sumError: %lf - counter: %d", |
1508 | //TMath::Abs(x),sum,sumError,nentries); | |
3f6d0c08 | 1509 | } |
1510 | Double_t mean = 0.0; | |
336ea0ff | 1511 | Double_t error = 0.0; |
1512 | if(nentries != 0) { | |
3f6d0c08 | 1513 | mean = sum/nentries; |
336ea0ff | 1514 | error = TMath::Sqrt(sumError)/nentries; |
1515 | } | |
3f6d0c08 | 1516 | |
1517 | //calculate the error | |
336ea0ff | 1518 | /*for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) { |
1519 | Double_t x = hist->GetBinCenter(i); | |
1520 | Double_t y = hist->GetBinContent(i); | |
3f6d0c08 | 1521 | if(TMath::Abs(x) < edge) { |
1522 | sum += TMath::Power((mean - y),2); | |
1523 | nentries += 1; | |
1524 | } | |
336ea0ff | 1525 | }*/ |
3f6d0c08 | 1526 | |
3f6d0c08 | 1527 | |
1528 | cout<<"========================================="<<endl; | |
1529 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
1530 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
1531 | cout<<"Mean value :"<<mean<<endl; | |
1532 | cout<<"Error: "<<error<<endl; | |
1533 | cout<<"========================================="<<endl; | |
1534 | ||
1535 | return 0; | |
1536 | } | |
1537 | ||
1538 | //____________________________________________________________________// | |
1539 | Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) { | |
1540 | //calculates the (anti)proton yields within the \pm edge | |
1541 | Double_t sum = 0.0, sumerror = 0.0; | |
1542 | Double_t error = 0.0; | |
1543 | for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) { | |
1544 | Double_t x = hist->GetBinCenter(i+1); | |
1545 | Double_t y = hist->GetBinContent(i+1); | |
1546 | if(TMath::Abs(x) < edge) { | |
1547 | sum += y; | |
1548 | sumerror += TMath::Power(hist->GetBinError(i+1),2); | |
1549 | } | |
1550 | } | |
1551 | ||
1552 | error = TMath::Sqrt(sumerror); | |
1553 | ||
1554 | cout<<"========================================="<<endl; | |
1555 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
1556 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
1557 | cout<<"Yields :"<<sum<<endl; | |
1558 | cout<<"Error: "<<error<<endl; | |
1559 | cout<<"========================================="<<endl; | |
1560 | ||
1561 | return 0; | |
1562 | } | |
1563 | ||
437dd627 | 1564 | //____________________________________________________________________// |
1565 | void AliProtonAnalysis::SetCorrectionMapForCuts(const char* filename) { | |
1566 | //Reads the file with the correction maps for the cut efficiency | |
1567 | TFile *gCorrectionForCuts = TFile::Open(filename); | |
1568 | if(!gCorrectionForCuts) { | |
1569 | Printf("The TFile object is not valid!!!"); | |
1570 | return; | |
1571 | } | |
1572 | if(!gCorrectionForCuts->IsOpen()) { | |
1573 | Printf("The file is not found!!!"); | |
1574 | return; | |
1575 | } | |
1576 | fHistYPtCorrectionForCutsProtons = dynamic_cast<TH2D *>(gCorrectionForCuts->Get("gHistCorrectionForCutsProtons")); | |
1577 | fHistYPtCorrectionForCutsAntiProtons = dynamic_cast<TH2D *>(gCorrectionForCuts->Get("gHistCorrectionForCutsAntiProtons")); | |
1578 | fCorrectForCutsFlag = kTRUE; | |
1579 | } | |
1580 | ||
207a5280 | 1581 | //____________________________________________________________________// |
1582 | void AliProtonAnalysis::SetCorrectionMapForTracking(const char* filename) { | |
1583 | //Reads the file with the correction maps for the tracking efficiency | |
1584 | TFile *gCorrectionForTracking = TFile::Open(filename); | |
1585 | if(!gCorrectionForTracking) { | |
1586 | Printf("The TFile object is not valid!!!"); | |
1587 | return; | |
1588 | } | |
1589 | if(!gCorrectionForTracking->IsOpen()) { | |
1590 | Printf("The file is not found!!!"); | |
1591 | return; | |
1592 | } | |
1593 | fHistYPtCorrectionForTrackingProtons = dynamic_cast<TH2D *>(gCorrectionForTracking->Get("gHistCorrectionForTrackingProtons")); | |
1594 | fHistYPtCorrectionForTrackingAntiProtons = dynamic_cast<TH2D *>(gCorrectionForTracking->Get("gHistCorrectionForTrackingAntiProtons")); | |
1595 | fCorrectForTrackingFlag = kTRUE; | |
1596 | } | |
1597 | ||
437dd627 | 1598 | //____________________________________________________________________// |
1599 | void AliProtonAnalysis::SetCorrectionMapForFeedDown(const char* filename) { | |
1600 | //Reads the file with the correction maps for the feed-down contamination | |
1601 | TFile *gCorrectionForFeedDown = TFile::Open(filename); | |
1602 | if(!gCorrectionForFeedDown) { | |
1603 | Printf("The TFile object is not valid!!!"); | |
1604 | return; | |
1605 | } | |
1606 | if(!gCorrectionForFeedDown->IsOpen()) { | |
1607 | Printf("The file is not found!!!"); | |
1608 | return; | |
1609 | } | |
1610 | fHistYPtCorrectionForFeedDownProtons = dynamic_cast<TH2D *>(gCorrectionForFeedDown->Get("gHistCorrectionForFeedDownProtons")); | |
1611 | fHistYPtCorrectionForFeedDownAntiProtons = dynamic_cast<TH2D *>(gCorrectionForFeedDown->Get("gHistCorrectionForFeedDownAntiProtons")); | |
1612 | fCorrectForFeedDownFlag = kTRUE; | |
1613 | } | |
1614 | ||
2c60f603 | 1615 | //____________________________________________________________________// |
1616 | void AliProtonAnalysis::SetCorrectionMapForSecondaries(const char* filename) { | |
1617 | //Reads the file with the correction maps for the secondaries | |
1618 | TFile *gCorrectionForSecondaries = TFile::Open(filename); | |
1619 | if(!gCorrectionForSecondaries) { | |
1620 | Printf("The TFile object is not valid!!!"); | |
1621 | return; | |
1622 | } | |
1623 | if(!gCorrectionForSecondaries->IsOpen()) { | |
1624 | Printf("The file is not found!!!"); | |
1625 | return; | |
1626 | } | |
1627 | ||
1628 | fHistYPtCorrectionForSecondaries = dynamic_cast<TH2D *>(gCorrectionForSecondaries->Get("gHistCorrectionForSecondaries")); | |
1629 | fCorrectForSecondariesFlag = kTRUE; | |
1630 | } | |
1631 | ||
7deb716b | 1632 | //____________________________________________________________________// |
1633 | void AliProtonAnalysis::SetCorrectionMapForCrossSection(const char* filename) { | |
1634 | //Reads the file with the correction maps for the proper x-section | |
1635 | TFile *gCorrectionForXSection = TFile::Open(filename); | |
1636 | if(!gCorrectionForXSection) { | |
1637 | Printf("The TFile object is not valid!!!"); | |
1638 | return; | |
1639 | } | |
1640 | if(!gCorrectionForXSection->IsOpen()) { | |
1641 | Printf("The file is not found!!!"); | |
1642 | return; | |
1643 | } | |
1644 | ||
1645 | fHistCorrectionForCrossSectionYPtProtons = dynamic_cast<TH2D *>(gCorrectionForXSection->Get("gHistCorrectionForCrossSectionProtons")); | |
1646 | fHistCorrectionForCrossSectionYPtAntiProtons = dynamic_cast<TH2D *>(gCorrectionForXSection->Get("gHistCorrectionForCrossSectionAntiProtons")); | |
1647 | fHistCorrectionForCrossSectionFlag = kTRUE; | |
1648 | } | |
1649 | ||
336ea0ff | 1650 | //____________________________________________________________________// |
1651 | void AliProtonAnalysis::Correct() { | |
a3bc43fb | 1652 | //Apply the corrections: Fast & dirty way for the absorption corrections |
2c60f603 | 1653 | //Correct the protons for the efficiency |
71a67ee1 | 1654 | fHistYPtProtonsCorrected = fProtonContainer->ShowProjection(0,1,kStepInPhaseSpace); |
1655 | fHistYPtProtonsCorrected->Divide(fHistEfficiencyYPtProtons); | |
7deb716b | 1656 | //Correct the protons for proper cross-section |
1657 | if(fHistCorrectionForCrossSectionFlag) | |
2f7be6f2 | 1658 | fHistYPtProtonsCorrected->Multiply(fHistCorrectionForCrossSectionYPtProtons); |
7deb716b | 1659 | //Correct the protons for secondaries |
2c60f603 | 1660 | if(fCorrectForSecondariesFlag) |
1661 | fHistYPtProtonsCorrected->Divide(fHistYPtCorrectionForSecondaries); | |
437dd627 | 1662 | //Correct the protons for feed-down |
1663 | if(fCorrectForFeedDownFlag) | |
1664 | fHistYPtProtonsCorrected->Divide(fHistYPtCorrectionForFeedDownProtons); | |
1665 | //Correct the protons for the cut efficiency | |
1666 | if(fCorrectForCutsFlag) | |
1667 | fHistYPtProtonsCorrected->Multiply(fHistYPtCorrectionForCutsProtons); | |
207a5280 | 1668 | //Correct the protons for the tracking efficiency |
1669 | if(fCorrectForTrackingFlag) | |
1670 | fHistYPtProtonsCorrected->Multiply(fHistYPtCorrectionForTrackingProtons); | |
437dd627 | 1671 | |
2c60f603 | 1672 | //Correct the antiprotons for the efficiency |
71a67ee1 | 1673 | fHistYPtAntiProtonsCorrected = fAntiProtonContainer->ShowProjection(0,1,kStepInPhaseSpace); |
1674 | fHistYPtAntiProtonsCorrected->Divide(fHistEfficiencyYPtAntiProtons); | |
7deb716b | 1675 | //Correct the antiprotons for proper cross-section |
1676 | if(fHistCorrectionForCrossSectionFlag) | |
2f7be6f2 | 1677 | fHistYPtAntiProtonsCorrected->Multiply(fHistCorrectionForCrossSectionYPtAntiProtons); |
437dd627 | 1678 | //Correct the antiprotons for feed-down |
1679 | if(fCorrectForFeedDownFlag) | |
1680 | fHistYPtAntiProtonsCorrected->Divide(fHistYPtCorrectionForFeedDownAntiProtons); | |
1681 | //Correct the antiprotons for the cut efficiency | |
1682 | if(fCorrectForCutsFlag) | |
1683 | fHistYPtAntiProtonsCorrected->Multiply(fHistYPtCorrectionForCutsAntiProtons); | |
207a5280 | 1684 | //Correct the antiprotons for the tracking efficiency |
1685 | if(fCorrectForTrackingFlag) | |
1686 | fHistYPtAntiProtonsCorrected->Multiply(fHistYPtCorrectionForTrackingAntiProtons); | |
336ea0ff | 1687 | } |
1688 | ||
251e4034 | 1689 | //____________________________________________________________________// |
1690 | void AliProtonAnalysis::Correct(Int_t step) { | |
1691 | //Applies the correction maps to the initial containers | |
1692 | fCorrectProtons = new AliCFDataGrid("correctProtons", | |
1693 | "corrected data", | |
1694 | *fProtonContainer); | |
0ab648ea | 1695 | fCorrectProtons->SetMeasured(0); |
251e4034 | 1696 | fCorrectProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListProtons->At(step)); |
1697 | ||
1698 | fCorrectAntiProtons = new AliCFDataGrid("correctAntiProtons", | |
1699 | "corrected data", | |
1700 | *fAntiProtonContainer); | |
0ab648ea | 1701 | fCorrectAntiProtons->SetMeasured(0); |
251e4034 | 1702 | fCorrectAntiProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListAntiProtons->At(step)); |
1703 | } | |
1704 | ||
39f2a708 | 1705 | //____________________________________________________________________// |
1706 | Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
1707 | // Reads the outout of the correction framework task | |
1708 | // Creates the correction maps | |
1709 | // Puts the results in the different TList objects | |
1710 | Bool_t status = kTRUE; | |
1711 | ||
336ea0ff | 1712 | TFile *file = TFile::Open(filename); |
1713 | if(!file) { | |
1714 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
1715 | status = kFALSE; | |
1716 | } | |
1717 | TList *list = dynamic_cast<TList *>(file->Get("outputList")); | |
1718 | Int_t iRap = 0, iPt = 1; | |
1719 | ||
1720 | //Calculation of efficiency/correction: Protons | |
1721 | AliCFContainer *gProtonContainer = dynamic_cast<AliCFContainer *>(list->At(0)); | |
1722 | AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1723 | "effProtonsStep0Step2", | |
1724 | *gProtonContainer); | |
1725 | effProtonsStep0Step2->CalculateEfficiency(2,0); | |
1726 | fHistEfficiencyYPtProtons = effProtonsStep0Step2->Project(iRap,iPt); | |
1727 | fHistEfficiencyYPtProtons->Sumw2(); | |
1728 | ||
1729 | //Calculation of efficiency/correction: Protons | |
1730 | AliCFContainer *gAntiProtonContainer = dynamic_cast<AliCFContainer *>(list->At(1)); | |
1731 | AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1732 | "effAntiProtonsStep0Step2", | |
1733 | *gAntiProtonContainer); | |
1734 | effAntiProtonsStep0Step2->CalculateEfficiency(2,0); | |
1735 | fHistEfficiencyYPtAntiProtons = effAntiProtonsStep0Step2->Project(iRap,iPt); | |
1736 | fHistEfficiencyYPtAntiProtons->Sumw2(); | |
1737 | ||
1738 | Correct(); | |
1739 | ||
1740 | return status; | |
1741 | } | |
1742 | ||
1743 | //____________________________________________________________________// | |
1744 | /*Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
1745 | // Reads the outout of the correction framework task | |
1746 | // Creates the correction maps | |
1747 | // Puts the results in the different TList objects | |
1748 | Bool_t status = kTRUE; | |
1749 | ||
39f2a708 | 1750 | TFile *file = TFile::Open(filename); |
1751 | if(!file) { | |
1752 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
1753 | status = kFALSE; | |
1754 | } | |
1755 | ||
cdb3530f | 1756 | //________________________________________// |
1757 | //Protons | |
251e4034 | 1758 | fEffGridListProtons = new TList(); |
cdb3530f | 1759 | fCorrectionListProtons2D = new TList(); |
1760 | fEfficiencyListProtons1D = new TList(); | |
1761 | fCorrectionListProtons1D = new TList(); | |
1762 | ||
1763 | AliCFContainer *corrfwContainerProtons = (AliCFContainer*) (file->Get("containerProtons")); | |
1764 | if(!corrfwContainerProtons) { | |
1765 | cout<<"CORRFW container for protons not found!"<<endl; | |
39f2a708 | 1766 | status = kFALSE; |
1767 | } | |
1768 | ||
cdb3530f | 1769 | Int_t nSteps = corrfwContainerProtons->GetNStep(); |
39f2a708 | 1770 | TH2D *gYPt[4]; |
1771 | //currently the GRID is formed by the y-pT parameters | |
1772 | //Add Vz as a next step | |
1773 | Int_t iRap = 0, iPt = 1; | |
9b168f47 | 1774 | AliCFEffGrid *effProtonsStep0Step1 = new AliCFEffGrid("eff10", |
1775 | "effProtonsStep0Step1", | |
1776 | *corrfwContainerProtons); | |
1777 | effProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0 | |
251e4034 | 1778 | fEffGridListProtons->Add(effProtonsStep0Step1); |
9b168f47 | 1779 | gYPt[0] = effProtonsStep0Step1->Project(iRap,iPt); |
1780 | fCorrectionListProtons2D->Add(gYPt[0]); | |
1781 | ||
1782 | AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1783 | "effProtonsStep0Step2", | |
1784 | *corrfwContainerProtons); | |
1785 | effProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0 | |
251e4034 | 1786 | fEffGridListProtons->Add(effProtonsStep0Step2); |
9b168f47 | 1787 | gYPt[1] = effProtonsStep0Step2->Project(iRap,iPt); |
1788 | fCorrectionListProtons2D->Add(gYPt[1]); | |
1789 | ||
1790 | AliCFEffGrid *effProtonsStep0Step3 = new AliCFEffGrid("eff30", | |
1791 | "effProtonsStep0Step3", | |
1792 | *corrfwContainerProtons); | |
1793 | effProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0 | |
251e4034 | 1794 | fEffGridListProtons->Add(effProtonsStep0Step3); |
9b168f47 | 1795 | gYPt[2] = effProtonsStep0Step3->Project(iRap,iPt); |
1796 | fCorrectionListProtons2D->Add(gYPt[2]); | |
1797 | ||
1798 | TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws-[2]) | |
1799 | TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws-[2]) | |
9b4aee57 | 1800 | TString gTitle; |
cdb3530f | 1801 | //Get the projection of the efficiency maps |
9b168f47 | 1802 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { |
1803 | gEfficiency[iParameter][0] = effProtonsStep0Step1->Project(iParameter); | |
1804 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1805 | gTitle += "_Step0_Step1"; | |
1806 | gEfficiency[iParameter][0]->SetName(gTitle.Data()); | |
1807 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][0]); | |
1808 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1809 | gTitle += "_Step0_Step1"; | |
1810 | gCorrection[iParameter][0] = new TH1D(gTitle.Data(), | |
1811 | gTitle.Data(), | |
1812 | gEfficiency[iParameter][0]->GetNbinsX(), | |
1813 | gEfficiency[iParameter][0]->GetXaxis()->GetXmin(), | |
1814 | gEfficiency[iParameter][0]->GetXaxis()->GetXmax()); | |
1815 | //initialisation of the correction | |
1816 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++) | |
1817 | gCorrection[iParameter][0]->SetBinContent(iBin,1.0); | |
1818 | ||
1819 | gEfficiency[iParameter][1] = effProtonsStep0Step2->Project(iParameter); | |
1820 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1821 | gTitle += "_Step0_Step2"; | |
1822 | gEfficiency[iParameter][1]->SetName(gTitle.Data()); | |
1823 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][1]); | |
1824 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1825 | gTitle += "_Step0_Step2"; | |
1826 | gCorrection[iParameter][1] = new TH1D(gTitle.Data(), | |
1827 | gTitle.Data(), | |
1828 | gEfficiency[iParameter][1]->GetNbinsX(), | |
1829 | gEfficiency[iParameter][1]->GetXaxis()->GetXmin(), | |
1830 | gEfficiency[iParameter][1]->GetXaxis()->GetXmax()); | |
1831 | //initialisation of the correction | |
1832 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++) | |
1833 | gCorrection[iParameter][1]->SetBinContent(iBin,1.0); | |
1834 | ||
1835 | gEfficiency[iParameter][2] = effProtonsStep0Step3->Project(iParameter); | |
1836 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1837 | gTitle += "_Step0_Step3"; | |
1838 | gEfficiency[iParameter][2]->SetName(gTitle.Data()); | |
1839 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][2]); | |
1840 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1841 | gTitle += "_Step0_Step3"; | |
1842 | gCorrection[iParameter][2] = new TH1D(gTitle.Data(), | |
1843 | gTitle.Data(), | |
1844 | gEfficiency[iParameter][2]->GetNbinsX(), | |
1845 | gEfficiency[iParameter][2]->GetXaxis()->GetXmin(), | |
1846 | gEfficiency[iParameter][2]->GetXaxis()->GetXmax()); | |
1847 | //initialisation of the correction | |
1848 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++) | |
1849 | gCorrection[iParameter][2]->SetBinContent(iBin,1.0); | |
cdb3530f | 1850 | }//parameter loop |
1851 | //Calculate the 1D correction parameters as a function of y and pT | |
1852 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
1853 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
1854 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
1855 | fCorrectionListProtons1D->Add(gCorrection[iParameter][iStep-1]); | |
1856 | } | |
1857 | } | |
1858 | ||
1859 | //________________________________________// | |
1860 | //AntiProtons | |
251e4034 | 1861 | fEffGridListAntiProtons = new TList(); |
cdb3530f | 1862 | fCorrectionListAntiProtons2D = new TList(); |
1863 | fEfficiencyListAntiProtons1D = new TList(); | |
1864 | fCorrectionListAntiProtons1D = new TList(); | |
1865 | ||
1866 | AliCFContainer *corrfwContainerAntiProtons = (AliCFContainer*) (file->Get("containerAntiProtons")); | |
1867 | if(!corrfwContainerAntiProtons) { | |
1868 | cout<<"CORRFW container for antiprotons not found!"<<endl; | |
1869 | status = kFALSE; | |
1870 | } | |
1871 | ||
1872 | nSteps = corrfwContainerAntiProtons->GetNStep(); | |
1873 | //currently the GRID is formed by the y-pT parameters | |
1874 | //Add Vz as a next step | |
9b168f47 | 1875 | AliCFEffGrid *effAntiProtonsStep0Step1 = new AliCFEffGrid("eff10", |
1876 | "effAntiProtonsStep0Step1", | |
1877 | *corrfwContainerAntiProtons); | |
1878 | effAntiProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0 | |
251e4034 | 1879 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step1); |
9b168f47 | 1880 | gYPt[0] = effAntiProtonsStep0Step1->Project(iRap,iPt); |
1881 | fCorrectionListAntiProtons2D->Add(gYPt[0]); | |
1882 | ||
1883 | AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1884 | "effAntiProtonsStep0Step2", | |
1885 | *corrfwContainerAntiProtons); | |
1886 | effAntiProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0 | |
251e4034 | 1887 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step2); |
9b168f47 | 1888 | gYPt[1] = effAntiProtonsStep0Step2->Project(iRap,iPt); |
1889 | fCorrectionListAntiProtons2D->Add(gYPt[1]); | |
1890 | ||
1891 | AliCFEffGrid *effAntiProtonsStep0Step3 = new AliCFEffGrid("eff30", | |
1892 | "effAntiProtonsStep0Step3", | |
1893 | *corrfwContainerAntiProtons); | |
1894 | effAntiProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0 | |
251e4034 | 1895 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step3); |
9b168f47 | 1896 | gYPt[2] = effAntiProtonsStep0Step3->Project(iRap,iPt); |
1897 | fCorrectionListAntiProtons2D->Add(gYPt[2]); | |
cdb3530f | 1898 | |
39f2a708 | 1899 | //Get the projection of the efficiency maps |
9b168f47 | 1900 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { |
1901 | gEfficiency[iParameter][0] = effAntiProtonsStep0Step1->Project(iParameter); | |
1902 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1903 | gTitle += "_Step0_Step1"; | |
1904 | gEfficiency[iParameter][0]->SetName(gTitle.Data()); | |
1905 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][0]); | |
1906 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1907 | gTitle += "_Step0_Step1"; | |
1908 | gCorrection[iParameter][0] = new TH1D(gTitle.Data(), | |
1909 | gTitle.Data(), | |
1910 | gEfficiency[iParameter][0]->GetNbinsX(), | |
1911 | gEfficiency[iParameter][0]->GetXaxis()->GetXmin(), | |
1912 | gEfficiency[iParameter][0]->GetXaxis()->GetXmax()); | |
1913 | //initialisation of the correction | |
1914 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++) | |
1915 | gCorrection[iParameter][0]->SetBinContent(iBin,1.0); | |
1916 | ||
1917 | gEfficiency[iParameter][1] = effAntiProtonsStep0Step2->Project(iParameter); | |
1918 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1919 | gTitle += "_Step0_Step2"; | |
1920 | gEfficiency[iParameter][1]->SetName(gTitle.Data()); | |
1921 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][1]); | |
1922 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1923 | gTitle += "_Step0_Step2"; | |
1924 | gCorrection[iParameter][1] = new TH1D(gTitle.Data(), | |
1925 | gTitle.Data(), | |
1926 | gEfficiency[iParameter][1]->GetNbinsX(), | |
1927 | gEfficiency[iParameter][1]->GetXaxis()->GetXmin(), | |
1928 | gEfficiency[iParameter][1]->GetXaxis()->GetXmax()); | |
1929 | //initialisation of the correction | |
1930 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++) | |
1931 | gCorrection[iParameter][1]->SetBinContent(iBin,1.0); | |
1932 | ||
1933 | gEfficiency[iParameter][2] = effAntiProtonsStep0Step3->Project(iParameter); | |
1934 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1935 | gTitle += "_Step0_Step3"; | |
1936 | gEfficiency[iParameter][2]->SetName(gTitle.Data()); | |
1937 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][2]); | |
1938 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1939 | gTitle += "_Step0_Step3"; | |
1940 | gCorrection[iParameter][2] = new TH1D(gTitle.Data(), | |
1941 | gTitle.Data(), | |
1942 | gEfficiency[iParameter][2]->GetNbinsX(), | |
1943 | gEfficiency[iParameter][2]->GetXaxis()->GetXmin(), | |
1944 | gEfficiency[iParameter][2]->GetXaxis()->GetXmax()); | |
1945 | //initialisation of the correction | |
1946 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++) | |
1947 | gCorrection[iParameter][2]->SetBinContent(iBin,1.0); | |
39f2a708 | 1948 | }//parameter loop |
1949 | //Calculate the 1D correction parameters as a function of y and pT | |
1950 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
1951 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
1952 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
cdb3530f | 1953 | fCorrectionListAntiProtons1D->Add(gCorrection[iParameter][iStep-1]); |
39f2a708 | 1954 | } |
1955 | } | |
ef1a8dbd | 1956 | |
1957 | return status; | |
336ea0ff | 1958 | }*/ |
24421eb6 | 1959 | |
735cc63d | 1960 | //____________________________________________________________________// |
1961 | void AliProtonAnalysis::InitQA() { | |
1962 | //Applies the correction maps to the initial containers | |
1963 | fInitQAFlag = kTRUE; | |
1964 | fGlobalQAList = new TList(); | |
1965 | fGlobalQAList->SetName("fGlobalQAList"); | |
1966 | ||
1967 | //========================================================// | |
1968 | fQA2DList = new TList(); | |
1969 | fQA2DList->SetName("fQA2DList"); | |
1970 | fGlobalQAList->Add(fQA2DList); | |
37cb8683 | 1971 | |
790140ac | 1972 | //dEdx plots |
37cb8683 | 1973 | TH2F *gHistdEdxP = new TH2F("gHistdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
790140ac | 1974 | fQA2DList->Add(gHistdEdxP); |
37cb8683 | 1975 | TH2F *gHistProtonsdEdxP = new TH2F("gHistProtonsdEdxP","Accepted protons dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
790140ac | 1976 | fQA2DList->Add(gHistProtonsdEdxP); |
37cb8683 | 1977 | |
ff672838 | 1978 | //normalized dEdx plots |
1979 | TH2F *gHistZP = new TH2F("gHistZP","Normalized dE/dx (TPC); P [GeV/c]; ln[(dE/dx)_{exp.}/(dE/dx)_{BB}] ",1000,0.05,20.05,100,-2.0,2.0); | |
1980 | fQA2DList->Add(gHistZP); | |
1981 | TH2F *gHistProtonsZP = new TH2F("gHistProtonsZP","Normalized dE/dx (TPC); P [GeV/c]; ln[(dE/dx)_{exp.}/(dE/dx)_{BB}] ",1000,0.05,20.05,100,-2.0,2.0); | |
1982 | fQA2DList->Add(gHistProtonsZP); | |
1983 | ||
37cb8683 | 1984 | //eta-phi-Npoints(dEdx) |
1985 | TH3F *gHistEtaPhiTPCdEdxNPoints = new TH3F("gHistEtaPhiTPCdEdxNPoints", | |
1986 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1987 | 18,-0.9,0.9, |
1988 | 180,0,360, | |
37cb8683 | 1989 | 100,0,200); |
1990 | gHistEtaPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1991 | fQA2DList->Add(gHistEtaPhiTPCdEdxNPoints); | |
1992 | TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = new TH3F("gHistProtonsEtaPhiTPCdEdxNPoints", | |
1993 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1994 | 18,-0.9,0.9, |
1995 | 180,0,360, | |
37cb8683 | 1996 | 100,0,200); |
1997 | gHistProtonsEtaPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1998 | fQA2DList->Add(gHistProtonsEtaPhiTPCdEdxNPoints); | |
1999 | ||
2000 | //eta-phi-Npoints | |
2001 | TH3F *gHistEtaPhiTPCNPoints = new TH3F("gHistEtaPhiTPCNPoints", | |
2002 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 2003 | 18,-0.9,0.9, |
2004 | 180,0,360, | |
37cb8683 | 2005 | 100,0,200); |
2006 | gHistEtaPhiTPCNPoints->SetStats(kTRUE); | |
2007 | fQA2DList->Add(gHistEtaPhiTPCNPoints); | |
2008 | TH3F *gHistProtonsEtaPhiTPCNPoints = new TH3F("gHistProtonsEtaPhiTPCNPoints", | |
2009 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 2010 | 18,-0.9,0.9, |
2011 | 180,0,360, | |
37cb8683 | 2012 | 100,0,200); |
2013 | gHistProtonsEtaPhiTPCNPoints->SetStats(kTRUE); | |
2014 | fQA2DList->Add(gHistProtonsEtaPhiTPCNPoints); | |
2015 | ||
2016 | //pt-phi-Npoints(dEdx) | |
2017 | TH3F *gHistPtPhiTPCdEdxNPoints = new TH3F("gHistPtPhiTPCdEdxNPoints", | |
2018 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
2019 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 2020 | 180,0,360, |
37cb8683 | 2021 | 100,0,200); |
2022 | gHistPtPhiTPCdEdxNPoints->SetStats(kTRUE); | |
2023 | fQA2DList->Add(gHistPtPhiTPCdEdxNPoints); | |
2024 | TH3F *gHistProtonsPtPhiTPCdEdxNPoints = new TH3F("gHistProtonsPtPhiTPCdEdxNPoints", | |
2025 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
2026 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 2027 | 180,0,360, |
37cb8683 | 2028 | 100,0,200); |
2029 | gHistProtonsPtPhiTPCdEdxNPoints->SetStats(kTRUE); | |
2030 | fQA2DList->Add(gHistProtonsPtPhiTPCdEdxNPoints); | |
2031 | ||
2032 | //pt-phi-Npoints | |
2033 | TH3F *gHistPtPhiTPCNPoints = new TH3F("gHistPtPhiTPCNPoints", | |
2034 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
2035 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 2036 | 180,0,360, |
37cb8683 | 2037 | 100,0,200); |
2038 | gHistPtPhiTPCNPoints->SetStats(kTRUE); | |
2039 | fQA2DList->Add(gHistPtPhiTPCNPoints); | |
2040 | TH3F *gHistProtonsPtPhiTPCNPoints = new TH3F("gHistProtonsPtPhiTPCNPoints", | |
2041 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
2042 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 2043 | 180,0,360, |
37cb8683 | 2044 | 100,0,200); |
2045 | gHistProtonsPtPhiTPCNPoints->SetStats(kTRUE); | |
2046 | fQA2DList->Add(gHistProtonsPtPhiTPCNPoints); | |
2047 | ||
e56f08ed | 2048 | //eta-phi for protons & antiprotons |
2049 | TH2F *gHistProtonsEtaPhi = new TH2F("gHistProtonsEtaPhi", | |
2050 | ";#eta;#phi", | |
2051 | 18,-0.9,0.9, | |
2052 | 180,0,360); | |
2053 | gHistProtonsEtaPhi->SetStats(kTRUE); | |
2054 | fQA2DList->Add(gHistProtonsEtaPhi); | |
2055 | TH2F *gHistAntiProtonsEtaPhi = new TH2F("gHistAntiProtonsEtaPhi", | |
2056 | ";#eta;#phi", | |
2057 | 18,-0.9,0.9, | |
2058 | 180,0,360); | |
2059 | gHistAntiProtonsEtaPhi->SetStats(kTRUE); | |
2060 | fQA2DList->Add(gHistAntiProtonsEtaPhi); | |
2061 | ||
f0e42d04 | 2062 | const Int_t nBinsdca = 1000; |
437dd627 | 2063 | Double_t dcaBins[nBinsdca+1]; |
f0e42d04 | 2064 | Double_t dcamin = -5., dcamax = 5.; |
2065 | Double_t dca = -5.; | |
437dd627 | 2066 | Double_t dcaStepSmall = 0.01; |
2067 | Int_t iCounter = 0; | |
f0e42d04 | 2068 | while(dca <= 5.) { |
437dd627 | 2069 | dcaBins[iCounter] = dcamin; |
2070 | dcamax = dcamin + dcaStepSmall; | |
2071 | dca = dcamax; | |
2072 | dcamin = dcamax; | |
2073 | iCounter += 1; | |
2074 | } | |
f0e42d04 | 2075 | |
437dd627 | 2076 | const Int_t nBinsY = 9; |
2077 | const Int_t nBinsPt = 6; | |
2078 | Double_t gY[nBinsY+1] = {-0.9,-0.7,-0.5,-0.3,-0.1,0.1,0.3,0.5,0.7,0.9}; | |
2079 | Double_t gPt[nBinsPt+1] = {0.45,0.55,0.65,0.75,0.85,0.95,1.05}; | |
2080 | ||
4de4661f | 2081 | //dca vs pT for protons & antiprotons |
3322c804 | 2082 | TH3F *gHistProtonsDCAxyEtaPt = new TH3F("gHistProtonsDCAxyEtaPt", |
2083 | ";P_{T} [GeV/c];dca_{xy} [cm]", | |
437dd627 | 2084 | nBinsY,gY,nBinsPt,gPt, |
2085 | nBinsdca,dcaBins); | |
3322c804 | 2086 | if(fProtonAnalysisBase->GetEtaMode()) |
2087 | gHistProtonsDCAxyEtaPt->GetXaxis()->SetTitle("#eta"); | |
2088 | else | |
2089 | gHistProtonsDCAxyEtaPt->GetXaxis()->SetTitle("y"); | |
2090 | gHistProtonsDCAxyEtaPt->SetStats(kTRUE); | |
2091 | fQA2DList->Add(gHistProtonsDCAxyEtaPt); | |
2092 | TH3F *gHistProtonsDCAzEtaPt = new TH3F("gHistProtonsDCAzEtaPt", | |
2093 | ";P_{T} [GeV/c];dca_{z} [cm]", | |
437dd627 | 2094 | nBinsY,gY,nBinsPt,gPt, |
2095 | nBinsdca,dcaBins); | |
3322c804 | 2096 | if(fProtonAnalysisBase->GetEtaMode()) |
2097 | gHistProtonsDCAzEtaPt->GetXaxis()->SetTitle("#eta"); | |
2098 | else | |
2099 | gHistProtonsDCAzEtaPt->GetXaxis()->SetTitle("y"); | |
2100 | gHistProtonsDCAzEtaPt->SetStats(kTRUE); | |
2101 | fQA2DList->Add(gHistProtonsDCAzEtaPt); | |
2102 | TH3F *gHistAntiProtonsDCAxyEtaPt = new TH3F("gHistAntiProtonsDCAxyEtaPt", | |
2103 | ";P_{T} [GeV/c];dca_{xy} [cm]", | |
437dd627 | 2104 | nBinsY,gY,nBinsPt,gPt, |
2105 | nBinsdca,dcaBins); | |
3322c804 | 2106 | if(fProtonAnalysisBase->GetEtaMode()) |
2107 | gHistAntiProtonsDCAxyEtaPt->GetXaxis()->SetTitle("#eta"); | |
2108 | else | |
2109 | gHistAntiProtonsDCAxyEtaPt->GetXaxis()->SetTitle("y"); | |
2110 | gHistAntiProtonsDCAxyEtaPt->SetStats(kTRUE); | |
2111 | fQA2DList->Add(gHistAntiProtonsDCAxyEtaPt); | |
2112 | TH3F *gHistAntiProtonsDCAzEtaPt = new TH3F("gHistAntiProtonsDCAzEtaPt", | |
2113 | ";P_{T} [GeV/c];dca_{z} [cm]", | |
437dd627 | 2114 | nBinsY,gY,nBinsPt,gPt, |
2115 | nBinsdca,dcaBins); | |
3322c804 | 2116 | if(fProtonAnalysisBase->GetEtaMode()) |
2117 | gHistAntiProtonsDCAzEtaPt->GetXaxis()->SetTitle("#eta"); | |
2118 | else | |
2119 | gHistAntiProtonsDCAzEtaPt->GetXaxis()->SetTitle("y"); | |
2120 | gHistAntiProtonsDCAzEtaPt->SetStats(kTRUE); | |
2121 | fQA2DList->Add(gHistAntiProtonsDCAzEtaPt); | |
4de4661f | 2122 | |
71a67ee1 | 2123 | TH3F *gHistProtonsDCA3DEtaPt = new TH3F("gHistProtonsDCA3DEtaPt", |
2124 | ";P_{T} [GeV/c];dca [cm]", | |
2125 | fNBinsY,fMinY,fMaxY, | |
2126 | fNBinsPt,fMinPt,fMaxPt, | |
2127 | 100,0,20); | |
2128 | if(fProtonAnalysisBase->GetEtaMode()) | |
2129 | gHistProtonsDCA3DEtaPt->GetXaxis()->SetTitle("#eta"); | |
2130 | else | |
2131 | gHistProtonsDCA3DEtaPt->GetXaxis()->SetTitle("y"); | |
2132 | gHistProtonsDCA3DEtaPt->SetStats(kTRUE); | |
2133 | fQA2DList->Add(gHistProtonsDCA3DEtaPt); | |
2134 | TH3F *gHistAntiProtonsDCA3DEtaPt = new TH3F("gHistAntiProtonsDCA3DEtaPt", | |
2135 | ";P_{T} [GeV/c];dca [cm]", | |
2136 | fNBinsY,fMinY,fMaxY, | |
2137 | fNBinsPt,fMinPt,fMaxPt, | |
2138 | 100,0,20); | |
2139 | if(fProtonAnalysisBase->GetEtaMode()) | |
2140 | gHistAntiProtonsDCA3DEtaPt->GetXaxis()->SetTitle("#eta"); | |
2141 | else | |
2142 | gHistAntiProtonsDCA3DEtaPt->GetXaxis()->SetTitle("y"); | |
2143 | gHistAntiProtonsDCA3DEtaPt->SetStats(kTRUE); | |
2144 | fQA2DList->Add(gHistAntiProtonsDCA3DEtaPt); | |
2145 | ||
f0e42d04 | 2146 | TH2F *gHistPosdEdxP = new TH2F("gHistPosdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
2147 | fQA2DList->Add(gHistPosdEdxP); | |
2148 | TH2F *gHistNegdEdxP = new TH2F("gHistNegdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); | |
2149 | fQA2DList->Add(gHistNegdEdxP); | |
2150 | ||
735cc63d | 2151 | //========================================================// |
2152 | fQAProtonsAcceptedList = new TList(); | |
2153 | fQAProtonsAcceptedList->SetName("fQAProtonsAcceptedList"); | |
2154 | fGlobalQAList->Add(fQAProtonsAcceptedList); | |
2155 | //Accepted protons | |
2156 | TH1F *gProtonsITSClustersPass = new TH1F("gProtonsITSClustersPass", | |
2157 | ";N_{clusters} (ITS);Entries", | |
2158 | 7,0,7); | |
2159 | fQAProtonsAcceptedList->Add(gProtonsITSClustersPass); | |
2160 | TH1F *gProtonsChi2PerClusterITSPass = new TH1F("gProtonsChi2PerClusterITSPass", | |
2161 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2162 | 100,0,4); | |
2163 | fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterITSPass); | |
2164 | TH1F *gProtonsTPCClustersPass = new TH1F("gProtonsTPCClustersPass", | |
2165 | ";N_{clusters} (TPC);Entries", | |
2166 | 100,0,200); | |
2167 | fQAProtonsAcceptedList->Add(gProtonsTPCClustersPass); | |
2168 | TH1F *gProtonsChi2PerClusterTPCPass = new TH1F("gProtonsChi2PerClusterTPCPass", | |
2169 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2170 | 100,0,4); | |
2171 | fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterTPCPass); | |
2172 | TH1F *gProtonsExtCov11Pass = new TH1F("gProtonsExtCov11Pass", | |
2173 | ";#sigma_{y} [cm];Entries", | |
2174 | 100,0,4); | |
2175 | fQAProtonsAcceptedList->Add(gProtonsExtCov11Pass); | |
2176 | TH1F *gProtonsExtCov22Pass = new TH1F("gProtonsExtCov22Pass", | |
2177 | ";#sigma_{z} [cm];Entries", | |
2178 | 100,0,4); | |
2179 | fQAProtonsAcceptedList->Add(gProtonsExtCov22Pass); | |
2180 | TH1F *gProtonsExtCov33Pass = new TH1F("gProtonsExtCov33Pass", | |
2181 | ";#sigma_{sin(#phi)};Entries", | |
2182 | 100,0,4); | |
2183 | fQAProtonsAcceptedList->Add(gProtonsExtCov33Pass); | |
2184 | TH1F *gProtonsExtCov44Pass = new TH1F("gProtonsExtCov44Pass", | |
2185 | ";#sigma_{tan(#lambda)};Entries", | |
2186 | 100,0,4); | |
2187 | fQAProtonsAcceptedList->Add(gProtonsExtCov44Pass); | |
2188 | TH1F *gProtonsExtCov55Pass = new TH1F("gProtonsExtCov55Pass", | |
2189 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2190 | 100,0,4); | |
2191 | fQAProtonsAcceptedList->Add(gProtonsExtCov55Pass); | |
2192 | TH1F *gProtonsSigmaToVertexPass = new TH1F("gProtonsSigmaToVertexPass", | |
2193 | ";#sigma_{Vertex};Entries", | |
3770a478 | 2194 | 100,0.,10.); |
735cc63d | 2195 | fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexPass); |
2196 | TH1F *gProtonsSigmaToVertexTPCPass = new TH1F("gProtonsSigmaToVertexTPCPass", | |
2197 | ";#sigma_{Vertex};Entries", | |
3770a478 | 2198 | 100,0.,10.); |
735cc63d | 2199 | fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexTPCPass); |
2200 | TH1F *gProtonsDCAXYPass = new TH1F("gProtonsDCAXYPass", | |
2201 | ";DCA_{xy} [cm];Entries", | |
2202 | 100,0,20); | |
2203 | fQAProtonsAcceptedList->Add(gProtonsDCAXYPass); | |
2204 | TH1F *gProtonsDCAXYTPCPass = new TH1F("gProtonsDCAXYTPCPass", | |
2205 | ";DCA_{xy} [cm];Entries", | |
2206 | 100,0,20); | |
2207 | fQAProtonsAcceptedList->Add(gProtonsDCAXYTPCPass); | |
2208 | TH1F *gProtonsDCAZPass = new TH1F("gProtonsDCAZPass", | |
2209 | ";DCA_{z} [cm];Entries", | |
2210 | 100,0,20); | |
2211 | fQAProtonsAcceptedList->Add(gProtonsDCAZPass); | |
2212 | TH1F *gProtonsDCAZTPCPass = new TH1F("gProtonsDCAZTPCPass", | |
2213 | ";DCA_{z} [cm];Entries", | |
2214 | 100,0,20); | |
2215 | fQAProtonsAcceptedList->Add(gProtonsDCAZTPCPass); | |
2216 | TH1F *gProtonsConstrainChi2Pass = new TH1F("gProtonsConstrainChi2Pass", | |
2217 | ";Log_{10}(#chi^{2});Entries", | |
2218 | 100,-10,10); | |
2219 | fQAProtonsAcceptedList->Add(gProtonsConstrainChi2Pass); | |
2220 | TH1F *gProtonsITSRefitPass = new TH1F("gProtonsITSRefitPass", | |
2221 | "",10,-1,1); | |
2222 | fQAProtonsAcceptedList->Add(gProtonsITSRefitPass); | |
2223 | TH1F *gProtonsTPCRefitPass = new TH1F("gProtonsTPCRefitPass", | |
2224 | "",10,-1,1); | |
2225 | fQAProtonsAcceptedList->Add(gProtonsTPCRefitPass); | |
2226 | TH1F *gProtonsESDpidPass = new TH1F("gProtonsESDpidPass", | |
2227 | "",10,-1,1); | |
2228 | fQAProtonsAcceptedList->Add(gProtonsESDpidPass); | |
2229 | TH1F *gProtonsTPCpidPass = new TH1F("gProtonsTPCpidPass", | |
2230 | "",10,-1,1); | |
2231 | fQAProtonsAcceptedList->Add(gProtonsTPCpidPass); | |
2232 | TH1F *gProtonsPointOnITSLayer1Pass = new TH1F("gProtonsPointOnITSLayer1Pass", | |
2233 | "",10,-1,1); | |
2234 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer1Pass); | |
2235 | TH1F *gProtonsPointOnITSLayer2Pass = new TH1F("gProtonsPointOnITSLayer2Pass", | |
2236 | "",10,-1,1); | |
2237 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer2Pass); | |
2238 | TH1F *gProtonsPointOnITSLayer3Pass = new TH1F("gProtonsPointOnITSLayer3Pass", | |
2239 | "",10,-1,1); | |
2240 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer3Pass); | |
2241 | TH1F *gProtonsPointOnITSLayer4Pass = new TH1F("gProtonsPointOnITSLayer4Pass", | |
2242 | "",10,-1,1); | |
2243 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer4Pass); | |
2244 | TH1F *gProtonsPointOnITSLayer5Pass = new TH1F("gProtonsPointOnITSLayer5Pass", | |
2245 | "",10,-1,1); | |
2246 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer5Pass); | |
2247 | TH1F *gProtonsPointOnITSLayer6Pass = new TH1F("gProtonsPointOnITSLayer6Pass", | |
2248 | "",10,-1,1); | |
2249 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer6Pass); | |
2250 | TH1F *gProtonsNumberOfTPCdEdxPointsPass = new TH1F("gProtonsNumberOfTPCdEdxPointsPass","",100,0,200); | |
2251 | fQAProtonsAcceptedList->Add(gProtonsNumberOfTPCdEdxPointsPass); | |
71a67ee1 | 2252 | TH1F *gProtonsITSClusterMapPass = new TH1F("gProtonsITSClusterMapPass",";ITS Layer;Entries",6,0.5,6.5); |
2253 | fQAProtonsAcceptedList->Add(gProtonsITSClusterMapPass); | |
2254 | TH1F *gProtonsDCA3DPass = new TH1F("gProtonsDCA3DPass", | |
2255 | ";dca [cm];Entries", | |
2256 | 100,0,20); | |
2257 | fQAProtonsAcceptedList->Add(gProtonsDCA3DPass); | |
735cc63d | 2258 | |
2259 | //========================================================// | |
2260 | fQAProtonsRejectedList = new TList(); | |
2261 | fQAProtonsRejectedList->SetName("fQAProtonsRejectedList"); | |
2262 | fGlobalQAList->Add(fQAProtonsRejectedList); | |
2263 | //Rejected protons | |
2264 | TH1F *gProtonsITSClustersReject = new TH1F("gProtonsITSClustersReject", | |
2265 | ";N_{clusters} (ITS);Entries", | |
2266 | 7,0,7); | |
2267 | gProtonsITSClustersReject->SetFillColor(kRed-2); | |
2268 | fQAProtonsRejectedList->Add(gProtonsITSClustersReject); | |
2269 | TH1F *gProtonsChi2PerClusterITSReject = new TH1F("gProtonsChi2PerClusterITSReject", | |
2270 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2271 | 100,0,4); | |
2272 | gProtonsChi2PerClusterITSReject->SetFillColor(kRed-2); | |
2273 | fQAProtonsRejectedList->Add(gProtonsChi2PerClusterITSReject); | |
2274 | TH1F *gProtonsTPCClustersReject = new TH1F("gProtonsTPCClustersReject", | |
2275 | ";N_{clusters} (TPC);Entries", | |
2276 | 100,0,200); | |
2277 | gProtonsTPCClustersReject->SetFillColor(kRed-2); | |
2278 | fQAProtonsRejectedList->Add(gProtonsTPCClustersReject); | |
2279 | TH1F *gProtonsChi2PerClusterTPCReject = new TH1F("gProtonsChi2PerClusterTPCReject", | |
2280 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2281 | 100,0,4); | |
2282 | gProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2); | |
2283 | fQAProtonsRejectedList->Add(gProtonsChi2PerClusterTPCReject); | |
2284 | TH1F *gProtonsExtCov11Reject = new TH1F("gProtonsExtCov11Reject", | |
2285 | ";#sigma_{y} [cm];Entries", | |
2286 | 100,0,4); | |
2287 | gProtonsExtCov11Reject->SetFillColor(kRed-2); | |
2288 | fQAProtonsRejectedList->Add(gProtonsExtCov11Reject); | |
2289 | TH1F *gProtonsExtCov22Reject = new TH1F("gProtonsExtCov22Reject", | |
2290 | ";#sigma_{z} [cm];Entries", | |
2291 | 100,0,4); | |
2292 | gProtonsExtCov22Reject->SetFillColor(kRed-2); | |
2293 | fQAProtonsRejectedList->Add(gProtonsExtCov22Reject); | |
2294 | TH1F *gProtonsExtCov33Reject = new TH1F("gProtonsExtCov33Reject", | |
2295 | ";#sigma_{sin(#phi)};Entries", | |
2296 | 100,0,4); | |
2297 | gProtonsExtCov33Reject->SetFillColor(kRed-2); | |
2298 | fQAProtonsRejectedList->Add(gProtonsExtCov33Reject); | |
2299 | TH1F *gProtonsExtCov44Reject = new TH1F("gProtonsExtCov44Reject", | |
2300 | ";#sigma_{tan(#lambda)};Entries", | |
2301 | 100,0,4); | |
2302 | gProtonsExtCov44Reject->SetFillColor(kRed-2); | |
2303 | fQAProtonsRejectedList->Add(gProtonsExtCov44Reject); | |
2304 | TH1F *gProtonsExtCov55Reject = new TH1F("gProtonsExtCov55Reject", | |
2305 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2306 | 100,0,4); | |
2307 | gProtonsExtCov55Reject->SetFillColor(kRed-2); | |
2308 | fQAProtonsRejectedList->Add(gProtonsExtCov55Reject); | |
2309 | TH1F *gProtonsSigmaToVertexReject = new TH1F("gProtonsSigmaToVertexReject", | |
2310 | ";#sigma_{Vertex};Entries", | |
2311 | 100,0,10); | |
2312 | gProtonsSigmaToVertexReject->SetFillColor(kRed-2); | |
2313 | fQAProtonsRejectedList->Add(gProtonsSigmaToVertexReject); | |
2314 | TH1F *gProtonsSigmaToVertexTPCReject = new TH1F("gProtonsSigmaToVertexTPCReject", | |
2315 | ";#sigma_{Vertex};Entries", | |
2316 | 100,0,10); | |
2317 | gProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2); | |
2318 | fQAProtonsRejectedList->Add(gProtonsSigmaToVertexTPCReject); | |
2319 | TH1F *gProtonsDCAXYReject = new TH1F("gProtonsDCAXYReject", | |
2320 | ";DCA_{xy} [cm];Entries", | |
2321 | 100,0,20); | |
2322 | gProtonsDCAXYReject->SetFillColor(kRed-2); | |
2323 | fQAProtonsRejectedList->Add(gProtonsDCAXYReject); | |
2324 | TH1F *gProtonsDCAXYTPCReject = new TH1F("gProtonsDCAXYTPCReject", | |
2325 | ";DCA_{xy} [cm];Entries", | |
2326 | 100,0,20); | |
2327 | gProtonsDCAXYTPCReject->SetFillColor(kRed-2); | |
2328 | fQAProtonsRejectedList->Add(gProtonsDCAXYTPCReject); | |
2329 | TH1F *gProtonsDCAZReject = new TH1F("gProtonsDCAZReject", | |
2330 | ";DCA_{z} [cm];Entries", | |
2331 | 100,0,20); | |
2332 | gProtonsDCAZReject->SetFillColor(kRed-2); | |
2333 | fQAProtonsRejectedList->Add(gProtonsDCAZReject); | |
2334 | TH1F *gProtonsDCAZTPCReject = new TH1F("gProtonsDCAZTPCReject", | |
2335 | ";DCA_{z} [cm];Entries", | |
2336 | 100,0,20); | |
2337 | gProtonsDCAZTPCReject->SetFillColor(kRed-2); | |
2338 | fQAProtonsRejectedList->Add(gProtonsDCAZTPCReject); | |
2339 | TH1F *gProtonsConstrainChi2Reject = new TH1F("gProtonsConstrainChi2Reject", | |
2340 | ";Log_{10}(#chi^{2});Entries", | |
2341 | 100,-10,10); | |
2342 | gProtonsConstrainChi2Reject->SetFillColor(kRed-2); | |
2343 | fQAProtonsRejectedList->Add(gProtonsConstrainChi2Reject); | |
2344 | TH1F *gProtonsITSRefitReject = new TH1F("gProtonsITSRefitReject", | |
2345 | "",10,-1,1); | |
2346 | gProtonsITSRefitReject->SetFillColor(kRed-2); | |
2347 | fQAProtonsRejectedList->Add(gProtonsITSRefitReject); | |
2348 | TH1F *gProtonsTPCRefitReject = new TH1F("gProtonsTPCRefitReject", | |
2349 | "",10,-1,1); | |
2350 | gProtonsTPCRefitReject->SetFillColor(kRed-2); | |
2351 | fQAProtonsRejectedList->Add(gProtonsTPCRefitReject); | |
2352 | TH1F *gProtonsESDpidReject = new TH1F("gProtonsESDpidReject", | |
2353 | "",10,-1,1); | |
2354 | gProtonsESDpidReject->SetFillColor(kRed-2); | |
2355 | fQAProtonsRejectedList->Add(gProtonsESDpidReject); | |
2356 | TH1F *gProtonsTPCpidReject = new TH1F("gProtonsTPCpidReject", | |
2357 | "",10,-1,1); | |
2358 | gProtonsTPCpidReject->SetFillColor(kRed-2); | |
2359 | fQAProtonsRejectedList->Add(gProtonsTPCpidReject); | |
2360 | TH1F *gProtonsPointOnITSLayer1Reject = new TH1F("gProtonsPointOnITSLayer1Reject", | |
2361 | "",10,-1,1); | |
2362 | gProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2); | |
2363 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer1Reject); | |
2364 | TH1F *gProtonsPointOnITSLayer2Reject = new TH1F("gProtonsPointOnITSLayer2Reject", | |
2365 | "",10,-1,1); | |
2366 | gProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2); | |
2367 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer2Reject); | |
2368 | TH1F *gProtonsPointOnITSLayer3Reject = new TH1F("gProtonsPointOnITSLayer3Reject", | |
2369 | "",10,-1,1); | |
2370 | gProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2); | |
2371 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer3Reject); | |
2372 | TH1F *gProtonsPointOnITSLayer4Reject = new TH1F("gProtonsPointOnITSLayer4Reject", | |
2373 | "",10,-1,1); | |
2374 | gProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2); | |
2375 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer4Reject); | |
2376 | TH1F *gProtonsPointOnITSLayer5Reject = new TH1F("gProtonsPointOnITSLayer5Reject", | |
2377 | "",10,-1,1); | |
2378 | gProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2); | |
2379 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer5Reject); | |
2380 | TH1F *gProtonsPointOnITSLayer6Reject = new TH1F("gProtonsPointOnITSLayer6Reject", | |
2381 | "",10,-1,1); | |
2382 | gProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2); | |
2383 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer6Reject); | |
2384 | TH1F *gProtonsNumberOfTPCdEdxPointsReject = new TH1F("gProtonsNumberOfTPCdEdxPointsReject","",100,0,200); | |
2385 | gProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2); | |
2386 | fQAProtonsRejectedList->Add(gProtonsNumberOfTPCdEdxPointsReject); | |
71a67ee1 | 2387 | TH1F *gProtonsITSClusterMapReject = new TH1F("gProtonsITSClusterMapReject",";ITS Layer;Entries",6,0.5,6.5); |
2388 | gProtonsITSClusterMapReject->SetFillColor(kRed-2); | |
2389 | fQAProtonsRejectedList->Add(gProtonsITSClusterMapReject); | |
2390 | TH1F *gProtonsDCA3DReject = new TH1F("gProtonsDCA3DReject", | |
2391 | ";dca [cm];Entries", | |
2392 | 100,0,20); | |
2393 | gProtonsDCA3DReject->SetFillColor(kRed-2); | |
2394 | fQAProtonsRejectedList->Add(gProtonsDCA3DReject); | |
735cc63d | 2395 | |
2396 | //========================================================// | |
2397 | fQAAntiProtonsAcceptedList = new TList(); | |
2398 | fQAAntiProtonsAcceptedList->SetName("fQAAntiProtonsAcceptedList"); | |
2399 | fGlobalQAList->Add(fQAAntiProtonsAcceptedList); | |
2400 | //Accepted antiprotons | |
2401 | TH1F *gAntiProtonsITSClustersPass = new TH1F("gAntiProtonsITSClustersPass", | |
2402 | ";N_{clusters} (ITS);Entries", | |
2403 | 7,0,7); | |
2404 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClustersPass); | |
2405 | TH1F *gAntiProtonsChi2PerClusterITSPass = new TH1F("gAntiProtonsChi2PerClusterITSPass", | |
2406 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2407 | 100,0,4); | |
2408 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterITSPass); | |
2409 | TH1F *gAntiProtonsTPCClustersPass = new TH1F("gAntiProtonsTPCClustersPass", | |
2410 | ";N_{clusters} (TPC);Entries", | |
2411 | 100,0,200); | |
2412 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCClustersPass); | |
2413 | TH1F *gAntiProtonsChi2PerClusterTPCPass = new TH1F("gAntiProtonsChi2PerClusterTPCPass", | |
2414 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2415 | 100,0,4); | |
2416 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterTPCPass); | |
2417 | TH1F *gAntiProtonsExtCov11Pass = new TH1F("gAntiProtonsExtCov11Pass", | |
2418 | ";#sigma_{y} [cm];Entries", | |
2419 | 100,0,4); | |
2420 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov11Pass); | |
2421 | TH1F *gAntiProtonsExtCov22Pass = new TH1F("gAntiProtonsExtCov22Pass", | |
2422 | ";#sigma_{z} [cm];Entries", | |
2423 | 100,0,4); | |
2424 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov22Pass); | |
2425 | TH1F *gAntiProtonsExtCov33Pass = new TH1F("gAntiProtonsExtCov33Pass", | |
2426 | ";#sigma_{sin(#phi)};Entries", | |
2427 | 100,0,4); | |
2428 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov33Pass); | |
2429 | TH1F *gAntiProtonsExtCov44Pass = new TH1F("gAntiProtonsExtCov44Pass", | |
2430 | ";#sigma_{tan(#lambda)};Entries", | |
2431 | 100,0,4); | |
2432 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov44Pass); | |
2433 | TH1F *gAntiProtonsExtCov55Pass = new TH1F("gAntiProtonsExtCov55Pass", | |
2434 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2435 | 100,0,4); | |
2436 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov55Pass); | |
2437 | TH1F *gAntiProtonsSigmaToVertexPass = new TH1F("gAntiProtonsSigmaToVertexPass", | |
2438 | ";#sigma_{Vertex};Entries", | |
2439 | 100,0,10); | |
2440 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexPass); | |
2441 | TH1F *gAntiProtonsSigmaToVertexTPCPass = new TH1F("gAntiProtonsSigmaToVertexTPCPass", | |
2442 | ";#sigma_{Vertex};Entries", | |
2443 | 100,0,10); | |
2444 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexTPCPass); | |
2445 | TH1F *gAntiProtonsDCAXYPass = new TH1F("gAntiProtonsDCAXYPass", | |
2446 | ";DCA_{xy} [cm];Entries", | |
2447 | 100,0,20); | |
2448 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYPass); | |
2449 | TH1F *gAntiProtonsDCAXYTPCPass = new TH1F("gAntiProtonsDCAXYTPCPass", | |
2450 | ";DCA_{xy} [cm];Entries", | |
2451 | 100,0,20); | |
2452 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYTPCPass); | |
2453 | TH1F *gAntiProtonsDCAZPass = new TH1F("gAntiProtonsDCAZPass", | |
2454 | ";DCA_{z} [cm];Entries", | |
2455 | 100,0,20); | |
2456 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZPass); | |
2457 | TH1F *gAntiProtonsDCAZTPCPass = new TH1F("gAntiProtonsDCAZTPCPass", | |
2458 | ";DCA_{z} [cm];Entries", | |
2459 | 100,0,20); | |
2460 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZTPCPass); | |
2461 | TH1F *gAntiProtonsConstrainChi2Pass = new TH1F("gAntiProtonsConstrainChi2Pass", | |
2462 | ";Log_{10}(#chi^{2});Entries", | |
2463 | 100,-10,10); | |
2464 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsConstrainChi2Pass); | |
2465 | TH1F *gAntiProtonsITSRefitPass = new TH1F("gAntiProtonsITSRefitPass", | |
2466 | "",10,-1,1); | |
2467 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSRefitPass); | |
2468 | TH1F *gAntiProtonsTPCRefitPass = new TH1F("gAntiProtonsTPCRefitPass", | |
2469 | "",10,-1,1); | |
2470 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCRefitPass); | |
2471 | TH1F *gAntiProtonsESDpidPass = new TH1F("gAntiProtonsESDpidPass", | |
2472 | "",10,-1,1); | |
2473 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsESDpidPass); | |
2474 | TH1F *gAntiProtonsTPCpidPass = new TH1F("gAntiProtonsTPCpidPass", | |
2475 | "",10,-1,1); | |
2476 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCpidPass); | |
2477 | TH1F *gAntiProtonsPointOnITSLayer1Pass = new TH1F("gAntiProtonsPointOnITSLayer1Pass", | |
2478 | "",10,-1,1); | |
2479 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer1Pass); | |
2480 | TH1F *gAntiProtonsPointOnITSLayer2Pass = new TH1F("gAntiProtonsPointOnITSLayer2Pass", | |
2481 | "",10,-1,1); | |
2482 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer2Pass); | |
2483 | TH1F *gAntiProtonsPointOnITSLayer3Pass = new TH1F("gAntiProtonsPointOnITSLayer3Pass", | |
2484 | "",10,-1,1); | |
2485 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer3Pass); | |
2486 | TH1F *gAntiProtonsPointOnITSLayer4Pass = new TH1F("gAntiProtonsPointOnITSLayer4Pass", | |
2487 | "",10,-1,1); | |
2488 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer4Pass); | |
2489 | TH1F *gAntiProtonsPointOnITSLayer5Pass = new TH1F("gAntiProtonsPointOnITSLayer5Pass", | |
2490 | "",10,-1,1); | |
2491 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer5Pass); | |
2492 | TH1F *gAntiProtonsPointOnITSLayer6Pass = new TH1F("gAntiProtonsPointOnITSLayer6Pass", | |
2493 | "",10,-1,1); | |
2494 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer6Pass); | |
2495 | TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200); | |
2496 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsNumberOfTPCdEdxPointsPass); | |
71a67ee1 | 2497 | TH1F *gAntiProtonsITSClusterMapPass = new TH1F("gAntiProtonsITSClusterMapPass",";ITS Layer;Entries",6,0.5,6.5); |
2498 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClusterMapPass); | |
2499 | TH1F *gAntiProtonsDCA3DPass = new TH1F("gAntiProtonsDCA3DPass", | |
2500 | ";dca [cm];Entries", | |
2501 | 100,0,20); | |
2502 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCA3DPass); | |
2503 | ||
735cc63d | 2504 | //========================================================// |
2505 | fQAAntiProtonsRejectedList = new TList(); | |
2506 | fQAAntiProtonsRejectedList->SetName("fQAAntiProtonsRejectedList"); | |
2507 | fGlobalQAList->Add(fQAAntiProtonsRejectedList); | |
2508 | //Rejected antiprotons | |
2509 | TH1F *gAntiProtonsITSClustersReject = new TH1F("gAntiProtonsITSClustersReject", | |
2510 | ";N_{clusters} (ITS);Entries", | |
2511 | 7,0,7); | |
2512 | gAntiProtonsITSClustersReject->SetFillColor(kRed-2); | |
2513 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClustersReject); | |
2514 | TH1F *gAntiProtonsChi2PerClusterITSReject = new TH1F("gAntiProtonsChi2PerClusterITSReject", | |
2515 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2516 | 100,0,4); | |
2517 | gAntiProtonsChi2PerClusterITSReject->SetFillColor(kRed-2); | |
2518 | fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterITSReject); | |
2519 | TH1F *gAntiProtonsTPCClustersReject = new TH1F("gAntiProtonsTPCClustersReject", | |
2520 | ";N_{clusters} (TPC);Entries", | |
2521 | 100,0,200); | |
2522 | gAntiProtonsTPCClustersReject->SetFillColor(kRed-2); | |
2523 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCClustersReject); | |
2524 | TH1F *gAntiProtonsChi2PerClusterTPCReject = new TH1F("gAntiProtonsChi2PerClusterTPCReject", | |
2525 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2526 | 100,0,4); | |
2527 | gAntiProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2); | |
2528 | fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterTPCReject); | |
2529 | TH1F *gAntiProtonsExtCov11Reject = new TH1F("gAntiProtonsExtCov11Reject", | |
2530 | ";#sigma_{y} [cm];Entries", | |
2531 | 100,0,4); | |
2532 | gAntiProtonsExtCov11Reject->SetFillColor(kRed-2); | |
2533 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov11Reject); | |
2534 | TH1F *gAntiProtonsExtCov22Reject = new TH1F("gAntiProtonsExtCov22Reject", | |
2535 | ";#sigma_{z} [cm];Entries", | |
2536 | 100,0,4); | |
2537 | gAntiProtonsExtCov22Reject->SetFillColor(kRed-2); | |
2538 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov22Reject); | |
2539 | TH1F *gAntiProtonsExtCov33Reject = new TH1F("gAntiProtonsExtCov33Reject", | |
2540 | ";#sigma_{sin(#phi)};Entries", | |
2541 | 100,0,4); | |
2542 | gAntiProtonsExtCov33Reject->SetFillColor(kRed-2); | |
2543 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov33Reject); | |
2544 | TH1F *gAntiProtonsExtCov44Reject = new TH1F("gAntiProtonsExtCov44Reject", | |
2545 | ";#sigma_{tan(#lambda)};Entries", | |
2546 | 100,0,4); | |
2547 | gAntiProtonsExtCov44Reject->SetFillColor(kRed-2); | |
2548 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov44Reject); | |
2549 | TH1F *gAntiProtonsExtCov55Reject = new TH1F("gAntiProtonsExtCov55Reject", | |
2550 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2551 | 100,0,4); | |
2552 | gAntiProtonsExtCov55Reject->SetFillColor(kRed-2); | |
2553 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov55Reject); | |
2554 | TH1F *gAntiProtonsSigmaToVertexReject = new TH1F("gAntiProtonsSigmaToVertexReject", | |
2555 | ";#sigma_{Vertex};Entries", | |
2556 | 100,0,10); | |
2557 | gAntiProtonsSigmaToVertexReject->SetFillColor(kRed-2); | |
2558 | fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexReject); | |
2559 | TH1F *gAntiProtonsSigmaToVertexTPCReject = new TH1F("gAntiProtonsSigmaToVertexTPCReject", | |
2560 | ";#sigma_{Vertex};Entries", | |
2561 | 100,0,10); | |
2562 | gAntiProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2); | |
2563 | fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexTPCReject); | |
2564 | TH1F *gAntiProtonsDCAXYReject = new TH1F("gAntiProtonsDCAXYReject", | |
2565 | ";DCA_{xy} [cm];Entries", | |
2566 | 100,0,20); | |
2567 | gAntiProtonsDCAXYReject->SetFillColor(kRed-2); | |
2568 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYReject); | |
2569 | TH1F *gAntiProtonsDCAXYTPCReject = new TH1F("gAntiProtonsDCAXYTPCReject", | |
2570 | ";DCA_{xy} [cm];Entries", | |
2571 | 100,0,20); | |
2572 | gAntiProtonsDCAXYTPCReject->SetFillColor(kRed-2); | |
2573 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYTPCReject); | |
2574 | TH1F *gAntiProtonsDCAZReject = new TH1F("gAntiProtonsDCAZReject", | |
2575 | ";DCA_{z} [cm];Entries", | |
2576 | 100,0,20); | |
2577 | gAntiProtonsDCAZReject->SetFillColor(kRed-2); | |
2578 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZReject); | |
2579 | TH1F *gAntiProtonsDCAZTPCReject = new TH1F("gAntiProtonsDCAZTPCReject", | |
2580 | ";DCA_{z} [cm];Entries", | |
2581 | 100,0,20); | |
2582 | gAntiProtonsDCAZTPCReject->SetFillColor(kRed-2); | |
2583 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZTPCReject); | |
2584 | TH1F *gAntiProtonsConstrainChi2Reject = new TH1F("gAntiProtonsConstrainChi2Reject", | |
2585 | ";Log_{10}(#chi^{2});Entries", | |
2586 | 100,-10,10); | |
2587 | gAntiProtonsConstrainChi2Reject->SetFillColor(kRed-2); | |
2588 | fQAAntiProtonsRejectedList->Add(gAntiProtonsConstrainChi2Reject); | |
2589 | TH1F *gAntiProtonsITSRefitReject = new TH1F("gAntiProtonsITSRefitReject", | |
2590 | "",10,-1,1); | |
2591 | gAntiProtonsITSRefitReject->SetFillColor(kRed-2); | |
2592 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSRefitReject); | |
2593 | TH1F *gAntiProtonsTPCRefitReject = new TH1F("gAntiProtonsTPCRefitReject", | |
2594 | "",10,-1,1); | |
2595 | gAntiProtonsTPCRefitReject->SetFillColor(kRed-2); | |
2596 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCRefitReject); | |
2597 | TH1F *gAntiProtonsESDpidReject = new TH1F("gAntiProtonsESDpidReject", | |
2598 | "",10,-1,1); | |
2599 | gAntiProtonsESDpidReject->SetFillColor(kRed-2); | |
2600 | fQAAntiProtonsRejectedList->Add(gAntiProtonsESDpidReject); | |
2601 | TH1F *gAntiProtonsTPCpidReject = new TH1F("gAntiProtonsTPCpidReject", | |
2602 | "",10,-1,1); | |
2603 | gAntiProtonsTPCpidReject->SetFillColor(kRed-2); | |
2604 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCpidReject); | |
2605 | TH1F *gAntiProtonsPointOnITSLayer1Reject = new TH1F("gAntiProtonsPointOnITSLayer1Reject", | |
2606 | "",10,-1,1); | |
2607 | gAntiProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2); | |
2608 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer1Reject); | |
2609 | TH1F *gAntiProtonsPointOnITSLayer2Reject = new TH1F("gAntiProtonsPointOnITSLayer2Reject", | |
2610 | "",10,-1,1); | |
2611 | gAntiProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2); | |
2612 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer2Reject); | |
2613 | TH1F *gAntiProtonsPointOnITSLayer3Reject = new TH1F("gAntiProtonsPointOnITSLayer3Reject", | |
2614 | "",10,-1,1); | |
2615 | gAntiProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2); | |
2616 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer3Reject); | |
2617 | TH1F *gAntiProtonsPointOnITSLayer4Reject = new TH1F("gAntiProtonsPointOnITSLayer4Reject", | |
2618 | "",10,-1,1); | |
2619 | gAntiProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2); | |
2620 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer4Reject); | |
2621 | TH1F *gAntiProtonsPointOnITSLayer5Reject = new TH1F("gAntiProtonsPointOnITSLayer5Reject", | |
2622 | "",10,-1,1); | |
2623 | gAntiProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2); | |
2624 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer5Reject); | |
2625 | TH1F *gAntiProtonsPointOnITSLayer6Reject = new TH1F("gAntiProtonsPointOnITSLayer6Reject", | |
2626 | "",10,-1,1); | |
2627 | gAntiProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2); | |
2628 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer6Reject); | |
2629 | TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200); | |
2630 | gAntiProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2); | |
2631 | fQAAntiProtonsRejectedList->Add(gAntiProtonsNumberOfTPCdEdxPointsReject); | |
71a67ee1 | 2632 | TH1F *gAntiProtonsITSClusterMapReject = new TH1F("gAntiProtonsITSClusterMapReject",";ITS Layer;Entries",6,0.5,6.5); |
2633 | gAntiProtonsITSClusterMapReject->SetFillColor(kRed-2); | |
2634 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClusterMapReject); | |
2635 | TH1F *gAntiProtonsDCA3DReject = new TH1F("gAntiProtonsDCA3DReject", | |
2636 | ";dca [cm];Entries", | |
2637 | 100,0,20); | |
2638 | gAntiProtonsDCA3DReject->SetFillColor(kRed-2); | |
2639 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCA3DReject); | |
735cc63d | 2640 | } |
39f2a708 | 2641 | |
735cc63d | 2642 | //____________________________________________________________________// |
2643 | void AliProtonAnalysis::FillQA(AliESDEvent *esd, | |
2644 | const AliESDVertex *vertex, | |
2645 | AliESDtrack* track) { | |
2646 | //Fills the QA histograms | |
2647 | Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0; | |
2648 | Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance. | |
71a67ee1 | 2649 | Double_t dca3D = 0.0; |
3770a478 | 2650 | Float_t dcaXY = 0.0, dcaZ = 0.0; |
735cc63d | 2651 | |
2652 | if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) { | |
2653 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
2654 | if(!tpcTrack) { | |
2655 | gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; | |
2656 | dca[0] = -100.; dca[1] = -100.; | |
2657 | cov[0] = -100.; cov[1] = -100.; cov[2] = -100.; | |
2658 | } | |
2659 | else { | |
2660 | gPt = tpcTrack->Pt(); | |
2661 | gPx = tpcTrack->Px(); | |
2662 | gPy = tpcTrack->Py(); | |
2663 | gPz = tpcTrack->Pz(); | |
2664 | tpcTrack->PropagateToDCA(vertex, | |
2665 | esd->GetMagneticField(), | |
2666 | 100.,dca,cov); | |
2667 | } | |
2668 | } | |
3770a478 | 2669 | if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kFullHybrid) { |
2670 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
2671 | AliExternalTrackParam cParam; | |
2672 | if(!tpcTrack) { | |
2673 | gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; | |
2674 | dca[0] = -100.; dca[1] = -100.; | |
2675 | cov[0] = -100.; cov[1] = -100.; cov[2] = -100.; | |
2676 | } | |
2677 | else { | |
2678 | gPt = tpcTrack->Pt(); | |
2679 | gPx = tpcTrack->Px(); | |
2680 | gPy = tpcTrack->Py(); | |
2681 | gPz = tpcTrack->Pz(); | |
2682 | track->RelateToVertex(vertex, | |
2683 | esd->GetMagneticField(), | |
2684 | 100.,&cParam); | |
2685 | track->GetImpactParameters(dcaXY,dcaZ); | |
2686 | dca[0] = dcaXY; dca[1] = dcaZ; | |
2687 | } | |
2688 | } | |
735cc63d | 2689 | else{ |
2690 | gPt = track->Pt(); | |
2691 | gPx = track->Px(); | |
2692 | gPy = track->Py(); | |
2693 | gPz = track->Pz(); | |
2694 | track->PropagateToDCA(vertex, | |
2695 | esd->GetMagneticField(), | |
2696 | 100.,dca,cov); | |
2697 | } | |
39f2a708 | 2698 | |
71a67ee1 | 2699 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + |
2700 | TMath::Power(dca[1],2)); | |
2701 | ||
735cc63d | 2702 | Int_t fIdxInt[200]; |
2703 | Int_t nClustersITS = track->GetITSclusters(fIdxInt); | |
2704 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
39f2a708 | 2705 | |
735cc63d | 2706 | Float_t chi2PerClusterITS = -1; |
2707 | if (nClustersITS!=0) | |
2708 | chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS); | |
2709 | Float_t chi2PerClusterTPC = -1; | |
2710 | if (nClustersTPC!=0) | |
2711 | chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC); | |
39f2a708 | 2712 | |
735cc63d | 2713 | Double_t extCov[15]; |
2714 | track->GetExternalCovariance(extCov); | |
2715 | ||
2716 | //protons | |
2717 | if(track->Charge() > 0) { | |
2718 | if(fProtonAnalysisBase->IsUsedMinITSClusters()) { | |
2719 | if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) { | |
2720 | ((TH1F *)(fQAProtonsRejectedList->At(0)))->Fill(nClustersITS); | |
2721 | } | |
2722 | else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters()) | |
2723 | ((TH1F *)(fQAProtonsAcceptedList->At(0)))->Fill(nClustersITS); | |
2724 | }//ITS clusters | |
2725 | if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) { | |
2726 | if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) { | |
2727 | ((TH1F *)(fQAProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS); | |
2728 | } | |
2729 | else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster()) | |
2730 | ((TH1F *)(fQAProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS); | |
2731 | }//chi2 per ITS cluster | |
2732 | if(fProtonAnalysisBase->IsUsedMinTPCClusters()) { | |
2733 | if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) { | |
2734 | ((TH1F *)(fQAProtonsRejectedList->At(2)))->Fill(nClustersTPC); | |
2735 | } | |
2736 | else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) { | |
2737 | ((TH1F *)(fQAProtonsAcceptedList->At(2)))->Fill(nClustersTPC); | |
2738 | } | |
2739 | }//TPC clusters | |
2740 | if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) { | |
2741 | if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) { | |
2742 | ((TH1F *)(fQAProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC); | |
2743 | } | |
2744 | else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) | |
2745 | ((TH1F *)(fQAProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC); | |
2746 | }//chi2 per TPC cluster | |
2747 | if(fProtonAnalysisBase->IsUsedMaxCov11()) { | |
2748 | if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) { | |
2749 | ((TH1F *)(fQAProtonsRejectedList->At(4)))->Fill(extCov[0]); | |
2750 | } | |
2751 | else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11()) | |
2752 | ((TH1F *)(fQAProtonsAcceptedList->At(4)))->Fill(extCov[0]); | |
2753 | }//cov11 | |
2754 | if(fProtonAnalysisBase->IsUsedMaxCov22()) { | |
2755 | if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) { | |
2756 | ((TH1F *)(fQAProtonsRejectedList->At(5)))->Fill(extCov[2]); | |
2757 | } | |
2758 | else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22()) | |
2759 | ((TH1F *)(fQAProtonsAcceptedList->At(5)))->Fill(extCov[2]); | |
2760 | }//cov11 | |
2761 | if(fProtonAnalysisBase->IsUsedMaxCov33()) { | |
2762 | if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) { | |
2763 | ((TH1F *)(fQAProtonsRejectedList->At(6)))->Fill(extCov[5]); | |
2764 | } | |
2765 | else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33()) | |
2766 | ((TH1F *)(fQAProtonsAcceptedList->At(6)))->Fill(extCov[5]); | |
2767 | }//cov11 | |
2768 | if(fProtonAnalysisBase->IsUsedMaxCov44()) { | |
2769 | if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) { | |
2770 | ((TH1F *)(fQAProtonsRejectedList->At(7)))->Fill(extCov[9]); | |
2771 | } | |
2772 | else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44()) | |
2773 | ((TH1F *)(fQAProtonsAcceptedList->At(7)))->Fill(extCov[9]); | |
2774 | }//cov11 | |
2775 | if(fProtonAnalysisBase->IsUsedMaxCov55()) { | |
2776 | if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) { | |
2777 | ((TH1F *)(fQAProtonsRejectedList->At(8)))->Fill(extCov[14]); | |
2778 | } | |
2779 | else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55()) | |
2780 | ((TH1F *)(fQAProtonsAcceptedList->At(8)))->Fill(extCov[14]); | |
2781 | }//cov55 | |
2782 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) { | |
2783 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) { | |
2784 | ((TH1F *)(fQAProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2785 | } | |
2786 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex()) | |
2787 | ((TH1F *)(fQAProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2788 | }//sigma to vertex | |
2789 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) { | |
2790 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) { | |
2791 | ((TH1F *)(fQAProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2792 | } | |
2793 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) | |
2794 | ((TH1F *)(fQAProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2795 | }//sigma to vertex TPC | |
2796 | if(fProtonAnalysisBase->IsUsedMaxDCAXY()) { | |
2797 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) { | |
2798 | ((TH1F *)(fQAProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2799 | } | |
2800 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) | |
2801 | ((TH1F *)(fQAProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2802 | }//DCA xy global tracking | |
2803 | if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) { | |
2804 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) { | |
2805 | ((TH1F *)(fQAProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2806 | } | |
2807 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC()) | |
2808 | ((TH1F *)(fQAProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2809 | }//DCA xy TPC tracking | |
2810 | if(fProtonAnalysisBase->IsUsedMaxDCAZ()) { | |
2811 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) { | |
2812 | ((TH1F *)(fQAProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2813 | } | |
2814 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) | |
2815 | ((TH1F *)(fQAProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2816 | }//DCA z global tracking | |
2817 | if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) { | |
2818 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) { | |
2819 | ((TH1F *)(fQAProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2820 | } | |
2821 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC()) | |
2822 | ((TH1F *)(fQAProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2823 | }//DCA z TPC tracking | |
2824 | if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) { | |
2825 | if(track->GetConstrainedChi2() > 0) { | |
2826 | if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) { | |
2827 | ((TH1F *)(fQAProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2828 | } | |
2829 | else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2()) | |
2830 | ((TH1F *)(fQAProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2831 | } | |
2832 | }//constrain chi2 - vertex | |
2833 | if(fProtonAnalysisBase->IsUsedITSRefit()) { | |
2834 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) { | |
2835 | ((TH1F *)(fQAProtonsRejectedList->At(16)))->Fill(0); | |
2836 | } | |
2837 | else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0) | |
2838 | ((TH1F *)(fQAProtonsAcceptedList->At(16)))->Fill(0); | |
2839 | }//ITS refit | |
2840 | if(fProtonAnalysisBase->IsUsedTPCRefit()) { | |
2841 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) { | |
2842 | ((TH1F *)(fQAProtonsRejectedList->At(17)))->Fill(0); | |
2843 | } | |
2844 | else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0) | |
2845 | ((TH1F *)(fQAProtonsAcceptedList->At(17)))->Fill(0); | |
2846 | }//TPC refit | |
2847 | if(fProtonAnalysisBase->IsUsedESDpid()) { | |
2848 | if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) { | |
2849 | ((TH1F *)(fQAProtonsRejectedList->At(18)))->Fill(0); | |
2850 | } | |
2851 | else if((track->GetStatus() & AliESDtrack::kESDpid) != 0) | |
2852 | ((TH1F *)(fQAProtonsAcceptedList->At(18)))->Fill(0); | |
2853 | }//ESD pid | |
2854 | if(fProtonAnalysisBase->IsUsedTPCpid()) { | |
2855 | if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) { | |
2856 | ((TH1F *)(fQAProtonsRejectedList->At(19)))->Fill(0); | |
2857 | } | |
2858 | else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0) | |
2859 | ((TH1F *)(fQAProtonsAcceptedList->At(19)))->Fill(0); | |
2860 | }//TPC pid | |
2861 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) { | |
2862 | if(!track->HasPointOnITSLayer(0)) { | |
2863 | ((TH1F *)(fQAProtonsRejectedList->At(20)))->Fill(0); | |
2864 | } | |
2865 | else if(track->HasPointOnITSLayer(0)) | |
2866 | ((TH1F *)(fQAProtonsAcceptedList->At(20)))->Fill(0); | |
2867 | }//point on SPD1 | |
2868 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) { | |
2869 | if(!track->HasPointOnITSLayer(1)) { | |
2870 | ((TH1F *)(fQAProtonsRejectedList->At(21)))->Fill(0); | |
2871 | } | |
2872 | else if(track->HasPointOnITSLayer(1)) | |
2873 | ((TH1F *)(fQAProtonsAcceptedList->At(21)))->Fill(0); | |
2874 | }//point on SPD2 | |
2875 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) { | |
2876 | if(!track->HasPointOnITSLayer(2)) { | |
2877 | ((TH1F *)(fQAProtonsRejectedList->At(22)))->Fill(0); | |
2878 | } | |
2879 | else if(track->HasPointOnITSLayer(2)) | |
2880 | ((TH1F *)(fQAProtonsAcceptedList->At(22)))->Fill(0); | |
2881 | }//point on SDD1 | |
2882 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) { | |
2883 | if(!track->HasPointOnITSLayer(3)) { | |
2884 | ((TH1F *)(fQAProtonsRejectedList->At(23)))->Fill(0); | |
2885 | } | |
2886 | else if(track->HasPointOnITSLayer(3)) | |
2887 | ((TH1F *)(fQAProtonsAcceptedList->At(23)))->Fill(0); | |
2888 | }//point on SDD2 | |
2889 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) { | |
2890 | if(!track->HasPointOnITSLayer(4)) { | |
2891 | ((TH1F *)(fQAProtonsRejectedList->At(24)))->Fill(0); | |
2892 | } | |
2893 | else if(track->HasPointOnITSLayer(4)) | |
2894 | ((TH1F *)(fQAProtonsAcceptedList->At(24)))->Fill(0); | |
2895 | }//point on SSD1 | |
2896 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) { | |
2897 | if(!track->HasPointOnITSLayer(5)) { | |
2898 | ((TH1F *)(fQAProtonsRejectedList->At(25)))->Fill(0); | |
2899 | } | |
2900 | else if(track->HasPointOnITSLayer(5)) | |
2901 | ((TH1F *)(fQAProtonsAcceptedList->At(25)))->Fill(0); | |
2902 | }//point on SSD2 | |
2903 | if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) { | |
2904 | if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) { | |
2905 | ((TH1F *)(fQAProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2906 | } | |
2907 | if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints()) | |
2908 | ((TH1F *)(fQAProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2909 | }//number of TPC points for the dE/dx | |
71a67ee1 | 2910 | if(fProtonAnalysisBase->IsUsedPointOnSPDLayer()) { |
2911 | if((!track->HasPointOnITSLayer(0))&&(!track->HasPointOnITSLayer(1))) { | |
2912 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
2913 | if(track->HasPointOnITSLayer(iLayer)) | |
2914 | ((TH1F *)(fQAProtonsRejectedList->At(27)))->Fill(iLayer+1); | |
2915 | } | |
2916 | } | |
2917 | else if((track->HasPointOnITSLayer(0))||(track->HasPointOnITSLayer(1))) { | |
2918 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
2919 | if(track->HasPointOnITSLayer(iLayer)) | |
2920 | ((TH1F *)(fQAProtonsAcceptedList->At(27)))->Fill(iLayer+1); | |
2921 | } | |
2922 | } | |
2923 | }//point on either SPD layers | |
2924 | if(fProtonAnalysisBase->IsUsedMaxDCA3D()) { | |
2925 | if(dca3D > fProtonAnalysisBase->GetMaxDCA3D()) { | |
2926 | ((TH1F *)(fQAProtonsRejectedList->At(28)))->Fill(dca3D); | |
2927 | } | |
2928 | if(dca3D < fProtonAnalysisBase->GetMaxDCA3D()) | |
2929 | ((TH1F *)(fQAProtonsAcceptedList->At(28)))->Fill(dca3D); | |
2930 | }//dca3D | |
735cc63d | 2931 | }//protons |
2932 | ||
2933 | //antiprotons | |
2934 | if(track->Charge() < 0) { | |
2935 | if(fProtonAnalysisBase->IsUsedMinITSClusters()) { | |
2936 | if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) { | |
2937 | ((TH1F *)(fQAAntiProtonsRejectedList->At(0)))->Fill(nClustersITS); | |
2938 | } | |
2939 | else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters()) | |
2940 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS); | |
2941 | }//ITS clusters | |
2942 | if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) { | |
2943 | if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) { | |
2944 | ((TH1F *)(fQAAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS); | |
2945 | } | |
2946 | else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster()) | |
2947 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS); | |
2948 | }//chi2 per ITS cluster | |
2949 | if(fProtonAnalysisBase->IsUsedMinTPCClusters()) { | |
2950 | if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) { | |
2951 | ((TH1F *)(fQAAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC); | |
2952 | } | |
2953 | else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) { | |
2954 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC); | |
2955 | } | |
2956 | }//TPC clusters | |
2957 | if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) { | |
2958 | if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) { | |
2959 | ((TH1F *)(fQAAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC); | |
2960 | } | |
2961 | else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) | |
2962 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC); | |
2963 | }//chi2 per TPC cluster | |
2964 | if(fProtonAnalysisBase->IsUsedMaxCov11()) { | |
2965 | if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) { | |
2966 | ((TH1F *)(fQAAntiProtonsRejectedList->At(4)))->Fill(extCov[0]); | |
2967 | } | |
2968 | else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11()) | |
2969 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]); | |
2970 | }//cov11 | |
2971 | if(fProtonAnalysisBase->IsUsedMaxCov22()) { | |
2972 | if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) { | |
2973 | ((TH1F *)(fQAAntiProtonsRejectedList->At(5)))->Fill(extCov[2]); | |
2974 | } | |
2975 | else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22()) | |
2976 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]); | |
2977 | }//cov11 | |
2978 | if(fProtonAnalysisBase->IsUsedMaxCov33()) { | |
2979 | if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) { | |
2980 | ((TH1F *)(fQAAntiProtonsRejectedList->At(6)))->Fill(extCov[5]); | |
2981 | } | |
2982 | else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33()) | |
2983 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]); | |
2984 | }//cov11 | |
2985 | if(fProtonAnalysisBase->IsUsedMaxCov44()) { | |
2986 | if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) { | |
2987 | ((TH1F *)(fQAAntiProtonsRejectedList->At(7)))->Fill(extCov[9]); | |
2988 | } | |
2989 | else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44()) | |
2990 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]); | |
2991 | }//cov11 | |
2992 | if(fProtonAnalysisBase->IsUsedMaxCov55()) { | |
2993 | if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) { | |
2994 | ((TH1F *)(fQAAntiProtonsRejectedList->At(8)))->Fill(extCov[14]); | |
2995 | } | |
2996 | else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55()) | |
2997 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]); | |
2998 | }//cov55 | |
2999 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) { | |
3000 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) { | |
3001 | ((TH1F *)(fQAAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
3002 | } | |
3003 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex()) | |
3004 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
3005 | }//sigma to vertex | |
3006 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) { | |
3007 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) { | |
3008 | ((TH1F *)(fQAAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
3009 | } | |
3010 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) | |
3011 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
3012 | }//sigma to vertex TPC | |
3013 | if(fProtonAnalysisBase->IsUsedMaxDCAXY()) { | |
3014 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) { | |
3015 | ((TH1F *)(fQAAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
3016 | } | |
3017 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) | |
3018 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
3019 | }//DCA xy global tracking | |
3020 | if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) { | |
3021 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) { | |
3022 | ((TH1F *)(fQAAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
3023 | } | |
3024 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC()) | |
3025 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
3026 | }//DCA xy TPC tracking | |
3027 | if(fProtonAnalysisBase->IsUsedMaxDCAZ()) { | |
3028 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) { | |
3029 | ((TH1F *)(fQAAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
3030 | } | |
3031 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) | |
3032 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
3033 | }//DCA z global tracking | |
3034 | if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) { | |
3035 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) { | |
3036 | ((TH1F *)(fQAAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
3037 | } | |
3038 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC()) | |
3039 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
3040 | }//DCA z TPC tracking | |
3041 | if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) { | |
3042 | if(track->GetConstrainedChi2() > 0) { | |
3043 | if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) { | |
3044 | ((TH1F *)(fQAAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
3045 | } | |
3046 | else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2()) | |
3047 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
3048 | } | |
3049 | }//constrain chi2 - vertex | |
3050 | if(fProtonAnalysisBase->IsUsedITSRefit()) { | |
3051 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) { | |
3052 | ((TH1F *)(fQAAntiProtonsRejectedList->At(16)))->Fill(0); | |
3053 | } | |
3054 | else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0) | |
3055 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(16)))->Fill(0); | |
3056 | }//ITS refit | |
3057 | if(fProtonAnalysisBase->IsUsedTPCRefit()) { | |
3058 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) { | |
3059 | ((TH1F *)(fQAAntiProtonsRejectedList->At(17)))->Fill(0); | |
3060 | } | |
3061 | else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0) | |
3062 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(17)))->Fill(0); | |
3063 | }//TPC refit | |
3064 | if(fProtonAnalysisBase->IsUsedESDpid()) { | |
3065 | if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) { | |
3066 | ((TH1F *)(fQAAntiProtonsRejectedList->At(18)))->Fill(0); | |
3067 | } | |
3068 | else if((track->GetStatus() & AliESDtrack::kESDpid) != 0) | |
3069 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(18)))->Fill(0); | |
3070 | }//ESD pid | |
3071 | if(fProtonAnalysisBase->IsUsedTPCpid()) { | |
3072 | if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) { | |
3073 | ((TH1F *)(fQAAntiProtonsRejectedList->At(19)))->Fill(0); | |
3074 | } | |
3075 | else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0) | |
3076 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(19)))->Fill(0); | |
3077 | }//TPC pid | |
3078 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) { | |
3079 | if(!track->HasPointOnITSLayer(0)) { | |
3080 | ((TH1F *)(fQAAntiProtonsRejectedList->At(20)))->Fill(0); | |
3081 | } | |
3082 | else if(track->HasPointOnITSLayer(0)) | |
3083 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(20)))->Fill(0); | |
3084 | }//point on SPD1 | |
3085 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) { | |
3086 | if(!track->HasPointOnITSLayer(1)) { | |
3087 | ((TH1F *)(fQAAntiProtonsRejectedList->At(21)))->Fill(0); | |
3088 | } | |
3089 | else if(track->HasPointOnITSLayer(1)) | |
3090 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(21)))->Fill(0); | |
3091 | }//point on SPD2 | |
3092 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) { | |
3093 | if(!track->HasPointOnITSLayer(2)) { | |
3094 | ((TH1F *)(fQAAntiProtonsRejectedList->At(22)))->Fill(0); | |
3095 | } | |
3096 | else if(track->HasPointOnITSLayer(2)) | |
3097 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(22)))->Fill(0); | |
3098 | }//point on SDD1 | |
3099 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) { | |
3100 | if(!track->HasPointOnITSLayer(3)) { | |
3101 | ((TH1F *)(fQAAntiProtonsRejectedList->At(23)))->Fill(0); | |
3102 | } | |
3103 | else if(track->HasPointOnITSLayer(3)) | |
3104 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(23)))->Fill(0); | |
3105 | }//point on SDD2 | |
3106 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) { | |
3107 | if(!track->HasPointOnITSLayer(4)) { | |
3108 | ((TH1F *)(fQAAntiProtonsRejectedList->At(24)))->Fill(0); | |
3109 | } | |
3110 | else if(track->HasPointOnITSLayer(4)) | |
3111 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(24)))->Fill(0); | |
3112 | }//point on SSD1 | |
3113 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) { | |
3114 | if(!track->HasPointOnITSLayer(5)) { | |
3115 | ((TH1F *)(fQAAntiProtonsRejectedList->At(25)))->Fill(0); | |
3116 | } | |
3117 | else if(track->HasPointOnITSLayer(5)) | |
3118 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(25)))->Fill(0); | |
3119 | }//point on SSD2 | |
3120 | if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) { | |
3121 | if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) { | |
3122 | ((TH1F *)(fQAAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN()); | |
3123 | } | |
3124 | if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints()) | |
3125 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN()); | |
3126 | }//number of TPC points for the dE/dx | |
71a67ee1 | 3127 | if(fProtonAnalysisBase->IsUsedPointOnSPDLayer()) { |
3128 | if((!track->HasPointOnITSLayer(0))&&(!track->HasPointOnITSLayer(1))) { | |
3129 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
3130 | if(track->HasPointOnITSLayer(iLayer)) | |
3131 | ((TH1F *)(fQAAntiProtonsRejectedList->At(27)))->Fill(iLayer+1); | |
3132 | } | |
3133 | } | |
3134 | else if((track->HasPointOnITSLayer(0))||(track->HasPointOnITSLayer(1))) { | |
3135 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
3136 | if(track->HasPointOnITSLayer(iLayer)) | |
3137 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(27)))->Fill(iLayer+1); | |
3138 | } | |
3139 | } | |
3140 | }//point on either SPD layers | |
3141 | if(fProtonAnalysisBase->IsUsedMaxDCA3D()) { | |
3142 | if(dca3D > fProtonAnalysisBase->GetMaxDCA3D()) { | |
3143 | ((TH1F *)(fQAAntiProtonsRejectedList->At(28)))->Fill(dca3D); | |
3144 | } | |
3145 | if(dca3D < fProtonAnalysisBase->GetMaxDCA3D()) | |
3146 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(28)))->Fill(dca3D); | |
3147 | }//dca3D | |
735cc63d | 3148 | }//antiprotons |
3149 | } |