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