]>
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 | |
19 | // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch | |
20 | //----------------------------------------------------------------- | |
21 | #include <Riostream.h> | |
22 | #include <TFile.h> | |
23 | #include <TSystem.h> | |
aafecd8b | 24 | #include <TF1.h> |
734d2c12 | 25 | #include <TH2F.h> |
26 | #include <TH1D.h> | |
3f6d0c08 | 27 | #include <TH1I.h> |
e4358d7f | 28 | #include <TParticle.h> |
734d2c12 | 29 | |
30 | #include "AliProtonAnalysis.h" | |
31 | ||
2b748670 | 32 | #include <AliExternalTrackParam.h> |
ee4ca40d | 33 | #include <AliAODEvent.h> |
734d2c12 | 34 | #include <AliESDEvent.h> |
35 | #include <AliLog.h> | |
ee4ca40d | 36 | #include <AliPID.h> |
e4358d7f | 37 | #include <AliStack.h> |
39f2a708 | 38 | #include <AliCFContainer.h> |
39 | #include <AliCFEffGrid.h> | |
40 | #include <AliCFEffGrid.h> | |
e4358d7f | 41 | |
734d2c12 | 42 | ClassImp(AliProtonAnalysis) |
43 | ||
44 | //____________________________________________________________________// | |
45 | AliProtonAnalysis::AliProtonAnalysis() : | |
46 | TObject(), | |
47 | fNBinsY(0), fMinY(0), fMaxY(0), | |
48 | fNBinsPt(0), fMinPt(0), fMaxPt(0), | |
49 | fMinTPCClusters(0), fMinITSClusters(0), | |
50 | fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0), | |
51 | fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0), | |
52 | fMaxSigmaToVertex(0), | |
53 | fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE), | |
54 | fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE), | |
55 | fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE), fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE), | |
56 | fMaxSigmaToVertexFlag(kFALSE), | |
57 | fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE), | |
ef1a8dbd | 58 | fQAHistograms(kFALSE), |
59 | fGlobalQAList(0), fQA2DList(0), | |
60 | fQAPrimaryProtonsAcceptedList(0), | |
61 | fQAPrimaryProtonsRejectedList(0), | |
62 | fQASecondaryProtonsAcceptedList(0), | |
63 | fQASecondaryProtonsRejectedList(0), | |
64 | fQAPrimaryAntiProtonsAcceptedList(0), | |
65 | fQAPrimaryAntiProtonsRejectedList(0), | |
66 | fQASecondaryAntiProtonsAcceptedList(0), | |
67 | fQASecondaryAntiProtonsRejectedList(0), | |
aafecd8b | 68 | fFunctionProbabilityFlag(kFALSE), |
69 | fElectronFunction(0), fMuonFunction(0), | |
70 | fPionFunction(0), fKaonFunction(0), fProtonFunction(0), | |
39f2a708 | 71 | fUseTPCOnly(kFALSE), fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
72 | fCorrectionList2D(0), fEfficiencyList1D(0), fCorrectionList1D(0) { | |
734d2c12 | 73 | //Default constructor |
74 | for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0; | |
39f2a708 | 75 | fCorrectionList2D = new TList(); |
76 | fEfficiencyList1D = new TList(); | |
77 | fCorrectionList1D = new TList(); | |
734d2c12 | 78 | } |
79 | ||
80 | //____________________________________________________________________// | |
81 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY,Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt) : | |
82 | TObject(), | |
83 | fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY), | |
84 | fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt), | |
aafecd8b | 85 | fMinTPCClusters(0), fMinITSClusters(0), |
86 | fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0), | |
87 | fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0), | |
88 | fMaxSigmaToVertex(0), | |
89 | fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE), | |
90 | fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE), | |
91 | fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE), fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE), | |
92 | fMaxSigmaToVertexFlag(kFALSE), | |
93 | fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE), | |
ef1a8dbd | 94 | fQAHistograms(kFALSE), |
95 | fGlobalQAList(0), fQA2DList(0), | |
96 | fQAPrimaryProtonsAcceptedList(0), | |
97 | fQAPrimaryProtonsRejectedList(0), | |
98 | fQASecondaryProtonsAcceptedList(0), | |
99 | fQASecondaryProtonsRejectedList(0), | |
100 | fQAPrimaryAntiProtonsAcceptedList(0), | |
101 | fQAPrimaryAntiProtonsRejectedList(0), | |
102 | fQASecondaryAntiProtonsAcceptedList(0), | |
103 | fQASecondaryAntiProtonsRejectedList(0), | |
aafecd8b | 104 | fFunctionProbabilityFlag(kFALSE), |
105 | fElectronFunction(0), fMuonFunction(0), | |
106 | fPionFunction(0), fKaonFunction(0), fProtonFunction(0), | |
39f2a708 | 107 | fUseTPCOnly(kFALSE), fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
108 | fCorrectionList2D(0), fEfficiencyList1D(0), fCorrectionList1D(0) { | |
734d2c12 | 109 | //Default constructor |
110 | ||
3f6d0c08 | 111 | fHistEvents = new TH1I("fHistEvents","Analyzed events",1,0,1); |
112 | ||
734d2c12 | 113 | fHistYPtProtons = new TH2F("fHistYPtProtons","y-Pt Protons",fNBinsY,fMinY,fMaxY,fNBinsPt,fMinPt,fMaxPt); |
114 | fHistYPtProtons->SetStats(kTRUE); | |
115 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV]"); | |
116 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
117 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
118 | ||
119 | fHistYPtAntiProtons = new TH2F("fHistYPtAntiProtons","y-Pt Antiprotons",fNBinsY,fMinY,fMaxY,fNBinsPt,fMinPt,fMaxPt); | |
120 | fHistYPtAntiProtons->SetStats(kTRUE); | |
121 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV]"); | |
122 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
123 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
124 | } | |
125 | ||
126 | //____________________________________________________________________// | |
127 | AliProtonAnalysis::~AliProtonAnalysis() { | |
128 | //Default destructor | |
39f2a708 | 129 | if(fHistEvents) delete fHistEvents; |
130 | if(fHistYPtProtons) delete fHistYPtProtons; | |
131 | if(fHistYPtAntiProtons) delete fHistYPtAntiProtons; | |
132 | if(fCorrectionList2D) delete fCorrectionList2D; | |
133 | if(fEfficiencyList1D) delete fEfficiencyList1D; | |
134 | if(fCorrectionList1D) delete fCorrectionList1D; | |
ef1a8dbd | 135 | if(fGlobalQAList) delete fGlobalQAList; |
136 | if(fQA2DList) delete fQA2DList; | |
137 | if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList; | |
138 | if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList; | |
139 | if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList; | |
140 | if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList; | |
141 | if(fQAPrimaryAntiProtonsAcceptedList) delete fQAPrimaryAntiProtonsAcceptedList; | |
142 | if(fQAPrimaryAntiProtonsRejectedList) delete fQAPrimaryAntiProtonsRejectedList; | |
143 | if(fQASecondaryAntiProtonsAcceptedList) delete fQASecondaryAntiProtonsAcceptedList; | |
144 | if(fQASecondaryAntiProtonsRejectedList) delete fQASecondaryAntiProtonsRejectedList; | |
734d2c12 | 145 | } |
146 | ||
147 | //____________________________________________________________________// | |
ef1a8dbd | 148 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY, |
149 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt) { | |
734d2c12 | 150 | fNBinsY = nbinsY; |
151 | fMinY = fLowY; | |
152 | fMaxY = fHighY; | |
153 | fNBinsPt = nbinsPt; | |
154 | fMinPt = fLowPt; | |
155 | fMaxPt = fHighPt; | |
156 | ||
3f6d0c08 | 157 | fHistEvents = new TH1I("fHistEvents","Anallyzed events",1,0,1); |
158 | ||
734d2c12 | 159 | fHistYPtProtons = new TH2F("fHistYPtProtons","y-Pt Protons",fNBinsY,fMinY,fMaxY,fNBinsPt,fMinPt,fMaxPt); |
160 | fHistYPtProtons->SetStats(kTRUE); | |
161 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV]"); | |
162 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
163 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
164 | ||
165 | fHistYPtAntiProtons = new TH2F("fHistYPtAntiProtons","y-Pt Antiprotons",fNBinsY,fMinY,fMaxY,fNBinsPt,fMinPt,fMaxPt); | |
166 | fHistYPtAntiProtons->SetStats(kTRUE); | |
167 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV]"); | |
168 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
169 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
170 | } | |
171 | ||
172 | //____________________________________________________________________// | |
2b748670 | 173 | Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) { |
174 | Bool_t status = kTRUE; | |
175 | ||
734d2c12 | 176 | TFile *file = TFile::Open(filename); |
2b748670 | 177 | if(!file) { |
178 | cout<<"Could not find the input file "<<filename<<endl; | |
179 | status = kFALSE; | |
180 | } | |
181 | ||
e4358d7f | 182 | TList *list = (TList *)file->Get("outputList1"); |
2b748670 | 183 | if(list) { |
184 | cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl; | |
185 | fHistYPtProtons = (TH2F *)list->At(0); | |
186 | fHistYPtAntiProtons = (TH2F *)list->At(1); | |
3f6d0c08 | 187 | fHistEvents = (TH1I *)list->At(2); |
2b748670 | 188 | } |
189 | else if(!list) { | |
190 | cout<<"Retrieving objects from the file... "<<endl; | |
191 | fHistYPtProtons = (TH2F *)file->Get("fHistYPtProtons"); | |
192 | fHistYPtAntiProtons = (TH2F *)file->Get("fHistYPtAntiProtons"); | |
3f6d0c08 | 193 | fHistEvents = (TH1I *)file->Get("fHistEvents"); |
2b748670 | 194 | } |
3f6d0c08 | 195 | if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents)) { |
2b748670 | 196 | cout<<"Input containers were not found!!!"<<endl; |
197 | status = kFALSE; | |
198 | } | |
199 | else { | |
200 | fHistYPtProtons->Sumw2(); | |
201 | fHistYPtAntiProtons->Sumw2(); | |
202 | } | |
203 | ||
204 | return status; | |
734d2c12 | 205 | } |
206 | ||
207 | //____________________________________________________________________// | |
208 | TH1D *AliProtonAnalysis::GetProtonYHistogram() { | |
3f6d0c08 | 209 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
734d2c12 | 210 | TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),"e"); |
211 | fYProtons->SetStats(kFALSE); | |
3f6d0c08 | 212 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 213 | fYProtons->SetTitle("dN/dy protons"); |
214 | fYProtons->SetMarkerStyle(kFullCircle); | |
215 | fYProtons->SetMarkerColor(4); | |
3f6d0c08 | 216 | if(nAnalyzedEvents > 0) |
217 | fYProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 218 | |
219 | return fYProtons; | |
220 | } | |
221 | ||
222 | //____________________________________________________________________// | |
223 | TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() { | |
3f6d0c08 | 224 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
734d2c12 | 225 | TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"e"); |
226 | fYAntiProtons->SetStats(kFALSE); | |
3f6d0c08 | 227 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 228 | fYAntiProtons->SetTitle("dN/dy antiprotons"); |
229 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
230 | fYAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 231 | if(nAnalyzedEvents > 0) |
232 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 233 | |
234 | return fYAntiProtons; | |
235 | } | |
236 | ||
237 | //____________________________________________________________________// | |
238 | TH1D *AliProtonAnalysis::GetProtonPtHistogram() { | |
3f6d0c08 | 239 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
734d2c12 | 240 | TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"e"); |
241 | fPtProtons->SetStats(kFALSE); | |
3f6d0c08 | 242 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 243 | fPtProtons->SetTitle("dN/dPt protons"); |
244 | fPtProtons->SetMarkerStyle(kFullCircle); | |
245 | fPtProtons->SetMarkerColor(4); | |
3f6d0c08 | 246 | if(nAnalyzedEvents > 0) |
247 | fPtProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 248 | |
249 | return fPtProtons; | |
250 | } | |
251 | ||
252 | //____________________________________________________________________// | |
253 | TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() { | |
3f6d0c08 | 254 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
734d2c12 | 255 | TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"e"); |
256 | fPtAntiProtons->SetStats(kFALSE); | |
3f6d0c08 | 257 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 258 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); |
259 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
260 | fPtAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 261 | if(nAnalyzedEvents > 0) |
262 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 263 | |
264 | return fPtAntiProtons; | |
265 | } | |
266 | ||
267 | //____________________________________________________________________// | |
268 | TH1D *AliProtonAnalysis::GetYRatioHistogram() { | |
269 | TH1D *fYProtons = GetProtonYHistogram(); | |
270 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
271 | ||
272 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
273 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0); | |
274 | hRatioY->SetMarkerStyle(kFullCircle); | |
275 | hRatioY->SetMarkerColor(4); | |
276 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
277 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
278 | hRatioY->GetXaxis()->SetTitle("y"); | |
279 | hRatioY->GetXaxis()->SetTitleColor(1); | |
280 | hRatioY->SetStats(kFALSE); | |
281 | ||
282 | return hRatioY; | |
283 | } | |
284 | ||
285 | //____________________________________________________________________// | |
286 | TH1D *AliProtonAnalysis::GetPtRatioHistogram() { | |
287 | TH1D *fPtProtons = GetProtonPtHistogram(); | |
288 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
289 | ||
290 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
291 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0); | |
292 | hRatioPt->SetMarkerStyle(kFullCircle); | |
293 | hRatioPt->SetMarkerColor(4); | |
294 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
295 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
296 | hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
297 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
298 | hRatioPt->SetStats(kFALSE); | |
299 | ||
300 | return hRatioPt; | |
301 | } | |
302 | ||
303 | //____________________________________________________________________// | |
304 | TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() { | |
305 | TH1D *fYProtons = GetProtonYHistogram(); | |
306 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
307 | ||
308 | TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
309 | hsum->Add(fYProtons,fYAntiProtons,1.0,1.0); | |
310 | ||
311 | TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
312 | hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0); | |
313 | ||
314 | TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
315 | hAsymmetryY->Divide(hdiff,hsum,2.0,1.); | |
316 | hAsymmetryY->SetMarkerStyle(kFullCircle); | |
317 | hAsymmetryY->SetMarkerColor(4); | |
318 | hAsymmetryY->GetYaxis()->SetTitle("A_{p}"); | |
319 | hAsymmetryY->GetYaxis()->SetTitleOffset(1.4); | |
320 | hAsymmetryY->GetXaxis()->SetTitle("y"); | |
321 | hAsymmetryY->GetXaxis()->SetTitleColor(1); | |
322 | hAsymmetryY->SetStats(kFALSE); | |
323 | ||
324 | return hAsymmetryY; | |
325 | } | |
326 | ||
327 | //____________________________________________________________________// | |
328 | TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() { | |
329 | TH1D *fPtProtons = GetProtonPtHistogram(); | |
330 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
331 | ||
332 | TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
333 | hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0); | |
334 | ||
335 | TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
336 | hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0); | |
337 | ||
338 | TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
339 | hAsymmetryPt->Divide(hdiff,hsum,2.0,1.); | |
340 | hAsymmetryPt->SetMarkerStyle(kFullCircle); | |
341 | hAsymmetryPt->SetMarkerColor(4); | |
342 | hAsymmetryPt->GetYaxis()->SetTitle("A_{p}"); | |
343 | hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4); | |
344 | hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
345 | hAsymmetryPt->GetXaxis()->SetTitleColor(1); | |
346 | hAsymmetryPt->SetStats(kFALSE); | |
347 | ||
348 | return hAsymmetryPt; | |
349 | } | |
350 | ||
aafecd8b | 351 | //____________________________________________________________________// |
352 | Double_t AliProtonAnalysis::GetParticleFraction(Int_t i, Double_t p) { | |
8b8b0b7a | 353 | Double_t partFrac=0; |
aafecd8b | 354 | if(fFunctionProbabilityFlag) { |
355 | if(i == 0) partFrac = fElectronFunction->Eval(p); | |
356 | if(i == 1) partFrac = fMuonFunction->Eval(p); | |
357 | if(i == 2) partFrac = fPionFunction->Eval(p); | |
358 | if(i == 3) partFrac = fKaonFunction->Eval(p); | |
359 | if(i == 4) partFrac = fProtonFunction->Eval(p); | |
360 | } | |
361 | else partFrac = fPartFrac[i]; | |
362 | ||
363 | return partFrac; | |
364 | } | |
365 | ||
734d2c12 | 366 | //____________________________________________________________________// |
367 | void AliProtonAnalysis::Analyze(AliESDEvent* fESD) { | |
e4358d7f | 368 | //Main analysis part - ESD |
3f6d0c08 | 369 | fHistEvents->Fill(0); //number of analyzed events |
2b748670 | 370 | Double_t Pt = 0.0, P = 0.0; |
734d2c12 | 371 | Int_t nGoodTracks = fESD->GetNumberOfTracks(); |
372 | for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) { | |
373 | AliESDtrack* track = fESD->GetTrack(iTracks); | |
2b748670 | 374 | Double_t probability[5]; |
375 | ||
376 | if(IsAccepted(track)) { | |
377 | if(fUseTPCOnly) { | |
378 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
379 | if(!tpcTrack) continue; | |
380 | Pt = tpcTrack->Pt(); | |
381 | P = tpcTrack->P(); | |
382 | ||
383 | //pid | |
384 | track->GetTPCpid(probability); | |
385 | Double_t rcc = 0.0; | |
386 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
387 | rcc += probability[i]*GetParticleFraction(i,P); | |
388 | if(rcc == 0.0) continue; | |
389 | Double_t w[5]; | |
390 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
391 | w[i] = probability[i]*GetParticleFraction(i,P)/rcc; | |
392 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w); | |
393 | if(fParticleType == 4) { | |
394 | if(tpcTrack->Charge() > 0) | |
395 | fHistYPtProtons->Fill(Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()),Pt); | |
396 | else if(tpcTrack->Charge() < 0) | |
397 | fHistYPtAntiProtons->Fill(Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()),Pt); | |
398 | }//proton check | |
399 | }//TPC only tracks | |
400 | else if(!fUseTPCOnly) { | |
401 | Pt = track->Pt(); | |
402 | P = track->P(); | |
734d2c12 | 403 | |
2b748670 | 404 | //pid |
405 | track->GetESDpid(probability); | |
406 | Double_t rcc = 0.0; | |
407 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
408 | rcc += probability[i]*GetParticleFraction(i,P); | |
409 | if(rcc == 0.0) continue; | |
410 | Double_t w[5]; | |
411 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
412 | w[i] = probability[i]*GetParticleFraction(i,P)/rcc; | |
413 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w); | |
414 | if(fParticleType == 4) { | |
415 | //cout<<"(Anti)protons found..."<<endl; | |
416 | if(track->Charge() > 0) | |
417 | fHistYPtProtons->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
418 | else if(track->Charge() < 0) | |
419 | fHistYPtAntiProtons->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
420 | }//proton check | |
421 | }//combined tracking | |
734d2c12 | 422 | }//cuts |
423 | }//track loop | |
424 | } | |
425 | ||
ee4ca40d | 426 | //____________________________________________________________________// |
427 | void AliProtonAnalysis::Analyze(AliAODEvent* fAOD) { | |
e4358d7f | 428 | //Main analysis part - AOD |
3f6d0c08 | 429 | fHistEvents->Fill(0); //number of analyzed events |
ee4ca40d | 430 | Int_t nGoodTracks = fAOD->GetNumberOfTracks(); |
431 | for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) { | |
432 | AliAODTrack* track = fAOD->GetTrack(iTracks); | |
433 | Double_t Pt = track->Pt(); | |
434 | Double_t P = track->P(); | |
435 | ||
436 | //pid | |
437 | Double_t probability[10]; | |
438 | track->GetPID(probability); | |
439 | Double_t rcc = 0.0; | |
440 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*GetParticleFraction(i,P); | |
441 | if(rcc == 0.0) continue; | |
738619fd | 442 | Double_t w[10]; |
ee4ca40d | 443 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*GetParticleFraction(i,P)/rcc; |
444 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w); | |
445 | if(fParticleType == 4) { | |
446 | if(track->Charge() > 0) fHistYPtProtons->Fill(track->Y(fParticleType),Pt); | |
447 | else if(track->Charge() < 0) fHistYPtAntiProtons->Fill(track->Y(fParticleType),Pt); | |
448 | }//proton check | |
449 | }//track loop | |
450 | } | |
451 | ||
e4358d7f | 452 | //____________________________________________________________________// |
453 | void AliProtonAnalysis::Analyze(AliStack* stack) { | |
454 | //Main analysis part - MC | |
3f6d0c08 | 455 | fHistEvents->Fill(0); //number of analyzed events |
e4358d7f | 456 | for(Int_t i = 0; i < stack->GetNprimary(); i++) { |
457 | TParticle *particle = stack->Particle(i); | |
458 | if(particle->Pt() < 0.1) continue; | |
459 | if(TMath::Abs(particle->Eta()) > 1.0) continue; | |
460 | Int_t pdgcode = particle->GetPdgCode(); | |
461 | if(pdgcode == 2212) fHistYPtProtons->Fill(Rapidity(particle->Px(), | |
462 | particle->Py(), | |
463 | particle->Pz()), | |
464 | particle->Pt()); | |
465 | if(pdgcode == -2212) fHistYPtAntiProtons->Fill(Rapidity(particle->Px(), | |
466 | particle->Py(), | |
467 | particle->Pz()), | |
468 | particle->Pt()); | |
469 | }//particle loop | |
470 | } | |
471 | ||
734d2c12 | 472 | //____________________________________________________________________// |
473 | Bool_t AliProtonAnalysis::IsAccepted(AliESDtrack* track) { | |
474 | // Checks if the track is excluded from the cuts | |
2b748670 | 475 | Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0; |
476 | if(fUseTPCOnly) { | |
477 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
478 | if(!tpcTrack) { | |
479 | Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0; | |
480 | } | |
481 | else { | |
482 | Pt = tpcTrack->Pt(); | |
483 | Px = tpcTrack->Px(); | |
484 | Py = tpcTrack->Py(); | |
485 | Pz = tpcTrack->Pz(); | |
486 | } | |
487 | } | |
488 | else{ | |
489 | Pt = track->Pt(); | |
490 | Px = track->Px(); | |
491 | Py = track->Py(); | |
492 | Pz = track->Pz(); | |
493 | } | |
494 | ||
734d2c12 | 495 | Int_t fIdxInt[200]; |
496 | Int_t nClustersITS = track->GetITSclusters(fIdxInt); | |
497 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
498 | ||
499 | Float_t chi2PerClusterITS = -1; | |
ef1a8dbd | 500 | if (nClustersITS!=0) |
501 | chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS); | |
502 | Float_t chi2PerClusterTPC = -1; | |
503 | if (nClustersTPC!=0) | |
504 | chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC); | |
505 | ||
506 | Double_t extCov[15]; | |
507 | track->GetExternalCovariance(extCov); | |
508 | ||
509 | if(fMinITSClustersFlag) | |
510 | if(nClustersITS < fMinITSClusters) return kFALSE; | |
511 | if(fMinTPCClustersFlag) | |
512 | if(nClustersTPC < fMinTPCClusters) return kFALSE; | |
513 | if(fMaxChi2PerTPCClusterFlag) | |
514 | if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE; | |
515 | if(fMaxChi2PerITSClusterFlag) | |
516 | if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE; | |
517 | if(fMaxCov11Flag) | |
518 | if(extCov[0] > fMaxCov11) return kFALSE; | |
519 | if(fMaxCov22Flag) | |
520 | if(extCov[2] > fMaxCov22) return kFALSE; | |
521 | if(fMaxCov33Flag) | |
522 | if(extCov[5] > fMaxCov33) return kFALSE; | |
523 | if(fMaxCov44Flag) | |
524 | if(extCov[9] > fMaxCov44) return kFALSE; | |
525 | if(fMaxCov55Flag) | |
526 | if(extCov[14] > fMaxCov55) return kFALSE; | |
527 | if(fMaxSigmaToVertexFlag) | |
528 | if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE; | |
529 | if(fITSRefitFlag) | |
530 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE; | |
531 | if(fTPCRefitFlag) | |
532 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE; | |
533 | ||
534 | if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE; | |
535 | if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY)) return kFALSE; | |
536 | ||
537 | return kTRUE; | |
538 | } | |
539 | ||
540 | //____________________________________________________________________// | |
541 | Bool_t AliProtonAnalysis::IsAccepted(AliESDtrack* track, AliStack *stack) { | |
542 | // Checks if the track is excluded from the cuts | |
543 | Bool_t status = kTRUE; | |
544 | Int_t nPrimaries = stack->GetNprimary(); | |
545 | Int_t label = TMath::Abs(track->GetLabel()); | |
546 | ||
547 | Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0; | |
548 | if(fUseTPCOnly) { | |
549 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
550 | if(!tpcTrack) { | |
551 | Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0; | |
552 | } | |
553 | else { | |
554 | Pt = tpcTrack->Pt(); | |
555 | Px = tpcTrack->Px(); | |
556 | Py = tpcTrack->Py(); | |
557 | Pz = tpcTrack->Pz(); | |
558 | } | |
559 | } | |
560 | else{ | |
561 | Pt = track->Pt(); | |
562 | Px = track->Px(); | |
563 | Py = track->Py(); | |
564 | Pz = track->Pz(); | |
565 | } | |
566 | ||
567 | Int_t fIdxInt[200]; | |
568 | Int_t nClustersITS = track->GetITSclusters(fIdxInt); | |
569 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
570 | ||
571 | Float_t chi2PerClusterITS = -1; | |
572 | if (nClustersITS!=0) | |
573 | chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS); | |
734d2c12 | 574 | Float_t chi2PerClusterTPC = -1; |
575 | if (nClustersTPC!=0) | |
576 | chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC); | |
577 | ||
578 | Double_t extCov[15]; | |
579 | track->GetExternalCovariance(extCov); | |
580 | ||
a5375b97 | 581 | if(fMinITSClustersFlag) |
734d2c12 | 582 | if(nClustersITS < fMinITSClusters) return kFALSE; |
583 | if(fMinTPCClustersFlag) | |
584 | if(nClustersTPC < fMinTPCClusters) return kFALSE; | |
585 | if(fMaxChi2PerTPCClusterFlag) | |
586 | if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE; | |
587 | if(fMaxChi2PerITSClusterFlag) | |
588 | if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE; | |
589 | if(fMaxCov11Flag) | |
590 | if(extCov[0] > fMaxCov11) return kFALSE; | |
591 | if(fMaxCov22Flag) | |
592 | if(extCov[2] > fMaxCov22) return kFALSE; | |
593 | if(fMaxCov33Flag) | |
594 | if(extCov[5] > fMaxCov33) return kFALSE; | |
595 | if(fMaxCov44Flag) | |
596 | if(extCov[9] > fMaxCov44) return kFALSE; | |
597 | if(fMaxCov55Flag) | |
598 | if(extCov[14] > fMaxCov55) return kFALSE; | |
599 | if(fMaxSigmaToVertexFlag) | |
600 | if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE; | |
601 | if(fITSRefitFlag) | |
602 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE; | |
603 | if(fTPCRefitFlag) | |
604 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE; | |
605 | ||
606 | if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE; | |
2b748670 | 607 | if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY)) return kFALSE; |
734d2c12 | 608 | |
609 | return kTRUE; | |
610 | } | |
611 | ||
612 | //____________________________________________________________________// | |
613 | Float_t AliProtonAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) { | |
614 | // Calculates the number of sigma to the vertex. | |
615 | ||
616 | Float_t b[2]; | |
617 | Float_t bRes[2]; | |
618 | Float_t bCov[3]; | |
f2eeda10 | 619 | if(fUseTPCOnly) |
620 | esdTrack->GetImpactParametersTPC(b,bCov); | |
621 | else | |
622 | esdTrack->GetImpactParameters(b,bCov); | |
623 | ||
734d2c12 | 624 | if (bCov[0]<=0 || bCov[2]<=0) { |
625 | //AliDebug(1, "Estimated b resolution lower or equal zero!"); | |
626 | bCov[0]=0; bCov[2]=0; | |
627 | } | |
628 | bRes[0] = TMath::Sqrt(bCov[0]); | |
629 | bRes[1] = TMath::Sqrt(bCov[2]); | |
630 | ||
631 | if (bRes[0] == 0 || bRes[1] ==0) return -1; | |
632 | ||
633 | Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2)); | |
634 | ||
635 | if (TMath::Exp(-d * d / 2) < 1e-10) return 1000; | |
636 | ||
637 | d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2); | |
638 | ||
639 | return d; | |
640 | } | |
641 | ||
3f6d0c08 | 642 | //____________________________________________________________________// |
2b748670 | 643 | Double_t AliProtonAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) { |
3f6d0c08 | 644 | //returns the rapidity of the proton - to be removed |
734d2c12 | 645 | Double_t fMass = 9.38270000000000048e-01; |
646 | ||
2b748670 | 647 | Double_t P = TMath::Sqrt(TMath::Power(Px,2) + |
648 | TMath::Power(Py,2) + | |
649 | TMath::Power(Pz,2)); | |
734d2c12 | 650 | Double_t energy = TMath::Sqrt(P*P + fMass*fMass); |
651 | Double_t y = -999; | |
2b748670 | 652 | if(energy != Pz) |
653 | y = 0.5*TMath::Log((energy + Pz)/(energy - Pz)); | |
734d2c12 | 654 | |
655 | return y; | |
656 | } | |
3f6d0c08 | 657 | |
658 | //____________________________________________________________________// | |
659 | Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) { | |
660 | //calculates the mean value of the ratio/asymmetry within \pm edge | |
661 | Double_t sum = 0.0; | |
662 | Int_t nentries = 0; | |
663 | //calculate the mean | |
664 | for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) { | |
665 | Double_t x = hist->GetBinCenter(i+1); | |
666 | Double_t y = hist->GetBinContent(i+1); | |
667 | if(TMath::Abs(x) < edge) { | |
668 | sum += y; | |
669 | nentries += 1; | |
670 | } | |
671 | } | |
672 | Double_t mean = 0.0; | |
673 | if(nentries != 0) | |
674 | mean = sum/nentries; | |
675 | ||
676 | //calculate the error | |
677 | for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) { | |
678 | Double_t x = hist->GetBinCenter(i+1); | |
679 | Double_t y = hist->GetBinContent(i+1); | |
680 | if(TMath::Abs(x) < edge) { | |
681 | sum += TMath::Power((mean - y),2); | |
682 | nentries += 1; | |
683 | } | |
684 | } | |
685 | ||
686 | Double_t error = 0.0; | |
687 | if(nentries != 0) | |
688 | error = TMath::Sqrt(sum)/nentries; | |
689 | ||
690 | cout<<"========================================="<<endl; | |
691 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
692 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
693 | cout<<"Mean value :"<<mean<<endl; | |
694 | cout<<"Error: "<<error<<endl; | |
695 | cout<<"========================================="<<endl; | |
696 | ||
697 | return 0; | |
698 | } | |
699 | ||
700 | //____________________________________________________________________// | |
701 | Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) { | |
702 | //calculates the (anti)proton yields within the \pm edge | |
703 | Double_t sum = 0.0, sumerror = 0.0; | |
704 | Double_t error = 0.0; | |
705 | for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) { | |
706 | Double_t x = hist->GetBinCenter(i+1); | |
707 | Double_t y = hist->GetBinContent(i+1); | |
708 | if(TMath::Abs(x) < edge) { | |
709 | sum += y; | |
710 | sumerror += TMath::Power(hist->GetBinError(i+1),2); | |
711 | } | |
712 | } | |
713 | ||
714 | error = TMath::Sqrt(sumerror); | |
715 | ||
716 | cout<<"========================================="<<endl; | |
717 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
718 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
719 | cout<<"Yields :"<<sum<<endl; | |
720 | cout<<"Error: "<<error<<endl; | |
721 | cout<<"========================================="<<endl; | |
722 | ||
723 | return 0; | |
724 | } | |
725 | ||
39f2a708 | 726 | //____________________________________________________________________// |
727 | Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
728 | // Reads the outout of the correction framework task | |
729 | // Creates the correction maps | |
730 | // Puts the results in the different TList objects | |
731 | Bool_t status = kTRUE; | |
732 | ||
733 | TFile *file = TFile::Open(filename); | |
734 | if(!file) { | |
735 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
736 | status = kFALSE; | |
737 | } | |
738 | ||
739 | AliCFContainer *corrfwContainer = (AliCFContainer*) (file->Get("container")); | |
740 | if(!corrfwContainer) { | |
741 | cout<<"CORRFW container not found!"<<endl; | |
742 | status = kFALSE; | |
743 | } | |
744 | ||
745 | Int_t nSteps = corrfwContainer->GetNStep(); | |
746 | TH2D *gYPt[4]; | |
747 | //currently the GRID is formed by the y-pT parameters | |
748 | //Add Vz as a next step | |
749 | Int_t iRap = 0, iPt = 1; | |
750 | for(Int_t iStep = 0; iStep < nSteps; iStep++) { | |
751 | gYPt[iStep] = corrfwContainer->ShowProjection(iRap,iPt,iStep); | |
752 | //fCorrectionList2D->Add(gYPt[iStep]); | |
753 | } | |
754 | ||
755 | //construct the efficiency grid from the data container | |
756 | TString gTitle = 0; | |
757 | AliCFEffGrid *efficiency[3]; //The efficiency array has nStep-1 entries!!! | |
758 | TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws - [2]) | |
759 | TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws - [2]) | |
760 | ||
761 | //Get the 2D efficiency maps | |
762 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
763 | gTitle = "Efficiency_Step0_Step"; gTitle += iStep; | |
764 | efficiency[iStep] = new AliCFEffGrid(gTitle.Data(), | |
765 | gTitle.Data(),*corrfwContainer); | |
766 | efficiency[iStep]->CalculateEfficiency(iStep,0); //eff= step[i]/step0 | |
767 | fCorrectionList2D->Add(efficiency[iStep]); | |
768 | } | |
769 | //Get the projection of the efficiency maps | |
770 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
771 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
772 | gEfficiency[iParameter][iStep-1] = efficiency[iStep]->Project(iParameter); | |
773 | fEfficiencyList1D->Add(gEfficiency[iParameter][iStep-1]); | |
774 | gTitle = "Correction_Parameter"; gTitle += iParameter+1; | |
775 | gTitle += "_Step0_Step"; gTitle += iStep; | |
776 | gCorrection[iParameter][iStep-1] = new TH1D(gTitle.Data(), | |
777 | gTitle.Data(), | |
778 | gEfficiency[iParameter][iStep-1]->GetNbinsX(), | |
779 | gEfficiency[iParameter][iStep-1]->GetXaxis()->GetXmin(), | |
780 | gEfficiency[iParameter][iStep-1]->GetXaxis()->GetXmax()); | |
781 | //initialisation of the correction | |
782 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][iStep-1]->GetNbinsX(); iBin++) | |
783 | gCorrection[iParameter][iStep-1]->SetBinContent(iBin,1.0); | |
784 | }//step loop | |
785 | }//parameter loop | |
786 | //Calculate the 1D correction parameters as a function of y and pT | |
787 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
788 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
789 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
790 | fCorrectionList1D->Add(gCorrection[iParameter][iStep-1]); | |
791 | } | |
792 | } | |
ef1a8dbd | 793 | |
794 | return status; | |
39f2a708 | 795 | } |
796 | ||
ef1a8dbd | 797 | //____________________________________________________________________// |
798 | void AliProtonAnalysis::InitQA() { | |
799 | //Initializes the QA histograms and builds the directory structure | |
800 | //2D histograms | |
801 | TDirectory *dir2D = gDirectory->mkdir("2D"); | |
802 | fGlobalQAList->Add(dir2D); dir2D->cd(); | |
803 | TH2F *gHistYPtPrimaryProtonsPass = new TH2F("gHistYPtPrimaryProtonsPass", | |
804 | ";y;P_{T} [GeV/c]", | |
805 | fNBinsY,fMinY,fMaxY, | |
806 | fNBinsPt,fMinPt,fMaxPt); | |
807 | gHistYPtPrimaryProtonsPass->SetStats(kTRUE); | |
808 | gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1); | |
809 | fQA2DList->Add(gHistYPtPrimaryProtonsPass); | |
810 | TH2F *gHistYPtPrimaryAntiProtonsPass = new TH2F("gHistYPtAntiPrimaryProtonsPass", | |
811 | ";y;P_{T} [GeV/c]", | |
812 | fNBinsY,fMinY,fMaxY, | |
813 | fNBinsPt,fMinPt,fMaxPt); | |
814 | gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE); | |
815 | gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1); | |
816 | fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass); | |
817 | TH2F *gHistYPtSecondaryProtonsPass = new TH2F("gHistYPtSecondaryAntiProtonsPass", | |
818 | ";y;P_{T} [GeV/c]", | |
819 | fNBinsY,fMinY,fMaxY, | |
820 | fNBinsPt,fMinPt,fMaxPt); | |
821 | gHistYPtSecondaryProtonsPass->SetStats(kTRUE); | |
822 | gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1); | |
823 | fQA2DList->Add(gHistYPtSecondaryProtonsPass); | |
824 | TH2F *gHistYPtSecondaryAntiAntiProtonsPass = new TH2F("gHistYPtAntiSecondaryAntiProtonsPass", | |
825 | ";y;P_{T} [GeV/c]", | |
826 | fNBinsY,fMinY,fMaxY, | |
827 | fNBinsPt,fMinPt,fMaxPt); | |
828 | gHistYPtSecondaryAntiAntiProtonsPass->SetStats(kTRUE); | |
829 | gHistYPtSecondaryAntiAntiProtonsPass->GetXaxis()->SetTitleColor(1); | |
830 | fQA2DList->Add(gHistYPtSecondaryAntiAntiProtonsPass); | |
831 | ||
832 | gDirectory->cd("../"); | |
833 | //protons | |
834 | TDirectory *dirProtons = gDirectory->mkdir("Protons"); | |
835 | fGlobalQAList->Add(dirProtons); dirProtons->cd(); | |
836 | ||
837 | //________________________________________________________________// | |
838 | TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries"); | |
839 | dirProtonsPrimary->cd(); | |
840 | TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted"); | |
841 | dirProtonsPrimaryAccepted->cd(); | |
842 | ||
843 | //Accepted primary protons | |
844 | TH1F *fPrimaryProtonsITSClustersPass = new TH1F("fPrimaryProtonsITSClustersPass", | |
845 | ";N_{clusters} (ITS);Entries", | |
846 | 7,0,7); | |
847 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsITSClustersPass); | |
848 | TH1F *fPrimaryProtonsChi2PerClusterITSPass = new TH1F("fPrimaryProtonsChi2PerClusterITSPass", | |
849 | ";x^{2}/N_{clusters} (ITS);Entries", | |
850 | 100,0,4); | |
851 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsChi2PerClusterITSPass); | |
852 | TH1F *fPrimaryProtonsTPCClustersPass = new TH1F("fPrimaryProtonsTPCClustersPass", | |
853 | ";N_{clusters} (TPC);Entries", | |
854 | 100,0,200); | |
855 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsTPCClustersPass); | |
856 | TH1F *fPrimaryProtonsChi2PerClusterTPCPass = new TH1F("fPrimaryProtonsChi2PerClusterTPCPass", | |
857 | ";x^{2}/N_{clusters} (TPC);Entries", | |
858 | 100,0,4); | |
859 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsChi2PerClusterTPCPass); | |
860 | TH1F *fPrimaryProtonsExtCov11Pass = new TH1F("fPrimaryProtonsExtCov11Pass", | |
861 | ";#sigma_{y} [cm];Entries", | |
862 | 100,0,4); | |
863 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov11Pass); | |
864 | TH1F *fPrimaryProtonsExtCov22Pass = new TH1F("fPrimaryProtonsExtCov22Pass", | |
865 | ";#sigma_{z} [cm];Entries", | |
866 | 100,0,4); | |
867 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov22Pass); | |
868 | TH1F *fPrimaryProtonsExtCov33Pass = new TH1F("fPrimaryProtonsExtCov33Pass", | |
869 | ";#sigma_{sin(#phi)};Entries", | |
870 | 100,0,4); | |
871 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov33Pass); | |
872 | TH1F *fPrimaryProtonsExtCov44Pass = new TH1F("fPrimaryProtonsExtCov44Pass", | |
873 | ";#sigma_{tan(#lambda)};Entries", | |
874 | 100,0,4); | |
875 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov44Pass); | |
876 | TH1F *fPrimaryProtonsExtCov55Pass = new TH1F("fPrimaryProtonsExtCov55Pass", | |
877 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
878 | 100,0,4); | |
879 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov55Pass); | |
880 | TH1F *fPrimaryProtonsSigmaToVertexPass = new TH1F("fPrimaryProtonsSigmaToVertexPass", | |
881 | ";#sigma_{Vertex};Entries", | |
882 | 100,0,10); | |
883 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsSigmaToVertexPass); | |
884 | TH1F *fPrimaryProtonsSigmaToVertexTPCPass = new TH1F("fPrimaryProtonsSigmaToVertexTPCPass", | |
885 | ";#sigma_{Vertex};Entries", | |
886 | 100,0,10); | |
887 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsSigmaToVertexTPCPass); | |
888 | TH1F *fPrimaryProtonsITSRefitPass = new TH1F("fPrimaryProtonsITSRefitPass", | |
889 | "",10,-1,1); | |
890 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsITSRefitPass); | |
891 | TH1F *fPrimaryProtonsTPCRefitPass = new TH1F("fPrimaryProtonsTPCRefitPass", | |
892 | "",10,-1,1); | |
893 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsTPCRefitPass); | |
894 | TH1F *fPrimaryProtonsESDpidPass = new TH1F("fPrimaryProtonsESDpidPass", | |
895 | "",10,-1,1); | |
896 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsESDpidPass); | |
897 | TH1F *fPrimaryProtonsTPCpidPass = new TH1F("fPrimaryProtonsTPCpidPass", | |
898 | "",10,-1,1); | |
899 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsTPCpidPass); | |
900 | ||
901 | //Rejected primary protons | |
902 | gDirectory->cd("../"); | |
903 | TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected"); | |
904 | dirProtonsPrimaryRejected->cd(); | |
905 | ||
906 | TH1F *fPrimaryProtonsITSClustersReject = new TH1F("fPrimaryProtonsITSClustersReject", | |
907 | ";N_{clusters} (ITS);Entries", | |
908 | 7,0,7); | |
909 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsITSClustersReject); | |
910 | TH1F *fPrimaryProtonsChi2PerClusterITSReject = new TH1F("fPrimaryProtonsChi2PerClusterITSReject", | |
911 | ";x^{2}/N_{clusters} (ITS);Entries", | |
912 | 100,0,4); | |
913 | fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsChi2PerClusterITSReject); | |
914 | TH1F *fPrimaryProtonsTPCClustersReject = new TH1F("fPrimaryProtonsTPCClustersReject", | |
915 | ";N_{clusters} (TPC);Entries", | |
916 | 100,0,200); | |
917 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsTPCClustersReject); | |
918 | TH1F *fPrimaryProtonsChi2PerClusterTPCReject = new TH1F("fPrimaryProtonsChi2PerClusterTPCReject", | |
919 | ";x^{2}/N_{clusters} (TPC);Entries", | |
920 | 100,0,4); | |
921 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsChi2PerClusterTPCReject); | |
922 | TH1F *fPrimaryProtonsExtCov11Reject = new TH1F("fPrimaryProtonsExtCov11Reject", | |
923 | ";#sigma_{y} [cm];Entries", | |
924 | 100,0,4); | |
925 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov11Reject); | |
926 | TH1F *fPrimaryProtonsExtCov22Reject = new TH1F("fPrimaryProtonsExtCov22Reject", | |
927 | ";#sigma_{z} [cm];Entries", | |
928 | 100,0,4); | |
929 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov22Reject); | |
930 | TH1F *fPrimaryProtonsExtCov33Reject = new TH1F("fPrimaryProtonsExtCov33Reject", | |
931 | ";#sigma_{sin(#phi)};Entries", | |
932 | 100,0,4); | |
933 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov33Reject); | |
934 | TH1F *fPrimaryProtonsExtCov44Reject = new TH1F("fPrimaryProtonsExtCov44Reject", | |
935 | ";#sigma_{tan(#lambda)};Entries", | |
936 | 100,0,4); | |
937 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov44Reject); | |
938 | TH1F *fPrimaryProtonsExtCov55Reject = new TH1F("fPrimaryProtonsExtCov55Reject", | |
939 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
940 | 100,0,4); | |
941 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov55Reject); | |
942 | TH1F *fPrimaryProtonsSigmaToVertexReject = new TH1F("fPrimaryProtonsSigmaToVertexReject", | |
943 | ";#sigma_{Vertex};Entries", | |
944 | 100,0,10); | |
945 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsSigmaToVertexReject); | |
946 | TH1F *fPrimaryProtonsSigmaToVertexTPCReject = new TH1F("fPrimaryProtonsSigmaToVertexTPCReject", | |
947 | ";#sigma_{Vertex};Entries", | |
948 | 100,0,10); | |
949 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsSigmaToVertexTPCReject); | |
950 | TH1F *fPrimaryProtonsITSRefitReject = new TH1F("fPrimaryProtonsITSRefitReject", | |
951 | "",10,-1,1); | |
952 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsITSRefitReject); | |
953 | TH1F *fPrimaryProtonsTPCRefitReject = new TH1F("fPrimaryProtonsTPCRefitReject", | |
954 | "",10,-1,1); | |
955 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsTPCRefitReject); | |
956 | TH1F *fPrimaryProtonsESDpidReject = new TH1F("fPrimaryProtonsESDpidReject", | |
957 | "",10,-1,1); | |
958 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsESDpidReject); | |
959 | TH1F *fPrimaryProtonsTPCpidReject = new TH1F("fPrimaryProtonsTPCpidReject", | |
960 | "",10,-1,1); | |
961 | fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsTPCpidReject); | |
962 | ||
963 | //________________________________________________________________// | |
964 | gDirectory->cd("../../"); | |
965 | ||
966 | TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries"); | |
967 | dirProtonsSecondary->cd(); | |
968 | TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted"); | |
969 | dirProtonsSecondaryAccepted->cd(); | |
970 | ||
971 | //Accepted secondary protons | |
972 | TH1F *fSecondaryProtonsITSClustersPass = new TH1F("fSecondaryProtonsITSClustersPass", | |
973 | ";N_{clusters} (ITS);Entries", | |
974 | 7,0,7); | |
975 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsITSClustersPass); | |
976 | TH1F *fSecondaryProtonsChi2PerClusterITSPass = new TH1F("fSecondaryProtonsChi2PerClusterITSPass", | |
977 | ";x^{2}/N_{clusters} (ITS);Entries", | |
978 | 100,0,4); | |
979 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsChi2PerClusterITSPass); | |
980 | TH1F *fSecondaryProtonsTPCClustersPass = new TH1F("fSecondaryProtonsTPCClustersPass", | |
981 | ";N_{clusters} (TPC);Entries", | |
982 | 100,0,200); | |
983 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsTPCClustersPass); | |
984 | TH1F *fSecondaryProtonsChi2PerClusterTPCPass = new TH1F("fSecondaryProtonsChi2PerClusterTPCPass", | |
985 | ";x^{2}/N_{clusters} (TPC);Entries", | |
986 | 100,0,4); | |
987 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsChi2PerClusterTPCPass); | |
988 | TH1F *fSecondaryProtonsExtCov11Pass = new TH1F("fSecondaryProtonsExtCov11Pass", | |
989 | ";#sigma_{y} [cm];Entries", | |
990 | 100,0,4); | |
991 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov11Pass); | |
992 | TH1F *fSecondaryProtonsExtCov22Pass = new TH1F("fSecondaryProtonsExtCov22Pass", | |
993 | ";#sigma_{z} [cm];Entries", | |
994 | 100,0,4); | |
995 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov22Pass); | |
996 | TH1F *fSecondaryProtonsExtCov33Pass = new TH1F("fSecondaryProtonsExtCov33Pass", | |
997 | ";#sigma_{sin(#phi)};Entries", | |
998 | 100,0,4); | |
999 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov33Pass); | |
1000 | TH1F *fSecondaryProtonsExtCov44Pass = new TH1F("fSecondaryProtonsExtCov44Pass", | |
1001 | ";#sigma_{tan(#lambda)};Entries", | |
1002 | 100,0,4); | |
1003 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov44Pass); | |
1004 | TH1F *fSecondaryProtonsExtCov55Pass = new TH1F("fSecondaryProtonsExtCov55Pass", | |
1005 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1006 | 100,0,4); | |
1007 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov55Pass); | |
1008 | TH1F *fSecondaryProtonsSigmaToVertexPass = new TH1F("fSecondaryProtonsSigmaToVertexPass", | |
1009 | ";#sigma_{Vertex};Entries", | |
1010 | 100,0,10); | |
1011 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsSigmaToVertexPass); | |
1012 | TH1F *fSecondaryProtonsSigmaToVertexTPCPass = new TH1F("fSecondaryProtonsSigmaToVertexTPCPass", | |
1013 | ";#sigma_{Vertex};Entries", | |
1014 | 100,0,10); | |
1015 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsSigmaToVertexTPCPass); | |
1016 | TH1F *fSecondaryProtonsITSRefitPass = new TH1F("fSecondaryProtonsITSRefitPass", | |
1017 | "",10,-1,1); | |
1018 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsITSRefitPass); | |
1019 | TH1F *fSecondaryProtonsTPCRefitPass = new TH1F("fSecondaryProtonsTPCRefitPass", | |
1020 | "",10,-1,1); | |
1021 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsTPCRefitPass); | |
1022 | TH1F *fSecondaryProtonsESDpidPass = new TH1F("fSecondaryProtonsESDpidPass", | |
1023 | "",10,-1,1); | |
1024 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsESDpidPass); | |
1025 | TH1F *fSecondaryProtonsTPCpidPass = new TH1F("fSecondaryProtonsTPCpidPass", | |
1026 | "",10,-1,1); | |
1027 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsTPCpidPass); | |
1028 | ||
1029 | //Rejected secondary protons | |
1030 | gDirectory->cd("../"); | |
1031 | TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected"); | |
1032 | dirProtonsSecondaryRejected->cd(); | |
1033 | ||
1034 | TH1F *fSecondaryProtonsITSClustersReject = new TH1F("fSecondaryProtonsITSClustersReject", | |
1035 | ";N_{clusters} (ITS);Entries", | |
1036 | 7,0,7); | |
1037 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsITSClustersReject); | |
1038 | TH1F *fSecondaryProtonsChi2PerClusterITSReject = new TH1F("fSecondaryProtonsChi2PerClusterITSReject", | |
1039 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1040 | 100,0,4); | |
1041 | fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsChi2PerClusterITSReject); | |
1042 | TH1F *fSecondaryProtonsTPCClustersReject = new TH1F("fSecondaryProtonsTPCClustersReject", | |
1043 | ";N_{clusters} (TPC);Entries", | |
1044 | 100,0,200); | |
1045 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsTPCClustersReject); | |
1046 | TH1F *fSecondaryProtonsChi2PerClusterTPCReject = new TH1F("fSecondaryProtonsChi2PerClusterTPCReject", | |
1047 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1048 | 100,0,4); | |
1049 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsChi2PerClusterTPCReject); | |
1050 | TH1F *fSecondaryProtonsExtCov11Reject = new TH1F("fSecondaryProtonsExtCov11Reject", | |
1051 | ";#sigma_{y} [cm];Entries", | |
1052 | 100,0,4); | |
1053 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov11Reject); | |
1054 | TH1F *fSecondaryProtonsExtCov22Reject = new TH1F("fSecondaryProtonsExtCov22Reject", | |
1055 | ";#sigma_{z} [cm];Entries", | |
1056 | 100,0,4); | |
1057 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov22Reject); | |
1058 | TH1F *fSecondaryProtonsExtCov33Reject = new TH1F("fSecondaryProtonsExtCov33Reject", | |
1059 | ";#sigma_{sin(#phi)};Entries", | |
1060 | 100,0,4); | |
1061 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov33Reject); | |
1062 | TH1F *fSecondaryProtonsExtCov44Reject = new TH1F("fSecondaryProtonsExtCov44Reject", | |
1063 | ";#sigma_{tan(#lambda)};Entries", | |
1064 | 100,0,4); | |
1065 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov44Reject); | |
1066 | TH1F *fSecondaryProtonsExtCov55Reject = new TH1F("fSecondaryProtonsExtCov55Reject", | |
1067 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1068 | 100,0,4); | |
1069 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov55Reject); | |
1070 | TH1F *fSecondaryProtonsSigmaToVertexReject = new TH1F("fSecondaryProtonsSigmaToVertexReject", | |
1071 | ";#sigma_{Vertex};Entries", | |
1072 | 100,0,10); | |
1073 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsSigmaToVertexReject); | |
1074 | TH1F *fSecondaryProtonsSigmaToVertexTPCReject = new TH1F("fSecondaryProtonsSigmaToVertexTPCReject", | |
1075 | ";#sigma_{Vertex};Entries", | |
1076 | 100,0,10); | |
1077 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsSigmaToVertexTPCReject); | |
1078 | TH1F *fSecondaryProtonsITSRefitReject = new TH1F("fSecondaryProtonsITSRefitReject", | |
1079 | "",10,-1,1); | |
1080 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsITSRefitReject); | |
1081 | TH1F *fSecondaryProtonsTPCRefitReject = new TH1F("fSecondaryProtonsTPCRefitReject", | |
1082 | "",10,-1,1); | |
1083 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsTPCRefitReject); | |
1084 | TH1F *fSecondaryProtonsESDpidReject = new TH1F("fSecondaryProtonsESDpidReject", | |
1085 | "",10,-1,1); | |
1086 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsESDpidReject); | |
1087 | TH1F *fSecondaryProtonsTPCpidReject = new TH1F("fSecondaryProtonsTPCpidReject", | |
1088 | "",10,-1,1); | |
1089 | fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsTPCpidReject); | |
1090 | ||
1091 | ||
1092 | gDirectory->cd("../../../"); | |
1093 | ||
1094 | //antiprotons | |
1095 | TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons"); | |
1096 | fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd(); | |
1097 | ||
1098 | //________________________________________________________________// | |
1099 | TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries"); | |
1100 | dirAntiProtonsPrimary->cd(); | |
1101 | TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted"); | |
1102 | dirAntiProtonsPrimaryAccepted->cd(); | |
1103 | ||
1104 | //Accepted primary antiprotons | |
1105 | TH1F *fPrimaryAntiProtonsITSClustersPass = new TH1F("fPrimaryAntiProtonsITSClustersPass", | |
1106 | ";N_{clusters} (ITS);Entries", | |
1107 | 7,0,7); | |
1108 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsITSClustersPass); | |
1109 | TH1F *fPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("fPrimaryAntiProtonsChi2PerClusterITSPass", | |
1110 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1111 | 100,0,4); | |
1112 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsChi2PerClusterITSPass); | |
1113 | TH1F *fPrimaryAntiProtonsTPCClustersPass = new TH1F("fPrimaryAntiProtonsTPCClustersPass", | |
1114 | ";N_{clusters} (TPC);Entries", | |
1115 | 100,0,200); | |
1116 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsTPCClustersPass); | |
1117 | TH1F *fPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("fPrimaryAntiProtonsChi2PerClusterTPCPass", | |
1118 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1119 | 100,0,4); | |
1120 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsChi2PerClusterTPCPass); | |
1121 | TH1F *fPrimaryAntiProtonsExtCov11Pass = new TH1F("fPrimaryAntiProtonsExtCov11Pass", | |
1122 | ";#sigma_{y} [cm];Entries", | |
1123 | 100,0,4); | |
1124 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov11Pass); | |
1125 | TH1F *fPrimaryAntiProtonsExtCov22Pass = new TH1F("fPrimaryAntiProtonsExtCov22Pass", | |
1126 | ";#sigma_{z} [cm];Entries", | |
1127 | 100,0,4); | |
1128 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov22Pass); | |
1129 | TH1F *fPrimaryAntiProtonsExtCov33Pass = new TH1F("fPrimaryAntiProtonsExtCov33Pass", | |
1130 | ";#sigma_{sin(#phi)};Entries", | |
1131 | 100,0,4); | |
1132 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov33Pass); | |
1133 | TH1F *fPrimaryAntiProtonsExtCov44Pass = new TH1F("fPrimaryAntiProtonsExtCov44Pass", | |
1134 | ";#sigma_{tan(#lambda)};Entries", | |
1135 | 100,0,4); | |
1136 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov44Pass); | |
1137 | TH1F *fPrimaryAntiProtonsExtCov55Pass = new TH1F("fPrimaryAntiProtonsExtCov55Pass", | |
1138 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1139 | 100,0,4); | |
1140 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov55Pass); | |
1141 | TH1F *fPrimaryAntiProtonsSigmaToVertexPass = new TH1F("fPrimaryAntiProtonsSigmaToVertexPass", | |
1142 | ";#sigma_{Vertex};Entries", | |
1143 | 100,0,10); | |
1144 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsSigmaToVertexPass); | |
1145 | TH1F *fPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("fPrimaryAntiProtonsSigmaToVertexTPCPass", | |
1146 | ";#sigma_{Vertex};Entries", | |
1147 | 100,0,10); | |
1148 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsSigmaToVertexTPCPass); | |
1149 | TH1F *fPrimaryAntiProtonsITSRefitPass = new TH1F("fPrimaryAntiProtonsITSRefitPass", | |
1150 | "",10,-1,1); | |
1151 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsITSRefitPass); | |
1152 | TH1F *fPrimaryAntiProtonsTPCRefitPass = new TH1F("fPrimaryAntiProtonsTPCRefitPass", | |
1153 | "",10,-1,1); | |
1154 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsTPCRefitPass); | |
1155 | TH1F *fPrimaryAntiProtonsESDpidPass = new TH1F("fPrimaryAntiProtonsESDpidPass", | |
1156 | "",10,-1,1); | |
1157 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsESDpidPass); | |
1158 | TH1F *fPrimaryAntiProtonsTPCpidPass = new TH1F("fPrimaryAntiProtonsTPCpidPass", | |
1159 | "",10,-1,1); | |
1160 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsTPCpidPass); | |
1161 | ||
1162 | //Rejected primary antiprotons | |
1163 | gDirectory->cd("../"); | |
1164 | TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected"); | |
1165 | dirAntiProtonsPrimaryRejected->cd(); | |
1166 | ||
1167 | TH1F *fPrimaryAntiProtonsITSClustersReject = new TH1F("fPrimaryAntiProtonsITSClustersReject", | |
1168 | ";N_{clusters} (ITS);Entries", | |
1169 | 7,0,7); | |
1170 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsITSClustersReject); | |
1171 | TH1F *fPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("fPrimaryAntiProtonsChi2PerClusterITSReject", | |
1172 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1173 | 100,0,4); | |
1174 | fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsChi2PerClusterITSReject); | |
1175 | TH1F *fPrimaryAntiProtonsTPCClustersReject = new TH1F("fPrimaryAntiProtonsTPCClustersReject", | |
1176 | ";N_{clusters} (TPC);Entries", | |
1177 | 100,0,200); | |
1178 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsTPCClustersReject); | |
1179 | TH1F *fPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("fPrimaryAntiProtonsChi2PerClusterTPCReject", | |
1180 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1181 | 100,0,4); | |
1182 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsChi2PerClusterTPCReject); | |
1183 | TH1F *fPrimaryAntiProtonsExtCov11Reject = new TH1F("fPrimaryAntiProtonsExtCov11Reject", | |
1184 | ";#sigma_{y} [cm];Entries", | |
1185 | 100,0,4); | |
1186 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov11Reject); | |
1187 | TH1F *fPrimaryAntiProtonsExtCov22Reject = new TH1F("fPrimaryAntiProtonsExtCov22Reject", | |
1188 | ";#sigma_{z} [cm];Entries", | |
1189 | 100,0,4); | |
1190 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov22Reject); | |
1191 | TH1F *fPrimaryAntiProtonsExtCov33Reject = new TH1F("fPrimaryAntiProtonsExtCov33Reject", | |
1192 | ";#sigma_{sin(#phi)};Entries", | |
1193 | 100,0,4); | |
1194 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov33Reject); | |
1195 | TH1F *fPrimaryAntiProtonsExtCov44Reject = new TH1F("fPrimaryAntiProtonsExtCov44Reject", | |
1196 | ";#sigma_{tan(#lambda)};Entries", | |
1197 | 100,0,4); | |
1198 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov44Reject); | |
1199 | TH1F *fPrimaryAntiProtonsExtCov55Reject = new TH1F("fPrimaryAntiProtonsExtCov55Reject", | |
1200 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1201 | 100,0,4); | |
1202 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov55Reject); | |
1203 | TH1F *fPrimaryAntiProtonsSigmaToVertexReject = new TH1F("fPrimaryAntiProtonsSigmaToVertexReject", | |
1204 | ";#sigma_{Vertex};Entries", | |
1205 | 100,0,10); | |
1206 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsSigmaToVertexReject); | |
1207 | TH1F *fPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("fPrimaryAntiProtonsSigmaToVertexTPCReject", | |
1208 | ";#sigma_{Vertex};Entries", | |
1209 | 100,0,10); | |
1210 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsSigmaToVertexTPCReject); | |
1211 | TH1F *fPrimaryAntiProtonsITSRefitReject = new TH1F("fPrimaryAntiProtonsITSRefitReject", | |
1212 | "",10,-1,1); | |
1213 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsITSRefitReject); | |
1214 | TH1F *fPrimaryAntiProtonsTPCRefitReject = new TH1F("fPrimaryAntiProtonsTPCRefitReject", | |
1215 | "",10,-1,1); | |
1216 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsTPCRefitReject); | |
1217 | TH1F *fPrimaryAntiProtonsESDpidReject = new TH1F("fPrimaryAntiProtonsESDpidReject", | |
1218 | "",10,-1,1); | |
1219 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsESDpidReject); | |
1220 | TH1F *fPrimaryAntiProtonsTPCpidReject = new TH1F("fPrimaryAntiProtonsTPCpidReject", | |
1221 | "",10,-1,1); | |
1222 | fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsTPCpidReject); | |
1223 | ||
1224 | //________________________________________________________________// | |
1225 | gDirectory->cd("../../"); | |
1226 | ||
1227 | TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries"); | |
1228 | dirAntiProtonsSecondary->cd(); | |
1229 | TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted"); | |
1230 | dirAntiProtonsSecondaryAccepted->cd(); | |
1231 | ||
1232 | //Accepted secondary antiprotons | |
1233 | TH1F *fSecondaryAntiProtonsITSClustersPass = new TH1F("fSecondaryAntiProtonsITSClustersPass", | |
1234 | ";N_{clusters} (ITS);Entries", | |
1235 | 7,0,7); | |
1236 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsITSClustersPass); | |
1237 | TH1F *fSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("fSecondaryAntiProtonsChi2PerClusterITSPass", | |
1238 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1239 | 100,0,4); | |
1240 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsChi2PerClusterITSPass); | |
1241 | TH1F *fSecondaryAntiProtonsTPCClustersPass = new TH1F("fSecondaryAntiProtonsTPCClustersPass", | |
1242 | ";N_{clusters} (TPC);Entries", | |
1243 | 100,0,200); | |
1244 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsTPCClustersPass); | |
1245 | TH1F *fSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("fSecondaryAntiProtonsChi2PerClusterTPCPass", | |
1246 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1247 | 100,0,4); | |
1248 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsChi2PerClusterTPCPass); | |
1249 | TH1F *fSecondaryAntiProtonsExtCov11Pass = new TH1F("fSecondaryAntiProtonsExtCov11Pass", | |
1250 | ";#sigma_{y} [cm];Entries", | |
1251 | 100,0,4); | |
1252 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov11Pass); | |
1253 | TH1F *fSecondaryAntiProtonsExtCov22Pass = new TH1F("fSecondaryAntiProtonsExtCov22Pass", | |
1254 | ";#sigma_{z} [cm];Entries", | |
1255 | 100,0,4); | |
1256 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov22Pass); | |
1257 | TH1F *fSecondaryAntiProtonsExtCov33Pass = new TH1F("fSecondaryAntiProtonsExtCov33Pass", | |
1258 | ";#sigma_{sin(#phi)};Entries", | |
1259 | 100,0,4); | |
1260 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov33Pass); | |
1261 | TH1F *fSecondaryAntiProtonsExtCov44Pass = new TH1F("fSecondaryAntiProtonsExtCov44Pass", | |
1262 | ";#sigma_{tan(#lambda)};Entries", | |
1263 | 100,0,4); | |
1264 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov44Pass); | |
1265 | TH1F *fSecondaryAntiProtonsExtCov55Pass = new TH1F("fSecondaryAntiProtonsExtCov55Pass", | |
1266 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1267 | 100,0,4); | |
1268 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov55Pass); | |
1269 | TH1F *fSecondaryAntiProtonsSigmaToVertexPass = new TH1F("fSecondaryAntiProtonsSigmaToVertexPass", | |
1270 | ";#sigma_{Vertex};Entries", | |
1271 | 100,0,10); | |
1272 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsSigmaToVertexPass); | |
1273 | TH1F *fSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("fSecondaryAntiProtonsSigmaToVertexTPCPass", | |
1274 | ";#sigma_{Vertex};Entries", | |
1275 | 100,0,10); | |
1276 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsSigmaToVertexTPCPass); | |
1277 | TH1F *fSecondaryAntiProtonsITSRefitPass = new TH1F("fSecondaryAntiProtonsITSRefitPass", | |
1278 | "",10,-1,1); | |
1279 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsITSRefitPass); | |
1280 | TH1F *fSecondaryAntiProtonsTPCRefitPass = new TH1F("fSecondaryAntiProtonsTPCRefitPass", | |
1281 | "",10,-1,1); | |
1282 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsTPCRefitPass); | |
1283 | TH1F *fSecondaryAntiProtonsESDpidPass = new TH1F("fSecondaryAntiProtonsESDpidPass", | |
1284 | "",10,-1,1); | |
1285 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsESDpidPass); | |
1286 | TH1F *fSecondaryAntiProtonsTPCpidPass = new TH1F("fSecondaryAntiProtonsTPCpidPass", | |
1287 | "",10,-1,1); | |
1288 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsTPCpidPass); | |
1289 | ||
1290 | //Rejected secondary antiprotons | |
1291 | gDirectory->cd("../"); | |
1292 | TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected"); | |
1293 | dirAntiProtonsSecondaryRejected->cd(); | |
1294 | ||
1295 | TH1F *fSecondaryAntiProtonsITSClustersReject = new TH1F("fSecondaryAntiProtonsITSClustersReject", | |
1296 | ";N_{clusters} (ITS);Entries", | |
1297 | 7,0,7); | |
1298 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsITSClustersReject); | |
1299 | TH1F *fSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("fSecondaryAntiProtonsChi2PerClusterITSReject", | |
1300 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1301 | 100,0,4); | |
1302 | fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsChi2PerClusterITSReject); | |
1303 | TH1F *fSecondaryAntiProtonsTPCClustersReject = new TH1F("fSecondaryAntiProtonsTPCClustersReject", | |
1304 | ";N_{clusters} (TPC);Entries", | |
1305 | 100,0,200); | |
1306 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsTPCClustersReject); | |
1307 | TH1F *fSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("fSecondaryAntiProtonsChi2PerClusterTPCReject", | |
1308 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1309 | 100,0,4); | |
1310 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsChi2PerClusterTPCReject); | |
1311 | TH1F *fSecondaryAntiProtonsExtCov11Reject = new TH1F("fSecondaryAntiProtonsExtCov11Reject", | |
1312 | ";#sigma_{y} [cm];Entries", | |
1313 | 100,0,4); | |
1314 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov11Reject); | |
1315 | TH1F *fSecondaryAntiProtonsExtCov22Reject = new TH1F("fSecondaryAntiProtonsExtCov22Reject", | |
1316 | ";#sigma_{z} [cm];Entries", | |
1317 | 100,0,4); | |
1318 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov22Reject); | |
1319 | TH1F *fSecondaryAntiProtonsExtCov33Reject = new TH1F("fSecondaryAntiProtonsExtCov33Reject", | |
1320 | ";#sigma_{sin(#phi)};Entries", | |
1321 | 100,0,4); | |
1322 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov33Reject); | |
1323 | TH1F *fSecondaryAntiProtonsExtCov44Reject = new TH1F("fSecondaryAntiProtonsExtCov44Reject", | |
1324 | ";#sigma_{tan(#lambda)};Entries", | |
1325 | 100,0,4); | |
1326 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov44Reject); | |
1327 | TH1F *fSecondaryAntiProtonsExtCov55Reject = new TH1F("fSecondaryAntiProtonsExtCov55Reject", | |
1328 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1329 | 100,0,4); | |
1330 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov55Reject); | |
1331 | TH1F *fSecondaryAntiProtonsSigmaToVertexReject = new TH1F("fSecondaryAntiProtonsSigmaToVertexReject", | |
1332 | ";#sigma_{Vertex};Entries", | |
1333 | 100,0,10); | |
1334 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsSigmaToVertexReject); | |
1335 | TH1F *fSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("fSecondaryAntiProtonsSigmaToVertexTPCReject", | |
1336 | ";#sigma_{Vertex};Entries", | |
1337 | 100,0,10); | |
1338 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsSigmaToVertexTPCReject); | |
1339 | TH1F *fSecondaryAntiProtonsITSRefitReject = new TH1F("fSecondaryAntiProtonsITSRefitReject", | |
1340 | "",10,-1,1); | |
1341 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsITSRefitReject); | |
1342 | TH1F *fSecondaryAntiProtonsTPCRefitReject = new TH1F("fSecondaryAntiProtonsTPCRefitReject", | |
1343 | "",10,-1,1); | |
1344 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsTPCRefitReject); | |
1345 | TH1F *fSecondaryAntiProtonsESDpidReject = new TH1F("fSecondaryAntiProtonsESDpidReject", | |
1346 | "",10,-1,1); | |
1347 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsESDpidReject); | |
1348 | TH1F *fSecondaryAntiProtonsTPCpidReject = new TH1F("fSecondaryAntiProtonsTPCpidReject", | |
1349 | "",10,-1,1); | |
1350 | fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsTPCpidReject); | |
1351 | ||
1352 | } | |
1353 | ||
1354 | //____________________________________________________________________// | |
1355 | void AliProtonAnalysis::RunQA(AliStack *stack, AliESDEvent *fESD) { | |
1356 | //Runs the QA code | |
1357 | Int_t nGoodTracks = fESD->GetNumberOfTracks(); | |
1358 | for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) { | |
1359 | AliESDtrack* track = fESD->GetTrack(iTracks); | |
1360 | Int_t label = TMath::Abs(track->GetLabel()); | |
1361 | Double_t Pt = 0.0, P = 0.0; | |
1362 | Double_t probability[5]; | |
1363 | ||
1364 | if(IsAccepted(track, stack)) { | |
1365 | if(fUseTPCOnly) { | |
1366 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
1367 | if(!tpcTrack) continue; | |
1368 | Pt = tpcTrack->Pt(); | |
1369 | P = tpcTrack->P(); | |
1370 | ||
1371 | //pid | |
1372 | track->GetTPCpid(probability); | |
1373 | Double_t rcc = 0.0; | |
1374 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
1375 | rcc += probability[i]*GetParticleFraction(i,P); | |
1376 | if(rcc == 0.0) continue; | |
1377 | Double_t w[5]; | |
1378 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
1379 | w[i] = probability[i]*GetParticleFraction(i,P)/rcc; | |
1380 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w); | |
1381 | if(fParticleType == 4) { | |
1382 | if(label <= stack->GetNprimary()) { | |
1383 | if(track->Charge() > 0) | |
1384 | ((TH2F *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1385 | else if(track->Charge() < 0) | |
1386 | ((TH2F *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1387 | }//primary particles | |
1388 | else if(label > stack->GetNprimary()) { | |
1389 | if(track->Charge() > 0) | |
1390 | ((TH2F *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1391 | else if(track->Charge() < 0) | |
1392 | ((TH2F *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1393 | }//secondary particles | |
1394 | }//proton check | |
1395 | }//TPC only tracks | |
1396 | else if(!fUseTPCOnly) { | |
1397 | Pt = track->Pt(); | |
1398 | P = track->P(); | |
1399 | ||
1400 | //pid | |
1401 | track->GetESDpid(probability); | |
1402 | Double_t rcc = 0.0; | |
1403 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
1404 | rcc += probability[i]*GetParticleFraction(i,P); | |
1405 | if(rcc == 0.0) continue; | |
1406 | Double_t w[5]; | |
1407 | for(Int_t i = 0; i < AliPID::kSPECIES; i++) | |
1408 | w[i] = probability[i]*GetParticleFraction(i,P)/rcc; | |
1409 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w); | |
1410 | if(fParticleType == 4) { | |
1411 | if(label <= stack->GetNprimary()) { | |
1412 | if(track->Charge() > 0) | |
1413 | ((TH2F *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1414 | else if(track->Charge() < 0) | |
1415 | ((TH2F *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1416 | }//primary particles | |
1417 | else if(label > stack->GetNprimary()) { | |
1418 | if(track->Charge() > 0) | |
1419 | ((TH2F *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1420 | else if(track->Charge() < 0) | |
1421 | ((TH2F *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),track->Py(),track->Pz()),Pt); | |
1422 | }//secondary particles | |
1423 | }//proton check | |
1424 | }//combined tracking | |
1425 | }//cuts | |
1426 | }//track loop | |
1427 | ||
1428 | } | |
39f2a708 | 1429 | |
1430 | ||
1431 | ||
1432 | ||
1433 | ||
1434 | ||
1435 | ||
3f6d0c08 | 1436 | |
1437 |