]>
Commit | Line | Data |
---|---|---|
724d7ba9 | 1 | void drawProtonQAResults(const char *analysisType = "TPC", |
2 | const char *pidMode = "Bayesian") { | |
0008a5a6 | 3 | //Macro to visualize the results of the proton QA task |
cc0fbd97 | 4 | gStyle->SetPalette(1,0); |
720944fa | 5 | gStyle->SetCanvasColor(41); |
6 | gStyle->SetFrameFillColor(10); | |
3f522b01 | 7 | |
8 | PrintHelpMenu(); | |
9 | ||
9e2392b0 | 10 | TString filename1 = "Protons.QA."; |
724d7ba9 | 11 | filename1 += analysisType; |
12 | filename1 += "."; filename1 += pidMode; | |
13 | filename1 += ".root"; | |
9e2392b0 | 14 | TString filename2 = "Protons.MC.QA."; |
724d7ba9 | 15 | filename2 += analysisType; |
16 | filename2 += "."; filename2 += pidMode; | |
17 | filename2 += ".root"; | |
9e2392b0 | 18 | TString filename3 = "Protons.Efficiency."; |
724d7ba9 | 19 | filename3 += analysisType; |
20 | filename3 += "."; filename3 += pidMode; | |
21 | filename3 += ".root"; | |
3f522b01 | 22 | |
9e2392b0 | 23 | TFile *fQA = TFile::Open(filename1.Data()); |
1c21299a | 24 | TList *listGlobalQA = (TList *)fQA->Get("globalQAList"); |
9e2392b0 | 25 | drawCutStatistics(listGlobalQA,analysisType); |
3f522b01 | 26 | fQA->Close(); |
1c21299a | 27 | |
9e2392b0 | 28 | TFile *fMC = TFile::Open(filename2.Data()); |
1c21299a | 29 | TList *listPDG = (TList *)fMC->Get("pdgCodeList"); |
30 | TList *listMCProcesses = (TList *)fMC->Get("mcProcessList"); | |
31 | drawMCQA(listPDG,listMCProcesses); | |
3f522b01 | 32 | fMC->Close(); |
1c21299a | 33 | |
9e2392b0 | 34 | TFile *fEfficiency = TFile::Open(filename3.Data()); |
863f782b | 35 | TList *listEfficiency = (TList *)fEfficiency->Get("efficiencyList"); |
9e2392b0 | 36 | drawEfficiency(listEfficiency,analysisType); |
3f522b01 | 37 | fEfficiency->Close(); |
863f782b | 38 | |
75decd62 | 39 | TFile *fVertex = TFile::Open("Vertex.QA.root"); |
40 | TList *listVertex = (TList *)fVertex->Get("vertexList"); | |
41 | drawVertexQA(listVertex); | |
75decd62 | 42 | fVertex->Close(); |
0008a5a6 | 43 | } |
cc0fbd97 | 44 | |
3f522b01 | 45 | //________________________________________// |
46 | void PrintHelpMenu() { | |
47 | //Function that prints the different possibilities the user has | |
48 | //with this macro (what to display, what is the input etc) | |
49 | Printf("==============================HELP MENU==========================="); | |
50 | Printf("Function drawCutStatistics: Takes as an argument the list obtained from the Protons.QA.root file and the corresponding analysis type. Displays the following plots:"); | |
51 | Printf("\t 1. Influence of the track cuts to the primary and secondary protons. For each bin we show the percentage of particles rejected by the corresponding cut. The first column shows the percentage of tracks excluded from the analysis."); | |
52 | Printf("\t 2. Influence of the track cuts to the primary and secondary antiprotons. For each bin we show the percentage of particles rejected by the corresponding cut. The first column shows the percentage of tracks excluded from the analysis."); | |
53 | Printf("\t 3. The ITS cluster map for primary and secondary (anti)protons."); | |
54 | Printf("\t 4. The (anti)proton purity and contamination as a function of eta or y."); | |
55 | Printf("\t 5. The (anti)proton purity and contamination as a function of Pt."); | |
56 | Printf("\t 6. The (anti)proton cut efficiency as a function of eta or y."); | |
57 | Printf("\t 7. The (anti)proton cut efficiency as a function of Pt."); | |
58 | Printf("\t 8. The composition of accepted secondary (anti)protons as a function of eta or y."); | |
59 | Printf("\t 9. The composition of accepted secondary (anti)protons as a function of Pt."); | |
60 | Printf("\t ***This function calls the DrawContamination function that creates an output root file with the name Contamination.root holding all the purity and contamination plots (eta or y and Pt dependence) and the DrawCutEfficiency function that creates an output root file with the name CutEfficiency.root with the y or eta and Pt dependence of the cut efficiency for protons and antiprotons.***"); | |
61 | ||
62 | Printf("\nFunction drawMCQA: Takes as an argument the two lists obtained from the Protons.MC.QA.root file holding pure MC information. Displays the following plots:"); | |
63 | Printf("\t 1. MC composition of secondary protons as a function of either eta or y."); | |
64 | Printf("\t 2. MC composition of secondary antiprotons as a function of either eta or y."); | |
65 | Printf("\t 3. MC composition of secondary protons as a function of Pt."); | |
66 | Printf("\t 4. MC composition of secondary antiprotons as a function of Pt"); | |
67 | ||
68 | Printf("\nFunction drawEfficiency: Takes as an argument the list obtained from the Protons.Efficiency.root file along with the analysis type. Displays the following plots:"); | |
69 | Printf("\t 1. Reconstruction efficiencies for primary and secondary (anti)protons as a function of either eta or y. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction."); | |
70 | Printf("\t 2. Reconstruction efficiencies for primary and secondary (anti)protons as a function of Pt. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction."); | |
71 | Printf("\t 3. Particle identifiction efficiencies for (anti)protons as a function of either eta or y and of Pt."); | |
72 | Printf("\t ***This function produces an output root file with the name Reconstruction-PID-Efficiency.root with all the efficiency and contamination plots.***"); | |
73 | ||
74 | Printf("\nFunction drawVertexQA: Takes as an argument the list obtained from the Vertex.QA.root file holding pure vertex information. Displays the following plots:"); | |
75 | Printf("\t 1. The vertex efficiencies for the TPC, SPD and track ones."); | |
76 | Printf("\t 2. The QA plots for the TPC vertex."); | |
77 | Printf("\t 3. The QA plots for the SPD vertex."); | |
78 | Printf("\t 4. The QA plots for the tracks vertex."); | |
79 | ||
80 | Printf("\nFunction drawKineQA: Takes as an argument the file Protons.QA.Histograms.root with all the histograms about kinematic or not variables"); | |
81 | Printf("\t 1. The phi vs eta correlation plots for primary and secondary (anti)protons."); | |
82 | Printf("\t 2. The Nclusters TPC vs eta correlation plots for primary and secondary (anti)protons."); | |
83 | Printf("\t 3. The Nclusters TPC vs phi correlation plots for primary and secondary (anti)protons."); | |
84 | ||
85 | Printf("\nFunction drawEfficiencies: Takes as arguments the filename produced by the drawEfficiency (see before - usually the name is Reconstruction-PID-Efficiency.root) and three booleans indicating whether the points for primaries, secondaries from weak decays and secondaries from hadronic interactions will be shown.It displays:"); | |
86 | Printf("\t 1. Reconstruction efficiencies for primary and secondary (anti)protons as a function of either eta or y. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction."); | |
87 | Printf("\t 2. Reconstruction efficiencies for primary and secondary (anti)protons as a function of Pt. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction."); | |
88 | Printf("\t 3. Particle identifiction efficiencies for (anti)protons as a function of either eta or y and of Pt."); | |
89 | ||
90 | Printf("\nFunction compareEfficiencies: Takes as arguments the filenames produced by the drawEfficiency (see before - usually the name is Reconstruction-PID-Efficiency.root) and three booleans indicating whether the points for primaries, secondaries from weak decays and secondaries from hadronic interactions will be shown. The two files correspond to two different tracking methods (e.g. TPC, Hybrid, Global). It displays:"); | |
91 | Printf("\t 1. Reconstruction efficiencies for primary and secondary (anti)protons as a function of either eta or y. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction."); | |
92 | Printf("\t 2. Reconstruction efficiencies for primary and secondary (anti)protons as a function of Pt. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction."); | |
57e749bb | 93 | |
94 | Printf("\nFunction drawCutParametersDistributions: Takes as an argument the third file created by the QA code (usually the name is Protons.QA.Histograms.<AnalysisMode>.root) and displays the distributions of accepted primaries (in blue) and secondaries (in orange) for the different cut parameters."); | |
3f522b01 | 95 | Printf("==================================================================\n\n\n"); |
96 | } | |
97 | ||
0008a5a6 | 98 | //________________________________________// |
9e2392b0 | 99 | void drawCutStatistics(TList *list, |
100 | const char* analysisType) { | |
0008a5a6 | 101 | //Function to display the statistics from the cuts |
102 | //The histogram shows the influence of each cut on the primary | |
103 | //and secondary (anti)protons | |
57e749bb | 104 | const Int_t NQAHISTOSPERLIST = 27; |
5661e210 | 105 | |
106 | Double_t gEntriesQA2DList[12] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; | |
cc0fbd97 | 107 | Double_t gEntriesQAPrimaryProtonsAcceptedList[NQAHISTOSPERLIST], gEntriesQAPrimaryProtonsRejectedList[NQAHISTOSPERLIST]; |
108 | Double_t gEntriesQASecondaryProtonsAcceptedList[NQAHISTOSPERLIST], gEntriesQASecondaryProtonsRejectedList[NQAHISTOSPERLIST]; | |
109 | Double_t gEntriesQAPrimaryAntiProtonsAcceptedList[NQAHISTOSPERLIST], gEntriesQAPrimaryAntiProtonsRejectedList[NQAHISTOSPERLIST]; | |
110 | Double_t gEntriesQASecondaryAntiProtonsAcceptedList[NQAHISTOSPERLIST], gEntriesQASecondaryAntiProtonsRejectedList[NQAHISTOSPERLIST]; | |
111 | ||
112 | for(Int_t i = 0; i < NQAHISTOSPERLIST; i++) { | |
113 | gEntriesQAPrimaryProtonsAcceptedList[i] = 0.0; | |
114 | gEntriesQAPrimaryProtonsRejectedList[i] = 0.0; | |
115 | gEntriesQASecondaryProtonsAcceptedList[i] = 0.0; | |
116 | gEntriesQASecondaryProtonsRejectedList[i] = 0.0; | |
117 | gEntriesQAPrimaryAntiProtonsAcceptedList[i] = 0.0; | |
118 | gEntriesQAPrimaryAntiProtonsRejectedList[i] = 0.0; | |
119 | gEntriesQASecondaryAntiProtonsAcceptedList[i] = 0.0; | |
120 | gEntriesQASecondaryAntiProtonsRejectedList[i] = 0.0; | |
121 | } | |
122 | ||
cc0fbd97 | 123 | TList *fQA2DList = (TList *)list->At(0); |
124 | GetQAEntries(fQA2DList,gEntriesQA2DList); | |
863f782b | 125 | TH3F *gHistYPtPDGProtonsPass = (TH3F *)fQA2DList->At(10); |
126 | TH3F *gHistYPtPDGAntiProtonsPass = (TH3F *)fQA2DList->At(11); | |
8debca88 | 127 | |
cc0fbd97 | 128 | TList *fQAPrimaryProtonsAcceptedList = (TList *)list->At(1); |
129 | GetQAEntries(fQAPrimaryProtonsAcceptedList,gEntriesQAPrimaryProtonsAcceptedList); | |
130 | ||
131 | TList *fQAPrimaryProtonsRejectedList = (TList *)list->At(2); | |
132 | GetQAEntries(fQAPrimaryProtonsRejectedList,gEntriesQAPrimaryProtonsRejectedList); | |
133 | ||
134 | TList *fQASecondaryProtonsAcceptedList = (TList *)list->At(3); | |
135 | GetQAEntries(fQASecondaryProtonsAcceptedList,gEntriesQASecondaryProtonsAcceptedList); | |
136 | ||
137 | TList *fQASecondaryProtonsRejectedList = (TList *)list->At(4); | |
138 | GetQAEntries(fQASecondaryProtonsRejectedList,gEntriesQASecondaryProtonsRejectedList); | |
139 | ||
140 | TList *fQAPrimaryAntiProtonsAcceptedList = (TList *)list->At(5); | |
141 | GetQAEntries(fQAPrimaryAntiProtonsAcceptedList,gEntriesQAPrimaryAntiProtonsAcceptedList); | |
142 | ||
143 | TList *fQAPrimaryAntiProtonsRejectedList = (TList *)list->At(6); | |
144 | GetQAEntries(fQAPrimaryAntiProtonsRejectedList,gEntriesQAPrimaryAntiProtonsRejectedList); | |
145 | ||
146 | TList *fQASecondaryAntiProtonsAcceptedList = (TList *)list->At(7); | |
147 | GetQAEntries(fQASecondaryAntiProtonsAcceptedList,gEntriesQASecondaryAntiProtonsAcceptedList); | |
148 | ||
149 | TList *fQASecondaryAntiProtonsRejectedList = (TList *)list->At(8); | |
150 | GetQAEntries(fQASecondaryAntiProtonsRejectedList,gEntriesQASecondaryAntiProtonsRejectedList); | |
151 | ||
152 | //_______________________________________________________// | |
153 | //Create the histograms | |
57e749bb | 154 | const Int_t nx = 27; |
cc0fbd97 | 155 | char *fCutName[nx] = {"Tracks","", |
156 | "ITS Clusters", | |
157 | "#chi^{2}/N_{ITS-Clusters}", | |
158 | "TPC Clusters", | |
159 | "#chi^{2}/N_{TPC-Clusters}", | |
160 | "ExtCov11", | |
161 | "ExtCov22", | |
162 | "ExtCov33", | |
163 | "ExtCov44", | |
164 | "ExtCov55", | |
165 | "#sigma_{Vertex}", | |
166 | "#sigma_{Vertex-TPC}", | |
0008a5a6 | 167 | "DCA_{xy}", |
168 | "DCA_{xy}(TPC)", | |
169 | "DCA_{z}", | |
170 | "DCA_{z}(TPC)", | |
171 | "#chi^{2}(vertex)", | |
cc0fbd97 | 172 | "ITS refit", |
173 | "TPC refit", | |
174 | "ESD pid", | |
57e749bb | 175 | "TPC pid", |
176 | "N_{points} (dE/dx)","", | |
cc0fbd97 | 177 | "N_{Secondaries}/N_{total}","",""}; |
0008a5a6 | 178 | char *fCutITSName[6] = {"SPD_{1}","SPD_{2}", |
179 | "SDD_{1}","SDD_{2}", | |
180 | "SSD_{1}","SSD_{2}"}; | |
cc0fbd97 | 181 | |
0008a5a6 | 182 | //cut influence |
cc0fbd97 | 183 | TH2F *hEmpty = new TH2F("hEmpty","",nx,0,nx,100,0,100); |
184 | hEmpty->SetStats(kFALSE); | |
185 | hEmpty->SetMarkerStyle(kFullCircle); | |
186 | hEmpty->SetLineColor(2); hEmpty->SetMarkerColor(2); | |
187 | hEmpty->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
188 | for(Int_t i = 1; i <= nx; i++) | |
189 | hEmpty->GetXaxis()->SetBinLabel(i,fCutName[i-1]); | |
190 | hEmpty->GetXaxis()->SetLabelOffset(0.01); | |
191 | hEmpty->GetXaxis()->SetLabelSize(0.045); | |
192 | ||
193 | //primary protons | |
194 | TH1F *hPrimaryProtons = new TH1F("hPrimaryProtons","",nx,0,nx); | |
195 | hPrimaryProtons->SetStats(kFALSE); | |
196 | hPrimaryProtons->SetMarkerStyle(kFullCircle); | |
197 | hPrimaryProtons->SetLineColor(4); hPrimaryProtons->SetLineWidth(2); | |
198 | hPrimaryProtons->SetMarkerColor(4); | |
199 | hPrimaryProtons->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
200 | for(Int_t i = 1; i <= nx; i++) { | |
201 | hPrimaryProtons->SetBinContent(i,-10.); | |
202 | hPrimaryProtons->GetXaxis()->SetBinLabel(i,fCutName[i-1]); | |
203 | } | |
204 | hPrimaryProtons->GetXaxis()->SetLabelOffset(0.01); | |
205 | hPrimaryProtons->GetXaxis()->SetLabelSize(0.045); | |
206 | ||
207 | //secondary protons | |
208 | TH1F *hSecondaryProtons = new TH1F("hSecondaryProtons","",nx,0,nx); | |
209 | hSecondaryProtons->SetStats(kFALSE); | |
210 | hSecondaryProtons->SetMarkerStyle(22); | |
211 | hSecondaryProtons->SetMarkerSize(1.4); | |
212 | hSecondaryProtons->SetLineColor(2); hSecondaryProtons->SetLineWidth(2); | |
213 | hSecondaryProtons->SetMarkerColor(2); | |
214 | hSecondaryProtons->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
215 | for(Int_t i = 1; i <= nx; i++) { | |
216 | hSecondaryProtons->SetBinContent(i,-10.); | |
217 | hSecondaryProtons->GetXaxis()->SetBinLabel(i,fCutName[i-1]); | |
218 | } | |
219 | hSecondaryProtons->GetXaxis()->SetLabelOffset(0.01); | |
220 | hSecondaryProtons->GetXaxis()->SetLabelSize(0.045); | |
221 | ||
222 | //primary antiprotons | |
223 | TH1F *hPrimaryAntiProtons = new TH1F("hPrimaryAntiProtons","",nx,0,nx); | |
224 | hPrimaryAntiProtons->SetStats(kFALSE); | |
225 | hPrimaryAntiProtons->SetMarkerStyle(kFullCircle); | |
226 | hPrimaryAntiProtons->SetLineColor(4); hPrimaryAntiProtons->SetLineWidth(2); | |
227 | hPrimaryAntiProtons->SetMarkerColor(4); | |
228 | hPrimaryAntiProtons->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
229 | for(Int_t i = 1; i <= nx; i++) { | |
230 | hPrimaryAntiProtons->SetBinContent(i,-10.); | |
231 | hPrimaryAntiProtons->GetXaxis()->SetBinLabel(i,fCutName[i-1]); | |
232 | } | |
233 | hPrimaryAntiProtons->GetXaxis()->SetLabelOffset(0.01); | |
234 | hPrimaryAntiProtons->GetXaxis()->SetLabelSize(0.045); | |
235 | ||
236 | //secondary antiprotons | |
237 | TH1F *hSecondaryAntiProtons = new TH1F("hSecondaryAntiProtons","",nx,0,nx); | |
238 | hSecondaryAntiProtons->SetStats(kFALSE); | |
239 | hSecondaryAntiProtons->SetMarkerStyle(22); | |
240 | hSecondaryAntiProtons->SetMarkerSize(1.4); | |
241 | hSecondaryAntiProtons->SetLineColor(2); hSecondaryAntiProtons->SetLineWidth(2); | |
242 | hSecondaryAntiProtons->SetMarkerColor(2); | |
243 | hSecondaryAntiProtons->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
244 | for(Int_t i = 1; i <= nx; i++) { | |
245 | hSecondaryAntiProtons->SetBinContent(i,-10.); | |
246 | hSecondaryAntiProtons->GetXaxis()->SetBinLabel(i,fCutName[i-1]); | |
247 | } | |
248 | hSecondaryAntiProtons->GetXaxis()->SetLabelOffset(0.01); | |
249 | hSecondaryAntiProtons->GetXaxis()->SetLabelSize(0.045); | |
250 | //_______________________________________________________// | |
251 | ||
252 | //1D for primary protons | |
0008a5a6 | 253 | //cout<<"_____________________________________________________"<<endl; |
254 | //cout<<"_______________PRIMARY PROTONS_______________________"<<endl; | |
cc0fbd97 | 255 | hPrimaryProtons->SetBinContent(1,GetPercentage(gEntriesQA2DList[0],gEntriesQA2DList[1])); |
256 | ||
0008a5a6 | 257 | for(Int_t i = 2; i < NQAHISTOSPERLIST-4; i++) |
cc0fbd97 | 258 | hPrimaryProtons->SetBinContent(i+1,GetPercentage(gEntriesQAPrimaryProtonsAcceptedList[i-2], |
0008a5a6 | 259 | gEntriesQAPrimaryProtonsRejectedList[i-2])); |
cc0fbd97 | 260 | |
261 | //1D for secondary protons | |
0008a5a6 | 262 | //cout<<"_____________________________________________________"<<endl; |
263 | //cout<<"_______________SECONDARY PROTONS_____________________"<<endl; | |
cc0fbd97 | 264 | hSecondaryProtons->SetBinContent(1,GetPercentage(gEntriesQA2DList[2],gEntriesQA2DList[3])); |
0008a5a6 | 265 | |
266 | for(Int_t i = 2; i < NQAHISTOSPERLIST-4; i++) | |
cc0fbd97 | 267 | hSecondaryProtons->SetBinContent(i+1,GetPercentage(gEntriesQASecondaryProtonsAcceptedList[i-2], |
0008a5a6 | 268 | gEntriesQASecondaryProtonsRejectedList[i-2])); |
0ececdf2 | 269 | hSecondaryProtons->SetBinContent(25,GetPercentage(gEntriesQA2DList[0],gEntriesQA2DList[2])); |
cc0fbd97 | 270 | |
271 | //1D for primary antiprotons | |
0008a5a6 | 272 | //cout<<"_________________________________________________________"<<endl; |
273 | //cout<<"_______________PRIMARY ANTIPROTONS_______________________"<<endl; | |
cc0fbd97 | 274 | hPrimaryAntiProtons->SetBinContent(1,GetPercentage(gEntriesQA2DList[4],gEntriesQA2DList[5])); |
0008a5a6 | 275 | |
276 | for(Int_t i = 2; i < NQAHISTOSPERLIST-4; i++) | |
cc0fbd97 | 277 | hPrimaryAntiProtons->SetBinContent(i+1,GetPercentage(gEntriesQAPrimaryAntiProtonsAcceptedList[i-2], |
0008a5a6 | 278 | gEntriesQAPrimaryAntiProtonsRejectedList[i-2])); |
279 | ||
cc0fbd97 | 280 | //1D for secondary antiprotons |
0008a5a6 | 281 | //cout<<"_________________________________________________________"<<endl; |
282 | //cout<<"_______________SECONDARY ANTIPROTONS_____________________"<<endl; | |
cc0fbd97 | 283 | hSecondaryAntiProtons->SetBinContent(1,GetPercentage(gEntriesQA2DList[6],gEntriesQA2DList[7])); |
cc0fbd97 | 284 | |
0008a5a6 | 285 | for(Int_t i = 2; i < NQAHISTOSPERLIST-4; i++) |
cc0fbd97 | 286 | hSecondaryAntiProtons->SetBinContent(i+1,GetPercentage(gEntriesQASecondaryAntiProtonsAcceptedList[i-2], |
0008a5a6 | 287 | gEntriesQASecondaryAntiProtonsRejectedList[i-2])); |
0ececdf2 | 288 | hSecondaryAntiProtons->SetBinContent(25,GetPercentage(gEntriesQA2DList[4],gEntriesQA2DList[6])); |
cc0fbd97 | 289 | |
290 | TLatex *t1 = new TLatex(); | |
291 | t1->SetTextSize(0.04); | |
292 | //_________________________________________________________// | |
863f782b | 293 | TCanvas *c1 = new TCanvas("c1","Cut Influence - Protons",0,0,700,400); |
cc0fbd97 | 294 | c1->SetHighLightColor(10); c1->SetBottomMargin(0.15); |
295 | c1->SetGridx(); c1->SetGridy(); | |
296 | ||
297 | for(Int_t i = 1; i <= nx; i++) { | |
298 | hPrimaryProtons->SetBinError(i,1.0); | |
299 | hSecondaryProtons->SetBinError(i,1.0); | |
300 | } | |
1c21299a | 301 | hEmpty->DrawCopy(); |
302 | hPrimaryProtons->DrawCopy("EHISTSAME"); | |
303 | hSecondaryProtons->DrawCopy("EHISTSAME"); | |
0008a5a6 | 304 | DrawMarker(20.5, 90, 20, 1.2, 4); |
305 | t1->DrawLatex(21,88,"Primary p"); | |
306 | DrawMarker(20.5, 80, 22, 1.2, 2); | |
307 | t1->DrawLatex(21,78,"Secondary p"); | |
cc0fbd97 | 308 | |
0008a5a6 | 309 | c1->SaveAs("CutInfluence-Protons.gif"); |
cc0fbd97 | 310 | |
311 | //_________________________________________________________// | |
863f782b | 312 | TCanvas *c2 = new TCanvas("c2","Cut Influence - AntiProtons",50,50,700,400); |
cc0fbd97 | 313 | c2->SetHighLightColor(10); c2->SetBottomMargin(0.15); |
314 | c2->SetGridx(); c2->SetGridy(); | |
315 | ||
316 | for(Int_t i = 1; i <= nx; i++) { | |
317 | hPrimaryAntiProtons->SetBinError(i,1.0); | |
318 | hSecondaryAntiProtons->SetBinError(i,1.0); | |
319 | } | |
1c21299a | 320 | hEmpty->DrawCopy(); |
321 | hPrimaryAntiProtons->DrawCopy("EHISTSAME"); | |
322 | hSecondaryAntiProtons->DrawCopy("EHISTSAME"); | |
0008a5a6 | 323 | DrawMarker(20.5, 90, 20, 1.2, 4); |
324 | t1->DrawLatex(21,88,"Primary #bar{p}"); | |
325 | DrawMarker(20.5, 80, 22, 1.2, 2); | |
326 | t1->DrawLatex(21,78,"Secondary #bar{p}"); | |
327 | ||
328 | c2->SaveAs("CutInfluence-AntiProtons.gif"); | |
329 | ||
330 | //_________________________________________________________// | |
331 | //ITS layers influence | |
332 | TH2F *hEmptyITS = new TH2F("hEmptyITS","",10,0,10,100,0,100); | |
333 | hEmptyITS->SetStats(kFALSE); | |
334 | hEmptyITS->SetMarkerStyle(kFullCircle); | |
335 | hEmptyITS->SetLineColor(2); hEmptyITS->SetMarkerColor(2); | |
336 | hEmptyITS->GetYaxis()->SetTitle("Influence of the ITS layers [%]"); | |
337 | hEmptyITS->GetYaxis()->SetTitleOffset(1.3); | |
338 | for(Int_t i = 1; i <= 6; i++) | |
339 | hEmptyITS->GetXaxis()->SetBinLabel(i,fCutITSName[i-1]); | |
340 | hEmptyITS->GetXaxis()->SetLabelOffset(0.01); | |
341 | hEmptyITS->GetXaxis()->SetLabelSize(0.045); | |
342 | ||
343 | //_________________________________________________________// | |
344 | //primary protons | |
345 | TH1F *hPrimaryProtonsITS = new TH1F("hPrimaryProtonsITS","",7,0,7); | |
346 | hPrimaryProtonsITS->SetStats(kFALSE); | |
347 | hPrimaryProtonsITS->SetMarkerStyle(kFullCircle); | |
348 | hPrimaryProtonsITS->SetLineColor(4); hPrimaryProtonsITS->SetLineWidth(2); | |
349 | hPrimaryProtonsITS->SetMarkerColor(4); | |
350 | hPrimaryProtonsITS->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
351 | for(Int_t i = 1; i <= 6; i++) { | |
352 | hPrimaryProtonsITS->SetBinContent(i,-10.); | |
353 | hPrimaryProtonsITS->GetXaxis()->SetBinLabel(i,fCutITSName[i-1]); | |
354 | } | |
355 | hPrimaryProtonsITS->GetXaxis()->SetLabelOffset(0.01); | |
356 | hPrimaryProtonsITS->GetXaxis()->SetLabelSize(0.045); | |
357 | ||
358 | //secondary protons | |
359 | TH1F *hSecondaryProtonsITS = new TH1F("hSecondaryProtonsITS","",7,0,7); | |
360 | hSecondaryProtonsITS->SetStats(kFALSE); | |
361 | hSecondaryProtonsITS->SetMarkerStyle(22); | |
362 | hSecondaryProtonsITS->SetMarkerSize(1.4); | |
363 | hSecondaryProtonsITS->SetLineColor(2); hSecondaryProtonsITS->SetLineWidth(2); | |
364 | hSecondaryProtonsITS->SetMarkerColor(2); | |
365 | hSecondaryProtonsITS->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
366 | for(Int_t i = 1; i <= 6; i++) { | |
367 | hSecondaryProtonsITS->SetBinContent(i,-10.); | |
368 | hSecondaryProtonsITS->GetXaxis()->SetBinLabel(i,fCutITSName[i-1]); | |
369 | } | |
370 | hSecondaryProtonsITS->GetXaxis()->SetLabelOffset(0.01); | |
371 | hSecondaryProtonsITS->GetXaxis()->SetLabelSize(0.045); | |
372 | ||
373 | //primary antiprotons | |
374 | TH1F *hPrimaryAntiProtonsITS = new TH1F("hPrimaryAntiProtonsITS","",7,0,7); | |
375 | hPrimaryAntiProtonsITS->SetStats(kFALSE); | |
376 | hPrimaryAntiProtonsITS->SetMarkerStyle(kFullCircle); | |
377 | hPrimaryAntiProtonsITS->SetLineColor(4); hPrimaryAntiProtonsITS->SetLineWidth(2); | |
378 | hPrimaryAntiProtonsITS->SetMarkerColor(4); | |
379 | hPrimaryAntiProtonsITS->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
380 | for(Int_t i = 1; i <= 6; i++) { | |
381 | hPrimaryAntiProtonsITS->SetBinContent(i,-10.); | |
382 | hPrimaryAntiProtonsITS->GetXaxis()->SetBinLabel(i,fCutITSName[i-1]); | |
383 | } | |
384 | hPrimaryAntiProtonsITS->GetXaxis()->SetLabelOffset(0.01); | |
385 | hPrimaryAntiProtonsITS->GetXaxis()->SetLabelSize(0.045); | |
cc0fbd97 | 386 | |
0008a5a6 | 387 | //secondary antiprotons |
388 | TH1F *hSecondaryAntiProtonsITS = new TH1F("hSecondaryAntiProtonsITS","",7,0,7); | |
389 | hSecondaryAntiProtonsITS->SetStats(kFALSE); | |
390 | hSecondaryAntiProtonsITS->SetMarkerStyle(22); | |
391 | hSecondaryAntiProtonsITS->SetMarkerSize(1.4); | |
392 | hSecondaryAntiProtonsITS->SetLineColor(2); hSecondaryAntiProtonsITS->SetLineWidth(2); | |
393 | hSecondaryAntiProtonsITS->SetMarkerColor(2); | |
394 | hSecondaryAntiProtonsITS->GetYaxis()->SetTitle("Influence of the cuts [%]"); | |
395 | for(Int_t i = 1; i <= 6; i++) { | |
396 | hSecondaryAntiProtonsITS->SetBinContent(i,-10.); | |
397 | hSecondaryAntiProtonsITS->GetXaxis()->SetBinLabel(i,fCutITSName[i-1]); | |
398 | } | |
399 | hSecondaryAntiProtonsITS->GetXaxis()->SetLabelOffset(0.01); | |
400 | hSecondaryAntiProtonsITS->GetXaxis()->SetLabelSize(0.045); | |
401 | ||
402 | //_______________________________________________________// | |
1c21299a | 403 | TCanvas *c9 = new TCanvas("c9","ITS cluster map - (anti)protons", |
863f782b | 404 | 100,100,700,400); |
0008a5a6 | 405 | c9->SetHighLightColor(10); c9->Divide(2,1); |
406 | for(Int_t i = 1; i <= 6; i++) { | |
407 | hPrimaryProtonsITS->SetBinError(i,1.0); | |
408 | hSecondaryProtonsITS->SetBinError(i,1.0); | |
409 | hPrimaryAntiProtonsITS->SetBinError(i,1.0); | |
410 | hSecondaryAntiProtonsITS->SetBinError(i,1.0); | |
411 | } | |
412 | c9->cd(1)->SetBottomMargin(0.15); | |
413 | c9->cd(1)->SetLeftMargin(0.15); | |
414 | c9->cd(1)->SetGridx(); c9->cd(1)->SetGridy(); | |
415 | hEmptyITS->SetTitle("Protons"); | |
416 | hEmptyITS->DrawCopy(); | |
417 | ||
418 | for(Int_t i = 1; i < 7; i++) { | |
57e749bb | 419 | hPrimaryProtonsITS->SetBinContent(i,GetPercentage(gEntriesQAPrimaryProtonsAcceptedList[20+i], |
420 | gEntriesQAPrimaryProtonsRejectedList[20+i])); | |
421 | hSecondaryProtonsITS->SetBinContent(i,GetPercentage(gEntriesQASecondaryProtonsAcceptedList[20+i], | |
422 | gEntriesQASecondaryProtonsRejectedList[20+i])); | |
0008a5a6 | 423 | } |
1c21299a | 424 | hPrimaryProtonsITS->DrawCopy("EHISTSAME"); |
425 | hSecondaryProtonsITS->DrawCopy("EHISTSAME"); | |
0008a5a6 | 426 | DrawMarker(6.5, 90, 20, 1.2, 4); |
427 | t1->DrawLatex(7,88,"Primary p"); | |
428 | DrawMarker(6.5, 80, 22, 1.2, 2); | |
429 | t1->DrawLatex(7,78,"Secondary p"); | |
430 | ||
431 | c9->cd(2)->SetBottomMargin(0.15); | |
432 | c9->cd(2)->SetLeftMargin(0.15); | |
433 | c9->cd(2)->SetGridx(); c9->cd(2)->SetGridy(); | |
434 | hEmptyITS->SetTitle("Antiprotons"); | |
435 | hEmptyITS->DrawCopy(); | |
436 | for(Int_t i = 1; i < 7; i++) { | |
57e749bb | 437 | hPrimaryAntiProtonsITS->SetBinContent(i,GetPercentage(gEntriesQAPrimaryAntiProtonsAcceptedList[20+i], |
438 | gEntriesQAPrimaryAntiProtonsRejectedList[20+i])); | |
439 | hSecondaryAntiProtonsITS->SetBinContent(i,GetPercentage(gEntriesQASecondaryAntiProtonsAcceptedList[20+i], | |
440 | gEntriesQASecondaryAntiProtonsRejectedList[20+i])); | |
0008a5a6 | 441 | } |
1c21299a | 442 | hPrimaryAntiProtonsITS->DrawCopy("EHISTSAME"); |
443 | hSecondaryAntiProtonsITS->DrawCopy("EHISTSAME"); | |
0008a5a6 | 444 | DrawMarker(6.5, 90, 20, 1.2, 4); |
445 | t1->DrawLatex(7,88,"Primary #bar{p}"); | |
446 | DrawMarker(6.5, 80, 22, 1.2, 2); | |
447 | t1->DrawLatex(7,78,"Secondary #bar{p}"); | |
448 | ||
449 | c9->SaveAs("CutInfluence-ITS.gif"); | |
1c21299a | 450 | |
863f782b | 451 | //Efficiency - Contamination plots |
9e2392b0 | 452 | DrawContamination(fQA2DList,analysisType); |
453 | DrawCutEfficiency(fQA2DList,analysisType); | |
863f782b | 454 | DrawComposition(gHistYPtPDGProtonsPass,gHistYPtPDGAntiProtonsPass); |
455 | } | |
456 | ||
457 | //________________________________________// | |
458 | void DrawComposition(TH3F *gHistYPtPDGProtons, | |
459 | TH3F *gHistYPtPDGAntiProtons) { | |
460 | //Function to display the composition of secondary (anti)protons | |
461 | //that survive the quality criteria | |
3f522b01 | 462 | Double_t nParticleCompositionProtonY[200], nParticleCompositionProtonPt[200]; |
463 | Double_t nParticleCompositionProtonYError[200], nParticleCompositionProtonPtError[200]; | |
464 | Double_t nParticleCompositionAntiProtonY[200], nParticleCompositionAntiProtonPt[200]; | |
465 | Double_t nParticleCompositionAntiProtonYError[200], nParticleCompositionAntiProtonPtError[200]; | |
466 | Double_t gY[200], gPt[200]; | |
467 | Double_t gYError[200], gPtError[200]; | |
468 | for(Int_t iBins = 0; iBins < 200; iBins++) { | |
863f782b | 469 | nParticleCompositionProtonY[iBins] = 0; |
470 | nParticleCompositionProtonPt[iBins] = 0; | |
720944fa | 471 | nParticleCompositionProtonYError[iBins] = 0; |
472 | nParticleCompositionProtonPtError[iBins] = 0; | |
863f782b | 473 | nParticleCompositionAntiProtonY[iBins] = 0; |
474 | nParticleCompositionAntiProtonPt[iBins] = 0; | |
720944fa | 475 | nParticleCompositionAntiProtonYError[iBins] = 0; |
476 | nParticleCompositionAntiProtonPtError[iBins] = 0; | |
863f782b | 477 | gY[iBins] = 0; |
478 | gPt[iBins] = 0; | |
720944fa | 479 | gYError[iBins] = 0; |
480 | gPtError[iBins] = 0; | |
863f782b | 481 | } |
482 | ||
720944fa | 483 | TGraphErrors *gParticleProtonY[14]; |
484 | TGraphErrors *gParticleProtonPt[14]; | |
485 | TGraphErrors *gParticleAntiProtonY[14]; | |
486 | TGraphErrors *gParticleAntiProtonPt[14]; | |
863f782b | 487 | for(Int_t iParticle = 0; iParticle < 14; iParticle++) { |
488 | GetComposition(iParticle, | |
489 | gHistYPtPDGProtons, | |
720944fa | 490 | nParticleCompositionProtonY,nParticleCompositionProtonYError,gY, gYError, |
491 | nParticleCompositionProtonPt, nParticleCompositionProtonPtError, gPt, gPtError); | |
492 | gParticleProtonY[iParticle] = new TGraphErrors(gHistYPtPDGProtons->GetNbinsX(), | |
493 | gY,nParticleCompositionProtonY,gYError,nParticleCompositionProtonYError); | |
863f782b | 494 | gParticleProtonY[iParticle]->SetMarkerStyle(iParticle+20); |
495 | gParticleProtonY[iParticle]->SetMarkerSize(1.2); | |
496 | ||
720944fa | 497 | gParticleProtonPt[iParticle] = new TGraphErrors(gHistYPtPDGProtons->GetNbinsY(), |
498 | gPt,nParticleCompositionProtonPt,gPtError,nParticleCompositionProtonPtError); | |
863f782b | 499 | gParticleProtonPt[iParticle]->SetMarkerStyle(iParticle+20); |
500 | gParticleProtonPt[iParticle]->SetMarkerSize(1.2); | |
501 | ||
502 | GetComposition(iParticle, | |
503 | gHistYPtPDGAntiProtons, | |
720944fa | 504 | nParticleCompositionAntiProtonY,nParticleCompositionAntiProtonYError,gY, gYError, |
505 | nParticleCompositionAntiProtonPt, nParticleCompositionAntiProtonPtError, gPt, gPtError); | |
506 | gParticleAntiProtonY[iParticle] = new TGraphErrors(gHistYPtPDGAntiProtons->GetNbinsX(), | |
507 | gY,nParticleCompositionAntiProtonY,gYError,nParticleCompositionAntiProtonYError); | |
863f782b | 508 | gParticleAntiProtonY[iParticle]->SetMarkerStyle(iParticle+20); |
509 | gParticleAntiProtonY[iParticle]->SetMarkerSize(1.2); | |
510 | ||
720944fa | 511 | gParticleAntiProtonPt[iParticle] = new TGraphErrors(gHistYPtPDGAntiProtons->GetNbinsY(), |
512 | gPt,nParticleCompositionAntiProtonPt,gPtError,nParticleCompositionAntiProtonPtError); | |
863f782b | 513 | gParticleAntiProtonPt[iParticle]->SetMarkerStyle(iParticle+20); |
514 | gParticleAntiProtonPt[iParticle]->SetMarkerSize(1.2); | |
515 | } | |
516 | ||
517 | //_________________________________________________________// | |
518 | char *fParticleName[14] = {"Primary","K_{L}","#pi","K_{S}","K", | |
519 | "n","p","#Sigma^{-}","#Lambda","#Sigma^{+}", | |
520 | "#Xi^{-}","#Xi^{0}","#Omega^{-}"}; | |
521 | TLatex *t1 = new TLatex(); | |
522 | t1->SetTextSize(0.04); | |
523 | ||
524 | TH2F *hEmptyY = new TH2F("hEmptyY","",100,-1.2,1.2,100,0,120); | |
525 | hEmptyY->SetStats(kFALSE); | |
526 | hEmptyY->GetYaxis()->SetTitle("Particle composition [%]"); | |
dd3fa486 | 527 | hEmptyY->GetXaxis()->SetTitle(gHistYPtPDGProtons->GetXaxis()->GetTitle()); |
863f782b | 528 | |
529 | TCanvas *c12 = new TCanvas("c12", | |
530 | "Composition of accepted secondaries vs y", | |
3e23254a | 531 | 350,350,700,400); |
720944fa | 532 | c12->Divide(2,1); |
863f782b | 533 | c12->SetHighLightColor(10); c12->cd(1)->SetBottomMargin(0.15); |
534 | c12->cd(1)->SetGridx(); c12->cd(1)->SetGridy(); | |
5ae0977e | 535 | hEmptyY->SetTitle("Protons"); |
863f782b | 536 | hEmptyY->DrawCopy(); |
537 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { | |
538 | //if((iParticle == 0)||(iParticle == 2)||(iParticle == 5)||(iParticle == 6)||(iParticle == 8)) | |
720944fa | 539 | if((iParticle == 2)||(iParticle == 6)||(iParticle == 8)) { |
863f782b | 540 | gParticleProtonY[iParticle]->Draw("P"); |
720944fa | 541 | //if(iParticle < 5) { |
542 | //DrawMarker(-1.1, 115-5*iParticle, 20+iParticle, 1.2, 1); | |
543 | //t1->DrawLatex(-1.0,113-5*iParticle,fParticleName[iParticle]); | |
863f782b | 544 | } |
720944fa | 545 | /*else { |
863f782b | 546 | DrawMarker(0.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1); |
547 | t1->DrawLatex(0.3,113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 548 | }*/ |
863f782b | 549 | } |
720944fa | 550 | DrawMarker(0.0, 115, 22, 1.2, 1); |
551 | t1->DrawLatex(0.1,113,fParticleName[2]); | |
552 | DrawMarker(0.0, 105, 26, 1.2, 1); | |
553 | t1->DrawLatex(0.1,103,fParticleName[6]); | |
554 | DrawMarker(0.0, 95, 28, 1.2, 1); | |
555 | t1->DrawLatex(0.1,93,fParticleName[8]); | |
863f782b | 556 | |
557 | c12->SetHighLightColor(10); c12->cd(2)->SetBottomMargin(0.15); | |
558 | c12->cd(2)->SetGridx(); c12->cd(2)->SetGridy(); | |
5ae0977e | 559 | hEmptyY->SetTitle("Antiprotons"); |
863f782b | 560 | hEmptyY->DrawCopy(); |
561 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { | |
720944fa | 562 | if((iParticle == 6)||(iParticle == 8)) |
863f782b | 563 | gParticleAntiProtonY[iParticle]->Draw("P"); |
720944fa | 564 | /*if(iParticle < 5) { |
863f782b | 565 | DrawMarker(-1.1, 115-5*iParticle, 20+iParticle, 1.2, 1); |
566 | t1->DrawLatex(-1.0,113-5*iParticle,fParticleName[iParticle]); | |
567 | } | |
568 | else { | |
569 | DrawMarker(0.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1); | |
570 | t1->DrawLatex(0.3,113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 571 | }*/ |
863f782b | 572 | } |
720944fa | 573 | DrawMarker(0.0, 115, 26, 1.2, 1); |
574 | t1->DrawLatex(0.1,113,fParticleName[6]); | |
575 | DrawMarker(0.0, 105, 28, 1.2, 1); | |
576 | t1->DrawLatex(0.1,103,fParticleName[8]); | |
2b00fd2c | 577 | c12->SaveAs("SurvivedSecondaries-Composition-Rapidity.gif"); |
863f782b | 578 | |
579 | TH2F *hEmptyPt = new TH2F("hEmptyPt","",100,0.0,4.0,100,0,120); | |
580 | hEmptyPt->SetStats(kFALSE); | |
581 | hEmptyPt->GetYaxis()->SetTitle("Particle composition [%]"); | |
582 | hEmptyPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
583 | ||
584 | TCanvas *c13 = new TCanvas("c13", | |
5ae0977e | 585 | "Composition of accepted secondaries vs pT", |
3e23254a | 586 | 400,400,700,400); |
720944fa | 587 | c13->Divide(2,1); |
863f782b | 588 | c13->SetHighLightColor(10); c13->cd(1)->SetBottomMargin(0.15); |
589 | c13->cd(1)->SetGridx(); c13->cd(1)->SetGridy(); | |
5ae0977e | 590 | hEmptyPt->GetXaxis()->SetRangeUser(gParticleProtonPt[0]->GetXaxis()->GetXmin()-0.2,gParticleProtonPt[0]->GetXaxis()->GetXmax()+0.2); |
591 | hEmptyPt->SetTitle("Protons"); | |
863f782b | 592 | hEmptyPt->DrawCopy(); |
593 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { | |
720944fa | 594 | /*if(iParticle < 5) { |
5ae0977e | 595 | DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.1, |
596 | 115-5*iParticle, 20+iParticle, 1.2, 1); | |
597 | t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.2, | |
598 | 113-5*iParticle,fParticleName[iParticle]); | |
863f782b | 599 | } |
600 | else { | |
5ae0977e | 601 | DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5, |
602 | 115-5*(iParticle-5), 20+iParticle, 1.2, 1); | |
603 | t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5+0.1, | |
604 | 113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 605 | }*/ |
606 | if((iParticle == 2)||(iParticle == 6)||(iParticle == 8)) | |
863f782b | 607 | gParticleProtonPt[iParticle]->Draw("P"); |
608 | } | |
720944fa | 609 | DrawMarker(0.5, 115, 22, 1.2, 1); |
610 | t1->DrawLatex(0.6,113,fParticleName[2]); | |
611 | DrawMarker(0.5, 105, 26, 1.2, 1); | |
612 | t1->DrawLatex(0.6,103,fParticleName[6]); | |
613 | DrawMarker(0.5, 95, 28, 1.2, 1); | |
614 | t1->DrawLatex(0.6,93,fParticleName[8]); | |
863f782b | 615 | |
616 | c13->SetHighLightColor(10); c13->cd(2)->SetBottomMargin(0.15); | |
617 | c13->cd(2)->SetGridx(); c13->cd(2)->SetGridy(); | |
5ae0977e | 618 | hEmptyPt->SetTitle("Antiprotons"); |
863f782b | 619 | hEmptyPt->DrawCopy(); |
620 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { | |
720944fa | 621 | /*if(iParticle < 5) { |
5ae0977e | 622 | DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.1, |
623 | 115-5*iParticle, 20+iParticle, 1.2, 1); | |
624 | t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.2, | |
625 | 113-5*iParticle,fParticleName[iParticle]); | |
863f782b | 626 | } |
627 | else { | |
5ae0977e | 628 | DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5, |
629 | 115-5*(iParticle-5), 20+iParticle, 1.2, 1); | |
630 | t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5+0.1, | |
631 | 113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 632 | }*/ |
633 | if((iParticle == 6)||(iParticle == 8)) | |
863f782b | 634 | gParticleAntiProtonPt[iParticle]->Draw("P"); |
635 | } | |
720944fa | 636 | DrawMarker(0.5, 115, 26, 1.2, 1); |
637 | t1->DrawLatex(0.6,113,fParticleName[6]); | |
638 | DrawMarker(0.5, 105, 28, 1.2, 1); | |
639 | t1->DrawLatex(0.6,103,fParticleName[8]); | |
2b00fd2c | 640 | c13->SaveAs("SurvivedSecondaries-Composition-Pt.gif"); |
0008a5a6 | 641 | } |
642 | ||
643 | //________________________________________________// | |
9e2392b0 | 644 | void DrawContamination(TList *inputList, |
645 | const char* analysisType) { | |
0008a5a6 | 646 | //loops over the list entries and |
647 | //draws the rapidity and pT dependence | |
648 | //of the percentage of primary and secondary | |
649 | //protons and antiprotons after the track cuts | |
650 | cout<<"Extracting the entries for the histograms in the list: "<< | |
651 | inputList->GetName()<<"..."<<endl; | |
652 | ||
653 | TLatex *t1 = new TLatex(); | |
654 | t1->SetTextSize(0.04); | |
655 | ||
656 | TH2F *hPrimaryProtons = (TH2F *)inputList->At(0); | |
657 | TH2F *hSecondaryProtons = (TH2F *)inputList->At(2); | |
658 | TH2F *hPrimaryAntiProtons = (TH2F *)inputList->At(4); | |
659 | TH2F *hSecondaryAntiProtons = (TH2F *)inputList->At(6); | |
660 | ||
661 | //rapidity dependence | |
662 | //Protons | |
663 | TH1D *gYPrimaryProtons = (TH1D *)hPrimaryProtons->ProjectionX("gYPrimaryProtons",0,hPrimaryProtons->GetXaxis()->GetNbins(),"e"); | |
664 | TH1D *gYSecondaryProtons = (TH1D *)hSecondaryProtons->ProjectionX("gYSecondaryProtons",0,hSecondaryProtons->GetXaxis()->GetNbins(),"e"); | |
665 | TH1D *gYTotalProtons = (TH1D *)hPrimaryProtons->ProjectionX("gYTotalProtons",0,hPrimaryProtons->GetXaxis()->GetNbins(),"e"); | |
666 | gYTotalProtons->Add(gYSecondaryProtons); | |
667 | ||
668 | TH1D *gYPrimaryProtonsPercentage = new TH1D("gYPrimaryProtonsPercentage", | |
669 | "", | |
670 | hPrimaryProtons->GetXaxis()->GetNbins(), | |
671 | hPrimaryProtons->GetXaxis()->GetXmin(), | |
672 | hPrimaryProtons->GetXaxis()->GetXmax()); | |
673 | gYPrimaryProtonsPercentage->Divide(gYPrimaryProtons, | |
863f782b | 674 | gYTotalProtons,1.,1.0); |
1c21299a | 675 | SetError(gYPrimaryProtonsPercentage,gYTotalProtons); |
863f782b | 676 | gYPrimaryProtonsPercentage->Scale(100.); |
0008a5a6 | 677 | gYPrimaryProtonsPercentage->SetMarkerStyle(kFullCircle); |
678 | ||
679 | TH1D *gYSecondaryProtonsPercentage = new TH1D("gYSecondaryProtonsPercentage", | |
680 | "", | |
681 | hSecondaryProtons->GetXaxis()->GetNbins(), | |
682 | hSecondaryProtons->GetXaxis()->GetXmin(), | |
683 | hSecondaryProtons->GetXaxis()->GetXmax()); | |
684 | gYSecondaryProtonsPercentage->Divide(gYSecondaryProtons, | |
863f782b | 685 | gYTotalProtons,1.,1.0); |
1c21299a | 686 | SetError(gYSecondaryProtonsPercentage,gYTotalProtons); |
863f782b | 687 | gYSecondaryProtonsPercentage->Scale(100.); |
0008a5a6 | 688 | gYSecondaryProtonsPercentage->SetMarkerStyle(kOpenCircle); |
689 | ||
0008a5a6 | 690 | //Antiprotons |
691 | TH1D *gYPrimaryAntiProtons = (TH1D *)hPrimaryAntiProtons->ProjectionX("gYPrimaryAntiProtons",0,hPrimaryAntiProtons->GetXaxis()->GetNbins(),"e"); | |
692 | TH1D *gYSecondaryAntiProtons = (TH1D *)hSecondaryAntiProtons->ProjectionX("gYSecondaryAntiProtons",0,hSecondaryAntiProtons->GetXaxis()->GetNbins(),"e"); | |
693 | TH1D *gYTotalAntiProtons = (TH1D *)hPrimaryAntiProtons->ProjectionX("gYTotalAntiProtons",0,hPrimaryAntiProtons->GetXaxis()->GetNbins(),"e"); | |
694 | gYTotalAntiProtons->Add(gYSecondaryAntiProtons); | |
695 | ||
696 | TH1D *gYPrimaryAntiProtonsPercentage = new TH1D("gYPrimaryAntiProtonsPercentage", | |
697 | "", | |
698 | hPrimaryAntiProtons->GetXaxis()->GetNbins(), | |
699 | hPrimaryAntiProtons->GetXaxis()->GetXmin(), | |
700 | hPrimaryAntiProtons->GetXaxis()->GetXmax()); | |
701 | gYPrimaryAntiProtonsPercentage->Divide(gYPrimaryAntiProtons, | |
863f782b | 702 | gYTotalAntiProtons,1.,1.0); |
1c21299a | 703 | SetError(gYPrimaryAntiProtonsPercentage,gYTotalAntiProtons); |
863f782b | 704 | gYPrimaryAntiProtonsPercentage->Scale(100.); |
0008a5a6 | 705 | gYPrimaryAntiProtonsPercentage->SetMarkerStyle(kFullCircle); |
706 | ||
707 | TH1D *gYSecondaryAntiProtonsPercentage = new TH1D("gYSecondaryAntiProtonsPercentage", | |
708 | "", | |
709 | hSecondaryAntiProtons->GetXaxis()->GetNbins(), | |
710 | hSecondaryAntiProtons->GetXaxis()->GetXmin(), | |
711 | hSecondaryAntiProtons->GetXaxis()->GetXmax()); | |
712 | gYSecondaryAntiProtonsPercentage->Divide(gYSecondaryAntiProtons, | |
863f782b | 713 | gYTotalAntiProtons,1.,1.0); |
1c21299a | 714 | SetError(gYSecondaryAntiProtonsPercentage,gYTotalAntiProtons); |
863f782b | 715 | gYSecondaryAntiProtonsPercentage->Scale(100.); |
0008a5a6 | 716 | gYSecondaryAntiProtonsPercentage->SetMarkerStyle(kOpenCircle); |
717 | ||
718 | ||
719 | TH2F *hEmptyY = new TH2F("hEmptyCompositionY","", | |
720 | 100,-1.2,1.2,100,-10.0,130); | |
721 | hEmptyY->SetStats(kFALSE); | |
722 | hEmptyY->GetYaxis()->SetTitle("Particle composition [%]"); | |
723 | hEmptyY->GetYaxis()->SetTitleOffset(1.3); | |
dd3fa486 | 724 | hEmptyY->GetXaxis()->SetTitle(hPrimaryProtons->GetXaxis()->GetTitle()); |
0008a5a6 | 725 | |
1c21299a | 726 | TCanvas *c7 = new TCanvas("c7","(Anti)Proton contamination vs y", |
863f782b | 727 | 150,150,700,400); |
0008a5a6 | 728 | c7->SetHighLightColor(10); c7->Divide(2,1); |
729 | ||
730 | c7->cd(1)->SetBottomMargin(0.15); | |
731 | c7->cd(1)->SetLeftMargin(0.15); | |
732 | c7->cd(1)->SetGridx(); c7->cd(1)->SetGridy(); | |
733 | hEmptyY->SetTitle("Protons"); | |
734 | hEmptyY->DrawCopy(); | |
1c21299a | 735 | gYPrimaryProtonsPercentage->DrawCopy("ESAME"); |
736 | gYSecondaryProtonsPercentage->DrawCopy("ESAME"); | |
0008a5a6 | 737 | |
738 | DrawMarker(0, 55, kFullCircle, 1.2, 1); | |
739 | t1->DrawLatex(0.1,53,"Primaries"); | |
740 | DrawMarker(0, 45, kOpenCircle, 1.2, 1); | |
741 | t1->DrawLatex(0.1,43,"Secondaries"); | |
742 | ||
743 | c7->cd(2)->SetBottomMargin(0.15); | |
744 | c7->cd(2)->SetLeftMargin(0.15); | |
745 | c7->cd(2)->SetGridx(); c7->cd(2)->SetGridy(); | |
746 | hEmptyY->SetTitle("Antiprotons"); | |
747 | hEmptyY->DrawCopy(); | |
1c21299a | 748 | gYPrimaryAntiProtonsPercentage->DrawCopy("ESAME"); |
749 | gYSecondaryAntiProtonsPercentage->DrawCopy("ESAME"); | |
0008a5a6 | 750 | |
751 | DrawMarker(0, 55, kFullCircle, 1.2, 1); | |
752 | t1->DrawLatex(0.1,53,"Primaries"); | |
753 | DrawMarker(0, 45, kOpenCircle, 1.2, 1); | |
5ae0977e | 754 | t1->DrawLatex(0.1,41,"Secondaries"); |
0008a5a6 | 755 | |
756 | c7->SaveAs("Contamination-Protons-Rapidity.gif"); | |
757 | ||
758 | //pT dependence | |
759 | //Protons | |
760 | TH1D *gPtPrimaryProtons = (TH1D *)hPrimaryProtons->ProjectionY("gPtPrimaryProtons",0,hPrimaryProtons->GetYaxis()->GetNbins(),"e"); | |
761 | TH1D *gPtSecondaryProtons = (TH1D *)hSecondaryProtons->ProjectionY("gPtSecondaryProtons",0,hSecondaryProtons->GetYaxis()->GetNbins(),"e"); | |
762 | TH1D *gPtTotalProtons = (TH1D *)hPrimaryProtons->ProjectionY("gPtTotalProtons",0,hPrimaryProtons->GetYaxis()->GetNbins(),"e"); | |
763 | gPtTotalProtons->Add(gPtSecondaryProtons); | |
764 | ||
765 | TH1D *gPtPrimaryProtonsPercentage = new TH1D("gPtPrimaryProtonsPercentage", | |
766 | "", | |
767 | hPrimaryProtons->GetYaxis()->GetNbins(), | |
768 | hPrimaryProtons->GetYaxis()->GetXmin(), | |
769 | hPrimaryProtons->GetYaxis()->GetXmax()); | |
770 | gPtPrimaryProtonsPercentage->Divide(gPtPrimaryProtons, | |
863f782b | 771 | gPtTotalProtons,1.,1.0); |
1c21299a | 772 | SetError(gPtPrimaryProtonsPercentage,gPtTotalProtons); |
863f782b | 773 | gPtPrimaryProtonsPercentage->Scale(100.); |
0008a5a6 | 774 | gPtPrimaryProtonsPercentage->SetMarkerStyle(kFullCircle); |
775 | ||
776 | TH1D *gPtSecondaryProtonsPercentage = new TH1D("gPtSecondaryProtonsPercentage", | |
777 | "", | |
778 | hSecondaryProtons->GetYaxis()->GetNbins(), | |
779 | hSecondaryProtons->GetYaxis()->GetXmin(), | |
780 | hSecondaryProtons->GetYaxis()->GetXmax()); | |
781 | gPtSecondaryProtonsPercentage->Divide(gPtSecondaryProtons, | |
863f782b | 782 | gPtTotalProtons,1.,1.0); |
1c21299a | 783 | SetError(gPtSecondaryProtonsPercentage,gPtTotalProtons); |
863f782b | 784 | gPtSecondaryProtonsPercentage->Scale(100.); |
0008a5a6 | 785 | gPtSecondaryProtonsPercentage->SetMarkerStyle(kOpenCircle); |
786 | ||
787 | ||
788 | //Antiprotons | |
789 | TH1D *gPtPrimaryAntiProtons = (TH1D *)hPrimaryAntiProtons->ProjectionY("gPtPrimaryAntiProtons",0,hPrimaryAntiProtons->GetYaxis()->GetNbins(),"e"); | |
790 | TH1D *gPtSecondaryAntiProtons = (TH1D *)hSecondaryAntiProtons->ProjectionY("gPtSecondaryAntiProtons",0,hSecondaryAntiProtons->GetYaxis()->GetNbins(),"e"); | |
791 | TH1D *gPtTotalAntiProtons = (TH1D *)hPrimaryAntiProtons->ProjectionY("gPtTotalAntiProtons",0,hPrimaryAntiProtons->GetYaxis()->GetNbins(),"e"); | |
792 | gPtTotalAntiProtons->Add(gPtSecondaryAntiProtons); | |
793 | ||
794 | TH1D *gPtPrimaryAntiProtonsPercentage = new TH1D("gPtPrimaryAntiProtonsPercentage", | |
795 | "", | |
796 | hPrimaryAntiProtons->GetYaxis()->GetNbins(), | |
797 | hPrimaryAntiProtons->GetYaxis()->GetXmin(), | |
798 | hPrimaryAntiProtons->GetYaxis()->GetXmax()); | |
799 | gPtPrimaryAntiProtonsPercentage->Divide(gPtPrimaryAntiProtons, | |
863f782b | 800 | gPtTotalAntiProtons,1.,1.0); |
1c21299a | 801 | SetError(gPtPrimaryAntiProtonsPercentage,gPtTotalAntiProtons); |
863f782b | 802 | gPtPrimaryAntiProtonsPercentage->Scale(100.); |
0008a5a6 | 803 | gPtPrimaryAntiProtonsPercentage->SetMarkerStyle(kFullCircle); |
804 | ||
805 | TH1D *gPtSecondaryAntiProtonsPercentage = new TH1D("gPtSecondaryAntiProtonsPercentage", | |
806 | "", | |
807 | hSecondaryAntiProtons->GetYaxis()->GetNbins(), | |
808 | hSecondaryAntiProtons->GetYaxis()->GetXmin(), | |
809 | hSecondaryAntiProtons->GetYaxis()->GetXmax()); | |
810 | gPtSecondaryAntiProtonsPercentage->Divide(gPtSecondaryAntiProtons, | |
863f782b | 811 | gPtTotalAntiProtons,1.,1.0); |
1c21299a | 812 | SetError(gPtSecondaryAntiProtonsPercentage,gPtTotalAntiProtons); |
863f782b | 813 | gPtSecondaryAntiProtonsPercentage->Scale(100.); |
0008a5a6 | 814 | gPtSecondaryAntiProtonsPercentage->SetMarkerStyle(kOpenCircle); |
815 | ||
816 | TH2F *hEmptyPt = new TH2F("hEmptyCompositionPt","", | |
817 | 100,0.0,4.0,100,-10.0,130); | |
818 | hEmptyPt->SetStats(kFALSE); | |
819 | hEmptyPt->GetYaxis()->SetTitle("Particle composition [%]"); | |
820 | hEmptyPt->GetYaxis()->SetTitleOffset(1.3); | |
821 | hEmptyPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
822 | ||
1c21299a | 823 | TCanvas *c8 = new TCanvas("c8","(Anti)Proton comtamination vs pT", |
863f782b | 824 | 200,200,700,400); |
0008a5a6 | 825 | c8->SetHighLightColor(10); c8->Divide(2,1); |
826 | ||
827 | c8->cd(1)->SetBottomMargin(0.15); | |
828 | c8->cd(1)->SetLeftMargin(0.15); | |
829 | c8->cd(1)->SetGridx(); c8->cd(1)->SetGridy(); | |
830 | hEmptyPt->SetTitle("Protons"); | |
5ae0977e | 831 | hEmptyPt->GetXaxis()->SetRangeUser(gPtPrimaryProtonsPercentage->GetXaxis()->GetXmin()-0.2,gPtPrimaryProtonsPercentage->GetXaxis()->GetXmax()+0.2); |
0008a5a6 | 832 | hEmptyPt->DrawCopy(); |
1c21299a | 833 | gPtPrimaryProtonsPercentage->DrawCopy("ESAME"); |
834 | gPtSecondaryProtonsPercentage->DrawCopy("ESAME"); | |
0008a5a6 | 835 | |
5ae0977e | 836 | DrawMarker(0.5, 55, kFullCircle, 1.2, 1); |
837 | t1->DrawLatex(0.6,53,"Primaries"); | |
838 | DrawMarker(0.5, 45, kOpenCircle, 1.2, 1); | |
839 | t1->DrawLatex(0.6,41,"Secondaries"); | |
0008a5a6 | 840 | |
841 | c8->cd(2)->SetBottomMargin(0.15); | |
842 | c8->cd(2)->SetLeftMargin(0.15); | |
843 | c8->cd(2)->SetGridx(); c8->cd(2)->SetGridy(); | |
844 | hEmptyPt->SetTitle("Antirotons"); | |
845 | hEmptyPt->DrawCopy(); | |
1c21299a | 846 | gPtPrimaryAntiProtonsPercentage->DrawCopy("ESAME"); |
847 | gPtSecondaryAntiProtonsPercentage->DrawCopy("ESAME"); | |
0008a5a6 | 848 | |
849 | DrawMarker(2.0, 55, kFullCircle, 1.2, 1); | |
850 | t1->DrawLatex(2.1,53,"Primaries"); | |
851 | DrawMarker(2.0, 45, kOpenCircle, 1.2, 1); | |
852 | t1->DrawLatex(2.1,43,"Secondaries"); | |
853 | ||
854 | c8->SaveAs("Contamination-Protons-Pt.gif"); | |
5b8133c7 | 855 | |
9e2392b0 | 856 | TString outputFileName = "Contamination."; |
857 | outputFileName += analysisType; outputFileName += ".root"; | |
858 | TFile *fout = TFile::Open(outputFileName.Data(),"recreate"); | |
5b8133c7 | 859 | gYPrimaryProtonsPercentage->Write(); |
860 | gYSecondaryProtonsPercentage->Write(); | |
861 | gPtPrimaryProtonsPercentage->Write(); | |
862 | gPtSecondaryProtonsPercentage->Write(); | |
863 | gYPrimaryAntiProtonsPercentage->Write(); | |
864 | gYSecondaryAntiProtonsPercentage->Write(); | |
865 | gPtPrimaryAntiProtonsPercentage->Write(); | |
866 | gPtSecondaryAntiProtonsPercentage->Write(); | |
867 | fout->Close(); | |
cc0fbd97 | 868 | } |
869 | ||
1c21299a | 870 | //________________________________________________// |
9e2392b0 | 871 | void DrawCutEfficiency(TList *inputList, |
872 | const char* analysisType) { | |
1c21299a | 873 | //loops over the list entries and |
874 | //draws the rapidity and pT dependence | |
875 | //of the percentage of primary and secondary | |
876 | //protons and antiprotons after the track cuts | |
877 | cout<<"Extracting the entries for the histograms in the list: "<< | |
878 | inputList->GetName()<<"..."<<endl; | |
879 | ||
880 | TLatex *t1 = new TLatex(); | |
881 | t1->SetTextSize(0.04); | |
882 | ||
883 | TH2F *hPrimaryESDProtons = (TH2F *)inputList->At(0); | |
884 | TH2F *hPrimaryESDAntiProtons = (TH2F *)inputList->At(4); | |
885 | TH2F *hPrimaryMCProtons = (TH2F *)inputList->At(8); | |
886 | TH2F *hPrimaryMCAntiProtons = (TH2F *)inputList->At(9); | |
887 | ||
888 | //rapidity dependence | |
889 | //Protons | |
890 | TH1D *gYPrimaryESDProtons = (TH1D *)hPrimaryESDProtons->ProjectionX("gYPrimaryESDProtons",0,hPrimaryESDProtons->GetXaxis()->GetNbins(),"e"); | |
891 | TH1D *gYPrimaryMCProtons = (TH1D *)hPrimaryMCProtons->ProjectionX("gYPrimaryMCProtons",0,hPrimaryMCProtons->GetXaxis()->GetNbins(),"e"); | |
892 | gYPrimaryESDProtons->Divide(gYPrimaryMCProtons); | |
1c21299a | 893 | SetError(gYPrimaryESDProtons,gYPrimaryMCProtons); |
863f782b | 894 | gYPrimaryESDProtons->Scale(100.); |
1c21299a | 895 | gYPrimaryESDProtons->SetMarkerStyle(kFullCircle); |
896 | ||
897 | //Antiprotons | |
898 | TH1D *gYPrimaryESDAntiProtons = (TH1D *)hPrimaryESDAntiProtons->ProjectionX("gYPrimaryESDAntiProtons",0,hPrimaryESDAntiProtons->GetXaxis()->GetNbins(),"e"); | |
899 | TH1D *gYPrimaryMCAntiProtons = (TH1D *)hPrimaryMCAntiProtons->ProjectionX("gYPrimaryMCAntiProtons",0,hPrimaryMCAntiProtons->GetXaxis()->GetNbins(),"e"); | |
900 | gYPrimaryESDAntiProtons->Divide(gYPrimaryMCAntiProtons); | |
1c21299a | 901 | SetError(gYPrimaryESDAntiProtons,gYPrimaryMCAntiProtons); |
863f782b | 902 | gYPrimaryESDAntiProtons->Scale(100.); |
1c21299a | 903 | gYPrimaryESDAntiProtons->SetMarkerStyle(kFullCircle); |
904 | ||
905 | TH2F *hEmptyY = new TH2F("hEmptyEfficiencyY","", | |
906 | 100,-1.2,1.2,100,-10.0,130); | |
907 | hEmptyY->SetStats(kFALSE); | |
908 | hEmptyY->GetYaxis()->SetTitle("#epsilon [%]"); | |
909 | hEmptyY->GetYaxis()->SetTitleOffset(1.3); | |
dd3fa486 | 910 | hEmptyY->GetXaxis()->SetTitle(hPrimaryESDProtons->GetXaxis()->GetTitle()); |
1c21299a | 911 | |
2b00fd2c | 912 | TCanvas *c10 = new TCanvas("c10","(Anti)Proton cut efficiency vs y", |
863f782b | 913 | 250,250,700,400); |
1c21299a | 914 | c10->SetHighLightColor(10); c10->Divide(2,1); |
915 | ||
916 | c10->cd(1)->SetBottomMargin(0.15); | |
917 | c10->cd(1)->SetLeftMargin(0.15); | |
918 | c10->cd(1)->SetGridx(); c10->cd(1)->SetGridy(); | |
919 | hEmptyY->SetTitle("Protons"); | |
e13bbda6 | 920 | hEmptyY->GetXaxis()->SetRangeUser(gYPrimaryESDAntiProtons->GetXaxis()->GetXmin()-0.2,gYPrimaryESDAntiProtons->GetXaxis()->GetXmax()+0.2); |
1c21299a | 921 | hEmptyY->DrawCopy(); |
922 | gYPrimaryESDProtons->DrawCopy("ESAME"); | |
923 | ||
924 | c10->cd(2)->SetBottomMargin(0.15); | |
925 | c10->cd(2)->SetLeftMargin(0.15); | |
926 | c10->cd(2)->SetGridx(); c10->cd(2)->SetGridy(); | |
927 | hEmptyY->SetTitle("Antiprotons"); | |
928 | hEmptyY->DrawCopy(); | |
929 | gYPrimaryESDAntiProtons->DrawCopy("ESAME"); | |
930 | ||
2b00fd2c | 931 | c10->SaveAs("CutEfficiency-Protons-Rapidity.gif"); |
1c21299a | 932 | |
933 | //pT dependence | |
934 | //Protons | |
935 | TH1D *gPtPrimaryESDProtons = (TH1D *)hPrimaryESDProtons->ProjectionY("gPtPrimaryESDProtons",0,hPrimaryESDProtons->GetYaxis()->GetNbins(),"e"); | |
936 | TH1D *gPtPrimaryMCProtons = (TH1D *)hPrimaryMCProtons->ProjectionY("gPtPrimaryMCProtons",0,hPrimaryMCProtons->GetYaxis()->GetNbins(),"e"); | |
937 | gPtPrimaryESDProtons->Divide(gPtPrimaryMCProtons); | |
1c21299a | 938 | SetError(gPtPrimaryESDProtons,gPtPrimaryMCProtons); |
863f782b | 939 | gPtPrimaryESDProtons->Scale(100.); |
1c21299a | 940 | gPtPrimaryESDProtons->SetMarkerStyle(kFullCircle); |
941 | ||
942 | //Antiprotons | |
943 | TH1D *gPtPrimaryESDAntiProtons = (TH1D *)hPrimaryESDAntiProtons->ProjectionY("gPtPrimaryESDAntiProtons",0,hPrimaryESDAntiProtons->GetYaxis()->GetNbins(),"e"); | |
944 | TH1D *gPtPrimaryMCAntiProtons = (TH1D *)hPrimaryMCAntiProtons->ProjectionY("gPtPrimaryMCAntiProtons",0,hPrimaryMCAntiProtons->GetYaxis()->GetNbins(),"e"); | |
945 | gPtPrimaryESDAntiProtons->Divide(gPtPrimaryMCAntiProtons); | |
1c21299a | 946 | SetError(gPtPrimaryESDAntiProtons,gPtPrimaryMCAntiProtons); |
863f782b | 947 | gPtPrimaryESDAntiProtons->Scale(100.); |
1c21299a | 948 | gPtPrimaryESDAntiProtons->SetMarkerStyle(kFullCircle); |
949 | ||
950 | TH2F *hEmptyPt = new TH2F("hEmptyEfficiencyPt","", | |
951 | 100,0.0,4.0,100,-10.0,130); | |
952 | hEmptyPt->SetStats(kFALSE); | |
953 | hEmptyPt->GetYaxis()->SetTitle("#epsilon [%]"); | |
954 | hEmptyPt->GetYaxis()->SetTitleOffset(1.3); | |
955 | hEmptyPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
956 | ||
2b00fd2c | 957 | TCanvas *c11 = new TCanvas("c11","(Anti)Proton cut efficiency vs pT", |
863f782b | 958 | 300,300,700,400); |
1c21299a | 959 | c11->SetHighLightColor(10); c11->Divide(2,1); |
960 | ||
961 | c11->cd(1)->SetBottomMargin(0.15); | |
962 | c11->cd(1)->SetLeftMargin(0.15); | |
963 | c11->cd(1)->SetGridx(); c11->cd(1)->SetGridy(); | |
964 | hEmptyPt->SetTitle("Protons"); | |
e13bbda6 | 965 | hEmptyPt->GetXaxis()->SetRangeUser(gPtPrimaryESDAntiProtons->GetXaxis()->GetXmin()-0.2,gPtPrimaryESDAntiProtons->GetXaxis()->GetXmax()+0.2); |
1c21299a | 966 | hEmptyPt->DrawCopy(); |
967 | gPtPrimaryESDProtons->DrawCopy("ESAME"); | |
968 | ||
969 | c11->cd(2)->SetBottomMargin(0.15); | |
970 | c11->cd(2)->SetLeftMargin(0.15); | |
971 | c11->cd(2)->SetGridx(); c11->cd(2)->SetGridy(); | |
972 | hEmptyPt->SetTitle("Antirotons"); | |
973 | hEmptyPt->DrawCopy(); | |
974 | gPtPrimaryESDAntiProtons->DrawCopy("ESAME"); | |
975 | ||
2b00fd2c | 976 | c11->SaveAs("CutEfficiency-Protons-Pt.gif"); |
1c21299a | 977 | |
9e2392b0 | 978 | TString outputFileName = "CutEfficiency."; |
979 | outputFileName += analysisType; outputFileName += ".root"; | |
980 | TFile *fout = TFile::Open(outputFileName.Data(),"recreate"); | |
1c21299a | 981 | gYPrimaryESDProtons->Write(); |
982 | gYPrimaryESDAntiProtons->Write(); | |
983 | gPtPrimaryESDProtons->Write(); | |
984 | gPtPrimaryESDAntiProtons->Write(); | |
985 | fout->Close(); | |
986 | } | |
987 | ||
cc0fbd97 | 988 | //________________________________________________// |
989 | void GetQAEntries(TList *inputList, Double_t *entries) { | |
990 | //loops over the list entries | |
991 | //extracts the entries for each histogram | |
0008a5a6 | 992 | //cout<<"Extracting the entries for the histograms in the list: "<< |
993 | //inputList->GetName()<<"..."<<endl; | |
cc0fbd97 | 994 | |
995 | for(Int_t i = 0; i < inputList->GetEntries(); i++) { | |
996 | TH1F *gHist = (TH1F *)inputList->At(i); | |
997 | entries[i] = gHist->GetEntries(); | |
57e749bb | 998 | cout<<"Position: "<<i+1<<" - Histogram: "<<gHist->GetName()<< |
999 | " - Entries: "<<entries[i]<<endl; | |
cc0fbd97 | 1000 | gHist = 0; |
1001 | } | |
1002 | } | |
1003 | ||
1004 | //________________________________________________// | |
1005 | Double_t GetPercentage(Double_t nPassEntries, | |
1006 | Double_t nRejectEntries) { | |
1007 | //returns the percentage of tracks that were rejected by a cut | |
1008 | Int_t nTotalEntries = nPassEntries + nRejectEntries; | |
1009 | ||
1010 | if(nTotalEntries == 0) | |
1011 | return -1; | |
1012 | ||
1013 | return 100.*nRejectEntries/nTotalEntries; | |
1014 | } | |
1015 | ||
0008a5a6 | 1016 | //________________________________________// |
1c21299a | 1017 | void drawMCQA(TList *listPDG, TList *listMCProcesses) { |
0008a5a6 | 1018 | //Function to display the composition of secondary (anti)protons |
1019 | //The histogram shows the percentage of secondary (anti)protons | |
1020 | //originating from each particle species. | |
1021 | //The box summarizes the MC process that gave these secondary (anti)protons | |
1022 | TDatabasePDG *db = TDatabasePDG::Instance(); | |
1023 | TParticlePDG *p = 0x0; | |
1024 | ||
1c21299a | 1025 | TH3F *gHistYPtPDGProtons = (TH3F *)listPDG->At(0); |
1026 | TH3F *gHistYPtPDGAntiProtons = (TH3F *)listPDG->At(1); | |
1027 | readProcesses(listMCProcesses); | |
3f522b01 | 1028 | Double_t nParticleCompositionProtonY[200], nParticleCompositionProtonPt[200]; |
1029 | Double_t nParticleCompositionProtonYError[200], nParticleCompositionProtonPtError[200]; | |
1030 | Double_t nParticleCompositionAntiProtonY[200], nParticleCompositionAntiProtonPt[200]; | |
1031 | Double_t nParticleCompositionAntiProtonYError[200], nParticleCompositionAntiProtonPtError[200]; | |
1032 | Double_t gY[200], gPt[200]; | |
1033 | Double_t gYError[200], gPtError[200]; | |
1034 | for(Int_t iBins = 0; iBins < 200; iBins++) { | |
0008a5a6 | 1035 | nParticleCompositionProtonY[iBins] = 0; |
1036 | nParticleCompositionProtonPt[iBins] = 0; | |
720944fa | 1037 | nParticleCompositionProtonYError[iBins] = 0; |
1038 | nParticleCompositionProtonPtError[iBins] = 0; | |
0008a5a6 | 1039 | nParticleCompositionAntiProtonY[iBins] = 0; |
1040 | nParticleCompositionAntiProtonPt[iBins] = 0; | |
720944fa | 1041 | nParticleCompositionAntiProtonYError[iBins] = 0; |
1042 | nParticleCompositionAntiProtonPtError[iBins] = 0; | |
0008a5a6 | 1043 | gY[iBins] = 0; |
1044 | gPt[iBins] = 0; | |
720944fa | 1045 | gYError[iBins] = 0; |
1046 | gPtError[iBins] = 0; | |
0008a5a6 | 1047 | } |
1048 | ||
720944fa | 1049 | TGraphErrors *gParticleProtonY[14]; |
1050 | TGraphErrors *gParticleProtonPt[14]; | |
1051 | TGraphErrors *gParticleAntiProtonY[14]; | |
1052 | TGraphErrors *gParticleAntiProtonPt[14]; | |
0008a5a6 | 1053 | for(Int_t iParticle = 0; iParticle < 14; iParticle++) { |
1054 | GetComposition(iParticle, | |
1055 | gHistYPtPDGProtons, | |
1056 | nParticleCompositionProtonY, | |
720944fa | 1057 | nParticleCompositionProtonYError, gY, gYError, |
1058 | nParticleCompositionProtonPt, | |
1059 | nParticleCompositionProtonPtError, gPt, gPtError); | |
1060 | gParticleProtonY[iParticle] = new TGraphErrors(gHistYPtPDGProtons->GetNbinsX(), | |
1061 | gY,nParticleCompositionProtonY, | |
1062 | gYError,nParticleCompositionProtonYError); | |
0008a5a6 | 1063 | gParticleProtonY[iParticle]->SetMarkerStyle(iParticle+20); |
1064 | gParticleProtonY[iParticle]->SetMarkerSize(1.2); | |
1065 | ||
720944fa | 1066 | gParticleProtonPt[iParticle] = new TGraphErrors(gHistYPtPDGProtons->GetNbinsY(), |
1067 | gPt,nParticleCompositionProtonPt, | |
1068 | gPtError,nParticleCompositionProtonPtError); | |
0008a5a6 | 1069 | gParticleProtonPt[iParticle]->SetMarkerStyle(iParticle+20); |
1070 | gParticleProtonPt[iParticle]->SetMarkerSize(1.2); | |
1071 | ||
1072 | GetComposition(iParticle, | |
1073 | gHistYPtPDGAntiProtons, | |
1074 | nParticleCompositionAntiProtonY, | |
720944fa | 1075 | nParticleCompositionAntiProtonYError, gY, gYError, |
1076 | nParticleCompositionAntiProtonPt, | |
1077 | nParticleCompositionAntiProtonPtError, gPt, gPtError); | |
1078 | gParticleAntiProtonY[iParticle] = new TGraphErrors(gHistYPtPDGAntiProtons->GetNbinsX(), | |
1079 | gY,nParticleCompositionAntiProtonY, | |
1080 | gYError,nParticleCompositionAntiProtonYError); | |
0008a5a6 | 1081 | gParticleAntiProtonY[iParticle]->SetMarkerStyle(iParticle+20); |
1082 | gParticleAntiProtonY[iParticle]->SetMarkerSize(1.2); | |
1083 | ||
720944fa | 1084 | gParticleAntiProtonPt[iParticle] = new TGraphErrors(gHistYPtPDGAntiProtons->GetNbinsY(), |
1085 | gPt,nParticleCompositionAntiProtonPt, | |
1086 | gPtError,nParticleCompositionAntiProtonPtError); | |
0008a5a6 | 1087 | gParticleAntiProtonPt[iParticle]->SetMarkerStyle(iParticle+20); |
1088 | gParticleAntiProtonPt[iParticle]->SetMarkerSize(1.2); | |
1089 | } | |
1090 | ||
1091 | //_________________________________________________________// | |
1092 | char *fParticleName[14] = {"Primary","K_{L}","#pi","K_{S}","K", | |
1093 | "n","p","#Sigma^{-}","#Lambda","#Sigma^{+}", | |
5b8133c7 | 1094 | "#Xi^{-}","#Xi^{0}","#Omega^{-}"}; |
0008a5a6 | 1095 | TLatex *t1 = new TLatex(); |
1096 | t1->SetTextSize(0.04); | |
1097 | ||
5b8133c7 | 1098 | TH2F *hEmptyY = new TH2F("hEmptyY","",100,-1.2,1.2,100,0,120); |
0008a5a6 | 1099 | hEmptyY->SetStats(kFALSE); |
1100 | hEmptyY->GetYaxis()->SetTitle("Particle composition [%]"); | |
dd3fa486 | 1101 | hEmptyY->GetXaxis()->SetTitle(gHistYPtPDGProtons->GetXaxis()->GetTitle()); |
0008a5a6 | 1102 | |
5b8133c7 | 1103 | TCanvas *c3 = new TCanvas("c3","MC secondary composition vs y - Protons", |
3e23254a | 1104 | 450,450,700,400); |
0008a5a6 | 1105 | c3->SetHighLightColor(10); c3->SetBottomMargin(0.15); |
1106 | c3->SetGridx(); c3->SetGridy(); | |
720944fa | 1107 | hEmptyY->GetXaxis()->SetRangeUser(gParticleProtonY[0]->GetXaxis()->GetXmin()-0.2,gParticleProtonY[0]->GetXaxis()->GetXmax()+0.2); |
1c21299a | 1108 | hEmptyY->DrawCopy(); |
0008a5a6 | 1109 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { |
5b8133c7 | 1110 | //if((iParticle == 0)||(iParticle == 2)||(iParticle == 5)||(iParticle == 6)||(iParticle == 8)) |
1111 | if((iParticle == 0)||(iParticle == 2)||(iParticle == 6)||(iParticle == 8)) | |
1112 | gParticleProtonY[iParticle]->Draw("P"); | |
720944fa | 1113 | /*if(iParticle < 5) { |
5b8133c7 | 1114 | DrawMarker(-1.1, 115-5*iParticle, 20+iParticle, 1.2, 1); |
1115 | t1->DrawLatex(-1.0,113-5*iParticle,fParticleName[iParticle]); | |
0008a5a6 | 1116 | } |
1117 | else { | |
5b8133c7 | 1118 | DrawMarker(0.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1); |
1119 | t1->DrawLatex(0.3,113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 1120 | }*/ |
0008a5a6 | 1121 | } |
720944fa | 1122 | DrawMarker(0.0, 115, 20, 1.2, 1); |
1123 | t1->DrawLatex(0.1,113,fParticleName[0]); | |
1124 | DrawMarker(0.0, 108, 22, 1.2, 1); | |
1125 | t1->DrawLatex(0.1,106,fParticleName[2]); | |
1126 | DrawMarker(0.0, 101, 26, 1.2, 1); | |
1127 | t1->DrawLatex(0.1,99,fParticleName[6]); | |
1128 | DrawMarker(0.0, 94, 28, 1.2, 1); | |
1129 | t1->DrawLatex(0.1,92,fParticleName[8]); | |
0008a5a6 | 1130 | |
5b8133c7 | 1131 | TCanvas *c5 = new TCanvas("c5","MC secondary composition vs y - antiProtons", |
3e23254a | 1132 | 500,500,700,400); |
0008a5a6 | 1133 | c5->SetHighLightColor(10); c5->SetBottomMargin(0.15); |
1134 | c5->SetGridx(); c5->SetGridy(); | |
1c21299a | 1135 | hEmptyY->DrawCopy(); |
0008a5a6 | 1136 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { |
5b8133c7 | 1137 | if((iParticle == 0)||(iParticle == 6)||(iParticle == 8)) |
1138 | gParticleAntiProtonY[iParticle]->Draw("P"); | |
720944fa | 1139 | /*if(iParticle < 5) { |
5b8133c7 | 1140 | DrawMarker(-1.1, 115-5*iParticle, 20+iParticle, 1.2, 1); |
1141 | t1->DrawLatex(-1.0,113-5*iParticle,fParticleName[iParticle]); | |
0008a5a6 | 1142 | } |
1143 | else { | |
5b8133c7 | 1144 | DrawMarker(0.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1); |
1145 | t1->DrawLatex(0.3,113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 1146 | }*/ |
0008a5a6 | 1147 | } |
720944fa | 1148 | DrawMarker(0.0, 115, 20, 1.2, 1); |
1149 | t1->DrawLatex(0.1,113,fParticleName[0]); | |
1150 | DrawMarker(0.0, 108, 26, 1.2, 1); | |
1151 | t1->DrawLatex(0.1,106,fParticleName[6]); | |
1152 | DrawMarker(0.0, 101, 28, 1.2, 1); | |
1153 | t1->DrawLatex(0.1,99,fParticleName[8]); | |
0008a5a6 | 1154 | |
5b8133c7 | 1155 | TH2F *hEmptyPt = new TH2F("hEmptyPt","",100,0.0,4.0,100,0,120); |
0008a5a6 | 1156 | hEmptyPt->SetStats(kFALSE); |
1157 | hEmptyPt->GetYaxis()->SetTitle("Particle composition [%]"); | |
1158 | hEmptyPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
1159 | ||
5b8133c7 | 1160 | TCanvas *c4 = new TCanvas("c4","MC secondary composition vs pT - Protons", |
3e23254a | 1161 | 550,550,700,400); |
0008a5a6 | 1162 | c4->SetHighLightColor(10); c4->SetBottomMargin(0.15); |
1163 | c4->SetGridx(); c4->SetGridy(); | |
720944fa | 1164 | hEmptyPt->GetXaxis()->SetRangeUser(gParticleProtonPt[0]->GetXaxis()->GetXmin()-0.2,gParticleProtonPt[0]->GetXaxis()->GetXmax()+0.2); |
1c21299a | 1165 | hEmptyPt->DrawCopy(); |
0008a5a6 | 1166 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { |
720944fa | 1167 | /*if(iParticle < 5) { |
5b8133c7 | 1168 | DrawMarker(0.2, 115-5*iParticle, 20+iParticle, 1.2, 1); |
1169 | t1->DrawLatex(0.3,113-5*iParticle,fParticleName[iParticle]); | |
0008a5a6 | 1170 | } |
1171 | else { | |
5b8133c7 | 1172 | DrawMarker(2.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1); |
1173 | t1->DrawLatex(2.3,113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 1174 | }*/ |
5b8133c7 | 1175 | if((iParticle == 0)||(iParticle == 2)||(iParticle == 6)||(iParticle == 8)) |
1176 | gParticleProtonPt[iParticle]->Draw("P"); | |
0008a5a6 | 1177 | } |
720944fa | 1178 | DrawMarker(0.5, 115, 20, 1.2, 1); |
1179 | t1->DrawLatex(0.6,113,fParticleName[0]); | |
1180 | DrawMarker(0.5, 108, 22, 1.2, 1); | |
1181 | t1->DrawLatex(0.6,106,fParticleName[2]); | |
1182 | DrawMarker(0.5, 101, 26, 1.2, 1); | |
1183 | t1->DrawLatex(0.6,99,fParticleName[6]); | |
1184 | DrawMarker(0.5, 94, 28, 1.2, 1); | |
1185 | t1->DrawLatex(0.6,92,fParticleName[8]); | |
0008a5a6 | 1186 | |
1c21299a | 1187 | TCanvas *c6 = new TCanvas("c6", |
1188 | "MC secondary composition vs pT - AntiProtons", | |
3e23254a | 1189 | 600,600,700,400); |
0008a5a6 | 1190 | c6->SetHighLightColor(10); c6->SetBottomMargin(0.15); |
1191 | c6->SetGridx(); c6->SetGridy(); | |
1c21299a | 1192 | hEmptyPt->DrawCopy(); |
0008a5a6 | 1193 | for(Int_t iParticle = 0; iParticle < 10; iParticle++) { |
720944fa | 1194 | /*if(iParticle < 5) { |
5b8133c7 | 1195 | DrawMarker(0.2, 115-5*iParticle, 20+iParticle, 1.2, 1); |
1196 | t1->DrawLatex(0.3,113-5*iParticle,fParticleName[iParticle]); | |
0008a5a6 | 1197 | } |
1198 | else { | |
5b8133c7 | 1199 | DrawMarker(2.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1); |
1200 | t1->DrawLatex(2.3,113-5*(iParticle-5),fParticleName[iParticle]); | |
720944fa | 1201 | }*/ |
5b8133c7 | 1202 | if((iParticle == 0)||(iParticle == 6)||(iParticle == 8)) |
1203 | gParticleAntiProtonPt[iParticle]->Draw("P"); | |
0008a5a6 | 1204 | } |
720944fa | 1205 | DrawMarker(0.5, 115, 20, 1.2, 1); |
1206 | t1->DrawLatex(0.6,113,fParticleName[0]); | |
1207 | DrawMarker(0.5, 108, 26, 1.2, 1); | |
1208 | t1->DrawLatex(0.6,106,fParticleName[6]); | |
1209 | DrawMarker(0.5, 101, 28, 1.2, 1); | |
1210 | t1->DrawLatex(0.6,99,fParticleName[8]); | |
0008a5a6 | 1211 | } |
1212 | ||
1213 | //________________________________________// | |
1214 | void GetComposition(Int_t iSpecies, | |
1215 | TH3F *gHist, | |
1216 | Double_t *nParticleCompositionY, | |
720944fa | 1217 | Double_t *nParticleCompositionYError, |
1218 | Double_t *gY, Double_t *gYError, | |
0008a5a6 | 1219 | Double_t *nParticleCompositionPt, |
720944fa | 1220 | Double_t *nParticleCompositionPtError, |
1221 | Double_t *gPt, Double_t *gPtError) { | |
0008a5a6 | 1222 | //Returns the pT and y dependence of the MC composition |
1223 | Double_t ymin = gHist->GetXaxis()->GetXmin(); | |
1224 | Double_t ymax = gHist->GetXaxis()->GetXmax(); | |
1225 | Double_t nybins = gHist->GetNbinsX(); | |
1226 | Double_t ptmin = gHist->GetYaxis()->GetXmin(); | |
1227 | Double_t ptmax = gHist->GetYaxis()->GetXmax(); | |
1228 | Double_t nptbins = gHist->GetNbinsY(); | |
3f522b01 | 1229 | Double_t nTotalY[200], nTotalPt[200]; |
1230 | for(Int_t iBins = 0; iBins < 200; iBins++) { | |
0008a5a6 | 1231 | nParticleCompositionY[iBins] = 0; |
1232 | nParticleCompositionPt[iBins] = 0; | |
720944fa | 1233 | nParticleCompositionYError[iBins] = 0; |
1234 | nParticleCompositionPtError[iBins] = 0; | |
0008a5a6 | 1235 | nTotalY[iBins] = 0.0; |
1236 | nTotalPt[iBins] = 0.0; | |
1237 | } | |
1238 | ||
1239 | //rapidity dependence | |
1240 | //cout<<"Ymin: "<<ymin<<" - Ymax: "<<ymax<<" - Ybins: "<<nybins<<endl; | |
1241 | for(Int_t iXbins = 1; iXbins <= gHist->GetNbinsX(); iXbins++) { | |
1242 | for(Int_t iZbins = 1; iZbins <= gHist->GetNbinsZ(); iZbins++) { | |
1243 | for(Int_t iYbins = 1; iYbins <= gHist->GetNbinsY(); iYbins++) { | |
1244 | nTotalY[iXbins-1] += gHist->GetBinContent(iXbins,iYbins,iZbins); | |
1245 | } | |
1246 | } | |
1247 | } | |
1248 | ||
1249 | for(Int_t iXbins = 1; iXbins <= gHist->GetNbinsX(); iXbins++) { | |
1250 | for(Int_t iYbins = 1; iYbins <= gHist->GetNbinsY(); iYbins++) { | |
863f782b | 1251 | if(nTotalY[iXbins-1] > 0) |
1252 | nParticleCompositionY[iXbins-1] += 100.*gHist->GetBinContent(iXbins,iYbins,iSpecies+1)/nTotalY[iXbins-1]; | |
720944fa | 1253 | //nCompositionY[iXbins-1] += gHist->GetBinContent(iXbins,iYbins,iSpecies+1); |
5b8133c7 | 1254 | //if(nParticleCompositionY[iXbins-1] == 0) |
1255 | //nParticleCompositionY[iXbins-1] = -10.0; | |
0008a5a6 | 1256 | }//pt loop |
720944fa | 1257 | if((nParticleCompositionY[iXbins-1] <= 100.)&&(nTotalY[iXbins-1] != 0)) |
1258 | nParticleCompositionYError[iXbins-1] = TMath::Sqrt(nParticleCompositionY[iXbins-1]*(100. - nParticleCompositionY[iXbins-1])/nTotalY[iXbins-1]); | |
0008a5a6 | 1259 | gY[iXbins-1] = ymin + (iXbins-1)*(ymax - ymin)/nybins + 0.5*(ymax - ymin)/nybins; |
720944fa | 1260 | gYError[iXbins-1] = 0.5*(ymax - ymin)/nybins; |
0008a5a6 | 1261 | //cout<<"y: "<<gY[iXbins-1]<< |
1262 | //" - test: "<<ymin + (iXbins-1)*(ymax - ymin)/nybins + 0.5*(ymax - ymin)/nybins<< | |
1263 | //" - Number of protons: "<<nY[iXbins-1]<< | |
1264 | //" - Total: "<<nTotalY[iXbins-1]<< | |
1265 | //" - Percentage: "<<nParticleCompositionY[iXbins-1]<<endl; | |
1266 | }//y loop | |
1267 | ||
1268 | //pt dependence | |
1269 | //cout<<"Ptmin: "<<ptmin<<" - Ptmax: "<<ptmax<<" - Ptbins: "<<nptbins<<endl; | |
1270 | for(Int_t iYbins = 1; iYbins <= gHist->GetNbinsY(); iYbins++) { | |
1271 | for(Int_t iZbins = 1; iZbins <= gHist->GetNbinsZ(); iZbins++) { | |
1272 | for(Int_t iXbins = 1; iXbins <= gHist->GetNbinsX(); iXbins++) { | |
1273 | nTotalPt[iYbins-1] += gHist->GetBinContent(iXbins,iYbins,iZbins); | |
1274 | } | |
1275 | } | |
1276 | } | |
1277 | ||
1278 | for(Int_t iYbins = 1; iYbins <= gHist->GetNbinsY(); iYbins++) { | |
1279 | for(Int_t iXbins = 1; iXbins <= gHist->GetNbinsX(); iXbins++) { | |
863f782b | 1280 | if(nTotalPt[iYbins-1] > 0) |
1281 | nParticleCompositionPt[iYbins-1] += 100.*gHist->GetBinContent(iXbins,iYbins,iSpecies+1)/nTotalPt[iYbins-1]; | |
5b8133c7 | 1282 | //if(nParticleCompositionPt[iYbins-1] == 0) |
1283 | //nParticleCompositionPt[iYbins-1] = -10.0; | |
0008a5a6 | 1284 | }//pt loop |
720944fa | 1285 | if((nParticleCompositionPt[iYbins-1] <= 100.)&&(nTotalPt[iYbins-1] != 0)) |
1286 | nParticleCompositionPtError[iYbins-1] = TMath::Sqrt(nParticleCompositionPt[iYbins-1]*(100. - nParticleCompositionPt[iYbins-1])/nTotalPt[iYbins-1]); | |
0008a5a6 | 1287 | gPt[iYbins-1] = ptmin + (iYbins-1)*(ptmax - ptmin)/nptbins + 0.5*(ptmax - ptmin)/nptbins; |
720944fa | 1288 | gPtError[iYbins-1] = 0.5*(ptmax - ptmin)/nptbins; |
0008a5a6 | 1289 | //cout<<"Pt: "<<gPt[iYbins-1]<< |
1290 | //" - test: "<<ptmin + (iYbins-1)*(ptmax - ptmin)/nptbins + 0.5*(ptmax - ptmin)/nptbins<< | |
1291 | //" - Number of protons: "<<nY[iXbins-1]<< | |
1292 | //" - Total: "<<nTotalPt[iYbins-1]<< | |
1293 | //" - Percentage: "<<nParticleCompositionPt[iYbins-1]<<endl; | |
1294 | }//pt loop | |
1295 | } | |
1296 | ||
5b8133c7 | 1297 | //________________________________________// |
1298 | void readProcesses(TList *list) { | |
1299 | char *fParticleProtonName[12] = {"K_{L}","#pi","K_{S}","K", | |
1300 | "n","p","#Sigma^{-}","#Lambda","#Sigma^{+}", | |
1301 | "#Xi^{-}","#Xi^{0}","#Omega^{-}"}; | |
1302 | char *fParticleAntiProtonName[8] = {"K_{L}","#pi","K_{S}","K", | |
1c21299a | 1303 | "n","p","#Lambda","#Sigma^{+}"}; |
5b8133c7 | 1304 | Int_t iProtonCounter = 0, iAntiProtonCounter = 0; |
1305 | TH1F *gMCProcesses; | |
1306 | for(Int_t iEntry = 0; iEntry < list->GetEntries(); iEntry++) { | |
1307 | gMCProcesses = (TH1F *)list->At(iEntry); | |
1308 | TString histName = gMCProcesses->GetName(); | |
1309 | if(histName.Contains("gHistProtons")) { | |
1310 | cout<<"Protons coming from "<<fParticleProtonName[iProtonCounter]<<endl; | |
1311 | ||
1312 | iProtonCounter += 1; | |
1313 | } | |
1314 | if(histName.Contains("gHistAntiProtons")) { | |
1315 | cout<<"Antiprotons coming from "<<fParticleAntiProtonName[iAntiProtonCounter]<<endl; | |
1316 | ||
1317 | iAntiProtonCounter += 1; | |
1318 | } | |
1319 | for(Int_t iBin = 1; iBin < gMCProcesses->GetNbinsX(); iBin++) { | |
1320 | Double_t binContent = gMCProcesses->GetBinContent(iBin); | |
1321 | if(binContent > 0) { | |
1322 | Int_t processId = gMCProcesses->GetBinCenter(iBin); | |
1323 | cout<<"\t Process ID: "<<processId<<" - "<< | |
1c21299a | 1324 | gMCProcessName[processId]<<" - "<< |
5b8133c7 | 1325 | 100.*binContent/gMCProcesses->GetEntries()<<"%"<<endl; |
1326 | } | |
1327 | } | |
1c21299a | 1328 | } |
1329 | } | |
5b8133c7 | 1330 | |
1c21299a | 1331 | //________________________________________________// |
75decd62 | 1332 | void SetError(TH1 *hEff, TH1 *hGen) { |
1c21299a | 1333 | for(Int_t iBin = 1; iBin <= hEff->GetNbinsX(); iBin++) { |
1334 | Double_t error = 0.0; | |
e13bbda6 | 1335 | if((hEff->GetBinContent(iBin) <= 1 .)&&(hGen->GetBinContent(iBin) != 0)) |
863f782b | 1336 | error = TMath::Sqrt(hEff->GetBinContent(iBin)*(1 . - hEff->GetBinContent(iBin))/hGen->GetBinContent(iBin)); |
1c21299a | 1337 | hEff->SetBinError(iBin,error); |
5b8133c7 | 1338 | } |
1339 | } | |
1340 | ||
75decd62 | 1341 | //________________________________________// |
1342 | void drawVertexQA(TList *list) { | |
1343 | //Function to display the vertex QA plots | |
1344 | TH1I *gHistMCPrimaryMultiplicity = (TH1I *)list->At(0); | |
1345 | //TPC | |
1346 | TH1I *gHistMCPrimaryMultiplicityTPC = (TH1I *)list->At(1); | |
1347 | TH2F *gHistTPCESDVx = (TH2F *)list->At(2); | |
1348 | TH2F *gHistTPCESDVy = (TH2F *)list->At(3); | |
1349 | TH2F *gHistTPCESDVz = (TH2F *)list->At(4); | |
1350 | TH1F *gHistTPCDiffVx = (TH1F *)list->At(5); | |
1351 | TH1F *gHistTPCDiffVy = (TH1F *)list->At(6); | |
1352 | TH1F *gHistTPCDiffVz = (TH1F *)list->At(7); | |
1353 | TH1F *gHistTPCResolutionVx = (TH1F *)list->At(8); | |
1354 | TH1F *gHistTPCResolutionVy = (TH1F *)list->At(9); | |
1355 | TH1F *gHistTPCResolutionVz = (TH1F *)list->At(10); | |
1356 | //SPD | |
1357 | TH1I *gHistMCPrimaryMultiplicitySPD = (TH1I *)list->At(11); | |
1358 | TH2F *gHistSPDESDVx = (TH2F *)list->At(12); | |
1359 | TH2F *gHistSPDESDVy = (TH2F *)list->At(13); | |
1360 | TH2F *gHistSPDESDVz = (TH2F *)list->At(14); | |
1361 | TH1F *gHistSPDDiffVx = (TH1F *)list->At(15); | |
1362 | TH1F *gHistSPDDiffVy = (TH1F *)list->At(16); | |
1363 | TH1F *gHistSPDDiffVz = (TH1F *)list->At(17); | |
1364 | TH1F *gHistSPDResolutionVx = (TH1F *)list->At(18); | |
1365 | TH1F *gHistSPDResolutionVy = (TH1F *)list->At(19); | |
1366 | TH1F *gHistSPDResolutionVz = (TH1F *)list->At(20); | |
1367 | //Tracks | |
1368 | TH1I *gHistMCPrimaryMultiplicityTracks = (TH1I *)list->At(21); | |
1369 | TH2F *gHistTracksESDVx = (TH2F *)list->At(22); | |
1370 | TH2F *gHistTracksESDVy = (TH2F *)list->At(23); | |
1371 | TH2F *gHistTracksESDVz = (TH2F *)list->At(24); | |
1372 | TH1F *gHistTracksDiffVx = (TH1F *)list->At(25); | |
1373 | TH1F *gHistTracksDiffVy = (TH1F *)list->At(26); | |
1374 | TH1F *gHistTracksDiffVz = (TH1F *)list->At(27); | |
1375 | TH1F *gHistTracksResolutionVx = (TH1F *)list->At(28); | |
1376 | TH1F *gHistTracksResolutionVy = (TH1F *)list->At(29); | |
1377 | TH1F *gHistTracksResolutionVz = (TH1F *)list->At(30); | |
1378 | ||
5661e210 | 1379 | TCanvas *c17 = new TCanvas("c17", |
75decd62 | 1380 | "Vertex efficiency", |
1381 | 300,0,900,400); | |
5661e210 | 1382 | c17->SetHighLightColor(10); c17->Divide(3,1); |
1383 | c17->cd(1)->SetLeftMargin(0.15); c17->cd(1)->SetBottomMargin(0.15); | |
1384 | c17->cd(1)->SetRightMargin(0.2); | |
4042c3a2 | 1385 | c17->cd(1)->SetGridx(); c17->cd(1)->SetGridy(); |
1386 | gHistMCPrimaryMultiplicityTPC->SetTitle("TPC vertex"); | |
75decd62 | 1387 | gHistMCPrimaryMultiplicityTPC->Divide(gHistMCPrimaryMultiplicity); |
1388 | SetError(gHistMCPrimaryMultiplicityTPC,gHistMCPrimaryMultiplicity); | |
4042c3a2 | 1389 | gHistMCPrimaryMultiplicityTPC->SetMaximum(110.); |
75decd62 | 1390 | gHistMCPrimaryMultiplicityTPC->Scale(100.); |
1391 | gHistMCPrimaryMultiplicityTPC->SetMarkerStyle(20); | |
1392 | gHistMCPrimaryMultiplicityTPC->SetMarkerColor(1); | |
1393 | gHistMCPrimaryMultiplicityTPC->GetYaxis()->SetTitle("#epsilon [%]"); | |
5661e210 | 1394 | gHistMCPrimaryMultiplicityTPC->SetStats(kFALSE); |
75decd62 | 1395 | gHistMCPrimaryMultiplicityTPC->Draw("E"); |
5661e210 | 1396 | c17->cd(2)->SetLeftMargin(0.15); c17->cd(2)->SetBottomMargin(0.15); |
1397 | c17->cd(2)->SetRightMargin(0.2); | |
4042c3a2 | 1398 | c17->cd(2)->SetGridx(); c17->cd(2)->SetGridy(); |
1399 | gHistMCPrimaryMultiplicitySPD->SetTitle("SPD vertex"); | |
75decd62 | 1400 | gHistMCPrimaryMultiplicitySPD->Divide(gHistMCPrimaryMultiplicity); |
1401 | SetError(gHistMCPrimaryMultiplicitySPD,gHistMCPrimaryMultiplicity); | |
4042c3a2 | 1402 | gHistMCPrimaryMultiplicitySPD->SetMaximum(110.); |
75decd62 | 1403 | gHistMCPrimaryMultiplicitySPD->Scale(100.); |
1404 | gHistMCPrimaryMultiplicitySPD->SetMarkerStyle(20); | |
1405 | gHistMCPrimaryMultiplicitySPD->SetMarkerColor(1); | |
1406 | gHistMCPrimaryMultiplicitySPD->GetYaxis()->SetTitle("#epsilon [%]"); | |
5661e210 | 1407 | gHistMCPrimaryMultiplicitySPD->SetStats(kFALSE); |
75decd62 | 1408 | gHistMCPrimaryMultiplicitySPD->Draw("E"); |
5661e210 | 1409 | c17->cd(3)->SetLeftMargin(0.15); c17->cd(3)->SetBottomMargin(0.15); |
1410 | c17->cd(3)->SetRightMargin(0.2); | |
4042c3a2 | 1411 | c17->cd(3)->SetGridx(); c17->cd(3)->SetGridy(); |
1412 | gHistMCPrimaryMultiplicityTracks->SetTitle("Vertex from tracks"); | |
75decd62 | 1413 | gHistMCPrimaryMultiplicityTracks->Divide(gHistMCPrimaryMultiplicity); |
1414 | SetError(gHistMCPrimaryMultiplicityTracks,gHistMCPrimaryMultiplicity); | |
4042c3a2 | 1415 | gHistMCPrimaryMultiplicityTracks->SetMaximum(110.); |
75decd62 | 1416 | gHistMCPrimaryMultiplicityTracks->Scale(100.); |
1417 | gHistMCPrimaryMultiplicityTracks->SetMarkerStyle(20); | |
1418 | gHistMCPrimaryMultiplicityTracks->SetMarkerColor(1); | |
1419 | gHistMCPrimaryMultiplicityTracks->GetYaxis()->SetTitle("#epsilon [%]"); | |
5661e210 | 1420 | gHistMCPrimaryMultiplicityTracks->SetStats(kFALSE); |
75decd62 | 1421 | gHistMCPrimaryMultiplicityTracks->Draw("E"); |
5aa87008 | 1422 | c17->SaveAs("VertexEfficiency.gif"); |
75decd62 | 1423 | |
1424 | //TPC vertex | |
5661e210 | 1425 | TCanvas *c18 = new TCanvas("c18", |
75decd62 | 1426 | "TPC vertex", |
1427 | 350,50,700,700); | |
5661e210 | 1428 | c18->SetHighLightColor(10); c18->Divide(3,3); |
1429 | c18->cd(1)->SetLeftMargin(0.15); c18->cd(1)->SetBottomMargin(0.15); | |
1430 | c18->cd(1)->SetRightMargin(0.2); c18->cd(1)->SetLogy(); | |
75decd62 | 1431 | gHistTPCESDVx->Draw("col"); |
5661e210 | 1432 | c18->cd(2)->SetLeftMargin(0.15); c18->cd(2)->SetBottomMargin(0.15); |
1433 | c18->cd(2)->SetRightMargin(0.2); c18->cd(2)->SetLogy(); | |
75decd62 | 1434 | gHistTPCESDVy->Draw("col"); |
5661e210 | 1435 | c18->cd(3)->SetLeftMargin(0.15); c18->cd(3)->SetBottomMargin(0.15); |
1436 | c18->cd(3)->SetRightMargin(0.2); c18->cd(3)->SetLogy(); | |
75decd62 | 1437 | gHistTPCESDVz->Draw("col"); |
5661e210 | 1438 | c18->cd(4)->SetLeftMargin(0.15); c18->cd(4)->SetBottomMargin(0.15); |
1439 | c18->cd(4)->SetRightMargin(0.2); c18->cd(4)->SetLogy(); | |
75decd62 | 1440 | gHistTPCDiffVx->Draw(); |
5661e210 | 1441 | c18->cd(5)->SetLeftMargin(0.15); c18->cd(5)->SetBottomMargin(0.15); |
1442 | c18->cd(5)->SetRightMargin(0.2); c18->cd(5)->SetLogy(); | |
75decd62 | 1443 | gHistTPCDiffVy->Draw(); |
5661e210 | 1444 | c18->cd(6)->SetLeftMargin(0.15); c18->cd(6)->SetBottomMargin(0.15); |
1445 | c18->cd(6)->SetRightMargin(0.2); c18->cd(6)->SetLogy(); | |
75decd62 | 1446 | gHistTPCDiffVz->Draw(); |
5661e210 | 1447 | c18->cd(7)->SetLeftMargin(0.15); c18->cd(7)->SetBottomMargin(0.15); |
1448 | c18->cd(7)->SetRightMargin(0.2); c18->cd(7)->SetLogy(); | |
75decd62 | 1449 | gHistTPCResolutionVx->Draw(); |
5661e210 | 1450 | c18->cd(8)->SetLeftMargin(0.15); c18->cd(8)->SetBottomMargin(0.15); |
1451 | c18->cd(8)->SetRightMargin(0.2); c18->cd(8)->SetLogy(); | |
75decd62 | 1452 | gHistTPCResolutionVy->Draw(); |
5661e210 | 1453 | c18->cd(9)->SetLeftMargin(0.15); c18->cd(9)->SetBottomMargin(0.15); |
1454 | c18->cd(9)->SetRightMargin(0.2); c18->cd(9)->SetLogy(); | |
75decd62 | 1455 | gHistTPCResolutionVz->Draw(); |
5aa87008 | 1456 | c18->SaveAs("VertexTPC.gif"); |
75decd62 | 1457 | |
1458 | //SPD vertex | |
5661e210 | 1459 | TCanvas *c19 = new TCanvas("c19", |
75decd62 | 1460 | "SPD vertex", |
1461 | 400,100,700,700); | |
5661e210 | 1462 | c19->SetHighLightColor(10); c19->Divide(3,3); |
1463 | c19->cd(1)->SetLeftMargin(0.15); c19->cd(1)->SetBottomMargin(0.15); | |
1464 | c19->cd(1)->SetRightMargin(0.2); c19->cd(1)->SetLogy(); | |
75decd62 | 1465 | gHistSPDESDVx->Draw("col"); |
5661e210 | 1466 | c19->cd(2)->SetLeftMargin(0.15); c19->cd(2)->SetBottomMargin(0.15); |
1467 | c19->cd(2)->SetRightMargin(0.2); c19->cd(2)->SetLogy(); | |
75decd62 | 1468 | gHistSPDESDVy->Draw("col"); |
5661e210 | 1469 | c19->cd(3)->SetLeftMargin(0.15); c19->cd(3)->SetBottomMargin(0.15); |
1470 | c19->cd(3)->SetRightMargin(0.2); c19->cd(3)->SetLogy(); | |
75decd62 | 1471 | gHistSPDESDVz->Draw("col"); |
5661e210 | 1472 | c19->cd(4)->SetLeftMargin(0.15); c19->cd(4)->SetBottomMargin(0.15); |
1473 | c19->cd(4)->SetRightMargin(0.2); c19->cd(4)->SetLogy(); | |
75decd62 | 1474 | gHistSPDDiffVx->Draw(); |
5661e210 | 1475 | c19->cd(5)->SetLeftMargin(0.15); c19->cd(5)->SetBottomMargin(0.15); |
1476 | c19->cd(5)->SetRightMargin(0.2); c19->cd(5)->SetLogy(); | |
75decd62 | 1477 | gHistSPDDiffVy->Draw(); |
5661e210 | 1478 | c19->cd(6)->SetLeftMargin(0.15); c19->cd(6)->SetBottomMargin(0.15); |
1479 | c19->cd(6)->SetRightMargin(0.2); c19->cd(6)->SetLogy(); | |
75decd62 | 1480 | gHistSPDDiffVz->Draw(); |
5661e210 | 1481 | c19->cd(7)->SetLeftMargin(0.15); c19->cd(7)->SetBottomMargin(0.15); |
1482 | c19->cd(7)->SetRightMargin(0.2); c19->cd(7)->SetLogy(); | |
75decd62 | 1483 | gHistSPDResolutionVx->Draw(); |
5661e210 | 1484 | c19->cd(8)->SetLeftMargin(0.15); c19->cd(8)->SetBottomMargin(0.15); |
1485 | c19->cd(8)->SetRightMargin(0.2); c19->cd(8)->SetLogy(); | |
75decd62 | 1486 | gHistSPDResolutionVy->Draw(); |
5661e210 | 1487 | c19->cd(9)->SetLeftMargin(0.15); c19->cd(9)->SetBottomMargin(0.15); |
1488 | c19->cd(9)->SetRightMargin(0.2); c19->cd(9)->SetLogy(); | |
75decd62 | 1489 | gHistSPDResolutionVz->Draw(); |
5aa87008 | 1490 | c19->SaveAs("VertexSPD.gif"); |
75decd62 | 1491 | |
1492 | //Tracks vertex | |
5661e210 | 1493 | TCanvas *c20 = new TCanvas("c20", |
75decd62 | 1494 | "Tracks vertex", |
5661e210 | 1495 | 450,150,700,700); |
1496 | c20->SetHighLightColor(10); c20->Divide(3,3); | |
1497 | c20->cd(1)->SetLeftMargin(0.15); c20->cd(1)->SetBottomMargin(0.15); | |
1498 | c20->cd(1)->SetRightMargin(0.2); c20->cd(1)->SetLogy(); | |
75decd62 | 1499 | gHistTracksESDVx->Draw("col"); |
5661e210 | 1500 | c20->cd(2)->SetLeftMargin(0.15); c20->cd(2)->SetBottomMargin(0.15); |
1501 | c20->cd(2)->SetRightMargin(0.2); c20->cd(2)->SetLogy(); | |
75decd62 | 1502 | gHistTracksESDVy->Draw("col"); |
5661e210 | 1503 | c20->cd(3)->SetLeftMargin(0.15); c20->cd(3)->SetBottomMargin(0.15); |
1504 | c20->cd(3)->SetRightMargin(0.2); c20->cd(3)->SetLogy(); | |
75decd62 | 1505 | gHistTracksESDVz->Draw("col"); |
5661e210 | 1506 | c20->cd(4)->SetLeftMargin(0.15); c20->cd(4)->SetBottomMargin(0.15); |
1507 | c20->cd(4)->SetRightMargin(0.2); c20->cd(4)->SetLogy(); | |
75decd62 | 1508 | gHistTracksDiffVx->Draw(); |
5661e210 | 1509 | c20->cd(5)->SetLeftMargin(0.15); c20->cd(5)->SetBottomMargin(0.15); |
1510 | c20->cd(5)->SetRightMargin(0.2); c20->cd(5)->SetLogy(); | |
75decd62 | 1511 | gHistTracksDiffVy->Draw(); |
5661e210 | 1512 | c20->cd(6)->SetLeftMargin(0.15); c20->cd(6)->SetBottomMargin(0.15); |
1513 | c20->cd(6)->SetRightMargin(0.2); c20->cd(6)->SetLogy(); | |
75decd62 | 1514 | gHistTracksDiffVz->Draw(); |
5661e210 | 1515 | c20->cd(7)->SetLeftMargin(0.15); c20->cd(7)->SetBottomMargin(0.15); |
1516 | c20->cd(7)->SetRightMargin(0.2); c20->cd(7)->SetLogy(); | |
75decd62 | 1517 | gHistTracksResolutionVx->Draw(); |
5661e210 | 1518 | c20->cd(8)->SetLeftMargin(0.15); c20->cd(8)->SetBottomMargin(0.15); |
1519 | c20->cd(8)->SetRightMargin(0.2); c20->cd(8)->SetLogy(); | |
75decd62 | 1520 | gHistTracksResolutionVy->Draw(); |
5661e210 | 1521 | c20->cd(9)->SetLeftMargin(0.15); c20->cd(9)->SetBottomMargin(0.15); |
1522 | c20->cd(9)->SetRightMargin(0.2); c20->cd(9)->SetLogy(); | |
75decd62 | 1523 | gHistTracksResolutionVz->Draw(); |
3f522b01 | 1524 | c20->SaveAs("VertexTracks.gif"); |
75decd62 | 1525 | } |
1526 | ||
863f782b | 1527 | //________________________________________// |
9e2392b0 | 1528 | void drawEfficiency(TList *list, |
1529 | const char* analysisType) { | |
863f782b | 1530 | //Function to display the reconstruction and PID efficiencies |
1531 | //for protons and antiprotons vs y and pT | |
1532 | ||
1533 | TH2F *hEmpty = new TH2F("hEmptyReconstructionEfficiency","", | |
0ececdf2 | 1534 | 1000,-1.2,210.,100,-10.0,130); |
863f782b | 1535 | hEmpty->SetStats(kFALSE); |
1536 | hEmpty->GetYaxis()->SetTitle("#epsilon [%]"); | |
1537 | hEmpty->GetYaxis()->SetTitleOffset(1.3); | |
1538 | ||
1539 | //Reconstruction efficiency | |
e13bbda6 | 1540 | TH2D *gHistPrimariesMCYPtProtons = (TH2D *)list->At(0); |
1541 | TH2D *gHistPrimariesMCYPtAntiProtons = (TH2D *)list->At(1); | |
1542 | TH2D *gHistMCYPtProtonsFromWeak = (TH2D *)list->At(2); | |
1543 | TH2D *gHistMCYPtAntiProtonsFromWeak = (TH2D *)list->At(3); | |
1544 | TH2D *gHistMCYPtProtonsFromHadronic = (TH2D *)list->At(4); | |
1545 | TH2D *gHistMCYPtAntiProtonsFromHadronic = (TH2D *)list->At(5); | |
1546 | TH2D *gHistPrimariesESDYPtProtons = (TH2D *)list->At(6); | |
1547 | TH2D *gHistPrimariesESDYPtAntiProtons = (TH2D *)list->At(7); | |
1548 | TH2D *gHistESDYPtProtonsFromWeak = (TH2D *)list->At(8); | |
1549 | TH2D *gHistESDYPtAntiProtonsFromWeak = (TH2D *)list->At(9); | |
1550 | TH2D *gHistESDYPtProtonsFromHadronic = (TH2D *)list->At(10); | |
1551 | TH2D *gHistESDYPtAntiProtonsFromHadronic = (TH2D *)list->At(11); | |
863f782b | 1552 | |
1553 | //rapidity dependence | |
1554 | TCanvas *c14 = new TCanvas("c14", | |
1555 | "(Anti)Proton reconstruction efficiency vs y", | |
3e23254a | 1556 | 650,650,700,400); |
863f782b | 1557 | c14->SetHighLightColor(10); c14->Divide(2,1); |
1558 | ||
e13bbda6 | 1559 | //Primary Protons |
1560 | TH1D *gYPrimariesESDProtons = (TH1D *)gHistPrimariesESDYPtProtons->ProjectionX("gYPrimariesESDProtons",0,gHistPrimariesESDYPtProtons->GetXaxis()->GetNbins(),"e"); | |
1561 | TH1D *gYPrimariesMCProtons = (TH1D *)gHistPrimariesMCYPtProtons->ProjectionX("gYPrimariesMCProtons",0,gHistPrimariesMCYPtProtons->GetXaxis()->GetNbins(),"e"); | |
1562 | gYPrimariesESDProtons->Divide(gYPrimariesMCProtons); | |
1563 | SetError(gYPrimariesESDProtons,gYPrimariesMCProtons); | |
1564 | gYPrimariesESDProtons->Scale(100.); | |
1565 | gYPrimariesESDProtons->SetMarkerStyle(kFullCircle); | |
1566 | ||
1567 | //Primary AntiProtons | |
1568 | TH1D *gYPrimariesESDAntiProtons = (TH1D *)gHistPrimariesESDYPtAntiProtons->ProjectionX("gYPrimariesESDAntiProtons",0,gHistPrimariesESDYPtAntiProtons->GetXaxis()->GetNbins(),"e"); | |
1569 | TH1D *gYPrimariesMCAntiProtons = (TH1D *)gHistPrimariesMCYPtAntiProtons->ProjectionX("gYPrimariesMCAntiProtons",0,gHistPrimariesMCYPtProtons->GetXaxis()->GetNbins(),"e"); | |
1570 | gYPrimariesESDAntiProtons->Divide(gYPrimariesMCAntiProtons); | |
1571 | SetError(gYPrimariesESDAntiProtons,gYPrimariesMCAntiProtons); | |
1572 | gYPrimariesESDAntiProtons->Scale(100.); | |
1573 | gYPrimariesESDAntiProtons->SetMarkerStyle(kFullCircle); | |
1574 | ||
1575 | //Protons from weak decays | |
1576 | TH1D *gYESDProtonsFromWeak = (TH1D *)gHistESDYPtProtonsFromWeak->ProjectionX("gYESDProtonsFromWeak",0,gHistESDYPtProtonsFromWeak->GetXaxis()->GetNbins(),"e"); | |
1577 | TH1D *gYMCProtonsFromWeak = (TH1D *)gHistMCYPtProtonsFromWeak->ProjectionX("gYMCProtonsFromWeak",0,gHistMCYPtProtonsFromWeak->GetXaxis()->GetNbins(),"e"); | |
1578 | gYESDProtonsFromWeak->Divide(gYMCProtonsFromWeak); | |
1579 | SetError(gYESDProtonsFromWeak,gYMCProtonsFromWeak); | |
1580 | gYESDProtonsFromWeak->Scale(100.); | |
1581 | gYESDProtonsFromWeak->SetMarkerStyle(21); | |
1582 | gYESDProtonsFromWeak->SetMarkerColor(2); | |
1583 | ||
1584 | //AntiProtons from weak decays | |
1585 | TH1D *gYESDAntiProtonsFromWeak = (TH1D *)gHistESDYPtAntiProtonsFromWeak->ProjectionX("gYESDAntiProtonsFromWeak",0,gHistESDYPtAntiProtonsFromWeak->GetXaxis()->GetNbins(),"e"); | |
1586 | TH1D *gYMCAntiProtonsFromWeak = (TH1D *)gHistMCYPtAntiProtonsFromWeak->ProjectionX("gYMCAntiProtonsFromWeak",0,gHistMCYPtProtonsFromWeak->GetXaxis()->GetNbins(),"e"); | |
1587 | gYESDAntiProtonsFromWeak->Divide(gYMCAntiProtonsFromWeak); | |
1588 | SetError(gYESDAntiProtonsFromWeak,gYMCAntiProtonsFromWeak); | |
1589 | gYESDAntiProtonsFromWeak->Scale(100.); | |
1590 | gYESDAntiProtonsFromWeak->SetMarkerStyle(21); | |
1591 | gYESDAntiProtonsFromWeak->SetMarkerColor(2); | |
1592 | ||
1593 | //Protons from hadronic interactions | |
1594 | TH1D *gYESDProtonsFromHadronic = (TH1D *)gHistESDYPtProtonsFromHadronic->ProjectionX("gYESDProtonsFromHadronic",0,gHistESDYPtProtonsFromHadronic->GetXaxis()->GetNbins(),"e"); | |
1595 | TH1D *gYMCProtonsFromHadronic = (TH1D *)gHistMCYPtProtonsFromHadronic->ProjectionX("gYMCProtonsFromHadronic",0,gHistMCYPtProtonsFromHadronic->GetXaxis()->GetNbins(),"e"); | |
1596 | gYESDProtonsFromHadronic->Divide(gYMCProtonsFromHadronic); | |
1597 | SetError(gYESDProtonsFromHadronic,gYMCProtonsFromHadronic); | |
1598 | gYESDProtonsFromHadronic->Scale(100.); | |
1599 | gYESDProtonsFromHadronic->SetMarkerStyle(22); | |
1600 | gYESDProtonsFromHadronic->SetMarkerColor(3); | |
1601 | ||
3e23254a | 1602 | //AntiProtons from hadronic interactions |
e13bbda6 | 1603 | TH1D *gYESDAntiProtonsFromHadronic = (TH1D *)gHistESDYPtAntiProtonsFromHadronic->ProjectionX("gYESDAntiProtonsFromHadronic",0,gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->GetNbins(),"e"); |
1604 | TH1D *gYMCAntiProtonsFromHadronic = (TH1D *)gHistMCYPtAntiProtonsFromHadronic->ProjectionX("gYMCAntiProtonsFromHadronic",0,gHistMCYPtProtonsFromHadronic->GetXaxis()->GetNbins(),"e"); | |
1605 | gYESDAntiProtonsFromHadronic->Divide(gYMCAntiProtonsFromHadronic); | |
1606 | SetError(gYESDAntiProtonsFromHadronic,gYMCAntiProtonsFromHadronic); | |
1607 | gYESDAntiProtonsFromHadronic->Scale(100.); | |
1608 | gYESDAntiProtonsFromHadronic->SetMarkerStyle(22); | |
1609 | gYESDAntiProtonsFromHadronic->SetMarkerColor(3); | |
863f782b | 1610 | |
1611 | c14->cd(1)->SetBottomMargin(0.15); | |
1612 | c14->cd(1)->SetLeftMargin(0.15); | |
1613 | c14->cd(1)->SetGridx(); c14->cd(1)->SetGridy(); | |
e13bbda6 | 1614 | hEmpty->GetXaxis()->SetRangeUser(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()-0.2, |
1615 | gYPrimariesESDAntiProtons->GetXaxis()->GetXmax()+0.2); | |
1616 | hEmpty->GetXaxis()->SetTitle(gYPrimariesESDAntiProtons->GetXaxis()->GetTitle()); | |
863f782b | 1617 | hEmpty->SetTitle("Protons"); |
1618 | hEmpty->DrawCopy(); | |
e13bbda6 | 1619 | gYPrimariesESDProtons->DrawCopy("ESAME"); |
1620 | gYESDProtonsFromWeak->DrawCopy("ESAME"); | |
1621 | gYESDProtonsFromHadronic->DrawCopy("ESAME"); | |
863f782b | 1622 | |
1623 | c14->cd(2)->SetBottomMargin(0.15); | |
1624 | c14->cd(2)->SetLeftMargin(0.15); | |
1625 | c14->cd(2)->SetGridx(); c14->cd(2)->SetGridy(); | |
1626 | hEmpty->SetTitle("Antiprotons"); | |
1627 | hEmpty->DrawCopy(); | |
e13bbda6 | 1628 | gYPrimariesESDAntiProtons->DrawCopy("ESAME"); |
1629 | gYESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
1630 | gYESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
863f782b | 1631 | c14->SaveAs("ReconstructionEfficiency-Protons-Rapidity.gif"); |
1632 | ||
1633 | //pT dependence | |
1634 | TCanvas *c15 = new TCanvas("c15", | |
1635 | "(Anti)Proton reconstruction efficiency vs pT", | |
3e23254a | 1636 | 700,700,700,400); |
863f782b | 1637 | c15->SetHighLightColor(10); c15->Divide(2,1); |
1638 | ||
e13bbda6 | 1639 | //Primary Protons |
1640 | TH1D *gPtPrimariesESDProtons = (TH1D *)gHistPrimariesESDYPtProtons->ProjectionY("gPtPrimariesESDProtons",0,gHistPrimariesESDYPtProtons->GetYaxis()->GetNbins(),"e"); | |
1641 | TH1D *gPtPrimariesMCProtons = (TH1D *)gHistPrimariesMCYPtProtons->ProjectionY("gPtPrimariesMCProtons",0,gHistPrimariesMCYPtProtons->GetYaxis()->GetNbins(),"e"); | |
1642 | gPtPrimariesESDProtons->Divide(gPtPrimariesMCProtons); | |
1643 | SetError(gPtPrimariesESDProtons,gPtPrimariesMCProtons); | |
1644 | gPtPrimariesESDProtons->Scale(100.); | |
1645 | gPtPrimariesESDProtons->SetMarkerStyle(kFullCircle); | |
1646 | ||
1647 | //Primary AntiProtons | |
1648 | TH1D *gPtPrimariesESDAntiProtons = (TH1D *)gHistPrimariesESDYPtAntiProtons->ProjectionY("gPtPrimariesESDAntiProtons",0,gHistPrimariesESDYPtAntiProtons->GetYaxis()->GetNbins(),"e"); | |
1649 | TH1D *gPtPrimariesMCAntiProtons = (TH1D *)gHistPrimariesMCYPtAntiProtons->ProjectionY("gPtPrimariesMCAntiProtons",0,gHistPrimariesMCYPtProtons->GetYaxis()->GetNbins(),"e"); | |
1650 | gPtPrimariesESDAntiProtons->Divide(gPtPrimariesMCAntiProtons); | |
1651 | SetError(gPtPrimariesESDAntiProtons,gPtPrimariesMCAntiProtons); | |
1652 | gPtPrimariesESDAntiProtons->Scale(100.); | |
1653 | gPtPrimariesESDAntiProtons->SetMarkerStyle(kFullCircle); | |
1654 | ||
1655 | //Protons from weak decays | |
1656 | TH1D *gPtESDProtonsFromWeak = (TH1D *)gHistESDYPtProtonsFromWeak->ProjectionY("gPtESDProtonsFromWeak",0,gHistESDYPtProtonsFromWeak->GetYaxis()->GetNbins(),"e"); | |
1657 | TH1D *gPtMCProtonsFromWeak = (TH1D *)gHistMCYPtProtonsFromWeak->ProjectionY("gPtMCProtonsFromWeak",0,gHistMCYPtProtonsFromWeak->GetYaxis()->GetNbins(),"e"); | |
1658 | gPtESDProtonsFromWeak->Divide(gPtMCProtonsFromWeak); | |
1659 | SetError(gPtESDProtonsFromWeak,gPtMCProtonsFromWeak); | |
1660 | gPtESDProtonsFromWeak->Scale(100.); | |
1661 | gPtESDProtonsFromWeak->SetMarkerStyle(21); | |
1662 | gPtESDProtonsFromWeak->SetMarkerColor(2); | |
1663 | ||
1664 | //AntiProtons from weak decays | |
1665 | TH1D *gPtESDAntiProtonsFromWeak = (TH1D *)gHistESDYPtAntiProtonsFromWeak->ProjectionY("gPtESDAntiProtonsFromWeak",0,gHistESDYPtAntiProtonsFromWeak->GetYaxis()->GetNbins(),"e"); | |
1666 | TH1D *gPtMCAntiProtonsFromWeak = (TH1D *)gHistMCYPtAntiProtonsFromWeak->ProjectionY("gPtMCAntiProtonsFromWeak",0,gHistMCYPtProtonsFromWeak->GetYaxis()->GetNbins(),"e"); | |
1667 | gPtESDAntiProtonsFromWeak->Divide(gPtMCAntiProtonsFromWeak); | |
1668 | SetError(gPtESDAntiProtonsFromWeak,gPtMCAntiProtonsFromWeak); | |
1669 | gPtESDAntiProtonsFromWeak->Scale(100.); | |
1670 | gPtESDAntiProtonsFromWeak->SetMarkerStyle(21); | |
1671 | gPtESDAntiProtonsFromWeak->SetMarkerColor(2); | |
1672 | ||
1673 | //Protons from hadronic interactions | |
1674 | TH1D *gPtESDProtonsFromHadronic = (TH1D *)gHistESDYPtProtonsFromHadronic->ProjectionY("gPtESDProtonsFromHadronic",0,gHistESDYPtProtonsFromHadronic->GetYaxis()->GetNbins(),"e"); | |
1675 | TH1D *gPtMCProtonsFromHadronic = (TH1D *)gHistMCYPtProtonsFromHadronic->ProjectionY("gPtMCProtonsFromHadronic",0,gHistMCYPtProtonsFromHadronic->GetYaxis()->GetNbins(),"e"); | |
1676 | gPtESDProtonsFromHadronic->Divide(gPtMCProtonsFromHadronic); | |
1677 | SetError(gPtESDProtonsFromHadronic,gPtMCProtonsFromHadronic); | |
1678 | gPtESDProtonsFromHadronic->Scale(100.); | |
1679 | gPtESDProtonsFromHadronic->SetMarkerStyle(22); | |
1680 | gPtESDProtonsFromHadronic->SetMarkerColor(3); | |
1681 | ||
1682 | //AntiProtons from hadronic interactions | |
1683 | TH1D *gPtESDAntiProtonsFromHadronic = (TH1D *)gHistESDYPtAntiProtonsFromHadronic->ProjectionY("gPtESDAntiProtonsFromHadronic",0,gHistESDYPtAntiProtonsFromHadronic->GetYaxis()->GetNbins(),"e"); | |
1684 | TH1D *gPtMCAntiProtonsFromHadronic = (TH1D *)gHistMCYPtAntiProtonsFromHadronic->ProjectionY("gPtMCAntiProtonsFromHadronic",0,gHistMCYPtProtonsFromHadronic->GetYaxis()->GetNbins(),"e"); | |
1685 | gPtESDAntiProtonsFromHadronic->Divide(gPtMCAntiProtonsFromHadronic); | |
1686 | SetError(gPtESDAntiProtonsFromHadronic,gPtMCAntiProtonsFromHadronic); | |
1687 | gPtESDAntiProtonsFromHadronic->Scale(100.); | |
1688 | gPtESDAntiProtonsFromHadronic->SetMarkerStyle(22); | |
1689 | gPtESDAntiProtonsFromHadronic->SetMarkerColor(3); | |
863f782b | 1690 | |
1691 | ||
1692 | c15->cd(1)->SetBottomMargin(0.15); | |
1693 | c15->cd(1)->SetLeftMargin(0.15); | |
1694 | c15->cd(1)->SetGridx(); c15->cd(1)->SetGridy(); | |
e13bbda6 | 1695 | hEmpty->GetXaxis()->SetRangeUser(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()-0.2, |
1696 | gPtPrimariesESDAntiProtons->GetXaxis()->GetXmax()+0.2); | |
863f782b | 1697 | hEmpty->GetXaxis()->SetTitle("P_{T} [GeV/c]"); |
1698 | hEmpty->SetTitle("Protons"); | |
1699 | hEmpty->DrawCopy(); | |
e13bbda6 | 1700 | gPtPrimariesESDProtons->DrawCopy("ESAME"); |
1701 | gPtESDProtonsFromWeak->DrawCopy("ESAME"); | |
1702 | gPtESDProtonsFromHadronic->DrawCopy("ESAME"); | |
863f782b | 1703 | |
1704 | c15->cd(2)->SetBottomMargin(0.15); | |
1705 | c15->cd(2)->SetLeftMargin(0.15); | |
1706 | c15->cd(2)->SetGridx(); c15->cd(2)->SetGridy(); | |
1707 | hEmpty->SetTitle("Antiprotons"); | |
1708 | hEmpty->DrawCopy(); | |
e13bbda6 | 1709 | gPtPrimariesESDAntiProtons->DrawCopy("ESAME"); |
1710 | gPtESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
1711 | gPtESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
863f782b | 1712 | c15->SaveAs("ReconstructionEfficiency-Protons-Pt.gif"); |
1713 | ||
e13bbda6 | 1714 | //______________// |
1715 | //PID efficiency// | |
1716 | //______________// | |
9a316962 | 1717 | TH3D *gHistESDInitYPtProtons = (TH3D *)list->At(12); |
1718 | TH3D *gHistESDIdYPtProtons = (TH3D *)list->At(13); | |
1719 | TH3D *gHistESDRecIdYPtProtons = (TH3D *)list->At(14); | |
1720 | TH3D *gHistESDContamYPtProtons = (TH3D *)list->At(15); | |
863f782b | 1721 | |
1722 | TCanvas *c16 = new TCanvas("c16", | |
1723 | "(Anti)Proton PID efficiency vs y and pT", | |
3e23254a | 1724 | 750,750,700,400); |
9a316962 | 1725 | c16->SetHighLightColor(10); c16->Divide(3,1); |
863f782b | 1726 | |
1727 | //rapidity dependence | |
1728 | //protons pid efficiency | |
9a316962 | 1729 | //TH1D *gYESDIdProtons = (TH1D *)gHistESDIdYPtProtons->ProjectionX("gYESDIdProtons",0,gHistESDIdYPtProtons->GetXaxis()->GetNbins(),"e"); |
1730 | //TH1D *gYESDInitProtons = (TH1D *)gHistESDInitYPtProtons->ProjectionX("gYESDInitProtons",0,gHistESDInitYPtProtons->GetXaxis()->GetNbins(),"e"); | |
1731 | TH1D *gYESDIdProtons = (TH1D *)gHistESDIdYPtProtons->Project3D("x"); | |
1732 | TH1D *gYESDInitProtons = (TH1D *)gHistESDInitYPtProtons->Project3D("x"); | |
863f782b | 1733 | gYESDIdProtons->Divide(gYESDInitProtons); |
1734 | SetError(gYESDIdProtons,gYESDInitProtons); | |
1735 | gYESDIdProtons->Scale(100.); | |
1736 | gYESDIdProtons->SetMarkerStyle(kFullCircle); | |
1737 | ||
1738 | //protons pid contamination | |
9a316962 | 1739 | //TH1D *gYESDContamProtons = (TH1D *)gHistESDContamYPtProtons->ProjectionX("gYESDContamProtons",0,gHistESDContamYPtProtons->GetXaxis()->GetNbins(),"e"); |
1740 | //TH1D *gYESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->ProjectionX("gYESDRecIdProtons",0,gHistESDRecIdYPtProtons->GetXaxis()->GetNbins(),"e"); | |
1741 | TH1D *gYESDContamProtons = (TH1D *)gHistESDContamYPtProtons->Project3D("x"); | |
1742 | TH1D *gYESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->Project3D("x"); | |
863f782b | 1743 | gYESDContamProtons->Divide(gYESDRecIdProtons); |
1744 | SetError(gYESDContamProtons,gYESDRecIdProtons); | |
1745 | gYESDContamProtons->Scale(100.); | |
1746 | gYESDContamProtons->SetMarkerStyle(kOpenCircle); | |
1747 | ||
1748 | c16->cd(1)->SetBottomMargin(0.15); | |
1749 | c16->cd(1)->SetLeftMargin(0.15); | |
1750 | c16->cd(1)->SetGridx(); c16->cd(1)->SetGridy(); | |
0ececdf2 | 1751 | hEmpty->GetXaxis()->SetRangeUser(gYESDIdProtons->GetXaxis()->GetXmin()-0.2, |
1752 | gYESDIdProtons->GetXaxis()->GetXmax()+0.2); | |
e13bbda6 | 1753 | hEmpty->GetXaxis()->SetTitle(gYESDContamProtons->GetXaxis()->GetTitle()); |
863f782b | 1754 | hEmpty->DrawCopy(); |
1755 | gYESDIdProtons->DrawCopy("ESAME"); | |
1756 | gYESDContamProtons->DrawCopy("ESAME"); | |
1757 | ||
1758 | //pT dependence | |
1759 | //protons pid efficiency | |
9a316962 | 1760 | //TH1D *gPtESDIdProtons = (TH1D *)gHistESDIdYPtProtons->ProjectionY("gPtESDIdProtons",0,gHistESDIdYPtProtons->GetYaxis()->GetNbins(),"e"); |
1761 | //TH1D *gPtESDInitProtons = (TH1D *)gHistESDInitYPtProtons->ProjectionY("gPtESDInitProtons",0,gHistESDInitYPtProtons->GetYaxis()->GetNbins(),"e"); | |
1762 | TH1D *gPtESDIdProtons = (TH1D *)gHistESDIdYPtProtons->Project3D("y"); | |
1763 | TH1D *gPtESDInitProtons = (TH1D *)gHistESDInitYPtProtons->Project3D("y"); | |
863f782b | 1764 | gPtESDIdProtons->Divide(gPtESDInitProtons); |
1765 | SetError(gPtESDIdProtons,gPtESDInitProtons); | |
1766 | gPtESDIdProtons->Scale(100.); | |
1767 | gPtESDIdProtons->SetMarkerStyle(kFullCircle); | |
1768 | ||
1769 | //protons pid contamination | |
9a316962 | 1770 | //TH1D *gPtESDContamProtons = (TH1D *)gHistESDContamYPtProtons->ProjectionY("gPtESDContamProtons",0,gHistESDContamYPtProtons->GetYaxis()->GetNbins(),"e"); |
1771 | //TH1D *gPtESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->ProjectionY("gPtESDRecIdProtons",0,gHistESDRecIdYPtProtons->GetYaxis()->GetNbins(),"e"); | |
1772 | TH1D *gPtESDContamProtons = (TH1D *)gHistESDContamYPtProtons->Project3D("y"); | |
1773 | TH1D *gPtESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->Project3D("y"); | |
863f782b | 1774 | gPtESDContamProtons->Divide(gPtESDRecIdProtons); |
1775 | SetError(gPtESDContamProtons,gPtESDRecIdProtons); | |
1776 | gPtESDContamProtons->Scale(100.); | |
1777 | gPtESDContamProtons->SetMarkerStyle(kOpenCircle); | |
1778 | ||
1779 | c16->cd(2)->SetBottomMargin(0.15); | |
1780 | c16->cd(2)->SetLeftMargin(0.15); | |
1781 | c16->cd(2)->SetGridx(); c16->cd(2)->SetGridy(); | |
0ececdf2 | 1782 | hEmpty->GetXaxis()->SetRangeUser(gPtESDIdProtons->GetXaxis()->GetXmin()-0.2, |
1783 | gPtESDIdProtons->GetXaxis()->GetXmax()+0.2); | |
9a316962 | 1784 | hEmpty->GetXaxis()->SetTitle(gPtESDContamProtons->GetXaxis()->GetTitle()); |
863f782b | 1785 | hEmpty->DrawCopy(); |
1786 | gPtESDIdProtons->DrawCopy("ESAME"); | |
1787 | gPtESDContamProtons->DrawCopy("ESAME"); | |
2b00fd2c | 1788 | |
9a316962 | 1789 | //N_points dependence |
1790 | //protons pid efficiency | |
0ececdf2 | 1791 | TH1D *gNPointsESDIdProtons = (TH1D *)gHistESDIdYPtProtons->Project3D("z"); |
1792 | TH1D *gNPointsESDInitProtons = (TH1D *)gHistESDInitYPtProtons->Project3D("z"); | |
9a316962 | 1793 | gNPointsESDIdProtons->Divide(gNPointsESDInitProtons); |
1794 | SetError(gNPointsESDIdProtons,gNPointsESDInitProtons); | |
1795 | gNPointsESDIdProtons->Scale(100.); | |
1796 | gNPointsESDIdProtons->SetMarkerStyle(kFullCircle); | |
1797 | ||
1798 | //protons pid contamination | |
1799 | TH1D *gNPointsESDContamProtons = (TH1D *)gHistESDContamYPtProtons->Project3D("z"); | |
1800 | TH1D *gNPointsESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->Project3D("z"); | |
1801 | gNPointsESDContamProtons->Divide(gNPointsESDRecIdProtons); | |
1802 | SetError(gNPointsESDContamProtons,gNPointsESDRecIdProtons); | |
1803 | gNPointsESDContamProtons->Scale(100.); | |
1804 | gNPointsESDContamProtons->SetMarkerStyle(kOpenCircle); | |
1805 | ||
1806 | c16->cd(3)->SetBottomMargin(0.15); | |
1807 | c16->cd(3)->SetLeftMargin(0.15); | |
0ececdf2 | 1808 | c16->cd(3)->SetGridx(); c16->cd(3)->SetGridy(); |
1809 | hEmpty->GetXaxis()->SetRangeUser(gNPointsESDIdProtons->GetXaxis()->GetXmin(), | |
1810 | gNPointsESDIdProtons->GetXaxis()->GetXmax()+10); | |
9a316962 | 1811 | hEmpty->GetXaxis()->SetTitle(gNPointsESDContamProtons->GetXaxis()->GetTitle()); |
1812 | hEmpty->DrawCopy(); | |
1813 | gNPointsESDIdProtons->DrawCopy("ESAME"); | |
1814 | gNPointsESDContamProtons->DrawCopy("ESAME"); | |
1815 | ||
2b00fd2c | 1816 | c16->SaveAs("PIDEfficiency-Protons.gif"); |
5b44449f | 1817 | |
9e2392b0 | 1818 | TString outputFileName = "Reconstruction-PID-Efficiency."; |
1819 | outputFileName += analysisType; outputFileName += ".root"; | |
1820 | TFile *fout = TFile::Open(outputFileName.Data(),"recreate"); | |
5b44449f | 1821 | gYPrimariesESDProtons->Write(); |
1822 | gYESDProtonsFromWeak->Write(); | |
1823 | gYESDProtonsFromHadronic->Write(); | |
1824 | gPtPrimariesESDProtons->Write(); | |
1825 | gPtESDProtonsFromWeak->Write(); | |
1826 | gPtESDProtonsFromHadronic->Write(); | |
1827 | gYPrimariesESDAntiProtons->Write(); | |
1828 | gYESDAntiProtonsFromWeak->Write(); | |
1829 | gYESDAntiProtonsFromHadronic->Write(); | |
1830 | gPtPrimariesESDAntiProtons->Write(); | |
1831 | gPtESDAntiProtonsFromWeak->Write(); | |
1832 | gPtESDAntiProtonsFromHadronic->Write(); | |
1833 | gYESDIdProtons->Write(); | |
1834 | gYESDContamProtons->Write(); | |
1835 | gPtESDIdProtons->Write(); | |
1836 | gPtESDContamProtons->Write(); | |
9a316962 | 1837 | gNPointsESDIdProtons->Write(); |
1838 | gNPointsESDContamProtons->Write(); | |
5b44449f | 1839 | fout->Close(); |
863f782b | 1840 | } |
1841 | ||
cc0fbd97 | 1842 | //________________________________________________// |
0008a5a6 | 1843 | void DrawMarker(Double_t x, Double_t y, Int_t style, |
1844 | Double_t size, Int_t color) { | |
cc0fbd97 | 1845 | TMarker *m = new TMarker(x,y,style); |
1846 | m->SetMarkerSize(size); | |
1847 | m->SetMarkerColor(color); | |
1848 | m->Draw(); | |
1849 | } | |
0008a5a6 | 1850 | |
5b8133c7 | 1851 | //________________________________________________// |
1c21299a | 1852 | const char * const gMCProcessName[45] = { |
5b8133c7 | 1853 | "Primary particle emission", |
1854 | "Multiple scattering", | |
1855 | "Energy loss", | |
1856 | "Bending in magnetic field", | |
1857 | "Decay", | |
1858 | "Lepton pair production", | |
1859 | "Compton scattering", | |
1860 | "Photoelectric effect", | |
1861 | "Bremstrahlung", | |
1862 | "Delta ray", | |
1863 | "Positron annihilation", | |
1864 | "Positron annihilation at rest", | |
1865 | "Positron annihilation in flight", | |
1866 | "Hadronic interaction", | |
1867 | "Nuclear evaporation", | |
1868 | "Nuclear fission", | |
1869 | "Nuclear absorbtion", | |
1870 | "Antiproton annihilation", | |
1871 | "Antineutron annihilation", | |
1872 | "Neutron capture", | |
1873 | "Hadronic elastic", | |
1874 | "Hadronic incoherent elastic", | |
1875 | "Hadronic coherent elastic", | |
1876 | "Hadronic inelastic", | |
1877 | "Photon inelastic", | |
1878 | "Muon nuclear interaction", | |
1879 | "Electron nuclear interaction", | |
1880 | "Positron nuclear interaction", | |
1881 | "Time of flight limit", | |
1882 | "Nuclear photofission", | |
1883 | "Rayleigh effect", | |
1884 | "No active process", | |
1885 | "Energy threshold", | |
1886 | "Light absorption", | |
1887 | "Light detection", | |
1888 | "Light scattering", | |
1889 | "Maximum allowed step", | |
1890 | "Cerenkov production", | |
1891 | "Cerenkov feed back photon", | |
1892 | "Cerenkov photon reflection", | |
1893 | "Cerenkov photon refraction", | |
1894 | "Synchrotron radiation", | |
1895 | "Scintillation", | |
1896 | "Transportation", | |
1897 | "Unknown process" | |
1c21299a | 1898 | }; |
5661e210 | 1899 | |
1900 | //________________________________________________// | |
1901 | void drawKineQA(const char *filename) { | |
1902 | //Draws the QA plots for the kinematic variables for protons and antiprotons | |
1903 | gStyle->SetPalette(1,0); | |
1904 | gStyle->SetCanvasColor(41); | |
1905 | gStyle->SetFrameFillColor(10); | |
1906 | ||
1907 | TFile *f = TFile::Open(filename); | |
1908 | TList *acceptedList = (TList *)f->Get("acceptedCutList"); | |
1909 | TH3D *gHistEtaPhiNClustersPrimaryProtonsPass = (TH3D *)acceptedList->At(44); | |
0ececdf2 | 1910 | gHistEtaPhiNClustersPrimaryProtonsPass->SetTitle("Primary protons"); |
5661e210 | 1911 | TH3D *gHistEtaPhiNClustersSecondaryProtonsPass = (TH3D *)acceptedList->At(46); |
0ececdf2 | 1912 | gHistEtaPhiNClustersSecondaryProtonsPass->SetTitle("Secondary protons"); |
5661e210 | 1913 | TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsPass = (TH3D *)acceptedList->At(45); |
0ececdf2 | 1914 | gHistEtaPhiNClustersPrimaryAntiProtonsPass->SetTitle("Primary antiprotons"); |
5661e210 | 1915 | TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsPass = (TH3D *)acceptedList->At(47); |
0ececdf2 | 1916 | gHistEtaPhiNClustersSecondaryAntiProtonsPass->SetTitle("Secondary antiprotons"); |
1917 | TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass = (TH3D *)acceptedList->At(48); | |
1918 | gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->SetTitle("Primary protons"); | |
1919 | TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass = (TH3D *)acceptedList->At(50); | |
1920 | gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->SetTitle("Secondary protons"); | |
1921 | TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass = (TH3D *)acceptedList->At(49); | |
1922 | gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->SetTitle("Primary antiprotons"); | |
1923 | TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass = (TH3D *)acceptedList->At(51); | |
1924 | gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->SetTitle("Secondary antiprotons"); | |
1925 | TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass = (TH3D *)acceptedList->At(52); | |
1926 | gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->SetTitle("Primary protons"); | |
1927 | TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass = (TH3D *)acceptedList->At(54); | |
1928 | gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->SetTitle("Secondary protons"); | |
1929 | TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass = (TH3D *)acceptedList->At(53); | |
1930 | gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->SetTitle("Primary antiprotons"); | |
1931 | TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass = (TH3D *)acceptedList->At(55); | |
1932 | gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->SetTitle("Secondary antiprotons"); | |
1933 | ||
5661e210 | 1934 | TList *rejectedList = (TList *)f->Get("rejectedCutList"); |
1935 | TH3D *gHistEtaPhiNClustersPrimaryProtonsReject = (TH3D *)rejectedList->At(0); | |
1936 | gHistEtaPhiNClustersPrimaryProtonsPass->Add(gHistEtaPhiNClustersPrimaryProtonsReject); | |
1937 | TH3D *gHistEtaPhiNClustersSecondaryProtonsReject = (TH3D *)rejectedList->At(2); | |
1938 | gHistEtaPhiNClustersSecondaryProtonsPass->Add(gHistEtaPhiNClustersSecondaryProtonsReject); | |
1939 | TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsReject = (TH3D *)rejectedList->At(1); | |
1940 | gHistEtaPhiNClustersPrimaryAntiProtonsPass->Add(gHistEtaPhiNClustersPrimaryAntiProtonsReject); | |
1941 | TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsReject = (TH3D *)rejectedList->At(3); | |
1942 | gHistEtaPhiNClustersSecondaryAntiProtonsPass->Add(gHistEtaPhiNClustersSecondaryAntiProtonsReject); | |
0ececdf2 | 1943 | TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject = (TH3D *)rejectedList->At(4); |
1944 | gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject); | |
1945 | TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject = (TH3D *)rejectedList->At(6); | |
1946 | gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject); | |
1947 | TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject = (TH3D *)rejectedList->At(5); | |
1948 | gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject); | |
1949 | TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject = (TH3D *)rejectedList->At(7); | |
1950 | gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject); | |
1951 | TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject = (TH3D *)rejectedList->At(8); | |
1952 | gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject); | |
1953 | TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject = (TH3D *)rejectedList->At(10); | |
1954 | gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject); | |
1955 | TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject = (TH3D *)rejectedList->At(9); | |
1956 | gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject); | |
1957 | TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject = (TH3D *)rejectedList->At(11); | |
1958 | gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject); | |
5661e210 | 1959 | |
1960 | //eta-phi | |
1961 | TCanvas *c21 = new TCanvas("c21", | |
1962 | "#eta-#phi", | |
1963 | 0,0,600,600); | |
1964 | c21->SetHighLightColor(10); c21->Divide(2,2); | |
1965 | c21->cd(1)->SetLeftMargin(0.15); c21->cd(1)->SetBottomMargin(0.15); | |
1966 | c21->cd(1)->SetRightMargin(0.2); | |
1967 | ((TH2D *)(gHistEtaPhiNClustersPrimaryProtonsPass->Project3D("yx")))->SetStats(kFALSE); | |
3f522b01 | 1968 | ((TH2D *)(gHistEtaPhiNClustersPrimaryProtonsPass->Project3D("yx")))->DrawCopy("colz"); |
5661e210 | 1969 | c21->cd(2)->SetLeftMargin(0.15); c21->cd(2)->SetBottomMargin(0.15); |
1970 | c21->cd(2)->SetRightMargin(0.2); | |
1971 | ((TH2D *)(gHistEtaPhiNClustersSecondaryProtonsPass->Project3D("yx")))->SetStats(kFALSE); | |
3f522b01 | 1972 | ((TH2D *)(gHistEtaPhiNClustersSecondaryProtonsPass->Project3D("yx")))->DrawCopy("colz"); |
5661e210 | 1973 | c21->cd(3)->SetLeftMargin(0.15); c21->cd(3)->SetBottomMargin(0.15); |
1974 | c21->cd(3)->SetRightMargin(0.2); | |
1975 | ((TH2D *)(gHistEtaPhiNClustersPrimaryAntiProtonsPass->Project3D("yx")))->SetStats(kFALSE); | |
3f522b01 | 1976 | ((TH2D *)(gHistEtaPhiNClustersPrimaryAntiProtonsPass->Project3D("yx")))->DrawCopy("colz"); |
5661e210 | 1977 | c21->cd(4)->SetLeftMargin(0.15); c21->cd(4)->SetBottomMargin(0.15); |
1978 | c21->cd(4)->SetRightMargin(0.2); | |
1979 | ((TH2D *)(gHistEtaPhiNClustersSecondaryAntiProtonsPass->Project3D("yx")))->SetStats(kFALSE); | |
3f522b01 | 1980 | ((TH2D *)(gHistEtaPhiNClustersSecondaryAntiProtonsPass->Project3D("yx")))->DrawCopy("colz"); |
1981 | c21->SaveAs("EtaPhi.gif"); | |
5661e210 | 1982 | |
1983 | //eta-Nclusters | |
1984 | TCanvas *c22 = new TCanvas("c22", | |
1985 | "#eta-N_{clusters}", | |
1986 | 100,100,600,600); | |
1987 | c22->SetHighLightColor(10); c22->Divide(2,2); | |
1988 | c22->cd(1)->SetLeftMargin(0.15); c22->cd(1)->SetBottomMargin(0.15); | |
1989 | c22->cd(1)->SetRightMargin(0.2); | |
1990 | ((TH2D *)(gHistEtaPhiNClustersPrimaryProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
3f522b01 | 1991 | ((TH2D *)(gHistEtaPhiNClustersPrimaryProtonsPass->Project3D("zx")))->DrawCopy("colz"); |
5661e210 | 1992 | c22->cd(2)->SetLeftMargin(0.15); c22->cd(2)->SetBottomMargin(0.15); |
1993 | c22->cd(2)->SetRightMargin(0.2); | |
1994 | ((TH2D *)(gHistEtaPhiNClustersSecondaryProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
3f522b01 | 1995 | ((TH2D *)(gHistEtaPhiNClustersSecondaryProtonsPass->Project3D("zx")))->DrawCopy("colz"); |
5661e210 | 1996 | c22->cd(3)->SetLeftMargin(0.15); c22->cd(3)->SetBottomMargin(0.15); |
1997 | c22->cd(3)->SetRightMargin(0.2); | |
1998 | ((TH2D *)(gHistEtaPhiNClustersPrimaryAntiProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
3f522b01 | 1999 | ((TH2D *)(gHistEtaPhiNClustersPrimaryAntiProtonsPass->Project3D("zx")))->DrawCopy("colz"); |
5661e210 | 2000 | c22->cd(4)->SetLeftMargin(0.15); c22->cd(4)->SetBottomMargin(0.15); |
2001 | c22->cd(4)->SetRightMargin(0.2); | |
2002 | ((TH2D *)(gHistEtaPhiNClustersSecondaryAntiProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
3f522b01 | 2003 | ((TH2D *)(gHistEtaPhiNClustersSecondaryAntiProtonsPass->Project3D("zx")))->DrawCopy("colz"); |
2004 | c22->SaveAs("EtaNClusters.gif"); | |
5661e210 | 2005 | |
2006 | //phi-Nclusters | |
2007 | TCanvas *c23 = new TCanvas("c23", | |
2008 | "#phi-N_{clusters}", | |
2009 | 200,200,600,600); | |
2010 | c23->SetHighLightColor(10); c23->Divide(2,2); | |
2011 | c23->cd(1)->SetLeftMargin(0.15); c23->cd(1)->SetBottomMargin(0.15); | |
2012 | c23->cd(1)->SetRightMargin(0.2); | |
2013 | ((TH2D *)(gHistEtaPhiNClustersPrimaryProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
3f522b01 | 2014 | ((TH2D *)(gHistEtaPhiNClustersPrimaryProtonsPass->Project3D("zy")))->DrawCopy("colz"); |
5661e210 | 2015 | c23->cd(2)->SetLeftMargin(0.15); c23->cd(2)->SetBottomMargin(0.15); |
2016 | c23->cd(2)->SetRightMargin(0.2); | |
2017 | ((TH2D *)(gHistEtaPhiNClustersSecondaryProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
3f522b01 | 2018 | ((TH2D *)(gHistEtaPhiNClustersSecondaryProtonsPass->Project3D("zy")))->DrawCopy("colz"); |
5661e210 | 2019 | c23->cd(3)->SetLeftMargin(0.15); c23->cd(3)->SetBottomMargin(0.15); |
2020 | c23->cd(3)->SetRightMargin(0.2); | |
2021 | ((TH2D *)(gHistEtaPhiNClustersPrimaryAntiProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
3f522b01 | 2022 | ((TH2D *)(gHistEtaPhiNClustersPrimaryAntiProtonsPass->Project3D("zy")))->DrawCopy("colz"); |
5661e210 | 2023 | c23->cd(4)->SetLeftMargin(0.15); c23->cd(4)->SetBottomMargin(0.15); |
2024 | c23->cd(4)->SetRightMargin(0.2); | |
2025 | ((TH2D *)(gHistEtaPhiNClustersSecondaryAntiProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
3f522b01 | 2026 | ((TH2D *)(gHistEtaPhiNClustersSecondaryAntiProtonsPass->Project3D("zy")))->DrawCopy("colz"); |
2027 | c23->SaveAs("PhiNClusters.gif"); | |
5661e210 | 2028 | |
0ececdf2 | 2029 | //eta-chi^2 per TPC cluster |
2030 | TCanvas *c24 = new TCanvas("c24", | |
2031 | "#eta-#chi^{2}/N_{clusters}(TPC)", | |
2032 | 300,300,600,600); | |
2033 | c24->SetHighLightColor(10); c24->Divide(2,2); | |
2034 | c24->cd(1)->SetLeftMargin(0.15); c24->cd(1)->SetBottomMargin(0.15); | |
2035 | c24->cd(1)->SetRightMargin(0.2); | |
2036 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2037 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2038 | c24->cd(2)->SetLeftMargin(0.15); c24->cd(2)->SetBottomMargin(0.15); | |
2039 | c24->cd(2)->SetRightMargin(0.2); | |
2040 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2041 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2042 | c24->cd(3)->SetLeftMargin(0.15); c24->cd(3)->SetBottomMargin(0.15); | |
2043 | c24->cd(3)->SetRightMargin(0.2); | |
2044 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2045 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2046 | c24->cd(4)->SetLeftMargin(0.15); c24->cd(4)->SetBottomMargin(0.15); | |
2047 | c24->cd(4)->SetRightMargin(0.2); | |
2048 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2049 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2050 | c24->SaveAs("EtaChi2PerTPCCluster.gif"); | |
2051 | ||
2052 | //phi-chi^2 per TPC cluster | |
2053 | TCanvas *c25 = new TCanvas("c25", | |
2054 | "#phi-#chi^{2}/N_{clusters}(TPC)", | |
2055 | 400,400,600,600); | |
2056 | c25->SetHighLightColor(10); c25->Divide(2,2); | |
2057 | c25->cd(1)->SetLeftMargin(0.15); c25->cd(1)->SetBottomMargin(0.15); | |
2058 | c25->cd(1)->SetRightMargin(0.2); | |
2059 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2060 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2061 | c25->cd(2)->SetLeftMargin(0.15); c25->cd(2)->SetBottomMargin(0.15); | |
2062 | c25->cd(2)->SetRightMargin(0.2); | |
2063 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2064 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2065 | c25->cd(3)->SetLeftMargin(0.15); c25->cd(3)->SetBottomMargin(0.15); | |
2066 | c25->cd(3)->SetRightMargin(0.2); | |
2067 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2068 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2069 | c25->cd(4)->SetLeftMargin(0.15); c25->cd(4)->SetBottomMargin(0.15); | |
2070 | c25->cd(4)->SetRightMargin(0.2); | |
2071 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2072 | ((TH2D *)(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2073 | c25->SaveAs("PhiChi2PerTPCCluster.gif"); | |
2074 | ||
2075 | //eta-dE/dx Npoints (TPC) | |
2076 | TCanvas *c26 = new TCanvas("c26", | |
2077 | "#eta-dEdx N_{points}(TPC)", | |
2078 | 500,500,600,600); | |
2079 | c26->SetHighLightColor(10); c26->Divide(2,2); | |
2080 | c26->cd(1)->SetLeftMargin(0.15); c26->cd(1)->SetBottomMargin(0.15); | |
2081 | c26->cd(1)->SetRightMargin(0.2); | |
2082 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2083 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2084 | c26->cd(2)->SetLeftMargin(0.15); c26->cd(2)->SetBottomMargin(0.15); | |
2085 | c26->cd(2)->SetRightMargin(0.2); | |
2086 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2087 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2088 | c26->cd(3)->SetLeftMargin(0.15); c26->cd(3)->SetBottomMargin(0.15); | |
2089 | c26->cd(3)->SetRightMargin(0.2); | |
2090 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2091 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2092 | c26->cd(4)->SetLeftMargin(0.15); c26->cd(4)->SetBottomMargin(0.15); | |
2093 | c26->cd(4)->SetRightMargin(0.2); | |
2094 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->Project3D("zx")))->SetStats(kFALSE); | |
2095 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->Project3D("zx")))->DrawCopy("colz"); | |
2096 | c26->SaveAs("EtadEdxNPointsTPC.gif"); | |
2097 | ||
2098 | //phi-dE/dx Npoints (TPC) | |
2099 | TCanvas *c27 = new TCanvas("c27", | |
2100 | "#phi-dEdx N_{points}(TPC)", | |
2101 | 600,600,600,600); | |
2102 | c27->SetHighLightColor(10); c27->Divide(2,2); | |
2103 | c27->cd(1)->SetLeftMargin(0.15); c27->cd(1)->SetBottomMargin(0.15); | |
2104 | c27->cd(1)->SetRightMargin(0.2); | |
2105 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2106 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2107 | c27->cd(2)->SetLeftMargin(0.15); c27->cd(2)->SetBottomMargin(0.15); | |
2108 | c27->cd(2)->SetRightMargin(0.2); | |
2109 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2110 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2111 | c27->cd(3)->SetLeftMargin(0.15); c27->cd(3)->SetBottomMargin(0.15); | |
2112 | c27->cd(3)->SetRightMargin(0.2); | |
2113 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2114 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2115 | c27->cd(4)->SetLeftMargin(0.15); c27->cd(4)->SetBottomMargin(0.15); | |
2116 | c27->cd(4)->SetRightMargin(0.2); | |
2117 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->Project3D("zy")))->SetStats(kFALSE); | |
2118 | ((TH2D *)(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->Project3D("zy")))->DrawCopy("colz"); | |
2119 | c27->SaveAs("PhidEdxNPointsTPC.gif"); | |
2120 | ||
5661e210 | 2121 | f->Close(); |
2122 | } | |
3f522b01 | 2123 | |
2124 | //________________________________________________// | |
2125 | void drawEfficiencies(const char *filename, | |
2126 | Bool_t gShowPrimaries = kTRUE, | |
2127 | Bool_t gShowWeak = kFALSE, | |
2128 | Bool_t gShowHadronic = kFALSE) { | |
2129 | //Macro to display the reconstruction, cut and pid efficiencies | |
2130 | gStyle->SetPalette(1,0); | |
2131 | gStyle->SetCanvasColor(41); | |
2132 | gStyle->SetFrameFillColor(10); | |
2133 | ||
2134 | TH2F *hEmpty = new TH2F("hEmpty","",100,-1.5,5.0,100,0,120); | |
2135 | hEmpty->SetStats(kFALSE); | |
2136 | hEmpty->GetXaxis()->SetTitleColor(1); | |
2137 | hEmpty->GetXaxis()->SetNdivisions(15); | |
2138 | hEmpty->GetYaxis()->SetNdivisions(15); | |
2139 | hEmpty->GetYaxis()->SetTitleOffset(1.4); | |
2140 | hEmpty->GetYaxis()->SetTitle("#epsilon"); | |
2141 | ||
2142 | TLatex *t1 = new TLatex(); | |
2143 | t1->SetTextSize(0.04); | |
2144 | ||
2145 | TPaveText *tpave = new TPaveText(); | |
2146 | tpave->SetFillColor(10); | |
2147 | Double_t bottomY = 0.0; | |
2148 | ||
2149 | TFile *f = TFile::Open(filename); | |
2150 | TH1D *gYPrimariesESDProtons = (TH1D *)f->Get("gYPrimariesESDProtons"); | |
2151 | TH1D *gYESDProtonsFromWeak = (TH1D *)f->Get("gYESDProtonsFromWeak"); | |
2152 | TH1D *gYESDProtonsFromHadronic = (TH1D *)f->Get("gYESDProtonsFromHadronic"); | |
2153 | TH1D *gPtPrimariesESDProtons = (TH1D *)f->Get("gPtPrimariesESDProtons"); | |
2154 | TH1D *gPtESDProtonsFromWeak = (TH1D *)f->Get("gPtESDProtonsFromWeak"); | |
2155 | TH1D *gPtESDProtonsFromHadronic = (TH1D *)f->Get("gPtESDProtonsFromHadronic"); | |
2156 | TH1D *gYPrimariesESDAntiProtons = (TH1D *)f->Get("gYPrimariesESDAntiProtons"); | |
2157 | TH1D *gYESDAntiProtonsFromWeak = (TH1D *)f->Get("gYESDAntiProtonsFromWeak"); | |
2158 | TH1D *gYESDAntiProtonsFromHadronic = (TH1D *)f->Get("gYESDAntiProtonsFromHadronic"); | |
2159 | TH1D *gPtPrimariesESDAntiProtons = (TH1D *)f->Get("gPtPrimariesESDAntiProtons"); | |
2160 | TH1D *gPtESDAntiProtonsFromWeak = (TH1D *)f->Get("gPtESDAntiProtonsFromWeak"); | |
2161 | TH1D *gPtESDAntiProtonsFromHadronic = (TH1D *)f->Get("gPtESDAntiProtonsFromHadronic"); | |
2162 | TH1D *gYESDIdProtons = (TH1D *)f->Get("gYESDIdProtons"); | |
2163 | TH1D *gYESDContamProtons = (TH1D *)f->Get("gYESDContamProtons"); | |
2164 | TH1D *gPtESDIdProtons = (TH1D *)f->Get("gPtESDIdProtons"); | |
2165 | TH1D *gPtESDContamProtons = (TH1D *)f->Get("gPtESDContamProtons"); | |
2166 | ||
2167 | //Reconstruction efficiencies - protons | |
2168 | TCanvas *c1 = new TCanvas("c1","Reconstruction efficiencies - Protons", | |
2169 | 0,0,700,400); | |
2170 | c1->SetFillColor(41); c1->SetHighLightColor(41); | |
2171 | c1->Divide(2,1); | |
2172 | c1->cd(1)->SetLeftMargin(0.15); c1->cd(1)->SetBottomMargin(0.15); | |
2173 | c1->cd(1)->SetGridx(); c1->cd(1)->SetGridy(); | |
2174 | hEmpty->GetXaxis()->SetRangeUser(gYPrimariesESDProtons->GetXaxis()->GetXmin()-0.1, | |
2175 | gYPrimariesESDProtons->GetXaxis()->GetXmax()+0.1); | |
2176 | hEmpty->GetXaxis()->SetTitle(gYPrimariesESDProtons->GetXaxis()->GetTitle()); | |
2177 | hEmpty->DrawCopy(); | |
2178 | if(gShowPrimaries) | |
2179 | bottomY = 111.0; | |
2180 | if(gShowWeak) | |
2181 | bottomY = 106.0; | |
2182 | if(gShowHadronic) | |
2183 | bottomY = 101.0; | |
2184 | tpave->DrawPave(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.1,119, | |
2185 | gYPrimariesESDProtons->GetXaxis()->GetXmax()-0.1,bottomY); | |
2186 | if(gShowPrimaries) { | |
2187 | DrawMarker(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.2, 115, 20, 1.2, 1); | |
2188 | t1->DrawLatex(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.3,113,"Primary p"); | |
2189 | gYPrimariesESDProtons->DrawCopy("ESAME"); | |
2190 | } | |
2191 | if(gShowWeak) { | |
2192 | DrawMarker(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.2, 110, 21, 1.2, 2); | |
2193 | t1->DrawLatex(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.3,108,"#Lambda -> p + #pi^{-}"); | |
2194 | gYESDProtonsFromWeak->DrawCopy("ESAME"); | |
2195 | } | |
2196 | if(gShowHadronic) { | |
2197 | DrawMarker(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.2, 105, 22, 1.2, 3); | |
2198 | t1->DrawLatex(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.3,103,"X + A -> p + B"); | |
2199 | gYESDProtonsFromHadronic->DrawCopy("ESAME"); | |
2200 | } | |
2201 | ||
2202 | c1->cd(2)->SetLeftMargin(0.15); c1->cd(2)->SetBottomMargin(0.15); | |
2203 | c1->cd(2)->SetGridx(); c1->cd(2)->SetGridy(); | |
2204 | hEmpty->GetXaxis()->SetRangeUser(gPtPrimariesESDProtons->GetXaxis()->GetXmin()-0.1, | |
2205 | gPtPrimariesESDProtons->GetXaxis()->GetXmax()+0.1); | |
2206 | hEmpty->GetXaxis()->SetTitle(gPtPrimariesESDProtons->GetXaxis()->GetTitle()); | |
2207 | hEmpty->DrawCopy(); | |
2208 | if(gShowPrimaries) | |
2209 | bottomY = 111.0; | |
2210 | if(gShowWeak) | |
2211 | bottomY = 106.0; | |
2212 | if(gShowHadronic) | |
2213 | bottomY = 101.0; | |
2214 | tpave->DrawPave(gPtPrimariesESDProtons->GetXaxis()->GetXmin(),119, | |
2215 | gPtPrimariesESDProtons->GetXaxis()->GetXmax(),bottomY); | |
2216 | if(gShowPrimaries) { | |
2217 | DrawMarker(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.05, 115, 20, 1.2, 1); | |
2218 | t1->DrawLatex(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.15,113,"Primary p"); | |
2219 | gPtPrimariesESDProtons->DrawCopy("ESAME"); | |
2220 | } | |
2221 | if(gShowWeak) { | |
2222 | DrawMarker(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.05, 110, 21, 1.2, 2); | |
2223 | t1->DrawLatex(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.15,108,"#Lambda -> p + #pi^{-}"); | |
2224 | gPtESDProtonsFromWeak->DrawCopy("ESAME"); | |
2225 | } | |
2226 | if(gShowHadronic) { | |
2227 | DrawMarker(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.05, 105, 22, 1.2, 3); | |
2228 | t1->DrawLatex(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.15,103,"X + A -> p + B"); | |
2229 | gPtESDProtonsFromHadronic->DrawCopy("ESAME"); | |
2230 | } | |
2231 | c1->SaveAs("ReconstructionEfficiency-Protons.gif"); | |
2232 | ||
2233 | //Reconstruction efficiencies - antiprotons | |
2234 | TCanvas *c2 = new TCanvas("c2","Reconstruction efficiencies - Antirotons", | |
2235 | 100,100,700,400); | |
2236 | c2->SetFillColor(41); c2->SetHighLightColor(41); | |
2237 | c2->Divide(2,1); | |
2238 | c2->cd(1)->SetLeftMargin(0.15); c2->cd(1)->SetBottomMargin(0.15); | |
2239 | c2->cd(1)->SetGridx(); c2->cd(1)->SetGridy(); | |
2240 | hEmpty->GetXaxis()->SetRangeUser(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()-0.1, | |
2241 | gYPrimariesESDAntiProtons->GetXaxis()->GetXmax()+0.1); | |
2242 | hEmpty->GetXaxis()->SetTitle(gYPrimariesESDAntiProtons->GetXaxis()->GetTitle()); | |
2243 | hEmpty->DrawCopy(); | |
2244 | if(gShowPrimaries) | |
2245 | bottomY = 111.0; | |
2246 | if(gShowWeak) | |
2247 | bottomY = 104.0; | |
2248 | if(gShowHadronic) | |
2249 | bottomY = 97.0; | |
2250 | tpave->DrawPave(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.1,119, | |
2251 | gYPrimariesESDAntiProtons->GetXaxis()->GetXmax()-0.1,bottomY); | |
2252 | if(gShowPrimaries) { | |
2253 | DrawMarker(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.2, 115, 20, 1.2, 1); | |
2254 | t1->DrawLatex(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.3,113,"Primary #bar{p}"); | |
2255 | gYPrimariesESDAntiProtons->DrawCopy("ESAME"); | |
2256 | } | |
2257 | if(gShowWeak) { | |
2258 | DrawMarker(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.2, 108, 21, 1.2, 2); | |
2259 | t1->DrawLatex(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.3,106,"#bar{#Lambda} -> #bar{p} + #pi^{+}"); | |
2260 | gYESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
2261 | } | |
2262 | if(gShowHadronic) { | |
2263 | DrawMarker(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.2, 101, 22, 1.2, 3); | |
2264 | t1->DrawLatex(gYPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.3,98,"X + A -> #bar{p} + B"); | |
2265 | gYESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
2266 | } | |
2267 | ||
2268 | c2->cd(2)->SetLeftMargin(0.15); c2->cd(2)->SetBottomMargin(0.15); | |
2269 | c2->cd(2)->SetGridx(); c2->cd(2)->SetGridy(); | |
2270 | hEmpty->GetXaxis()->SetRangeUser(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()-0.1, | |
2271 | gPtPrimariesESDAntiProtons->GetXaxis()->GetXmax()+0.1); | |
2272 | hEmpty->GetXaxis()->SetTitle(gPtPrimariesESDAntiProtons->GetXaxis()->GetTitle()); | |
2273 | hEmpty->DrawCopy(); | |
2274 | hEmpty->DrawCopy(); | |
2275 | if(gShowPrimaries) | |
2276 | bottomY = 111.0; | |
2277 | if(gShowWeak) | |
2278 | bottomY = 104.0; | |
2279 | if(gShowHadronic) | |
2280 | bottomY = 97.0; | |
2281 | tpave->DrawPave(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin(),119, | |
2282 | gPtPrimariesESDAntiProtons->GetXaxis()->GetXmax(),bottomY); | |
2283 | if(gShowPrimaries) { | |
2284 | DrawMarker(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.05, 115, 20, 1.2, 1); | |
2285 | t1->DrawLatex(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.15,113,"Primary #bar{p}"); | |
2286 | gPtPrimariesESDAntiProtons->DrawCopy("ESAME"); | |
2287 | } | |
2288 | if(gShowWeak) { | |
2289 | DrawMarker(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.05, 108, 21, 1.2, 2); | |
2290 | t1->DrawLatex(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.15,106,"#bar{#Lambda} -> #bar{p} + #pi^{+}"); | |
2291 | gPtESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
2292 | } | |
2293 | if(gShowHadronic) { | |
2294 | DrawMarker(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.05, 101, 22, 1.2, 3); | |
2295 | t1->DrawLatex(gPtPrimariesESDAntiProtons->GetXaxis()->GetXmin()+0.15,98,"X + A -> #bar{p} + B"); | |
2296 | gPtESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
2297 | } | |
2298 | c2->SaveAs("ReconstructionEfficiency-AntiProtons.gif"); | |
2299 | ||
2300 | //PID efficiencies - (anti)protons | |
2301 | TCanvas *c3 = new TCanvas("c3","PID efficiencies", | |
2302 | 200,200,700,400); | |
2303 | c3->SetFillColor(41); c3->SetHighLightColor(41); | |
2304 | c3->Divide(2,1); | |
2305 | c3->cd(1)->SetLeftMargin(0.15); c3->cd(1)->SetBottomMargin(0.15); | |
2306 | c3->cd(1)->SetGridx(); c3->cd(1)->SetGridy(); | |
2307 | hEmpty->GetXaxis()->SetRangeUser(gYPrimariesESDProtons->GetXaxis()->GetXmin()-0.1, | |
2308 | gYPrimariesESDProtons->GetXaxis()->GetXmax()+0.1); | |
2309 | hEmpty->GetXaxis()->SetTitle(gYPrimariesESDProtons->GetXaxis()->GetTitle()); | |
2310 | hEmpty->DrawCopy(); | |
2311 | tpave->DrawPave(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.1,119, | |
2312 | gYPrimariesESDProtons->GetXaxis()->GetXmax()-0.1,104); | |
2313 | gYESDIdProtons->DrawCopy("ESAME"); | |
2314 | gYESDContamProtons->DrawCopy("ESAME"); | |
2315 | DrawMarker(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.2, 115, 20, 1.2, 1); | |
2316 | t1->DrawLatex(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.3,113,"Efficiency"); | |
2317 | DrawMarker(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.2, 108, 24, 1.2, 1); | |
2318 | t1->DrawLatex(gYPrimariesESDProtons->GetXaxis()->GetXmin()+0.3,106,"Contamination"); | |
2319 | ||
2320 | c3->cd(2)->SetLeftMargin(0.15); c3->cd(2)->SetBottomMargin(0.15); | |
2321 | c3->cd(2)->SetGridx(); c3->cd(2)->SetGridy(); | |
2322 | hEmpty->GetXaxis()->SetRangeUser(gPtPrimariesESDProtons->GetXaxis()->GetXmin()-0.1, | |
2323 | gPtPrimariesESDProtons->GetXaxis()->GetXmax()+0.1); | |
2324 | hEmpty->GetXaxis()->SetTitle(gPtPrimariesESDProtons->GetXaxis()->GetTitle()); | |
2325 | hEmpty->DrawCopy(); | |
2326 | tpave->DrawPave(gPtPrimariesESDProtons->GetXaxis()->GetXmin(),119, | |
2327 | gPtPrimariesESDProtons->GetXaxis()->GetXmax(),104); | |
2328 | gPtESDIdProtons->DrawCopy("ESAME"); | |
2329 | gPtESDContamProtons->DrawCopy("ESAME"); | |
2330 | DrawMarker(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.05, 115, 20, 1.2, 1); | |
2331 | t1->DrawLatex(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.15,113,"Efficiency"); | |
2332 | DrawMarker(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.05, 108, 24, 1.2, 1); | |
2333 | t1->DrawLatex(gPtPrimariesESDProtons->GetXaxis()->GetXmin()+0.15,106,"Contamination"); | |
2334 | c3->SaveAs("PIDEfficiency-Protons.gif"); | |
2335 | } | |
2336 | ||
2337 | //________________________________________________// | |
2338 | void compareEfficiencies(const char *filenameTPC, | |
2339 | const char *filenameHybrid, | |
2340 | Bool_t gShowPrimaries = kTRUE, | |
2341 | Bool_t gShowWeak = kFALSE, | |
2342 | Bool_t gShowHadronic = kFALSE) { | |
2343 | //Function to compare the reconstruction efficiencies between two methods: | |
2344 | //e.g. TPC standalone and global tracking | |
2345 | gStyle->SetPalette(1,0); | |
2346 | gStyle->SetCanvasColor(41); | |
2347 | gStyle->SetFrameFillColor(10); | |
2348 | ||
2349 | TH2F *hEmpty = new TH2F("hEmpty","",100,-1.5,2.0,100,0,120); | |
2350 | hEmpty->SetStats(kFALSE); | |
2351 | hEmpty->GetXaxis()->SetTitleColor(1); | |
2352 | hEmpty->GetXaxis()->SetNdivisions(15); | |
2353 | hEmpty->GetYaxis()->SetNdivisions(15); | |
2354 | hEmpty->GetYaxis()->SetTitleOffset(1.4); | |
2355 | hEmpty->GetYaxis()->SetTitle("#epsilon"); | |
2356 | ||
2357 | TLatex *t1 = new TLatex(); | |
2358 | t1->SetTextSize(0.04); | |
2359 | ||
2360 | TPaveText *tpave = new TPaveText(); | |
2361 | tpave->SetFillColor(10); | |
2362 | Double_t bottomY = 0.0; | |
2363 | ||
2364 | //TPC standalone | |
2365 | TFile *f1 = TFile::Open(filenameTPC); | |
2366 | TH1D *g1YPrimariesESDProtons = (TH1D *)f1->Get("gYPrimariesESDProtons"); | |
2367 | TH1D *g1YESDProtonsFromWeak = (TH1D *)f1->Get("gYESDProtonsFromWeak"); | |
2368 | TH1D *g1YESDProtonsFromHadronic = (TH1D *)f1->Get("gYESDProtonsFromHadronic"); | |
2369 | TH1D *g1PtPrimariesESDProtons = (TH1D *)f1->Get("gPtPrimariesESDProtons"); | |
2370 | TH1D *g1PtESDProtonsFromWeak = (TH1D *)f1->Get("gPtESDProtonsFromWeak"); | |
2371 | TH1D *g1PtESDProtonsFromHadronic = (TH1D *)f1->Get("gPtESDProtonsFromHadronic"); | |
2372 | TH1D *g1YPrimariesESDAntiProtons = (TH1D *)f1->Get("gYPrimariesESDAntiProtons"); | |
2373 | TH1D *g1YESDAntiProtonsFromWeak = (TH1D *)f1->Get("gYESDAntiProtonsFromWeak"); | |
2374 | TH1D *g1YESDAntiProtonsFromHadronic = (TH1D *)f1->Get("gYESDAntiProtonsFromHadronic"); | |
2375 | TH1D *g1PtPrimariesESDAntiProtons = (TH1D *)f1->Get("gPtPrimariesESDAntiProtons"); | |
2376 | TH1D *g1PtESDAntiProtonsFromWeak = (TH1D *)f1->Get("gPtESDAntiProtonsFromWeak"); | |
2377 | TH1D *g1PtESDAntiProtonsFromHadronic = (TH1D *)f1->Get("gPtESDAntiProtonsFromHadronic"); | |
2378 | ||
2379 | //Global tracking | |
2380 | TFile *f2 = TFile::Open(filenameHybrid); | |
2381 | TH1D *g2YPrimariesESDProtons = (TH1D *)f2->Get("gYPrimariesESDProtons"); | |
2382 | TH1D *g2YESDProtonsFromWeak = (TH1D *)f2->Get("gYESDProtonsFromWeak"); | |
2383 | TH1D *g2YESDProtonsFromHadronic = (TH1D *)f2->Get("gYESDProtonsFromHadronic"); | |
2384 | TH1D *g2PtPrimariesESDProtons = (TH1D *)f2->Get("gPtPrimariesESDProtons"); | |
2385 | TH1D *g2PtESDProtonsFromWeak = (TH1D *)f2->Get("gPtESDProtonsFromWeak"); | |
2386 | TH1D *g2PtESDProtonsFromHadronic = (TH1D *)f2->Get("gPtESDProtonsFromHadronic"); | |
2387 | TH1D *g2YPrimariesESDAntiProtons = (TH1D *)f2->Get("gYPrimariesESDAntiProtons"); | |
2388 | TH1D *g2YESDAntiProtonsFromWeak = (TH1D *)f2->Get("gYESDAntiProtonsFromWeak"); | |
2389 | TH1D *g2YESDAntiProtonsFromHadronic = (TH1D *)f2->Get("gYESDAntiProtonsFromHadronic"); | |
2390 | TH1D *g2PtPrimariesESDAntiProtons = (TH1D *)f2->Get("gPtPrimariesESDAntiProtons"); | |
2391 | TH1D *g2PtESDAntiProtonsFromWeak = (TH1D *)f2->Get("gPtESDAntiProtonsFromWeak"); | |
2392 | TH1D *g2PtESDAntiProtonsFromHadronic = (TH1D *)f2->Get("gPtESDAntiProtonsFromHadronic"); | |
2393 | ||
2394 | //Reconstruction efficiencies - protons | |
2395 | TCanvas *c1 = new TCanvas("c1","Reconstruction efficiencies - Protons", | |
2396 | 0,0,700,400); | |
2397 | c1->SetFillColor(41); c1->SetHighLightColor(41); | |
2398 | c1->Divide(2,1); | |
2399 | c1->cd(1)->SetLeftMargin(0.15); c1->cd(1)->SetBottomMargin(0.15); | |
2400 | c1->cd(1)->SetGridx(); c1->cd(1)->SetGridy(); | |
2401 | hEmpty->GetXaxis()->SetRangeUser(-1.1,1.1); | |
2402 | hEmpty->GetXaxis()->SetTitle("#eta"); | |
2403 | hEmpty->DrawCopy(); | |
2404 | if(gShowPrimaries) | |
2405 | bottomY = 106.0; | |
2406 | if(gShowWeak) | |
2407 | bottomY = 99.0; | |
2408 | if(gShowHadronic) | |
2409 | bottomY = 92.0; | |
2410 | tpave->DrawPave(-0.4,119,1.1,bottomY); | |
2411 | t1->DrawLatex(-0.3,113,"TPC"); | |
2412 | t1->DrawLatex(0.0,113,"Global"); | |
2413 | if(gShowPrimaries) { | |
2414 | DrawMarker(-0.15, 110, 20, 1.2, 1); | |
2415 | DrawMarker(0.15, 110, 24, 1.2, 1); | |
2416 | t1->DrawLatex(0.35,108,"Primary p"); | |
2417 | g1YPrimariesESDProtons->DrawCopy("ESAME"); | |
2418 | g2YPrimariesESDProtons->SetMarkerStyle(24); | |
2419 | g2YPrimariesESDProtons->DrawCopy("ESAME"); | |
2420 | } | |
2421 | if(gShowWeak) { | |
2422 | DrawMarker(-0.15, 103, 21, 1.2, 2); | |
2423 | DrawMarker(0.15, 103, 25, 1.2, 2); | |
2424 | t1->DrawLatex(0.35,101,"#Lambda -> p + #pi^{-}"); | |
2425 | g1YESDProtonsFromWeak->DrawCopy("ESAME"); | |
2426 | g2YESDProtonsFromWeak->SetMarkerStyle(25); | |
2427 | g2YESDProtonsFromWeak->DrawCopy("ESAME"); | |
2428 | } | |
2429 | if(gShowHadronic) { | |
2430 | DrawMarker(-0.15, 96, 22, 1.2, 3); | |
2431 | DrawMarker(0.15, 96, 26, 1.2, 3); | |
2432 | t1->DrawLatex(0.35,94,"X + A -> p + B"); | |
2433 | g1YESDProtonsFromHadronic->DrawCopy("ESAME"); | |
2434 | g2YESDProtonsFromHadronic->SetMarkerStyle(26); | |
2435 | g2YESDProtonsFromHadronic->DrawCopy("ESAME"); | |
2436 | } | |
2437 | ||
2438 | c1->cd(2)->SetLeftMargin(0.15); c1->cd(2)->SetBottomMargin(0.15); | |
2439 | c1->cd(2)->SetGridx(); c1->cd(2)->SetGridy(); | |
2440 | hEmpty->GetXaxis()->SetRangeUser(0.0,1.7); | |
2441 | hEmpty->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
2442 | hEmpty->DrawCopy(); | |
2443 | if(gShowPrimaries) | |
2444 | bottomY = 106.0; | |
2445 | if(gShowWeak) | |
2446 | bottomY = 99.0; | |
2447 | if(gShowHadronic) | |
2448 | bottomY = 92.0; | |
2449 | tpave->DrawPave(0.05,119,1.2,bottomY); | |
2450 | t1->DrawLatex(0.1,113,"TPC"); | |
2451 | t1->DrawLatex(0.3,113,"Global"); | |
2452 | if(gShowPrimaries) { | |
2453 | DrawMarker(0.15, 110, 20, 1.2, 1); | |
2454 | DrawMarker(0.4, 110, 24, 1.2, 1); | |
2455 | t1->DrawLatex(0.6,108,"Primary p"); | |
2456 | g1PtPrimariesESDProtons->DrawCopy("ESAME"); | |
2457 | g2PtPrimariesESDProtons->SetMarkerStyle(24); | |
2458 | g2PtPrimariesESDProtons->DrawCopy("ESAME"); | |
2459 | } | |
2460 | if(gShowWeak) { | |
2461 | DrawMarker(0.15, 103, 21, 1.2, 2); | |
2462 | DrawMarker(0.4, 103, 25, 1.2, 2); | |
2463 | t1->DrawLatex(0.6,101,"#Lambda -> p + #pi^{-}"); | |
2464 | g1PtESDProtonsFromWeak->DrawCopy("ESAME"); | |
2465 | g2PtESDProtonsFromWeak->SetMarkerStyle(25); | |
2466 | g2PtESDProtonsFromWeak->DrawCopy("ESAME"); | |
2467 | } | |
2468 | if(gShowHadronic) { | |
2469 | DrawMarker(0.15, 96, 22, 1.2, 3); | |
2470 | DrawMarker(0.4, 96, 26, 1.2, 3); | |
2471 | t1->DrawLatex(0.6,94,"X + A -> p + B"); | |
2472 | g1PtESDProtonsFromHadronic->DrawCopy("ESAME"); | |
2473 | g2PtESDProtonsFromHadronic->SetMarkerStyle(26); | |
2474 | g2PtESDProtonsFromHadronic->DrawCopy("ESAME"); | |
2475 | } | |
2476 | c1->SaveAs("ReconstructionEfficiency-Protons.gif"); | |
2477 | ||
2478 | //Reconstruction efficiencies - antiprotons | |
2479 | TCanvas *c2 = new TCanvas("c2","Reconstruction efficiencies - Antirotons", | |
2480 | 100,100,700,400); | |
2481 | c2->SetFillColor(41); c2->SetHighLightColor(41); | |
2482 | c2->Divide(2,1); | |
2483 | c2->cd(1)->SetLeftMargin(0.15); c2->cd(1)->SetBottomMargin(0.15); | |
2484 | c2->cd(1)->SetGridx(); c2->cd(1)->SetGridy(); | |
2485 | hEmpty->GetXaxis()->SetRangeUser(-1.1,1.1); | |
2486 | hEmpty->GetXaxis()->SetTitle("#eta"); | |
2487 | hEmpty->DrawCopy(); | |
2488 | if(gShowPrimaries) | |
2489 | bottomY = 106.0; | |
2490 | if(gShowWeak) | |
2491 | bottomY = 99.0; | |
2492 | if(gShowHadronic) | |
2493 | bottomY = 92.0; | |
2494 | tpave->DrawPave(-0.4,119,1.1,bottomY); | |
2495 | t1->DrawLatex(-0.3,113,"TPC"); | |
2496 | t1->DrawLatex(0.0,113,"Global"); | |
2497 | if(gShowPrimaries) { | |
2498 | DrawMarker(-0.15, 110, 20, 1.2, 1); | |
2499 | DrawMarker(0.15, 110, 24, 1.2, 1); | |
2500 | t1->DrawLatex(0.35,108,"Primary #bar{p}"); | |
2501 | g1YPrimariesESDAntiProtons->DrawCopy("ESAME"); | |
2502 | g2YPrimariesESDAntiProtons->SetMarkerStyle(24); | |
2503 | g2YPrimariesESDAntiProtons->DrawCopy("ESAME"); | |
2504 | } | |
2505 | if(gShowWeak) { | |
2506 | DrawMarker(-0.15, 103, 21, 1.2, 2); | |
2507 | DrawMarker(0.15, 103, 25, 1.2, 2); | |
2508 | t1->DrawLatex(0.35,101,"#bar{#Lambda} -> #bar{p} + #pi^{+}"); | |
2509 | g1YESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
2510 | g2YESDAntiProtonsFromWeak->SetMarkerStyle(25); | |
2511 | g2YESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
2512 | } | |
2513 | if(gShowHadronic) { | |
2514 | DrawMarker(-0.15, 96, 22, 1.2, 3); | |
2515 | DrawMarker(0.15, 96, 26, 1.2, 3); | |
2516 | t1->DrawLatex(0.35,94,"X + A -> #bar{p} + B"); | |
2517 | g1YESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
2518 | g2YESDAntiProtonsFromHadronic->SetMarkerStyle(26); | |
2519 | g2YESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
2520 | } | |
2521 | ||
2522 | c2->cd(2)->SetLeftMargin(0.15); c2->cd(2)->SetBottomMargin(0.15); | |
2523 | c2->cd(2)->SetGridx(); c2->cd(2)->SetGridy(); | |
2524 | hEmpty->GetXaxis()->SetRangeUser(0.0,1.7); | |
2525 | hEmpty->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
2526 | hEmpty->DrawCopy(); | |
2527 | if(gShowPrimaries) | |
2528 | bottomY = 106.0; | |
2529 | if(gShowWeak) | |
2530 | bottomY = 99.0; | |
2531 | if(gShowHadronic) | |
2532 | bottomY = 92.0; | |
2533 | tpave->DrawPave(0.05,119,1.2,bottomY); | |
2534 | t1->DrawLatex(0.1,113,"TPC"); | |
2535 | t1->DrawLatex(0.3,113,"Global"); | |
2536 | if(gShowPrimaries) { | |
2537 | DrawMarker(0.15, 110, 20, 1.2, 1); | |
2538 | DrawMarker(0.4, 110, 24, 1.2, 1); | |
2539 | t1->DrawLatex(0.6,108,"Primary #bar{p}"); | |
2540 | g1PtPrimariesESDAntiProtons->DrawCopy("ESAME"); | |
2541 | g2PtPrimariesESDAntiProtons->SetMarkerStyle(24); | |
2542 | g2PtPrimariesESDAntiProtons->DrawCopy("ESAME"); | |
2543 | } | |
2544 | if(gShowWeak) { | |
2545 | DrawMarker(0.15, 103, 21, 1.2, 2); | |
2546 | DrawMarker(0.4, 103, 25, 1.2, 2); | |
2547 | t1->DrawLatex(0.6,101,"#bar{#Lambda} -> #bar{p} + #pi^{+}"); | |
2548 | g1PtESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
2549 | g2PtESDAntiProtonsFromWeak->SetMarkerStyle(25); | |
2550 | g2PtESDAntiProtonsFromWeak->DrawCopy("ESAME"); | |
2551 | } | |
2552 | if(gShowHadronic) { | |
2553 | DrawMarker(0.15, 96, 22, 1.2, 3); | |
2554 | DrawMarker(0.4, 96, 26, 1.2, 3); | |
2555 | t1->DrawLatex(0.6,94,"X + A -> #bar{p} + B"); | |
2556 | g1PtESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
2557 | g2PtESDAntiProtonsFromHadronic->SetMarkerStyle(26); | |
2558 | g2PtESDAntiProtonsFromHadronic->DrawCopy("ESAME"); | |
2559 | } | |
2560 | c2->SaveAs("ReconstructionEfficiency-AntiProtons.gif"); | |
2561 | ||
2562 | } | |
57e749bb | 2563 | |
2564 | //________________________________________________// | |
2565 | void drawCutParametersDistributions(const char* filename = "Protons.QA.Histograms.root") { | |
2566 | //macro that takes as an input the third file | |
2567 | //created by the proton QA analysis task | |
2568 | //and draws the DCA distributions of protons | |
2569 | //and antiprotons (both primary & secondaries) | |
2570 | const Int_t nEvents = 1; | |
2571 | ||
2572 | TFile *f = TFile::Open(filename); | |
2573 | ||
2574 | //cut list | |
2575 | TH1F *gCutListHistograms[100]; | |
2576 | TList *listCut = (TList *)f->Get("acceptedCutList"); | |
2577 | Int_t iCounter = 0; | |
2578 | cout<<"Cut list entries: "<<listCut->GetEntries()<<endl; | |
2579 | for(Int_t iEntry = 0; iEntry < listCut->GetEntries(); iEntry++) { | |
2580 | if(iCounter == 4) iCounter = 0; | |
2581 | iCounter += 1; | |
2582 | gCutListHistograms[iEntry] = (TH1F *)listCut->At(iEntry); | |
2583 | gCutListHistograms[iEntry]->Scale(1./nEvents); | |
2584 | if(iCounter < 3) { | |
2585 | gCutListHistograms[iEntry]->SetFillColor(4); | |
2586 | gCutListHistograms[iEntry]->SetMarkerColor(4); | |
2587 | gCutListHistograms[iEntry]->SetMarkerStyle(20); | |
2588 | } | |
2589 | else { | |
2590 | gCutListHistograms[iEntry]->SetFillColor(kOrange+1); | |
2591 | gCutListHistograms[iEntry]->SetMarkerColor(kOrange+1); | |
2592 | gCutListHistograms[iEntry]->SetMarkerStyle(29); | |
2593 | } | |
2594 | /*cout<<"Entry: "<<iEntry<< | |
2595 | " - Counter: "<<iCounter<< | |
2596 | " - Name: "<<gCutListHistograms[iEntry]->GetName()<<endl;*/ | |
2597 | } | |
2598 | ||
2599 | //DCA list | |
2600 | TH1F *gDCAListHistograms[20]; | |
2601 | TList *listDCA = (TList *)f->Get("acceptedDCAList"); | |
2602 | iCounter = 0; | |
2603 | cout<<"DCA list entries: "<<listDCA->GetEntries()<<endl; | |
2604 | for(Int_t iEntry = 0; iEntry < listDCA->GetEntries(); iEntry++) { | |
2605 | if(iCounter == 4) iCounter = 0; | |
2606 | iCounter += 1; | |
2607 | gDCAListHistograms[iEntry] = (TH1F *)listDCA->At(iEntry); | |
2608 | gDCAListHistograms[iEntry]->Scale(1./nEvents); | |
2609 | if(iCounter < 3) { | |
2610 | gDCAListHistograms[iEntry]->SetFillColor(4); | |
2611 | gDCAListHistograms[iEntry]->SetMarkerColor(4); | |
2612 | gDCAListHistograms[iEntry]->SetMarkerStyle(20); | |
2613 | } | |
2614 | else { | |
2615 | gDCAListHistograms[iEntry]->SetFillColor(kOrange+1); | |
2616 | gDCAListHistograms[iEntry]->SetMarkerColor(kOrange+1); | |
2617 | gDCAListHistograms[iEntry]->SetMarkerStyle(29); | |
2618 | } | |
2619 | /*cout<<"Entry: "<<iEntry<< | |
2620 | " - Counter: "<<iCounter<< | |
2621 | " - Name: "<<gDCAListHistograms[iEntry]->GetName()<<endl;*/ | |
2622 | } | |
2623 | ||
2624 | //_________________________________________________________// | |
2625 | TF1 *gDCA = new TF1("gDCA", | |
2626 | "[0]*TMath::Power(1+TMath::Exp((x-[1])/[2]),-1)", | |
2627 | 0.1,100.0); | |
2628 | gDCA->SetParameter(0,1.74221e+07); | |
2629 | gDCA->SetParameter(1,-1.12221e+01); | |
2630 | gDCA->SetParameter(2,1.02726); | |
2631 | //_________________________________________________________// | |
2632 | TH2F *hEmpty = new TH2F("hEmpty","",300,-100,200,100,1e-01,1e+06); | |
2633 | hEmpty->GetYaxis()->SetTitle("Entries/Event"); | |
2634 | hEmpty->GetYaxis()->SetNdivisions(10); | |
2635 | hEmpty->GetXaxis()->SetNdivisions(10); | |
2636 | hEmpty->SetStats(kFALSE); | |
2637 | //_________________________________________________________// | |
2638 | ||
2639 | //Cut parameters | |
2640 | TCanvas *c1 = new TCanvas("c1","ITS Cluster map",0,0,650,350); | |
2641 | c1->SetFillColor(10); c1->GetFrame()->SetFillColor(10); | |
2642 | c1->SetHighLightColor(10); c1->Divide(2,1); | |
2643 | c1->cd(1)->SetBottomMargin(0.2); c1->cd(1)->SetLeftMargin(0.2); | |
2644 | c1->cd(1)->SetLogy(); | |
2645 | hEmpty->GetXaxis()->SetTitle("ITS layer"); | |
2646 | hEmpty->GetXaxis()->SetRangeUser(0.0,7.0); | |
2647 | hEmpty->SetTitle("Protons"); | |
2648 | hEmpty->DrawCopy(); | |
2649 | gCutListHistograms[0]->Draw("ESAME"); | |
2650 | gCutListHistograms[2]->Draw("ESAME"); | |
2651 | c1->cd(2)->SetBottomMargin(0.2); c1->cd(2)->SetLeftMargin(0.2); | |
2652 | c1->cd(2)->SetLogy(); | |
2653 | hEmpty->GetXaxis()->SetTitle("ITS layer"); | |
2654 | hEmpty->GetXaxis()->SetRangeUser(0.0,7.0); | |
2655 | hEmpty->SetTitle("Antiprotons"); | |
2656 | hEmpty->DrawCopy(); | |
2657 | gCutListHistograms[1]->Draw("ESAME"); | |
2658 | gCutListHistograms[3]->Draw("ESAME"); | |
2659 | c1->SaveAs("ITSClusterMap.gif"); | |
2660 | ||
2661 | TCanvas *c2 = new TCanvas("c2","Number of ITS Clusters",50,50,650,350); | |
2662 | c2->SetFillColor(10); c2->GetFrame()->SetFillColor(10); | |
2663 | c2->SetHighLightColor(10); c2->Divide(2,1); | |
2664 | c2->cd(1)->SetBottomMargin(0.2); c2->cd(1)->SetLeftMargin(0.2); | |
2665 | c2->cd(1)->SetLogy(); | |
2666 | hEmpty->GetXaxis()->SetTitle("N_{clusters}(ITS)"); | |
2667 | hEmpty->GetXaxis()->SetRangeUser(0.0,7.0); | |
2668 | hEmpty->SetTitle("Protons"); | |
2669 | hEmpty->DrawCopy(); | |
2670 | gCutListHistograms[4]->Draw("ESAME"); | |
2671 | gCutListHistograms[6]->Draw("ESAME"); | |
2672 | c2->cd(2)->SetBottomMargin(0.2); c2->cd(2)->SetLeftMargin(0.2); | |
2673 | c2->cd(2)->SetLogy(); | |
2674 | hEmpty->GetXaxis()->SetTitle("N_{clusters}(ITS)"); | |
2675 | hEmpty->GetXaxis()->SetRangeUser(0.0,7.0); | |
2676 | hEmpty->SetTitle("Antiprotons"); | |
2677 | hEmpty->DrawCopy(); | |
2678 | gCutListHistograms[5]->Draw("ESAME"); | |
2679 | gCutListHistograms[7]->Draw("ESAME"); | |
2680 | c2->SaveAs("NITSClusters.gif"); | |
2681 | ||
2682 | TCanvas *c3 = new TCanvas("c3","Chi2 per ITS cluster",100,100,650,350); | |
2683 | c3->SetFillColor(10); c3->GetFrame()->SetFillColor(10); | |
2684 | c3->SetHighLightColor(10); c3->Divide(2,1); | |
2685 | c3->cd(1)->SetBottomMargin(0.2); c3->cd(1)->SetLeftMargin(0.2); | |
2686 | c3->cd(1)->SetLogy(); | |
2687 | hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(ITS)"); | |
2688 | hEmpty->GetXaxis()->SetRangeUser(0.0,20.0); | |
2689 | hEmpty->SetTitle("Protons"); | |
2690 | hEmpty->DrawCopy(); | |
2691 | gCutListHistograms[8]->Draw("ESAME"); | |
2692 | gCutListHistograms[10]->Draw("ESAME"); | |
2693 | c3->cd(2)->SetBottomMargin(0.2); c3->cd(2)->SetLeftMargin(0.2); | |
2694 | c3->cd(2)->SetLogy(); | |
2695 | hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(ITS)"); | |
2696 | hEmpty->GetXaxis()->SetRangeUser(0.0,20.0); | |
2697 | hEmpty->SetTitle("AntiPpotons"); | |
2698 | hEmpty->DrawCopy(); | |
2699 | gCutListHistograms[9]->Draw("ESAME"); | |
2700 | gCutListHistograms[11]->Draw("ESAME"); | |
2701 | c3->SaveAs("Chi2PerITSCluster.gif"); | |
2702 | ||
2703 | TCanvas *c4 = new TCanvas("c4","Constrain chi2 - vertex",150,150,650,350); | |
2704 | c4->SetFillColor(10); c4->GetFrame()->SetFillColor(10); | |
2705 | c4->SetHighLightColor(10); c4->Divide(2,1); | |
2706 | c4->cd(1)->SetBottomMargin(0.2); c4->cd(1)->SetLeftMargin(0.2); | |
2707 | c4->cd(1)->SetLogy(); | |
2708 | hEmpty->GetXaxis()->SetTitle("log_{10}(#chi^{2}) (vertex)"); | |
2709 | hEmpty->GetXaxis()->SetRangeUser(-10.0,10.0); | |
2710 | hEmpty->SetTitle("Protons"); | |
2711 | hEmpty->DrawCopy(); | |
2712 | gCutListHistograms[12]->Draw("ESAME"); | |
2713 | gCutListHistograms[14]->Draw("ESAME"); | |
2714 | c4->cd(2)->SetBottomMargin(0.2); c4->cd(2)->SetLeftMargin(0.2); | |
2715 | c4->cd(2)->SetLogy(); | |
2716 | hEmpty->GetXaxis()->SetTitle("log_{10}(#chi^{2}) (vertex )"); | |
2717 | hEmpty->GetXaxis()->SetRangeUser(-10.0,10.0); | |
2718 | hEmpty->SetTitle("Antiprotons"); | |
2719 | hEmpty->DrawCopy(); | |
2720 | gCutListHistograms[13]->Draw("ESAME"); | |
2721 | gCutListHistograms[15]->Draw("ESAME"); | |
2722 | c4->SaveAs("ConstrainChi2Vertex.gif"); | |
2723 | ||
2724 | TCanvas *c5 = new TCanvas("c5","Number of TPC Clusters",200,200,650,350); | |
2725 | c5->SetFillColor(10); c5->GetFrame()->SetFillColor(10); | |
2726 | c5->SetHighLightColor(10); c5->Divide(2,1); | |
2727 | c5->cd(1)->SetBottomMargin(0.2); c5->cd(1)->SetLeftMargin(0.2); | |
2728 | c5->cd(1)->SetLogy(); | |
2729 | hEmpty->GetXaxis()->SetTitle("N_{clusters}(TPC"); | |
2730 | hEmpty->GetXaxis()->SetRangeUser(0.0,200.0); | |
2731 | hEmpty->SetTitle("Protons"); | |
2732 | hEmpty->DrawCopy(); | |
2733 | gCutListHistograms[16]->Draw("ESAME"); | |
2734 | gCutListHistograms[18]->Draw("ESAME"); | |
2735 | c5->cd(2)->SetBottomMargin(0.2); c5->cd(2)->SetLeftMargin(0.2); | |
2736 | c5->cd(2)->SetLogy(); | |
2737 | hEmpty->GetXaxis()->SetTitle("N_{clusters}(TPC"); | |
2738 | hEmpty->GetXaxis()->SetRangeUser(0.0,200.0); | |
2739 | hEmpty->SetTitle("Antiprotons"); | |
2740 | hEmpty->DrawCopy(); | |
2741 | gCutListHistograms[17]->Draw("ESAME"); | |
2742 | gCutListHistograms[19]->Draw("ESAME"); | |
2743 | c5->SaveAs("NTPCClusters.gif"); | |
2744 | ||
2745 | TCanvas *c6 = new TCanvas("c6","Chi2 per TPC cluster",250,250,650,350); | |
2746 | c6->SetFillColor(10); c6->GetFrame()->SetFillColor(10); | |
2747 | c6->SetHighLightColor(10); c6->Divide(2,1); | |
2748 | c6->cd(1)->SetBottomMargin(0.2); c6->cd(1)->SetLeftMargin(0.2); | |
2749 | c6->cd(1)->SetLogy(); | |
2750 | hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(TPC)"); | |
2751 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2752 | hEmpty->SetTitle("Protons"); | |
2753 | hEmpty->DrawCopy(); | |
2754 | gCutListHistograms[20]->Draw("ESAME"); | |
2755 | gCutListHistograms[22]->Draw("ESAME"); | |
2756 | c6->cd(2)->SetBottomMargin(0.2); c6->cd(2)->SetLeftMargin(0.2); | |
2757 | c6->cd(2)->SetLogy(); | |
2758 | hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(TPC)"); | |
2759 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2760 | hEmpty->SetTitle("Antiprotons"); | |
2761 | hEmpty->DrawCopy(); | |
2762 | gCutListHistograms[21]->Draw("ESAME"); | |
2763 | gCutListHistograms[23]->Draw("ESAME"); | |
2764 | c6->SaveAs("Chi2PerTPCCluster.gif"); | |
2765 | ||
2766 | TCanvas *c7 = new TCanvas("c7","Covariance matrix 11",300,300,650,350); | |
2767 | c7->SetFillColor(10); c7->GetFrame()->SetFillColor(10); | |
2768 | c7->SetHighLightColor(10); c7->Divide(2,1); | |
2769 | c7->cd(1)->SetBottomMargin(0.2); c7->cd(1)->SetLeftMargin(0.2); | |
2770 | c7->cd(1)->SetLogy(); | |
2771 | hEmpty->GetXaxis()->SetTitle("#sigma_{y} [cm]"); | |
2772 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2773 | hEmpty->SetTitle("Protons"); | |
2774 | hEmpty->DrawCopy(); | |
2775 | gCutListHistograms[24]->Draw("ESAME"); | |
2776 | gCutListHistograms[26]->Draw("ESAME"); | |
2777 | c7->cd(2)->SetBottomMargin(0.2); c7->cd(2)->SetLeftMargin(0.2); | |
2778 | c7->cd(2)->SetLogy(); | |
2779 | hEmpty->GetXaxis()->SetTitle("#sigma_{y} [cm]"); | |
2780 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2781 | hEmpty->SetTitle("Antiprotons"); | |
2782 | hEmpty->DrawCopy(); | |
2783 | gCutListHistograms[25]->Draw("ESAME"); | |
2784 | gCutListHistograms[27]->Draw("ESAME"); | |
2785 | c7->SaveAs("Cov11.gif"); | |
2786 | ||
2787 | TCanvas *c8 = new TCanvas("c8","Covariance matrix 22",350,350,650,350); | |
2788 | c8->SetFillColor(10); c8->GetFrame()->SetFillColor(10); | |
2789 | c8->SetHighLightColor(10); c8->Divide(2,1); | |
2790 | c8->cd(1)->SetBottomMargin(0.2); c8->cd(1)->SetLeftMargin(0.2); | |
2791 | c8->cd(1)->SetLogy(); | |
2792 | hEmpty->GetXaxis()->SetTitle("#sigma_{z} [cm]"); | |
2793 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2794 | hEmpty->SetTitle("Protons"); | |
2795 | hEmpty->DrawCopy(); | |
2796 | gCutListHistograms[28]->Draw("ESAME"); | |
2797 | gCutListHistograms[30]->Draw("ESAME"); | |
2798 | c8->cd(2)->SetBottomMargin(0.2); c8->cd(2)->SetLeftMargin(0.2); | |
2799 | c8->cd(2)->SetLogy(); | |
2800 | hEmpty->GetXaxis()->SetTitle("#sigma_{z} [cm]"); | |
2801 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2802 | hEmpty->SetTitle("Antiprotons"); | |
2803 | hEmpty->DrawCopy(); | |
2804 | gCutListHistograms[29]->Draw("ESAME"); | |
2805 | gCutListHistograms[31]->Draw("ESAME"); | |
2806 | c8->SaveAs("Cov22.gif"); | |
2807 | ||
2808 | TCanvas *c9 = new TCanvas("c9","Covariance matrix 33",400,400,650,350); | |
2809 | c9->SetFillColor(10); c9->GetFrame()->SetFillColor(10); | |
2810 | c9->SetHighLightColor(10); c9->Divide(2,1); | |
2811 | c9->cd(1)->SetBottomMargin(0.2); c9->cd(1)->SetLeftMargin(0.2); | |
2812 | c9->cd(1)->SetLogy(); | |
2813 | hEmpty->GetXaxis()->SetTitle("#sigma_{sin(#phi)}"); | |
2814 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2815 | hEmpty->SetTitle("Protons"); | |
2816 | hEmpty->DrawCopy(); | |
2817 | gCutListHistograms[32]->Draw("ESAME"); | |
2818 | gCutListHistograms[34]->Draw("ESAME"); | |
2819 | c9->cd(2)->SetBottomMargin(0.2); c9->cd(2)->SetLeftMargin(0.2); | |
2820 | c9->cd(2)->SetLogy(); | |
2821 | hEmpty->GetXaxis()->SetTitle("#sigma_{sin(#phi)}"); | |
2822 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2823 | hEmpty->SetTitle("Antiprotons"); | |
2824 | hEmpty->DrawCopy(); | |
2825 | gCutListHistograms[33]->Draw("ESAME"); | |
2826 | gCutListHistograms[35]->Draw("ESAME"); | |
2827 | c9->SaveAs("Cov33.gif"); | |
2828 | ||
2829 | TCanvas *c10 = new TCanvas("c10","Covariance matrix 44",450,450,650,350); | |
2830 | c10->SetFillColor(10); c10->GetFrame()->SetFillColor(10); | |
2831 | c10->SetHighLightColor(10); c10->Divide(2,1); | |
2832 | c10->cd(1)->SetBottomMargin(0.2); c10->cd(1)->SetLeftMargin(0.2); | |
2833 | c10->cd(1)->SetLogy(); | |
2834 | hEmpty->GetXaxis()->SetTitle("#sigma_{tan(#lambda)}"); | |
2835 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2836 | hEmpty->SetTitle("Protons"); | |
2837 | hEmpty->DrawCopy(); | |
2838 | gCutListHistograms[36]->Draw("ESAME"); | |
2839 | gCutListHistograms[38]->Draw("ESAME"); | |
2840 | c10->cd(2)->SetBottomMargin(0.2); c10->cd(2)->SetLeftMargin(0.2); | |
2841 | c10->cd(2)->SetLogy(); | |
2842 | hEmpty->GetXaxis()->SetTitle("#sigma_{tan(#lambda)}"); | |
2843 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2844 | hEmpty->SetTitle("Antiprotons"); | |
2845 | hEmpty->DrawCopy(); | |
2846 | gCutListHistograms[37]->Draw("ESAME"); | |
2847 | gCutListHistograms[39]->Draw("ESAME"); | |
2848 | c10->SaveAs("Cov44.gif"); | |
2849 | ||
2850 | TCanvas *c11 = new TCanvas("c11","Covariance matrix 55",500,500,650,350); | |
2851 | c11->SetFillColor(10); c11->GetFrame()->SetFillColor(10); | |
2852 | c11->SetHighLightColor(10); c11->Divide(2,1); | |
2853 | c11->cd(1)->SetBottomMargin(0.2); c11->cd(1)->SetLeftMargin(0.2); | |
2854 | c11->cd(1)->SetLogy(); | |
2855 | hEmpty->GetXaxis()->SetTitle("#sigma_{1/P_{T}} [GeV/c]^{-1}"); | |
2856 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2857 | hEmpty->SetTitle("Protons"); | |
2858 | hEmpty->DrawCopy(); | |
2859 | gCutListHistograms[40]->Draw("ESAME"); | |
2860 | gCutListHistograms[42]->Draw("ESAME"); | |
2861 | c11->cd(2)->SetBottomMargin(0.2); c11->cd(2)->SetLeftMargin(0.2); | |
2862 | c11->cd(2)->SetLogy(); | |
2863 | hEmpty->GetXaxis()->SetTitle("#sigma_{1/P_{T}} [GeV/c]^{-1}"); | |
2864 | hEmpty->GetXaxis()->SetRangeUser(0.0,4.0); | |
2865 | hEmpty->SetTitle("Antiprotons"); | |
2866 | hEmpty->DrawCopy(); | |
2867 | gCutListHistograms[41]->Draw("ESAME"); | |
2868 | gCutListHistograms[43]->Draw("ESAME"); | |
2869 | c11->SaveAs("Cov55.gif"); | |
2870 | ||
2871 | TCanvas *c12 = new TCanvas("c12","Number of TPC points (dE/dx)",550,550,650,350); | |
2872 | c12->SetFillColor(10); c12->GetFrame()->SetFillColor(10); | |
2873 | c12->SetHighLightColor(10); c12->Divide(2,1); | |
2874 | c12->cd(1)->SetBottomMargin(0.2); c12->cd(1)->SetLeftMargin(0.2); | |
2875 | c12->cd(1)->SetLogy(); | |
2876 | hEmpty->GetXaxis()->SetTitle("N_{points} (TPC-dE/dx"); | |
2877 | hEmpty->GetXaxis()->SetRangeUser(0.0,200.0); | |
2878 | hEmpty->SetTitle("Protons"); | |
2879 | hEmpty->DrawCopy(); | |
2880 | gCutListHistograms[56]->Draw("ESAME"); | |
2881 | gCutListHistograms[58]->Draw("ESAME"); | |
2882 | c12->cd(2)->SetBottomMargin(0.2); c12->cd(2)->SetLeftMargin(0.2); | |
2883 | c12->cd(2)->SetLogy(); | |
2884 | hEmpty->GetXaxis()->SetTitle("N_{points} (TPC-dE/dx"); | |
2885 | hEmpty->GetXaxis()->SetRangeUser(0.0,200.0); | |
2886 | hEmpty->SetTitle("Antiprotons"); | |
2887 | hEmpty->DrawCopy(); | |
2888 | gCutListHistograms[57]->Draw("ESAME"); | |
2889 | gCutListHistograms[59]->Draw("ESAME"); | |
2890 | c12->SaveAs("Npoints-TPCdEdx.gif"); | |
2891 | ||
2892 | ||
2893 | //DCA cut parameters | |
2894 | TCanvas *c13 = new TCanvas("c13","DCA xy",600,600,650,350); | |
2895 | c13->SetFillColor(10); c13->GetFrame()->SetFillColor(10); | |
2896 | c13->SetHighLightColor(10); c13->Divide(2,1); | |
2897 | c13->cd(1)->SetBottomMargin(0.2); c13->cd(1)->SetLeftMargin(0.2); | |
2898 | c13->cd(1)->SetLogy(); | |
2899 | hEmpty->GetXaxis()->SetTitle("DCA_{xy} [cm]"); | |
2900 | hEmpty->GetXaxis()->SetRangeUser(0.0,20.0); | |
2901 | hEmpty->SetTitle("Protons"); | |
2902 | hEmpty->DrawCopy(); | |
2903 | gDCAListHistograms[2]->Draw("ESAME"); | |
2904 | //gDCAListHistograms[2]->Fit("gDCA","","esame",0.1,12); | |
2905 | gDCAListHistograms[0]->Draw("ESAME"); | |
2906 | c13->cd(2)->SetBottomMargin(0.15); c13->cd(2)->SetLeftMargin(0.15); | |
2907 | c13->cd(2)->SetLogy(); | |
2908 | hEmpty->GetXaxis()->SetTitle("DCA_{xy} [cm]"); | |
2909 | hEmpty->GetXaxis()->SetRangeUser(0.0,20.0); | |
2910 | hEmpty->SetTitle("Antiprotons"); | |
2911 | hEmpty->DrawCopy(); | |
2912 | gDCAListHistograms[1]->Draw("ESAME"); | |
2913 | gDCAListHistograms[3]->Draw("ESAME"); | |
2914 | c13->SaveAs("DCAxy.gif"); | |
2915 | ||
2916 | TCanvas *c14 = new TCanvas("c14","DCA z",650,650,650,350); | |
2917 | c14->SetFillColor(10); c14->GetFrame()->SetFillColor(10); | |
2918 | c14->SetHighLightColor(10); c14->Divide(2,1); | |
2919 | c14->cd(1)->SetBottomMargin(0.2); c14->cd(1)->SetLeftMargin(0.2); | |
2920 | c14->cd(1)->SetLogy(); | |
2921 | hEmpty->GetXaxis()->SetTitle("DCA_{z} [cm]"); | |
2922 | hEmpty->GetXaxis()->SetRangeUser(0.0,20.0); | |
2923 | hEmpty->SetTitle("Protons"); | |
2924 | hEmpty->DrawCopy(); | |
2925 | gDCAListHistograms[4]->Draw("ESAME"); | |
2926 | gDCAListHistograms[6]->Draw("ESAME"); | |
2927 | //gDCAListHistograms[6]->Fit("gDCA","","esame",0.1,12); | |
2928 | c14->cd(2)->SetBottomMargin(0.15); c14->cd(2)->SetLeftMargin(0.15); | |
2929 | c14->cd(2)->SetLogy(); | |
2930 | hEmpty->GetXaxis()->SetTitle("DCA_{z} [cm]"); | |
2931 | hEmpty->GetXaxis()->SetRangeUser(0.0,20.0); | |
2932 | hEmpty->SetTitle("Antiprotons"); | |
2933 | hEmpty->DrawCopy(); | |
2934 | gDCAListHistograms[5]->Draw("ESAME"); | |
2935 | gDCAListHistograms[7]->Draw("ESAME"); | |
2936 | c14->SaveAs("DCAz.gif"); | |
2937 | ||
2938 | TCanvas *c15 = new TCanvas("c15","Sigma to vertex",700,700,650,350); | |
2939 | c15->SetFillColor(10); c15->GetFrame()->SetFillColor(10); | |
2940 | c15->SetHighLightColor(10); c15->Divide(2,1); | |
2941 | c15->cd(1)->SetBottomMargin(0.2); c15->cd(1)->SetLeftMargin(0.2); | |
2942 | c15->cd(1)->SetLogy(); | |
2943 | hEmpty->GetXaxis()->SetTitle("N_{#sigma}(Vertex)"); | |
2944 | hEmpty->GetXaxis()->SetRangeUser(0.0,7.0); | |
2945 | hEmpty->SetTitle("Protons"); | |
2946 | hEmpty->DrawCopy(); | |
2947 | gDCAListHistograms[8]->DrawCopy("ESAME"); | |
2948 | gDCAListHistograms[10]->DrawCopy("ESAME"); | |
2949 | c15->cd(2)->SetBottomMargin(0.15); c15->cd(2)->SetLeftMargin(0.15); | |
2950 | c15->cd(2)->SetLogy(); | |
2951 | hEmpty->GetXaxis()->SetTitle("N_{#sigma}(Vertex)"); | |
2952 | hEmpty->GetXaxis()->SetRangeUser(0.0,7.0); | |
2953 | hEmpty->SetTitle("Antiprotons"); | |
2954 | hEmpty->DrawCopy(); | |
2955 | gDCAListHistograms[9]->DrawCopy("ESAME"); | |
2956 | gDCAListHistograms[11]->DrawCopy("ESAME"); | |
2957 | c15->SaveAs("NSigmaToVertex.gif"); | |
2958 | ||
2959 | ||
2960 | f->Close(); | |
2961 | } |