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