Update analysis macro
[u/mrichter/AliRoot.git] / PWG1 / macros / PlotITSTrackingHists.C
CommitLineData
c2893e82 1void PlotITSTrackingHists(TString fname="ITS.Performance.root") {
2308c814 2 //
3 // Macro to plot the histos from the task AliAnalysisTaskITSTrackingCheck
4 // A. Dainese 28.11.09
5 //
6
fa516524 7 //gStyle->SetOptStat(0);
2308c814 8
8fa56655 9 if(fname.Contains("alien")) TGrid::Connect("alien://");
10
11 TFile *f= TFile::Open(fname.Data());
2308c814 12
fa516524 13 TList *list=(TList*)f->Get("cOutputITS");
8fa56655 14 if(!list) {
15 TDirectoryFile *dir=(TDirectoryFile*)f->GetDirectory("ITS_Performance");
16 list = (TList*)dir->Get("cOutputITS");
17 }
2308c814 18 TH1F *fHistNclsITSSA = (TH1F*)list->FindObject("fHistNclsITSSA");
19 TH1F *fHistClusterMapITSSA = (TH1F*)list->FindObject("fHistClusterMapITSSA");
20 TH1F *fHistClusterMapITSSAok = (TH1F*)list->FindObject("fHistClusterMapITSSAok");
21 TH1F *fHistClusterMapITSSAbad = (TH1F*)list->FindObject("fHistClusterMapITSSAbad");
22 TH1F *fHistClusterMapITSSAskipped = (TH1F*)list->FindObject("fHistClusterMapITSSAskipped");
23 TH1F *fHistClusterMapITSSAoutinz = (TH1F*)list->FindObject("fHistClusterMapITSSAoutinz");
24 TH1F *fHistClusterMapITSSAokoutinzbad = (TH1F*)list->FindObject("fHistClusterMapITSSAokoutinzbad");
25 TH1F *fHistClusterMapITSSAnorefit = (TH1F*)list->FindObject("fHistClusterMapITSSAnorefit");
26 TH1F *fHistClusterMapITSSAnocls = (TH1F*)list->FindObject("fHistClusterMapITSSAnocls");
27 TH1F *fHistNclsITSSAInAcc = (TH1F*)list->FindObject("fHistNclsITSSAInAcc");
28 TH1F *fHistClusterMapITSSAInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAInAcc");
29 TH1F *fHistClusterMapITSSAokInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAokInAcc");
30 TH1F *fHistClusterMapITSSAbadInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAbadInAcc");
fa516524 31 TH1F *fHistClusterMapModuleITSMIokInAcc = (TH1F*)list->FindObject("fHistClusterMapModuleITSMIokInAcc");
32 TH1F *fHistClusterMapModuleITSMIbadInAcc = (TH1F*)list->FindObject("fHistClusterMapModuleITSMIbadInAcc");
2308c814 33 TH1F *fHistClusterMapITSSAskippedInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAskippedInAcc");
34 TH1F *fHistClusterMapITSSAoutinzInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAoutinzInAcc");
35 TH1F *fHistClusterMapITSSAokoutinzbadInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAokoutinzbadInAcc");
36 TH1F *fHistClusterMapITSSAnorefitInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAnorefitInAcc");
37 TH1F *fHistClusterMapITSSAnoclsInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAnoclsInAcc");
fa516524 38 TH1F *fHistClusterMapModuleITSMInoclsInAcc = (TH1F*)list->FindObject("fHistClusterMapModuleITSMInoclsInAcc");
2308c814 39 TH1F *fHistNclsITSMI = (TH1F*)list->FindObject("fHistNclsITSMI");
40 TH1F *fHistClusterMapITSMI = (TH1F*)list->FindObject("fHistClusterMapITSMI");
41 TH1F *fHistClusterMapITSMIok = (TH1F*)list->FindObject("fHistClusterMapITSMIok");
42 TH1F *fHistClusterMapITSMIbad = (TH1F*)list->FindObject("fHistClusterMapITSMIbad");
43 TH1F *fHistClusterMapITSMIskipped = (TH1F*)list->FindObject("fHistClusterMapITSMIskipped");
44 TH1F *fHistClusterMapITSMIoutinz = (TH1F*)list->FindObject("fHistClusterMapITSMIoutinz");
45 TH1F *fHistClusterMapITSMIokoutinzbad = (TH1F*)list->FindObject("fHistClusterMapITSMIokoutinzbad");
46 TH1F *fHistClusterMapITSMInorefit = (TH1F*)list->FindObject("fHistClusterMapITSMInorefit");
47 TH1F *fHistClusterMapITSMInocls = (TH1F*)list->FindObject("fHistClusterMapITSMInocls");
48
c2893e82 49 TH1F *fHistPhiTPCInAcc = (TH1F*)list->FindObject("fHistPhiTPCInAcc");
50 TH1F *fHistPhiITSMIokbadoutinz6InAcc = (TH1F*)list->FindObject("fHistPhiITSMIokbadoutinz6InAcc");
51
52 TH1F *fHistPtTPCInAcc = (TH1F*)list->FindObject("fHistPtTPCInAcc");
8fa56655 53 TH1F *fHistPtTPCInAccSfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccSfromStrange");
54 TH1F *fHistPtTPCInAccPfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccPfromStrange");
fa516524 55 TH1F *fHistPtTPCInAccMCtwoSPD = (TH1F*)list->FindObject("fHistPtTPCInAccMCtwoSPD");
56 TH1F *fHistPtTPCInAccMConeSPD = (TH1F*)list->FindObject("fHistPtTPCInAccMConeSPD");
c2893e82 57 TH1F *fHistPtITSMI6InAcc = (TH1F*)list->FindObject("fHistPtITSMI6InAcc");
58 TH1F *fHistPtITSMI5InAcc = (TH1F*)list->FindObject("fHistPtITSMI5InAcc");
59 TH1F *fHistPtITSMI4InAcc = (TH1F*)list->FindObject("fHistPtITSMI4InAcc");
60 TH1F *fHistPtITSMI3InAcc = (TH1F*)list->FindObject("fHistPtITSMI3InAcc");
61 TH1F *fHistPtITSMI2InAcc = (TH1F*)list->FindObject("fHistPtITSMI2InAcc");
62 TH1F *fHistPtITSMISPDInAcc = (TH1F*)list->FindObject("fHistPtITSMISPDInAcc");
fa516524 63 TH1F *fHistPtITSMIoneSPDInAcc = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAcc");
8fa56655 64 TH1F *fHistPtITSMIoneSPDthreeSDDSSDInAcc = (TH1F*)list->FindObject("fHistPtITSMIoneSPDthreeSDDSSDInAcc");
c2893e82 65 TH1F *fHistPtITSMIokbadoutinz6InAcc = (TH1F*)list->FindObject("fHistPtITSMIokbadoutinz6InAcc");
66 TH1F *fHistPtITSMIokbadoutinz5InAcc = (TH1F*)list->FindObject("fHistPtITSMIokbadoutinz5InAcc");
67 TH1F *fHistPtITSMIokbadoutinz4InAcc = (TH1F*)list->FindObject("fHistPtITSMIokbadoutinz4InAcc");
fa516524 68 TH1F *fHistPtTPCInAccP = (TH1F*)list->FindObject("fHistPtTPCInAccP");
69 TH1F *fHistPtITSMI6InAccP = (TH1F*)list->FindObject("fHistPtITSMI6InAccP");
70 TH1F *fHistPtITSMI5InAccP = (TH1F*)list->FindObject("fHistPtITSMI5InAccP");
71 TH1F *fHistPtITSMI4InAccP = (TH1F*)list->FindObject("fHistPtITSMI4InAccP");
72 TH1F *fHistPtITSMI3InAccP = (TH1F*)list->FindObject("fHistPtITSMI3InAccP");
73 TH1F *fHistPtITSMI2InAccP = (TH1F*)list->FindObject("fHistPtITSMI2InAccP");
74 TH1F *fHistPtITSMISPDInAccP = (TH1F*)list->FindObject("fHistPtITSMISPDInAccP");
75 TH1F *fHistPtITSMIoneSPDInAccP = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAccP");
76 TH1F *fHistPtTPCInAccS = (TH1F*)list->FindObject("fHistPtTPCInAccS");
77 TH1F *fHistPtITSMI6InAccS = (TH1F*)list->FindObject("fHistPtITSMI6InAccS");
78 TH1F *fHistPtITSMI5InAccS = (TH1F*)list->FindObject("fHistPtITSMI5InAccS");
79 TH1F *fHistPtITSMI4InAccS = (TH1F*)list->FindObject("fHistPtITSMI4InAccS");
80 TH1F *fHistPtITSMI3InAccS = (TH1F*)list->FindObject("fHistPtITSMI3InAccS");
81 TH1F *fHistPtITSMI2InAccS = (TH1F*)list->FindObject("fHistPtITSMI2InAccS");
82 TH1F *fHistPtITSMISPDInAccS = (TH1F*)list->FindObject("fHistPtITSMISPDInAccS");
83 TH1F *fHistPtITSMIoneSPDInAccS = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAccS");
84
85 TH1F *fHistRProdVtxInAccP = (TH1F*)list->FindObject("fHistRProdVtxInAccP");
86 TH1F *fHistRProdVtxInAccS = (TH1F*)list->FindObject("fHistRProdVtxInAccS");
87
88 TH1F *fHistxlocSDDok = (TH1F*)list->FindObject("fHistxlocSDDok");
89 TH1F *fHistxlocSDDall = (TH1F*)list->FindObject("fHistxlocSDDall");
90 TH1F *fHistzlocSDDok = (TH1F*)list->FindObject("fHistzlocSDDok");
91 TH1F *fHistzlocSDDall = (TH1F*)list->FindObject("fHistzlocSDDall");
92
93 TH1F *fHistPtITSTPCsel = (TH1F*)list->FindObject("fHistPtITSTPCsel");
94 TH1F *fHistPtITSTPCselP = (TH1F*)list->FindObject("fHistPtITSTPCselP");
95 TH1F *fHistPtITSTPCselS = (TH1F*)list->FindObject("fHistPtITSTPCselS");
96 TH1F *fHistPtITSTPCselPfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
97 TH1F *fHistPtITSTPCselSfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
98 TH1F *fHistPtITSTPCselSfromMat = (TH1F*)list->FindObject("fHistPtITSTPCselSfromMat");
99
fa516524 100 TH1F *fHistPtTPCInAccSfromMat = (TH1F*)list->FindObject("fHistPtTPCInAccSfromMat");
101
8fa56655 102 //ReweightStrange(fHistPtTPCInAcc,fHistPtTPCInAccPfromStrange,fHistPtTPCInAccSfromStrange);
103 //ReweightStrange(fHistPtITSTPCsel,fHistPtITSTPCselPfromStrange,fHistPtITSTPCselSfromStrange);
c2893e82 104
105 //---------------------------------------------------------------
fa516524 106 TH1F *fHistPtITSMIge2InAcc = (TH1F*)fHistPtITSMI6InAcc->Clone("fHistPtITSMIge2InAcc");
107 fHistPtITSMIge2InAcc->Add(fHistPtITSMI5InAcc);
108 fHistPtITSMIge2InAcc->Add(fHistPtITSMI4InAcc);
109 fHistPtITSMIge2InAcc->Add(fHistPtITSMI3InAcc);
110 fHistPtITSMIge2InAcc->Add(fHistPtITSMI2InAcc);
111 TH1F *fHistPtITSMIge2InAccP = (TH1F*)fHistPtITSMI6InAccP->Clone("fHistPtITSMIge2InAccP");
112 fHistPtITSMIge2InAccP->Add(fHistPtITSMI5InAccP);
113 fHistPtITSMIge2InAccP->Add(fHistPtITSMI4InAccP);
114 fHistPtITSMIge2InAccP->Add(fHistPtITSMI3InAccP);
115 fHistPtITSMIge2InAccP->Add(fHistPtITSMI2InAccP);
116 TH1F *fHistPtITSMIge2InAccS = (TH1F*)fHistPtITSMI6InAccS->Clone("fHistPtITSMIge2InAccS");
117 fHistPtITSMIge2InAccS->Add(fHistPtITSMI5InAccS);
118 fHistPtITSMIge2InAccS->Add(fHistPtITSMI4InAccS);
119 fHistPtITSMIge2InAccS->Add(fHistPtITSMI3InAccS);
120 fHistPtITSMIge2InAccS->Add(fHistPtITSMI2InAccS);
121
122 TH1F* fHistPtITSMISPDInAccMC=(TH1F*)fHistPtITSMISPDInAcc->Clone("fHistPtITSMISPDInAccMC");
123 TH1F* fHistPtITSMIoneSPDInAccMC=(TH1F*)fHistPtITSMIoneSPDInAcc->Clone("fHistPtITSMIoneSPDInAccMC");
124
c2893e82 125
2308c814 126 TLegend *l1=new TLegend(0.5,0.5,0.9,0.9);
127 TLegend *l2=new TLegend(0.5,0.5,0.9,0.9);
128
129 TCanvas *c1= new TCanvas("c1","c1",10,10,600,500);
130 fHistNclsITSSA->SetMinimum(0);
131 fHistNclsITSSA->SetLineColor(1);
132 l1->AddEntry(fHistNclsITSSA,"ITS-SA","l");
133 fHistNclsITSSA->Draw();
134 fHistNclsITSSAInAcc->SetLineColor(4);
135 l1->AddEntry(fHistNclsITSSAInAcc,"ITS-SA in acc.","l");
136 fHistNclsITSSAInAcc->Draw("same");
137 fHistNclsITSMI->SetLineColor(2);
138 l1->AddEntry(fHistNclsITSMI,"ITS from TPC","l");
139 fHistNclsITSMI->Draw("same");
140 l1->Draw();
141
142
143 TCanvas *c2 =new TCanvas("c2","c2",10,10,1200,800);
144 c2->Divide(3,2);
145 c2->cd(1);
146 //
147 fHistClusterMapITSSAokoutinzbad->SetLineColor(1);
148 fHistClusterMapITSSAokoutinzbad->SetMarkerColor(1);
149 fHistClusterMapITSSAokoutinzbad->SetMarkerStyle(20);
150 fHistClusterMapITSSAokoutinzbad->Draw();
c2893e82 151 fHistClusterMapITSMIokoutinzbad->SetLineColor(2);
152 fHistClusterMapITSMIokoutinzbad->SetMarkerColor(2);
2308c814 153 fHistClusterMapITSMIokoutinzbad->SetMarkerStyle(20);
154 fHistClusterMapITSMIokoutinzbad->Draw("same");
155 l1->Draw();
156 //
157 c2->cd(2);
158 fHistClusterMapITSSAok->SetLineColor(1);
159 fHistClusterMapITSSAok->SetMarkerColor(1);
160 fHistClusterMapITSSAok->SetMarkerStyle(21);
161 fHistClusterMapITSSAok->Draw();
162 fHistClusterMapITSMIok->SetLineColor(2);
163 fHistClusterMapITSMIok->SetMarkerColor(2);
164 fHistClusterMapITSMIok->SetMarkerStyle(21);
165 fHistClusterMapITSMIok->Draw("same");
166 //
167 c2->cd(3);
168 fHistClusterMapITSSAoutinz->SetLineColor(1);
169 fHistClusterMapITSSAoutinz->SetMarkerColor(1);
170 fHistClusterMapITSSAoutinz->SetMarkerStyle(22);
171 fHistClusterMapITSSAoutinz->Draw();
172 fHistClusterMapITSMIoutinz->SetLineColor(2);
173 fHistClusterMapITSMIoutinz->SetMarkerColor(2);
174 fHistClusterMapITSMIoutinz->SetMarkerStyle(22);
175 fHistClusterMapITSMIoutinz->Draw("same");
176 //
177 c2->cd(4);
178 fHistClusterMapITSSAbad->SetLineColor(1);
179 fHistClusterMapITSSAbad->SetMarkerColor(1);
180 fHistClusterMapITSSAbad->SetMarkerStyle(23);
181 fHistClusterMapITSSAbad->Draw();
182 fHistClusterMapITSMIbad->SetLineColor(2);
183 fHistClusterMapITSMIbad->SetMarkerColor(2);
184 fHistClusterMapITSMIbad->SetMarkerStyle(23);
185 fHistClusterMapITSMIbad->Draw("same");
186 //
187 c2->cd(5);
188 fHistClusterMapITSSAnocls->SetLineColor(1);
189 fHistClusterMapITSSAnocls->SetMarkerColor(1);
190 fHistClusterMapITSSAnocls->SetMarkerStyle(24);
191 fHistClusterMapITSSAnocls->Draw();
192 fHistClusterMapITSMInocls->SetLineColor(2);
193 fHistClusterMapITSMInocls->SetMarkerColor(2);
194 fHistClusterMapITSMInocls->SetMarkerStyle(24);
195 fHistClusterMapITSMInocls->Draw("same");
196
fa516524 197 TCanvas *c3 =new TCanvas("c3","c3",10,10,1200,800);
198 c3->Divide(1,2);
199 c3->cd(1);
200 fHistClusterMapModuleITSMIokInAcc->SetLineColor(1);
201 fHistClusterMapModuleITSMIokInAcc->Draw();
202 l2->AddEntry(fHistClusterMapModuleITSMIokInAcc,"ok","l");
203 fHistClusterMapModuleITSMIbadInAcc->SetLineColor(3);
204 fHistClusterMapModuleITSMIbadInAcc->Draw("same");
205 l2->AddEntry(fHistClusterMapModuleITSMIbadInAcc,"bad","l");
206 fHistClusterMapModuleITSMInoclsInAcc->SetLineColor(2);
207 fHistClusterMapModuleITSMInoclsInAcc->Draw("same");
208 l2->AddEntry(fHistClusterMapModuleITSMInoclsInAcc,"no cls","l");
2308c814 209 l2->Draw();
fa516524 210 c3->cd(2);
211 TH1F *fHistClusterMapModuleITSMIallInAcc=(TH1F*)fHistClusterMapModuleITSMIokInAcc->Clone("fHistClusterMapModuleITSMIallInAcc");
212 fHistClusterMapModuleITSMIallInAcc->Add(fHistClusterMapModuleITSMIbadInAcc);
213 fHistClusterMapModuleITSMIallInAcc->Add(fHistClusterMapModuleITSMInoclsInAcc);
214 TH1F *fHistClusterMapModuleITSMIokRatioInAcc=(TH1F*)fHistClusterMapModuleITSMIokInAcc->Clone("fHistClusterMapModuleITSMIokRatioInAcc");
215 fHistClusterMapModuleITSMIokRatioInAcc->Divide(fHistClusterMapModuleITSMIallInAcc);
216 for(Int_t ib=1;ib<=fHistClusterMapModuleITSMIokRatioInAcc->GetNbinsX();ib++) {
217 fHistClusterMapModuleITSMIokRatioInAcc->SetBinError(ib,0);
218 if(fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)) fHistClusterMapModuleITSMIokRatioInAcc->SetBinError(ib,TMath::Sqrt(fHistClusterMapModuleITSMIokRatioInAcc->GetBinContent(ib)*(1.-fHistClusterMapModuleITSMIokRatioInAcc->GetBinContent(ib))/fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)));
219 }
220 fHistClusterMapModuleITSMIokRatioInAcc->Draw();
221 TH1F *fHistClusterMapModuleITSMIbadRatioInAcc=(TH1F*)fHistClusterMapModuleITSMIbadInAcc->Clone("fHistClusterMapModuleITSMIbadRatioInAcc");
222 fHistClusterMapModuleITSMIbadRatioInAcc->Divide(fHistClusterMapModuleITSMIallInAcc);
223 for(Int_t ib=1;ib<=fHistClusterMapModuleITSMIokRatioInAcc->GetNbinsX();ib++) {
224 fHistClusterMapModuleITSMIbadRatioInAcc->SetBinError(ib,0);
225 if(fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)) fHistClusterMapModuleITSMIbadRatioInAcc->SetBinError(ib,TMath::Sqrt(fHistClusterMapModuleITSMIbadRatioInAcc->GetBinContent(ib)*(1.-fHistClusterMapModuleITSMIbadRatioInAcc->GetBinContent(ib))/fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)));
226 }
227 fHistClusterMapModuleITSMIbadRatioInAcc->Draw("same");
228 TH1F *fHistClusterMapModuleITSMInoclsRatioInAcc=(TH1F*)fHistClusterMapModuleITSMInoclsInAcc->Clone("fHistClusterMapModuleITSMInoclsRatioInAcc");
229 fHistClusterMapModuleITSMInoclsRatioInAcc->Divide(fHistClusterMapModuleITSMIallInAcc);
230 for(Int_t ib=1;ib<=fHistClusterMapModuleITSMIokRatioInAcc->GetNbinsX();ib++) {
231 fHistClusterMapModuleITSMInoclsRatioInAcc->SetBinError(ib,0);
232 if(fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)) fHistClusterMapModuleITSMInoclsRatioInAcc->SetBinError(ib,TMath::Sqrt(fHistClusterMapModuleITSMInoclsRatioInAcc->GetBinContent(ib)*(1.-fHistClusterMapModuleITSMInoclsRatioInAcc->GetBinContent(ib))/fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)));
233 }
234 fHistClusterMapModuleITSMInoclsRatioInAcc->Draw("same");
2308c814 235
fa516524 236 TCanvas *c3b = new TCanvas("c3b","c3b");
237 c3b->Divide(2,1);
238 c3b->cd(1);
239 fHistxlocSDDok->Divide(fHistxlocSDDall);
240 fHistxlocSDDok->Draw();
241 c3b->cd(2);
242 fHistzlocSDDok->Divide(fHistzlocSDDall);
243 fHistzlocSDDok->Draw();
2308c814 244
c2893e82 245 TCanvas *c4 =new TCanvas("c4","c4",10,10,500,500);
246 c4->SetGridy();
247 fHistPhiITSMIokbadoutinz6InAcc->Divide(fHistPhiTPCInAcc);
248 fHistPhiITSMIokbadoutinz6InAcc->SetMinimum(0);
249 fHistPhiITSMIokbadoutinz6InAcc->SetMaximum(1.5);
250 fHistPhiITSMIokbadoutinz6InAcc->SetYTitle("ITS+TPC / TPC");
251 fHistPhiITSMIokbadoutinz6InAcc->SetTitle("Fraction of tracks with 6 layers ok");
252 fHistPhiITSMIokbadoutinz6InAcc->Draw();
253
fa516524 254 TCanvas *c5c =new TCanvas("c5c","c5c",10,10,600,600);
255 c5c->SetGridy();
256 TH1F *fHistPtTPCInAccSecFrac = (TH1F*)fHistPtTPCInAccS->Clone("fHistPtTPCInAccSecFrac");
257 fHistPtTPCInAccSecFrac->Divide(fHistPtTPCInAcc);
258 fHistPtTPCInAccSecFrac->SetLineColor(kOrange+7);
259 fHistPtTPCInAccSecFrac->SetTitle("Fraction of secondaries");
260 fHistPtTPCInAccSecFrac->SetYTitle("sec/all");
261 fHistPtTPCInAccSecFrac->Draw();
262 TH1F *fHistPtITSMI2InAccSecFrac = (TH1F*)fHistPtITSMI2InAccS->Clone("fHistPtITSMI2InAccSecFrac");
263 fHistPtITSMI2InAccSecFrac->Divide(fHistPtITSMI2InAcc);
264 fHistPtITSMI2InAccSecFrac->SetLineColor(7);
265 fHistPtITSMI2InAccSecFrac->Draw("same");
266 TH1F *fHistPtITSMIge2InAccSecFrac = (TH1F*)fHistPtITSMIge2InAccS->Clone("fHistPtITSMIge2InAccSecFrac");
267 fHistPtITSMIge2InAccSecFrac->Divide(fHistPtITSMIge2InAcc);
268 fHistPtITSMIge2InAccSecFrac->Draw("same");
269 TH1F *fHistPtITSMI3InAccSecFrac = (TH1F*)fHistPtITSMI3InAccS->Clone("fHistPtITSMI3InAccSecFrac");
270 fHistPtITSMI3InAccSecFrac->Divide(fHistPtITSMI3InAcc);
271 fHistPtITSMI3InAccSecFrac->SetLineColor(6);
272 fHistPtITSMI3InAccSecFrac->Draw("same");
273 TH1F *fHistPtITSMI4InAccSecFrac = (TH1F*)fHistPtITSMI4InAccS->Clone("fHistPtITSMI4InAccSecFrac");
274 fHistPtITSMI4InAccSecFrac->Divide(fHistPtITSMI4InAcc);
275 fHistPtITSMI4InAccSecFrac->SetLineColor(4);
276 fHistPtITSMI4InAccSecFrac->Draw("same");
277 TH1F *fHistPtITSMI5InAccSecFrac = (TH1F*)fHistPtITSMI5InAccS->Clone("fHistPtITSMI5InAccSecFrac");
278 fHistPtITSMI5InAccSecFrac->Divide(fHistPtITSMI5InAcc);
279 fHistPtITSMI5InAccSecFrac->SetLineColor(3);
280 fHistPtITSMI5InAccSecFrac->Draw("same");
281 TH1F *fHistPtITSMI6InAccSecFrac = (TH1F*)fHistPtITSMI6InAccS->Clone("fHistPtITSMI6InAccSecFrac");
282 fHistPtITSMI6InAccSecFrac->Divide(fHistPtITSMI6InAcc);
283 fHistPtITSMI6InAccSecFrac->SetLineColor(2);
284 fHistPtITSMI6InAccSecFrac->SetLineColor(2);
285 fHistPtITSMI6InAccSecFrac->Draw("same");
286 TH1F *fHistPtITSMISPDInAccSecFrac = (TH1F*)fHistPtITSMISPDInAccS->Clone("fHistPtITSMISPDInAccSecFrac");
287 fHistPtITSMISPDInAccSecFrac->Divide(fHistPtITSMISPDInAcc);
288 fHistPtITSMISPDInAccSecFrac->SetLineColor(9);
289 fHistPtITSMISPDInAccSecFrac->Draw("same");
290 TH1F *fHistPtITSMIoneSPDInAccSecFrac = (TH1F*)fHistPtITSMIoneSPDInAccS->Clone("fHistPtITSMIoneSPDInAccSecFrac");
291 fHistPtITSMIoneSPDInAccSecFrac->Divide(fHistPtITSMIoneSPDInAcc);
292 fHistPtITSMIoneSPDInAccSecFrac->SetLineColor(15);
293 fHistPtITSMIoneSPDInAccSecFrac->Draw("same");
294 TH1F *fHistPtITSTPCselSecFrac = (TH1F*)fHistPtITSTPCselS->Clone("fHistPtITSTPCselSecFrac");
295 fHistPtITSTPCselSecFrac->Divide(fHistPtITSTPCsel);
296 fHistPtITSTPCselSecFrac->SetLineColor(15);
297 fHistPtITSTPCselSecFrac->Draw("same");
298
299
c2893e82 300 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
301 TLegend *l4=new TLegend(0.5,0.5,0.9,0.9);
302 TCanvas *c5 =new TCanvas("c5","c5",10,10,1200,600);
303 c5->Divide(2,1);
304 c5_1->SetGridy();
305 c5_2->SetGridy();
8fa56655 306 c5_1->SetLogx();
307 c5_2->SetLogx();
c2893e82 308 c5->cd(1);
c2893e82 309 fHistPtITSMIge2InAcc->SetMaximum(1.5);
310 fHistPtITSMIge2InAcc->SetMinimum(0);
311 fHistPtITSMIge2InAcc->SetTitle("Fraction of prolonged tracks with N ITS points");
312 fHistPtITSMIge2InAcc->SetYTitle("ITS+TPC / TPC");
8fa56655 313 fHistPtITSMIge2InAcc->Divide(fHistPtITSMIge2InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 314 fHistPtITSMIge2InAcc->Draw();
315 l3->AddEntry(fHistPtITSMIge2InAcc,">=2 cls","l");
8fa56655 316 fHistPtITSMI6InAcc->Divide(fHistPtITSMI6InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 317 fHistPtITSMI6InAcc->SetLineColor(2);
318 l3->AddEntry(fHistPtITSMI6InAcc,"6 cls","l");
319 fHistPtITSMI6InAcc->Draw("same");
8fa56655 320 fHistPtITSMI5InAcc->Divide(fHistPtITSMI5InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 321 fHistPtITSMI5InAcc->SetLineColor(3);
322 l3->AddEntry(fHistPtITSMI5InAcc,"5 cls","l");
323 fHistPtITSMI5InAcc->Draw("same");
8fa56655 324 fHistPtITSMI4InAcc->Divide(fHistPtITSMI4InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 325 fHistPtITSMI4InAcc->SetLineColor(4);
326 l3->AddEntry(fHistPtITSMI4InAcc,"4 cls","l");
327 fHistPtITSMI4InAcc->Draw("same");
8fa56655 328 fHistPtITSMI3InAcc->Divide(fHistPtITSMI3InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 329 fHistPtITSMI3InAcc->SetLineColor(6);
330 l3->AddEntry(fHistPtITSMI3InAcc,"3 cls","l");
331 fHistPtITSMI3InAcc->Draw("same");
8fa56655 332 fHistPtITSMI2InAcc->Divide(fHistPtITSMI2InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 333 fHistPtITSMI2InAcc->SetLineColor(7);
334 l3->AddEntry(fHistPtITSMI2InAcc,"2 cls","l");
335 fHistPtITSMI2InAcc->Draw("same");
8fa56655 336 fHistPtITSMISPDInAcc->Divide(fHistPtITSMISPDInAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 337 fHistPtITSMISPDInAcc->SetLineColor(9);
338 l3->AddEntry(fHistPtITSMISPDInAcc,"2SPD + any","l");
339 fHistPtITSMISPDInAcc->Draw("same");
8fa56655 340 fHistPtITSMIoneSPDInAcc->Divide(fHistPtITSMIoneSPDInAcc,fHistPtTPCInAcc,1,1,"B");
fa516524 341 fHistPtITSMIoneSPDInAcc->SetLineColor(15);
342 l3->AddEntry(fHistPtITSMIoneSPDInAcc,">=1SPD + any","l");
343 fHistPtITSMIoneSPDInAcc->Draw("same");
8fa56655 344 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Divide(fHistPtITSMIoneSPDthreeSDDSSDInAcc,fHistPtTPCInAcc,1,1,"B");
345 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->SetLineColor(kOrange);
346 //l3->AddEntry(fHistPtITSMIoneSPDthreeSDDSSDInAcc,">=1SPD + >=3SDDSSD","l");
347 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Draw("same");
348 fHistPtITSTPCsel->Divide(fHistPtITSTPCsel,fHistPtTPCInAcc,1,1,"B");
fa516524 349 fHistPtITSTPCsel->SetLineColor(kAzure+1);
350 l3->AddEntry(fHistPtITSTPCsel,">=1SPD + any + d_{0} cut","l");
351 fHistPtITSTPCsel->Draw("same");
c2893e82 352 fHistPtITSMIge2InAcc->Draw("same");
353 l3->Draw();
354 c5->cd(2);
355 TH1F *fHistPtITSMIokbadoutinzge4InAcc = (TH1F*)fHistPtITSMIokbadoutinz6InAcc->Clone("fHistPtITSMIokbadoutinzge4InAcc");
356 fHistPtITSMIokbadoutinzge4InAcc->Add(fHistPtITSMIokbadoutinz5InAcc);
357 fHistPtITSMIokbadoutinzge4InAcc->Add(fHistPtITSMIokbadoutinz4InAcc);
358 fHistPtITSMIokbadoutinzge4InAcc->SetMaximum(1.5);
359 fHistPtITSMIokbadoutinzge4InAcc->SetMinimum(0);
360 fHistPtITSMIokbadoutinzge4InAcc->SetTitle("Fraction of prolonged tracks with N ITS layers \"ok\"");
361 fHistPtITSMIokbadoutinzge4InAcc->SetYTitle("ITS+TPC / TPC");
8fa56655 362 fHistPtITSMIokbadoutinzge4InAcc->Divide(fHistPtITSMIokbadoutinzge4InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 363 fHistPtITSMIokbadoutinzge4InAcc->SetLineColor(1);
364 fHistPtITSMIokbadoutinzge4InAcc->Draw();
8fa56655 365 fHistPtITSMIokbadoutinz6InAcc->Divide(fHistPtITSMIokbadoutinz6InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 366 fHistPtITSMIokbadoutinz6InAcc->SetLineColor(2);
367 fHistPtITSMIokbadoutinz6InAcc->Draw("same");
8fa56655 368 fHistPtITSMIokbadoutinz5InAcc->Divide(fHistPtITSMIokbadoutinz5InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 369 fHistPtITSMIokbadoutinz5InAcc->SetLineColor(3);
370 fHistPtITSMIokbadoutinz5InAcc->Draw("same");
8fa56655 371 fHistPtITSMIokbadoutinz4InAcc->Divide(fHistPtITSMIokbadoutinz4InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 372 fHistPtITSMIokbadoutinz4InAcc->SetLineColor(4);
373 fHistPtITSMIokbadoutinz4InAcc->Draw("same");
374 fHistPtITSMIokbadoutinzge4InAcc->Draw("same");
375 l4->AddEntry(fHistPtITSMIokbadoutinzge4InAcc,">=4 layers","l");
376 l4->AddEntry(fHistPtITSMIokbadoutinz6InAcc,"6 layers","l");
377 l4->AddEntry(fHistPtITSMIokbadoutinz5InAcc,"5 layers","l");
378 l4->AddEntry(fHistPtITSMIokbadoutinz4InAcc,"4 layers","l");
379 l4->Draw();
380
381
fa516524 382 TLegend *l4d=new TLegend(0.5,0.5,0.9,0.9);
383 TCanvas *c5d =new TCanvas("c5d","c5d",10,10,600,600);
384 c5d->SetGridy();
385 c5d->SetGridy();
386 fHistPtITSMISPDInAccMC->SetMaximum(1.5);
387 fHistPtITSMISPDInAccMC->SetMinimum(0);
388 fHistPtITSMISPDInAccMC->SetTitle("Fraction of prolonged tracks with N ITS points");
389 fHistPtITSMISPDInAccMC->SetYTitle("ITS+TPC / TPC");
8fa56655 390 fHistPtITSMISPDInAccMC->Divide(fHistPtITSMISPDInAccMC,fHistPtTPCInAccMCtwoSPD,1,1,"B");
fa516524 391 fHistPtITSMISPDInAccMC->SetLineColor(9);
392 l4d->AddEntry(fHistPtITSMISPDInAccMC,"2SPD + any","l");
393 fHistPtITSMISPDInAccMC->Draw();
8fa56655 394 fHistPtITSMIoneSPDInAccMC->Divide(fHistPtITSMIoneSPDInAccMC,fHistPtTPCInAccMConeSPD,1,1,"B");
fa516524 395 fHistPtITSMIoneSPDInAccMC->SetLineColor(15);
396 l4d->AddEntry(fHistPtITSMIoneSPDInAccMC,">=1SPD + any","l");
397 fHistPtITSMIoneSPDInAccMC->Draw("same");
398 l4d->Draw();
399
400 TFile *eff=new TFile("eff.root","recreate");
401 fHistPtITSMIge2InAcc->Write();
402 fHistPtITSMI6InAcc->Write();
403 fHistPtITSMI5InAcc->Write();
404 fHistPtITSMI4InAcc->Write();
405 fHistPtITSMI3InAcc->Write();
406 fHistPtITSMI2InAcc->Write();
407 fHistPtITSMISPDInAcc->Write();
408 fHistPtITSMIoneSPDInAcc->Write();
8fa56655 409 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Write();
fa516524 410 fHistPtITSTPCsel->Write();
8fa56655 411 fHistNclsITSMI->Write();
fa516524 412 fHistClusterMapModuleITSMIokRatioInAcc->Write();
413 fHistClusterMapModuleITSMIbadRatioInAcc->Write();
414 fHistClusterMapModuleITSMInoclsRatioInAcc->Write();
415 eff->Close();
416
417 c5c->cd();
418 l3->Draw();
419
420
421 TCanvas *c5b =new TCanvas("c5b","c5b",10,10,600,600);
422 c5b->SetLogy();
423 fHistRProdVtxInAccP->SetLineColor(2);
424 fHistRProdVtxInAccP->SetMinimum(1);
425 fHistRProdVtxInAccS->SetMinimum(1);
426 fHistRProdVtxInAccP->Draw();
427 fHistRProdVtxInAccS->Draw("sames");
428
429 TCanvas *c5a =new TCanvas("c5a","c5a",10,10,1200,600);
430 c5a->Divide(2,1);
8fa56655 431 c5a_1->SetLogx();
432 c5a_2->SetLogx();
fa516524 433 c5a_1->SetGridy();
434 c5a_2->SetGridy();
435 c5a->cd(1);
436 fHistPtITSMIge2InAccP->SetMaximum(1.5);
437 fHistPtITSMIge2InAccP->SetMinimum(0);
438 fHistPtITSMIge2InAccP->SetTitle("Fraction of prolonged tracks with N ITS points");
439 fHistPtITSMIge2InAccP->SetYTitle("ITS+TPC / TPC");
440 fHistPtITSMIge2InAccP->Draw();
8fa56655 441 fHistPtITSMIge2InAccP->Divide(fHistPtITSMIge2InAccP,fHistPtTPCInAccP,1,1,"B");
442 fHistPtITSMI6InAccP->Divide(fHistPtITSMI6InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 443 fHistPtITSMI6InAccP->SetLineColor(2);
444 fHistPtITSMI6InAccP->Draw("same");
8fa56655 445 fHistPtITSMI5InAccP->Divide(fHistPtITSMI5InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 446 fHistPtITSMI5InAccP->SetLineColor(3);
447 fHistPtITSMI5InAccP->Draw("same");
8fa56655 448 fHistPtITSMI4InAccP->Divide(fHistPtITSMI4InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 449 fHistPtITSMI4InAccP->SetLineColor(4);
450 fHistPtITSMI4InAccP->Draw("same");
8fa56655 451 fHistPtITSMI3InAccP->Divide(fHistPtITSMI3InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 452 fHistPtITSMI3InAccP->SetLineColor(6);
453 fHistPtITSMI3InAccP->Draw("same");
8fa56655 454 fHistPtITSMI2InAccP->Divide(fHistPtITSMI2InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 455 fHistPtITSMI2InAccP->SetLineColor(7);
456 fHistPtITSMI2InAccP->Draw("same");
8fa56655 457 fHistPtITSMISPDInAccP->Divide(fHistPtITSMISPDInAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 458 fHistPtITSMISPDInAccP->SetLineColor(9);
459 fHistPtITSMISPDInAccP->Draw("same");
8fa56655 460 fHistPtITSMIoneSPDInAccP->Divide(fHistPtITSMIoneSPDInAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 461 fHistPtITSMIoneSPDInAccP->SetLineColor(15);
462 fHistPtITSMIoneSPDInAccP->Draw("same");
8fa56655 463 fHistPtITSTPCselP->Divide(fHistPtITSTPCselP,fHistPtTPCInAccP,1,1,"B");
fa516524 464 fHistPtITSTPCselP->SetLineColor(kAzure+1);
465 fHistPtITSTPCselP->Draw("same");
466 fHistPtITSMIge2InAccP->Draw("same");
467 l3->Draw();
468 c5a->cd(2);
469 fHistPtITSMIge2InAccS->SetMaximum(1.5);
470 fHistPtITSMIge2InAccS->SetMinimum(0);
471 fHistPtITSMIge2InAccS->SetTitle("Fraction of prolonged tracks with N ITS points");
472 fHistPtITSMIge2InAccS->SetYTitle("ITS+TPC / TPC");
8fa56655 473 fHistPtITSMIge2InAccS->Divide(fHistPtITSMIge2InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 474 fHistPtITSMIge2InAccS->Draw();
8fa56655 475 fHistPtITSMI6InAccS->Divide(fHistPtITSMI6InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 476 fHistPtITSMI6InAccS->SetLineColor(2);
477 fHistPtITSMI6InAccS->Draw("same");
8fa56655 478 fHistPtITSMI5InAccS->Divide(fHistPtITSMI5InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 479 fHistPtITSMI5InAccS->SetLineColor(3);
480 fHistPtITSMI5InAccS->Draw("same");
8fa56655 481 fHistPtITSMI4InAccS->Divide(fHistPtITSMI4InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 482 fHistPtITSMI4InAccS->SetLineColor(4);
483 fHistPtITSMI4InAccS->Draw("same");
8fa56655 484 fHistPtITSMI3InAccS->Divide(fHistPtITSMI3InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 485 fHistPtITSMI3InAccS->SetLineColor(6);
486 fHistPtITSMI3InAccS->Draw("same");
8fa56655 487 fHistPtITSMI2InAccS->Divide(fHistPtITSMI2InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 488 fHistPtITSMI2InAccS->SetLineColor(7);
489 fHistPtITSMI2InAccS->Draw("same");
8fa56655 490 fHistPtITSMISPDInAccS->Divide(fHistPtITSMISPDInAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 491 fHistPtITSMISPDInAccS->SetLineColor(9);
492 fHistPtITSMISPDInAccS->Draw("same");
8fa56655 493 fHistPtITSMIoneSPDInAccS->Divide(fHistPtITSMIoneSPDInAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 494 fHistPtITSMIoneSPDInAccS->SetLineColor(15);
495 fHistPtITSMIoneSPDInAccS->Draw("same");
8fa56655 496 fHistPtITSTPCselS->Divide(fHistPtITSTPCselS,fHistPtTPCInAccS,1,1,"B");
fa516524 497 fHistPtITSTPCselS->SetLineColor(kAzure+1);
498 fHistPtITSTPCselS->Draw("same");
499 fHistPtITSMIge2InAccS->Draw("same");
500 l3->Draw();
501
502
503
504
c2893e82 505 // PLOT ALIGNMENT CHECKS
506 //
507 TH1F *hSPDTrackletsTBdxy = new TH1F("hSPDTrackletsTBdxy","SPD tracklets; SPD tracklet to SPD vertex distance in (x,y) [cm]; entries",100,-0.1,0.1);
508 TH1F *hSPDTrackletsLRdxy = new TH1F("hSPDTrackletsLRdxy","SPD tracklets; SPD tracklet to SPD vertex distance in (x,y) [cm]; entries",100,-0.1,0.1);
509 TH1F *hSPDTrackletsTBdz = new TH1F("hSPDTrackletsTBdz","SPD tracklets; SPD tracklet to SPD vertex distance in z [cm]; entries",100,-0.1,0.1);
510 TH1F *hSPDTrackletsLRdz = new TH1F("hSPDTrackletsLRdz","SPD tracklets; SPD tracklet to SPD vertex distance in z [cm]; entries",100,-0.1,0.1);
511
512 TNtuple *fNtupleITSAlignSPDTracklets = (TNtuple*)list->FindObject("fNtupleITSAlignSPDTracklets");
513 Float_t dxy,dz,phi,pt;
514 fNtupleITSAlignSPDTracklets->SetBranchAddress("pt",&pt);
515 fNtupleITSAlignSPDTracklets->SetBranchAddress("phi",&phi);
516 fNtupleITSAlignSPDTracklets->SetBranchAddress("dxy",&dxy);
517 fNtupleITSAlignSPDTracklets->SetBranchAddress("dz",&dz);
518
519 for(Int_t i=0;i<fNtupleITSAlignSPDTracklets->GetEntries();i++) {
520 fNtupleITSAlignSPDTracklets->GetEvent(i);
fa516524 521 if(pt<.01) continue;
c2893e82 522 if(TMath::Abs(TMath::Abs(phi)-0.5*TMath::Pi())<0.25*TMath::Pi()) {
523 // top-bottom
524 hSPDTrackletsTBdxy->Fill(dxy);
525 hSPDTrackletsTBdz->Fill(dz);
526 } else {
527 // left-right
528 hSPDTrackletsLRdxy->Fill(dxy);
529 hSPDTrackletsLRdz->Fill(dz);
530 }
531 }
532
533 TLegend *l6=new TLegend(0.5,0.5,0.9,0.9);
534
535 TCanvas *c6 = new TCanvas("c6","c6",0,0,1000,500);
536 c6->Divide(2,1);
537 c6->cd(1);
538 hSPDTrackletsTBdxy->SetLineColor(4);
539 hSPDTrackletsTBdxy->Draw();
540 hSPDTrackletsLRdxy->SetLineColor(2);
fa516524 541 hSPDTrackletsLRdxy->Draw("sames");
c2893e82 542 l6->AddEntry(hSPDTrackletsTBdxy,"top-bottom","l");
543 l6->AddEntry(hSPDTrackletsLRdxy,"left-right","l");
544 l6->Draw();
545 c6->cd(2);
546 hSPDTrackletsTBdz->SetLineColor(4);
547 hSPDTrackletsTBdz->Draw();
548 hSPDTrackletsLRdz->SetLineColor(2);
fa516524 549 hSPDTrackletsLRdz->Draw("sames");
c2893e82 550 l6->Draw();
551
552
553 TH1F *hSPDExtraClsTBdxy = new TH1F("hSPDExtraClsTBdxy","SPD extra clusters; track-to-point distance in (x,y) [cm]; entries",100,-0.1,0.1);
554 TH1F *hSPDExtraClsLRdxy = new TH1F("hSPDExtraClsLRdxy","SPD extra clusters; track-to-point distance in (x,y) [cm]; entries",100,-0.1,0.1);
555 TH1F *hSPDExtraClsTBdz = new TH1F("hSPDExtraClsTBdz","SPD extra clusters; track-to-point distance in z [cm]; entries",100,-0.1,0.1);
556 TH1F *hSPDExtraClsLRdz = new TH1F("hSPDExtraClsLRdz","SPD extra clusters; track-to-point distance in z [cm]; entries",100,-0.1,0.1);
557
558 TNtuple *fNtupleITSAlignExtra = (TNtuple*)list->FindObject("fNtupleITSAlignExtra");
559 Float_t layer,npoints,x,y,z;
560 fNtupleITSAlignExtra->SetBranchAddress("layer",&layer);
561 fNtupleITSAlignExtra->SetBranchAddress("npoints",&npoints);
562 fNtupleITSAlignExtra->SetBranchAddress("x",&x);
563 fNtupleITSAlignExtra->SetBranchAddress("y",&y);
564 fNtupleITSAlignExtra->SetBranchAddress("z",&z);
565 fNtupleITSAlignExtra->SetBranchAddress("dxy",&dxy);
566 fNtupleITSAlignExtra->SetBranchAddress("dz",&dz);
567 fNtupleITSAlignExtra->SetBranchAddress("pt",&pt);
568
569 for(Int_t i=0;i<fNtupleITSAlignExtra->GetEntries();i++) {
570 fNtupleITSAlignExtra->GetEvent(i);
fa516524 571 if(pt<0.1) continue;
c2893e82 572 if(layer!=0 && layer!=1) continue;
fa516524 573 if(npoints<3) continue;
c2893e82 574 phi = TMath::ATan2(y,x);
575 if(TMath::Abs(TMath::Abs(phi)-0.5*TMath::Pi())<0.25*TMath::Pi()) {
576 // top-bottom
577 hSPDExtraClsTBdxy->Fill(dxy);
578 hSPDExtraClsTBdz->Fill(dz);
579 } else {
580 // left-right
581 hSPDExtraClsLRdxy->Fill(dxy);
582 hSPDExtraClsLRdz->Fill(dz);
583 }
584 }
585
586 TCanvas *c7 = new TCanvas("c7","c7",0,0,1000,500);
587 c7->Divide(2,1);
588 c7->cd(1);
589 hSPDExtraClsTBdxy->SetLineColor(4);
590 hSPDExtraClsTBdxy->Draw();
591 hSPDExtraClsLRdxy->SetLineColor(2);
592 hSPDExtraClsLRdxy->Draw("same");
593 l6->Draw();
594 c7->cd(2);
595 hSPDExtraClsTBdz->SetLineColor(4);
596 hSPDExtraClsTBdz->Draw();
597 hSPDExtraClsLRdz->SetLineColor(2);
598 hSPDExtraClsLRdz->Draw("same");
599 l6->Draw();
600
601
2308c814 602 return;
603}
fa516524 604//-----------------------------------------------------------------------------
605void PlotEffRatio() {
606
8fa56655 607 TFile *f= new TFile("eff_117220_117223_pass1.root");
fa516524 608
609 TH1F *fHistPtITSMI6InAcc = (TH1F*)f->Get("fHistPtITSMI6InAcc");
610 TH1F *fHistPtITSMI5InAcc = (TH1F*)f->Get("fHistPtITSMI5InAcc");
611 TH1F *fHistPtITSMI4InAcc = (TH1F*)f->Get("fHistPtITSMI4InAcc");
612 TH1F *fHistPtITSMI3InAcc = (TH1F*)f->Get("fHistPtITSMI3InAcc");
613 TH1F *fHistPtITSMI2InAcc = (TH1F*)f->Get("fHistPtITSMI2InAcc");
614 TH1F *fHistPtITSMIge2InAcc = (TH1F*)f->Get("fHistPtITSMIge2InAcc");
615 TH1F *fHistPtITSMISPDInAcc = (TH1F*)f->Get("fHistPtITSMISPDInAcc");
616 TH1F *fHistPtITSMIoneSPDInAcc = (TH1F*)f->Get("fHistPtITSMIoneSPDInAcc");
8fa56655 617 TH1F *fHistPtITSMIoneSPDthreeSDDSSDInAcc = (TH1F*)f->Get("fHistPtITSMIoneSPDthreeSDDSSDInAcc");
fa516524 618 TH1F *fHistPtITSTPCsel = (TH1F*)f->Get("fHistPtITSTPCsel");
619 TH1F *fHistClusterMapModuleITSMIokRatioInAcc = (TH1F*)f->Get("fHistClusterMapModuleITSMIokRatioInAcc");
8fa56655 620 TH1F *fHistNclsITSMI = (TH1F*)f->Get("fHistNclsITSMI");
621
fa516524 622
8fa56655 623 TFile *fMC= new TFile("eff_lhc10c4.root");
fa516524 624
625 TH1F *fHistPtITSMI6InAccMC = (TH1F*)fMC->Get("fHistPtITSMI6InAcc");
626 TH1F *fHistPtITSMI5InAccMC = (TH1F*)fMC->Get("fHistPtITSMI5InAcc");
627 TH1F *fHistPtITSMI4InAccMC = (TH1F*)fMC->Get("fHistPtITSMI4InAcc");
628 TH1F *fHistPtITSMI3InAccMC = (TH1F*)fMC->Get("fHistPtITSMI3InAcc");
629 TH1F *fHistPtITSMI2InAccMC = (TH1F*)fMC->Get("fHistPtITSMI2InAcc");
630 TH1F *fHistPtITSMIge2InAccMC = (TH1F*)fMC->Get("fHistPtITSMIge2InAcc");
631 TH1F *fHistPtITSMISPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMISPDInAcc");
632 TH1F *fHistPtITSMIoneSPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMIoneSPDInAcc");
8fa56655 633 TH1F *fHistPtITSMIoneSPDthreeSDDSSDInAccMC = (TH1F*)fMC->Get("fHistPtITSMIoneSPDthreeSDDSSDInAcc");
fa516524 634 TH1F *fHistPtITSTPCselMC = (TH1F*)fMC->Get("fHistPtITSTPCsel");
635 TH1F *fHistClusterMapModuleITSMIokRatioInAccMC = (TH1F*)fMC->Get("fHistClusterMapModuleITSMIokRatioInAcc");
8fa56655 636 TH1F *fHistNclsITSMIMC = (TH1F*)fMC->Get("fHistNclsITSMIMC");
fa516524 637
8fa56655 638 /*
639 TCanvas *c0 = new TCanvas("c0","c0",0,0,600,500);
640 c0->SetGridy();
641 fHistNclsITSMI->SetLineColor(4);
642 fHistNclsITSMI->SetMarkerColor(4);
643 fHistNclsITSMI->SetLineStyle(1);
644 fHistNclsITSMI->SetMarkerStyle(20);
645 fHistNclsITSMI->Draw();
646 fHistNclsITSMIMC->SetLineColor(4);
647 fHistNclsITSMIMC->SetMarkerColor(4);
648 fHistNclsITSMIMC->SetLineStyle(2);
649 fHistNclsITSMIMC->SetMarkerStyle(24);
650 fHistNclsITSMIMC->Draw("same");
651 */
fa516524 652 TCanvas *c = new TCanvas("c","c",0,0,600,500);
653 c->SetGridy();
8fa56655 654 c->SetLogx();
655
fa516524 656 fHistPtITSMI6InAcc->Divide(fHistPtITSMI6InAccMC);
657 fHistPtITSMI6InAcc->Draw();
658 fHistPtITSMI5InAcc->Divide(fHistPtITSMI5InAccMC);
659 fHistPtITSMI5InAcc->Draw("same");
660 fHistPtITSMI4InAcc->Divide(fHistPtITSMI4InAccMC);
661 fHistPtITSMI4InAcc->Draw("same");
662 fHistPtITSMI3InAcc->Divide(fHistPtITSMI3InAccMC);
663 fHistPtITSMI3InAcc->Draw("same");
664 fHistPtITSMI2InAcc->Divide(fHistPtITSMI2InAccMC);
665 fHistPtITSMI2InAcc->Draw("same");
666 fHistPtITSMIge2InAcc->Divide(fHistPtITSMIge2InAccMC);
667 fHistPtITSMIge2InAcc->Draw("same");
668 fHistPtITSMISPDInAcc->Divide(fHistPtITSMISPDInAccMC);
669 fHistPtITSMISPDInAcc->Draw("same");
670 fHistPtITSMIoneSPDInAcc->Divide(fHistPtITSMIoneSPDInAccMC);
671 fHistPtITSMIoneSPDInAcc->Draw("same");
8fa56655 672 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Divide(fHistPtITSMIoneSPDthreeSDDSSDInAccMC);
673 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Draw("same");
674
fa516524 675 fHistPtITSTPCsel->Divide(fHistPtITSTPCselMC);
676 fHistPtITSTPCsel->Draw("same");
8fa56655 677
fa516524 678 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
679 l3->AddEntry(fHistPtITSMIge2InAcc,">=2 cls","l");
680 l3->AddEntry(fHistPtITSMI6InAcc,"6 cls","l");
681 l3->AddEntry(fHistPtITSMI5InAcc,"5 cls","l");
682 l3->AddEntry(fHistPtITSMI4InAcc,"4 cls","l");
683 l3->AddEntry(fHistPtITSMI3InAcc,"3 cls","l");
684 l3->AddEntry(fHistPtITSMI2InAcc,"2 cls","l");
685 l3->AddEntry(fHistPtITSMISPDInAcc,"2SPD + any","l");
686 l3->AddEntry(fHistPtITSMIoneSPDInAcc,">=1SPD + any","l");
8fa56655 687 //l3->AddEntry(fHistPtITSMIoneSPDthreeSDDSSDInAcc,">=1SPD + >=3SDDSSD","l");
fa516524 688 l3->AddEntry(fHistPtITSTPCsel,">=1SPD + any + d_{0} cut","l");
689 l3->Draw();
8fa56655 690
fa516524 691 TCanvas *cc = new TCanvas("cc","cc",0,0,600,500);
692 cc->Divide(1,2);
693 cc->cd(1);
694 fHistClusterMapModuleITSMIokRatioInAccMC->SetLineColor(4);
695 fHistClusterMapModuleITSMIokRatioInAccMC->Draw();
696 fHistClusterMapModuleITSMIokRatioInAcc->Draw("same");
697 cc->cd(2);
698 for(Int_t i=1;i<=fHistClusterMapModuleITSMIokRatioInAccMC->GetNbinsX();i++) {
699 if(fHistClusterMapModuleITSMIokRatioInAccMC->GetBinContent(i)<0.02) {
700 fHistClusterMapModuleITSMIokRatioInAccMC->SetBinContent(i,1);
701 if(fHistClusterMapModuleITSMIokRatioInAcc->GetBinContent(i)<0.02) {
702 fHistClusterMapModuleITSMIokRatioInAcc->SetBinContent(i,1);
703 }
704 }
705 }
706 TH1F* fHistClusterMapDataOverMC=(TH1F*)fHistClusterMapModuleITSMIokRatioInAcc->Clone("fHistClusterMapDataOverMC");
707 fHistClusterMapDataOverMC->Divide(fHistClusterMapModuleITSMIokRatioInAccMC);
708 fHistClusterMapDataOverMC->Draw();
709
710 return;
711}
712
8fa56655 713//-----------------------------------------------------------------------------
714void PlotEffOfficial(Bool_t drawRatio=kTRUE) {
715
716 gStyle->SetOptStat(0);
717
718 gROOT->LoadMacro("/Users/dainesea/ALICEWorkInProgress.C");
719
720 TFile *f= new TFile("eff_115328_115393_minipass.root");
721
722 TH1F *fHistPtITSMI6InAcc = (TH1F*)f->Get("fHistPtITSMI6InAcc");
723 TH1F *fHistPtITSMI5InAcc = (TH1F*)f->Get("fHistPtITSMI5InAcc");
724 TH1F *fHistPtITSMI4InAcc = (TH1F*)f->Get("fHistPtITSMI4InAcc");
725 TH1F *fHistPtITSMI3InAcc = (TH1F*)f->Get("fHistPtITSMI3InAcc");
726 TH1F *fHistPtITSMI2InAcc = (TH1F*)f->Get("fHistPtITSMI2InAcc");
727 TH1F *fHistPtITSMIge2InAcc = (TH1F*)f->Get("fHistPtITSMIge2InAcc");
728 fHistPtITSMIge2InAcc->SetLineColor(1);
729 fHistPtITSMIge2InAcc->SetLineStyle(1);
730 fHistPtITSMIge2InAcc->SetMarkerColor(1);
731 fHistPtITSMIge2InAcc->SetMarkerStyle(21);
732 TH1F *fHistPtITSMISPDInAcc = (TH1F*)f->Get("fHistPtITSMISPDInAcc");
733 TH1F *fHistPtITSMIoneSPDInAcc = (TH1F*)f->Get("fHistPtITSMIoneSPDInAcc");
734 fHistPtITSMIoneSPDInAcc->SetLineColor(2);
735 fHistPtITSMIoneSPDInAcc->SetLineStyle(1);
736 fHistPtITSMIoneSPDInAcc->SetMarkerColor(2);
737 fHistPtITSMIoneSPDInAcc->SetMarkerStyle(20);
738 TH1F *fHistPtITSTPCsel = (TH1F*)f->Get("fHistPtITSTPCsel");
739 TH1F *fHistClusterMapModuleITSMIokRatioInAcc = (TH1F*)f->Get("fHistClusterMapModuleITSMIokRatioInAcc");
740 TH1F *fHistNclsITSMI = (TH1F*)f->Get("fHistNclsITSMI");
741
742
743 TFile *fMC= new TFile("eff_lhc10b2.root");
744
745 TH1F *fHistPtITSMI6InAccMC = (TH1F*)fMC->Get("fHistPtITSMI6InAcc");
746 TH1F *fHistPtITSMI5InAccMC = (TH1F*)fMC->Get("fHistPtITSMI5InAcc");
747 TH1F *fHistPtITSMI4InAccMC = (TH1F*)fMC->Get("fHistPtITSMI4InAcc");
748 TH1F *fHistPtITSMI3InAccMC = (TH1F*)fMC->Get("fHistPtITSMI3InAcc");
749 TH1F *fHistPtITSMI2InAccMC = (TH1F*)fMC->Get("fHistPtITSMI2InAcc");
750 TH1F *fHistPtITSMIge2InAccMC = (TH1F*)fMC->Get("fHistPtITSMIge2InAcc");
751 fHistPtITSMIge2InAccMC->SetLineColor(1);
752 fHistPtITSMIge2InAccMC->SetLineStyle(2);
753 fHistPtITSMIge2InAccMC->SetMarkerColor(1);
754 fHistPtITSMIge2InAccMC->SetMarkerStyle(25);
755 TH1F *fHistPtITSMISPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMISPDInAcc");
756 TH1F *fHistPtITSMIoneSPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMIoneSPDInAcc");
757 fHistPtITSMIoneSPDInAccMC->SetLineColor(2);
758 fHistPtITSMIoneSPDInAccMC->SetLineStyle(2);
759 fHistPtITSMIoneSPDInAccMC->SetMarkerColor(2);
760 fHistPtITSMIoneSPDInAccMC->SetMarkerStyle(24);
761 TH1F *fHistPtITSTPCselMC = (TH1F*)fMC->Get("fHistPtITSTPCsel");
762 TH1F *fHistClusterMapModuleITSMIokRatioInAccMC = (TH1F*)fMC->Get("fHistClusterMapModuleITSMIokRatioInAcc");
763 TH1F *fHistNclsITSMIMC = (TH1F*)fMC->Get("fHistNclsITSMI");
764
765
766 TCanvas *c0 = new TCanvas("c0","c0",0,0,600,500);
767 c0->SetGridy();
768 fHistNclsITSMI->SetLineColor(4);
769 fHistNclsITSMI->SetMarkerColor(4);
770 fHistNclsITSMI->SetLineStyle(1);
771 fHistNclsITSMI->SetMarkerStyle(20);
772 fHistNclsITSMI->Scale(1./fHistNclsITSMI->Integral());
773 fHistNclsITSMI->Draw();
774 fHistNclsITSMIMC->SetLineColor(4);
775 fHistNclsITSMIMC->SetMarkerColor(4);
776 fHistNclsITSMIMC->SetLineStyle(2);
777 fHistNclsITSMIMC->SetMarkerStyle(24);
778 fHistNclsITSMIMC->Scale(1./fHistNclsITSMIMC->Integral());
779 fHistNclsITSMIMC->Draw("same");
780
781 TLegend *l0=new TLegend(0.5,0.5,0.9,0.9);
782 l0->SetFillStyle(0);
783 l0->SetBorderSize(0);
784 l0->AddEntry(fHistNclsITSMI,"Data","lp");
785 l0->AddEntry(fHistNclsITSMIMC,"MC","lp");
786 l0->Draw();
787
788 ALICEWorkInProgress(c0,"20/05/2010");
789
790 TCanvas *c = new TCanvas("c","c",0,0,600,500);
791 c->SetGridy();
792 c->SetLogx();
793
794 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
795 l3->SetFillStyle(0);
796 l3->SetBorderSize(0);
797
798 if(drawRatio) {
799 //fHistPtITSMI6InAcc->Divide(fHistPtITSMI6InAccMC);
800 //fHistPtITSMI6InAcc->Draw();
801 //fHistPtITSMI5InAcc->Divide(fHistPtITSMI5InAccMC);
802 //fHistPtITSMI5InAcc->Draw("same");
803 //fHistPtITSMI4InAcc->Divide(fHistPtITSMI4InAccMC);
804 //fHistPtITSMI4InAcc->Draw("same");
805 //fHistPtITSMI3InAcc->Divide(fHistPtITSMI3InAccMC);
806 //fHistPtITSMI3InAcc->Draw("same");
807 //fHistPtITSMI2InAcc->Divide(fHistPtITSMI2InAccMC);
808 //fHistPtITSMI2InAcc->Draw("same");
809 fHistPtITSMIge2InAcc->SetYTitle("Data efficiency / MC efficiency");
810 fHistPtITSMIge2InAcc->Divide(fHistPtITSMIge2InAccMC);
811 fHistPtITSMIge2InAcc->Draw();
812 //fHistPtITSMISPDInAcc->Divide(fHistPtITSMISPDInAccMC);
813 //fHistPtITSMISPDInAcc->Draw("same");
814 fHistPtITSMIoneSPDInAcc->Divide(fHistPtITSMIoneSPDInAccMC);
815 fHistPtITSMIoneSPDInAcc->Draw("same");
816
817 //fHistPtITSTPCsel->Divide(fHistPtITSTPCselMC);
818 //fHistPtITSTPCsel->Draw("same");
819 l3->AddEntry(fHistPtITSMIge2InAcc,"at least 2 ITS hits","lp");
820 //l3->AddEntry(fHistPtITSMI6InAcc,"6 cls","l");
821 //l3->AddEntry(fHistPtITSMI5InAcc,"5 cls","l");
822 //l3->AddEntry(fHistPtITSMI4InAcc,"4 cls","l");
823 //l3->AddEntry(fHistPtITSMI3InAcc,"3 cls","l");
824 //l3->AddEntry(fHistPtITSMI2InAcc,"2 cls","l");
825 //l3->AddEntry(fHistPtITSMISPDInAcc,"2 SPD hits","lp");
826 l3->AddEntry(fHistPtITSMIoneSPDInAcc,"at least 1 SPD hit","lp");
827 //l3->AddEntry(fHistPtITSTPCsel,">=1SPD + any + d_{0} cut","l");
828
829 } else {
830 fHistPtITSMIge2InAcc->SetYTitle("ITS prolongation efficiency");
831 fHistPtITSMIge2InAcc->Draw();
832 fHistPtITSMIge2InAccMC->Draw("same");
833 fHistPtITSMIoneSPDInAcc->Draw("same");
834 fHistPtITSMIoneSPDInAccMC->Draw("same");
835 l3->AddEntry(fHistPtITSMIge2InAcc,"at least 2 ITS hits (Data)","lp");
836 l3->AddEntry(fHistPtITSMIoneSPDInAcc,"at least 1 SPD hit (Data)","lp");
837 l3->AddEntry(fHistPtITSMIge2InAccMC,"at least 2 ITS hits (MC)","lp");
838 l3->AddEntry(fHistPtITSMIoneSPDInAccMC,"at least 1 SPD hit (MC)","lp");
839 }
840
841 l3->Draw();
842
843 ALICEWorkInProgress(c,"20/05/2010");
844
845 return;
846}
847
fa516524 848void PlotImpPar_rphi(Int_t rebin=1) {
849
850
8fa56655 851 TFile *fMC= new TFile("ITS.Performance_lhc10b2.root");
fa516524 852
853 TList *list=(TList*)fMC->Get("cOutputITS");
854 TH1F *fHistd0rphiITSMIoneSPDInAccP150200MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
855 TH1F *fHistd0rphiITSMIoneSPDInAccS150200MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
856 TH1F *fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200fromStrange");
857 TH1F *fHistd0rphiITSMIoneSPDInAccS150200fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200fromMat");
8fa56655 858 TH1F *fHistd0rphiITSMIoneSPDInAccP350450MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP350450");
fa516524 859 TH1F *fHistd0rphiITSMIoneSPDInAccS350450MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450");
860 TH1F *fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450fromStrange");
8fa56655 861 TH1F *fHistd0rphiITSMIoneSPDInAccS350450fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450fromMat");
fa516524 862 TH1F *fHistd0rphiITSMIoneSPDInAccP500700MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP500700");
863 TH1F *fHistd0rphiITSMIoneSPDInAccS500700MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700");
864 TH1F *fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700fromStrange");
865 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from211MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from211");
866 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from22MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from22");
867 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from310MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from310");
868 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from321MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from321");
869 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from3122MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from3122");
870 TH1F *fHistd0rphiITSMIoneSPDInAccS500700fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700fromMat");
871 TH1F *fHistd0rphiITSMIoneSPDInAccP10001500MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP10001500");
872 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500");
873 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500fromStrange");
874 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500fromMat");
8fa56655 875 TH1F *fHistd0rphiITSMIoneSPDInAccP25004000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP25004000");
fa516524 876 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000");
877 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000fromStrange");
878 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000fromMat");
879 TH1F *fHistd0rphiITSMIoneSPDInAccP40008000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP40008000");
880 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000");
881 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000fromStrange");
8fa56655 882 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000fromMat");
fa516524 883
884 TH1F *fHistd0rphiITSMIoneSPDInAcc150200MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP150200MC->Clone("fHistd0rphiITSMIoneSPDInAcc150200MC");
885 fHistd0rphiITSMIoneSPDInAcc150200MC->Add(fHistd0rphiITSMIoneSPDInAccS150200MC);
886 fHistd0rphiITSMIoneSPDInAcc150200MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc150200MC->GetEntries());
8fa56655 887 TH1F *fHistd0rphiITSMIoneSPDInAcc350450MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP350450MC->Clone("fHistd0rphiITSMIoneSPDInAcc350450MC");
888 fHistd0rphiITSMIoneSPDInAcc350450MC->Add(fHistd0rphiITSMIoneSPDInAccS350450MC);
889 fHistd0rphiITSMIoneSPDInAcc350450MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc350450MC->GetEntries());
fa516524 890 TH1F *fHistd0rphiITSMIoneSPDInAcc500700MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP500700MC->Clone("fHistd0rphiITSMIoneSPDInAcc500700MC");
891 fHistd0rphiITSMIoneSPDInAcc500700MC->Add(fHistd0rphiITSMIoneSPDInAccS500700MC);
892 fHistd0rphiITSMIoneSPDInAcc500700MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc500700MC->GetEntries());
893 TH1F *fHistd0rphiITSMIoneSPDInAcc10001500MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP10001500MC->Clone("fHistd0rphiITSMIoneSPDInAcc10001500MC");
894 fHistd0rphiITSMIoneSPDInAcc10001500MC->Add(fHistd0rphiITSMIoneSPDInAccS10001500MC);
895 fHistd0rphiITSMIoneSPDInAcc10001500MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc10001500MC->GetEntries());
8fa56655 896 TH1F *fHistd0rphiITSMIoneSPDInAcc25004000MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP25004000MC->Clone("fHistd0rphiITSMIoneSPDInAcc25004000MC");
fa516524 897 fHistd0rphiITSMIoneSPDInAcc25004000MC->Add(fHistd0rphiITSMIoneSPDInAccS25004000MC);
898 fHistd0rphiITSMIoneSPDInAcc25004000MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc25004000MC->GetEntries());
899 TH1F *fHistd0rphiITSMIoneSPDInAcc40008000MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP40008000MC->Clone("fHistd0rphiITSMIoneSPDInAcc40008000MC");
900 fHistd0rphiITSMIoneSPDInAcc40008000MC->Add(fHistd0rphiITSMIoneSPDInAccS40008000MC);
901 fHistd0rphiITSMIoneSPDInAcc40008000MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc40008000MC->GetEntries());
8fa56655 902
fa516524 903
8fa56655 904 TFile *f= new TFile("ITS.Performance_117048_117223_pass1.root");
fa516524 905
906 TList *list=(TList*)f->Get("cOutputITS");
907 TH1F *fHistd0rphiITSMIoneSPDInAccP150200 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
908 TH1F *fHistd0rphiITSMIoneSPDInAccS150200 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
8fa56655 909 TH1F *fHistd0rphiITSMIoneSPDInAccP350450 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP350450");
910 TH1F *fHistd0rphiITSMIoneSPDInAccS350450 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450");
fa516524 911 TH1F *fHistd0rphiITSMIoneSPDInAccP500700 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP500700");
912 TH1F *fHistd0rphiITSMIoneSPDInAccS500700 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700");
913 TH1F *fHistd0rphiITSMIoneSPDInAccP10001500 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP10001500");
914 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500");
8fa56655 915 TH1F *fHistd0rphiITSMIoneSPDInAccP25004000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP25004000");
fa516524 916 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000");
917 TH1F *fHistd0rphiITSMIoneSPDInAccP40008000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP40008000");
8fa56655 918 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000");
fa516524 919 TH1F *fHistd0rphiITSMIoneSPDInAcc150200=(TH1F*)fHistd0rphiITSMIoneSPDInAccP150200->Clone("fHistd0rphiITSMIoneSPDInAcc150200");
920 fHistd0rphiITSMIoneSPDInAcc150200->Add(fHistd0rphiITSMIoneSPDInAccS150200);
921 fHistd0rphiITSMIoneSPDInAcc150200->Scale(1./fHistd0rphiITSMIoneSPDInAcc150200->GetEntries());
8fa56655 922 TH1F *fHistd0rphiITSMIoneSPDInAcc350450=(TH1F*)fHistd0rphiITSMIoneSPDInAccP350450->Clone("fHistd0rphiITSMIoneSPDInAcc350450");
fa516524 923 fHistd0rphiITSMIoneSPDInAcc350450->Add(fHistd0rphiITSMIoneSPDInAccS350450);
8fa56655 924 fHistd0rphiITSMIoneSPDInAcc350450->Scale(1./fHistd0rphiITSMIoneSPDInAcc350450->GetEntries());
fa516524 925 TH1F *fHistd0rphiITSMIoneSPDInAcc500700=(TH1F*)fHistd0rphiITSMIoneSPDInAccP500700->Clone("fHistd0rphiITSMIoneSPDInAcc500700");
926 fHistd0rphiITSMIoneSPDInAcc500700->Add(fHistd0rphiITSMIoneSPDInAccS500700);
927 fHistd0rphiITSMIoneSPDInAcc500700->Scale(1./fHistd0rphiITSMIoneSPDInAcc500700->GetEntries());
928 TH1F *fHistd0rphiITSMIoneSPDInAcc10001500=(TH1F*)fHistd0rphiITSMIoneSPDInAccP10001500->Clone("fHistd0rphiITSMIoneSPDInAcc10001500");
929 fHistd0rphiITSMIoneSPDInAcc10001500->Add(fHistd0rphiITSMIoneSPDInAccS10001500);
930 fHistd0rphiITSMIoneSPDInAcc10001500->Scale(1./fHistd0rphiITSMIoneSPDInAcc10001500->GetEntries());
8fa56655 931 TH1F *fHistd0rphiITSMIoneSPDInAcc25004000=(TH1F*)fHistd0rphiITSMIoneSPDInAccP25004000->Clone("fHistd0rphiITSMIoneSPDInAcc25004000");
fa516524 932 fHistd0rphiITSMIoneSPDInAcc25004000->Add(fHistd0rphiITSMIoneSPDInAccS25004000);
933 fHistd0rphiITSMIoneSPDInAcc25004000->Scale(1./fHistd0rphiITSMIoneSPDInAcc25004000->GetEntries());
934 TH1F *fHistd0rphiITSMIoneSPDInAcc40008000=(TH1F*)fHistd0rphiITSMIoneSPDInAccP40008000->Clone("fHistd0rphiITSMIoneSPDInAcc40008000");
935 fHistd0rphiITSMIoneSPDInAcc40008000->Add(fHistd0rphiITSMIoneSPDInAccS40008000);
8fa56655 936 fHistd0rphiITSMIoneSPDInAcc40008000->Scale(1./fHistd0rphiITSMIoneSPDInAcc40008000->GetEntries());
fa516524 937
938
939 TCanvas *c1 = new TCanvas("c1","c1");
940 c1->Divide(3,2);
941 c1->cd(1);
942 fHistd0rphiITSMIoneSPDInAcc150200MC->Rebin(rebin);
943 fHistd0rphiITSMIoneSPDInAcc150200->Rebin(rebin);
944 fHistd0rphiITSMIoneSPDInAcc150200MC->SetLineColor(2);
945 fHistd0rphiITSMIoneSPDInAcc150200MC->Draw();
946 fHistd0rphiITSMIoneSPDInAcc150200->SetLineColor(4);
947 fHistd0rphiITSMIoneSPDInAcc150200->Draw("same");
8fa56655 948 c1->cd(2);
fa516524 949 fHistd0rphiITSMIoneSPDInAcc350450MC->Rebin(rebin);
950 fHistd0rphiITSMIoneSPDInAcc350450->Rebin(rebin);
951 fHistd0rphiITSMIoneSPDInAcc350450MC->SetLineColor(2);
952 fHistd0rphiITSMIoneSPDInAcc350450MC->Draw();
953 fHistd0rphiITSMIoneSPDInAcc350450->SetLineColor(4);
8fa56655 954 fHistd0rphiITSMIoneSPDInAcc350450->Draw("same");
fa516524 955 c1->cd(3);
956 fHistd0rphiITSMIoneSPDInAcc500700MC->Rebin(rebin);
957 fHistd0rphiITSMIoneSPDInAcc500700->Rebin(rebin);
958 fHistd0rphiITSMIoneSPDInAcc500700MC->SetLineColor(2);
959 fHistd0rphiITSMIoneSPDInAcc500700MC->Draw();
960 fHistd0rphiITSMIoneSPDInAcc500700->SetLineColor(4);
961 fHistd0rphiITSMIoneSPDInAcc500700->Draw("same");
962 c1->cd(4);
963 fHistd0rphiITSMIoneSPDInAcc10001500MC->Rebin(rebin);
964 fHistd0rphiITSMIoneSPDInAcc10001500->Rebin(rebin);
965 fHistd0rphiITSMIoneSPDInAcc10001500MC->SetLineColor(2);
966 fHistd0rphiITSMIoneSPDInAcc10001500MC->Draw();
967 fHistd0rphiITSMIoneSPDInAcc10001500->SetLineColor(4);
968 fHistd0rphiITSMIoneSPDInAcc10001500->Draw("same");
8fa56655 969 c1->cd(5);
fa516524 970 fHistd0rphiITSMIoneSPDInAcc25004000MC->Rebin(rebin);
971 fHistd0rphiITSMIoneSPDInAcc25004000->Rebin(rebin);
972 fHistd0rphiITSMIoneSPDInAcc25004000MC->SetLineColor(2);
973 fHistd0rphiITSMIoneSPDInAcc25004000MC->Draw();
974 fHistd0rphiITSMIoneSPDInAcc25004000->SetLineColor(4);
975 fHistd0rphiITSMIoneSPDInAcc25004000->Draw("same");
976 c1->cd(6);
977 fHistd0rphiITSMIoneSPDInAcc40008000MC->Rebin(rebin);
978 fHistd0rphiITSMIoneSPDInAcc40008000->Rebin(rebin);
979 fHistd0rphiITSMIoneSPDInAcc40008000MC->SetLineColor(2);
980 fHistd0rphiITSMIoneSPDInAcc40008000MC->Draw();
981 fHistd0rphiITSMIoneSPDInAcc40008000->SetLineColor(4);
982 fHistd0rphiITSMIoneSPDInAcc40008000->Draw("same");
8fa56655 983
984
fa516524 985 TCanvas *c1a = new TCanvas("c1a","c1a");
986 c1a->Divide(3,1);
987 c1a->cd(1);
988 TH1F* fHistd0rphiITSMIoneSPDInAcc150200Ratio=(TH1F*)fHistd0rphiITSMIoneSPDInAcc150200->Clone("fHistd0rphiITSMIoneSPDInAcc150200Ratio");
989 fHistd0rphiITSMIoneSPDInAcc150200Ratio->Divide(fHistd0rphiITSMIoneSPDInAcc150200MC);
990 fHistd0rphiITSMIoneSPDInAcc150200Ratio->Draw();
991 c1a->cd(2);
992 TH1F* fHistd0rphiITSMIoneSPDInAcc500700Ratio=(TH1F*)fHistd0rphiITSMIoneSPDInAcc500700->Clone("fHistd0rphiITSMIoneSPDInAcc500700Ratio");
993 fHistd0rphiITSMIoneSPDInAcc500700Ratio->Divide(fHistd0rphiITSMIoneSPDInAcc500700MC);
994 fHistd0rphiITSMIoneSPDInAcc500700Ratio->Draw();
995 c1a->cd(3);
996 TH1F* fHistd0rphiITSMIoneSPDInAcc10001500Ratio=(TH1F*)fHistd0rphiITSMIoneSPDInAcc10001500->Clone("fHistd0rphiITSMIoneSPDInAcc10001500Ratio");
997 fHistd0rphiITSMIoneSPDInAcc10001500Ratio->Divide(fHistd0rphiITSMIoneSPDInAcc10001500MC);
998 fHistd0rphiITSMIoneSPDInAcc10001500Ratio->Draw();
999
1000
1001
1002 TCanvas *c2 = new TCanvas("c2","c2");
1003 c2->Divide(3,2);
1004 c2_1->SetLogy();
1005 c2_2->SetLogy();
1006 c2_3->SetLogy();
1007 c2_4->SetLogy();
1008 c2_5->SetLogy();
1009 c2_6->SetLogy();
1010 c2->cd(1);
1011 fHistd0rphiITSMIoneSPDInAccP150200MC->SetMinimum(1);
1012 fHistd0rphiITSMIoneSPDInAccS150200MC->SetMinimum(1);
1013 fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->SetMinimum(1);
1014 fHistd0rphiITSMIoneSPDInAccS150200fromMatMC->SetMinimum(1);
1015 fHistd0rphiITSMIoneSPDInAccP150200MC->SetLineColor(1);
1016 fHistd0rphiITSMIoneSPDInAccP150200MC->Draw();
1017 fHistd0rphiITSMIoneSPDInAccS150200MC->SetLineColor(6);
1018 fHistd0rphiITSMIoneSPDInAccS150200MC->Draw("same");
1019 fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->SetLineColor(8);
1020 fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->Draw("same");
1021 fHistd0rphiITSMIoneSPDInAccS150200fromMatMC->SetLineColor(9);
1022 fHistd0rphiITSMIoneSPDInAccS150200fromMatMC->Draw("same");
8fa56655 1023 c2->cd(2);
fa516524 1024 fHistd0rphiITSMIoneSPDInAccP350450MC->SetMinimum(1);
1025 fHistd0rphiITSMIoneSPDInAccS350450MC->SetMinimum(1);
1026 fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->SetMinimum(1);
1027 fHistd0rphiITSMIoneSPDInAccS350450fromMatMC->SetMinimum(1);
1028 fHistd0rphiITSMIoneSPDInAccP350450MC->SetLineColor(1);
1029 fHistd0rphiITSMIoneSPDInAccP350450MC->Draw();
1030 fHistd0rphiITSMIoneSPDInAccS350450MC->SetLineColor(6);
1031 fHistd0rphiITSMIoneSPDInAccS350450MC->Draw("same");
1032 fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->SetLineColor(8);
1033 fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->Draw("same");
1034 fHistd0rphiITSMIoneSPDInAccS350450fromMatMC->SetLineColor(9);
8fa56655 1035 fHistd0rphiITSMIoneSPDInAccS350450fromMatMC->Draw("same");
fa516524 1036 c2->cd(3);
1037 fHistd0rphiITSMIoneSPDInAccP500700MC->SetMinimum(1);
1038 fHistd0rphiITSMIoneSPDInAccS500700MC->SetMinimum(1);
1039 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetMinimum(1);
1040 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->SetMinimum(1);
1041 fHistd0rphiITSMIoneSPDInAccP500700MC->SetLineColor(1);
1042 fHistd0rphiITSMIoneSPDInAccP500700MC->Draw();
1043 fHistd0rphiITSMIoneSPDInAccS500700MC->SetLineColor(6);
1044 fHistd0rphiITSMIoneSPDInAccS500700MC->Draw("same");
1045 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetLineColor(8);
1046 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->Draw("same");
1047 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->SetLineColor(9);
1048 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->Draw("same");
1049 c2->cd(4);
1050 fHistd0rphiITSMIoneSPDInAccP10001500MC->SetMinimum(1);
1051 fHistd0rphiITSMIoneSPDInAccS10001500MC->SetMinimum(1);
1052 fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->SetMinimum(1);
1053 fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC->SetMinimum(1);
1054 fHistd0rphiITSMIoneSPDInAccP10001500MC->SetLineColor(1);
1055 fHistd0rphiITSMIoneSPDInAccP10001500MC->Draw();
1056 fHistd0rphiITSMIoneSPDInAccS10001500MC->SetLineColor(6);
1057 fHistd0rphiITSMIoneSPDInAccS10001500MC->Draw("same");
1058 fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->SetLineColor(8);
1059 fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->Draw("same");
1060 fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC->SetLineColor(9);
1061 fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC->Draw("same");
fa516524 1062 c2->cd(5);
1063 fHistd0rphiITSMIoneSPDInAccP25004000MC->SetMinimum(1);
1064 fHistd0rphiITSMIoneSPDInAccS25004000MC->SetMinimum(1);
1065 fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->SetMinimum(1);
1066 fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC->SetMinimum(1);
1067 fHistd0rphiITSMIoneSPDInAccP25004000MC->SetLineColor(1);
1068 fHistd0rphiITSMIoneSPDInAccP25004000MC->Draw();
1069 fHistd0rphiITSMIoneSPDInAccS25004000MC->SetLineColor(6);
1070 fHistd0rphiITSMIoneSPDInAccS25004000MC->Draw("same");
1071 fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->SetLineColor(8);
1072 fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->Draw("same");
1073 fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC->SetLineColor(9);
1074 fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC->Draw("same");
1075 c2->cd(6);
1076 fHistd0rphiITSMIoneSPDInAccP40008000MC->SetMinimum(1);
1077 fHistd0rphiITSMIoneSPDInAccS40008000MC->SetMinimum(1);
1078 fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->SetMinimum(1);
1079 fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC->SetMinimum(1);
1080 fHistd0rphiITSMIoneSPDInAccP40008000MC->SetLineColor(1);
1081 fHistd0rphiITSMIoneSPDInAccP40008000MC->Draw();
1082 fHistd0rphiITSMIoneSPDInAccS40008000MC->SetLineColor(6);
1083 fHistd0rphiITSMIoneSPDInAccS40008000MC->Draw("same");
1084 fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->SetLineColor(8);
1085 fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->Draw("same");
1086 fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC->SetLineColor(9);
1087 fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC->Draw("same");
8fa56655 1088
fa516524 1089 TCanvas *c2b = new TCanvas("c2b","c2b");
1090 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetMinimum(1);
1091 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetLineColor(8);
1092 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->Draw();
1093 fHistd0rphiITSMIoneSPDInAccS500700from310MC->SetMinimum(1);
1094 fHistd0rphiITSMIoneSPDInAccS500700from310MC->SetLineColor(2);
1095 fHistd0rphiITSMIoneSPDInAccS500700from310MC->Draw("same");
1096 fHistd0rphiITSMIoneSPDInAccS500700from321MC->SetMinimum(1);
1097 fHistd0rphiITSMIoneSPDInAccS500700from321MC->SetLineColor(5);
1098 fHistd0rphiITSMIoneSPDInAccS500700from321MC->Draw("same");
1099 fHistd0rphiITSMIoneSPDInAccS500700from3122MC->SetMinimum(1);
1100 fHistd0rphiITSMIoneSPDInAccS500700from3122MC->SetLineColor(1);
1101 fHistd0rphiITSMIoneSPDInAccS500700from3122MC->Draw("same");
1102
1103 TCanvas *c2c = new TCanvas("c2c","c2c");
1104 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->SetMinimum(1);
1105 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->Draw();
1106 fHistd0rphiITSMIoneSPDInAccS500700from211MC->SetMinimum(1);
1107 fHistd0rphiITSMIoneSPDInAccS500700from211MC->SetLineColor(2);
1108 fHistd0rphiITSMIoneSPDInAccS500700from211MC->Draw("same");
1109 fHistd0rphiITSMIoneSPDInAccS500700from22MC->SetMinimum(1);
1110 fHistd0rphiITSMIoneSPDInAccS500700from22MC->SetLineColor(1);
1111 fHistd0rphiITSMIoneSPDInAccS500700from22MC->Draw("same");
1112
1113
1114
1115 TCanvas *c3 = new TCanvas("c3","c3");
1116 c3->Divide(3,2);
1117 c3_1->SetLogx();
1118 c3_2->SetLogx();
1119 c3_3->SetLogx();
1120 c3_4->SetLogx();
1121 c3_5->SetLogx();
1122 c3_6->SetLogx();
1123 Float_t d0cut[15]={0.0301,0.0401,0.0501,0.0601,0.0801,0.101,0.151,0.201,0.251,0.301,0.401,0.601,0.801,1.001,1.401};
8fa56655 1124
fa516524 1125 c3->cd(1);
1126 Float_t fracP150200[15],fracS150200[15],fracSfromStrange150200[15],fracS150200Strp30[15],fracS150200Strm30[15],fracS150200Matm10[15],fracS150200Matp10[15];
1127 Float_t intPtot150200=fHistd0rphiITSMIoneSPDInAccP150200MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP150200MC->GetNbinsX());
1128 for(Int_t i=0;i<15;i++) {
1129 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP150200MC->FindBin(-d0cut[i]);
1130 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP150200MC->FindBin(+d0cut[i]);
1131 Float_t intPcut150200=fHistd0rphiITSMIoneSPDInAccP150200MC->Integral(bin1,bin2);
1132 Float_t intScut150200=fHistd0rphiITSMIoneSPDInAccS150200MC->Integral(bin1,bin2);
1133 Float_t intSfromStrangecut150200=fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->Integral(bin1,bin2);
1134 Float_t intScut150200Strp30 = intScut150200 + 0.3*intSfromStrangecut150200;
1135 Float_t intScut150200Strm30 = intScut150200 - 0.3*intSfromStrangecut150200;
1136 Float_t intScut150200Matp10 = intScut150200 + 0.1*(intScut150200-intSfromStrangecut150200);
1137 Float_t intScut150200Matm10 = intScut150200 - 0.1*(intScut150200-intSfromStrangecut150200);
1138 fracP150200[i]=intPcut150200/intPtot150200;
1139 fracS150200[i]=1.-intScut150200/(intPcut150200+intScut150200);
1140 fracS150200Strp30[i]=1.-intScut150200Strp30/(intPcut150200+intScut150200Strp30);
1141 fracS150200Strm30[i]=1.-intScut150200Strm30/(intPcut150200+intScut150200Strm30);
1142 fracS150200Matp10[i]=1.-intScut150200Matp10/(intPcut150200+intScut150200Matp10);
1143 fracS150200Matm10[i]=1.-intScut150200Matm10/(intPcut150200+intScut150200Matm10);
1144 fracSfromStrange150200[i]=1.-intSfromStrangecut150200/(intPcut150200+intScut150200);
1145 }
1146 TGraph *gfracP150200=new TGraph(15,d0cut,fracP150200);
1147 gfracP150200->SetMarkerColor(2);
1148 gfracP150200->SetMarkerStyle(20);
1149 gfracP150200->Draw("ap");
1150 TGraph *gfracS150200=new TGraph(15,d0cut,fracS150200);
1151 gfracS150200->SetMarkerColor(4);
1152 gfracS150200->SetMarkerStyle(21);
1153 gfracS150200->Draw("p");
1154 TGraph *gfracSfromStrange150200=new TGraph(15,d0cut,fracSfromStrange150200);
1155 gfracSfromStrange150200->SetMarkerColor(8);
1156 gfracSfromStrange150200->SetMarkerStyle(22);
8fa56655 1157 gfracSfromStrange150200->Draw("p");
1158
fa516524 1159 c3->cd(2);
1160 Float_t fracP350450[15],fracS350450[15],fracSfromStrange350450[15],fracS350450Strp30[15],fracS350450Strm30[15],fracS350450Matm10[15],fracS350450Matp10[15];
1161 Float_t intPtot350450=fHistd0rphiITSMIoneSPDInAccP350450MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP350450MC->GetNbinsX());
1162 for(Int_t i=0;i<15;i++) {
1163 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP350450MC->FindBin(-d0cut[i]);
1164 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP350450MC->FindBin(+d0cut[i]);
1165 Float_t intPcut350450=fHistd0rphiITSMIoneSPDInAccP350450MC->Integral(bin1,bin2);
1166 Float_t intScut350450=fHistd0rphiITSMIoneSPDInAccS350450MC->Integral(bin1,bin2);
1167 Float_t intSfromStrangecut350450=fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->Integral(bin1,bin2);
1168 Float_t intScut350450Strp30 = intScut350450 + 0.3*intSfromStrangecut350450;
1169 Float_t intScut350450Strm30 = intScut350450 - 0.3*intSfromStrangecut350450;
1170 Float_t intScut350450Matp10 = intScut350450 + 0.1*(intScut350450-intSfromStrangecut350450);
1171 Float_t intScut350450Matm10 = intScut350450 - 0.1*(intScut350450-intSfromStrangecut350450);
1172 fracP350450[i]=intPcut350450/intPtot350450;
1173 fracS350450[i]=1.-intScut350450/(intPcut350450+intScut350450);
1174 fracS350450Strp30[i]=1.-intScut350450Strp30/(intPcut350450+intScut350450Strp30);
1175 fracS350450Strm30[i]=1.-intScut350450Strm30/(intPcut350450+intScut350450Strm30);
1176 fracS350450Matp10[i]=1.-intScut350450Matp10/(intPcut350450+intScut350450Matp10);
1177 fracS350450Matm10[i]=1.-intScut350450Matm10/(intPcut350450+intScut350450Matm10);
1178 fracSfromStrange350450[i]=1.-intSfromStrangecut350450/(intPcut350450+intScut350450);
1179 }
1180 TGraph *gfracP350450=new TGraph(15,d0cut,fracP350450);
1181 gfracP350450->SetMarkerColor(2);
1182 gfracP350450->SetMarkerStyle(20);
1183 gfracP350450->Draw("ap");
1184 TGraph *gfracS350450=new TGraph(15,d0cut,fracS350450);
1185 gfracS350450->SetMarkerColor(4);
1186 gfracS350450->SetMarkerStyle(21);
1187 gfracS350450->Draw("p");
1188 TGraph *gfracSfromStrange350450=new TGraph(15,d0cut,fracSfromStrange350450);
1189 gfracSfromStrange350450->SetMarkerColor(8);
1190 gfracSfromStrange350450->SetMarkerStyle(22);
1191 gfracSfromStrange350450->Draw("p");
8fa56655 1192
fa516524 1193 c3->cd(3);
1194 Float_t fracP500700[15],fracS500700[15],fracSfromStrange500700[15],fracS500700Strp30[15],fracS500700Strm30[15],fracS500700Matm10[15],fracS500700Matp10[15];
1195 Float_t intPtot500700=fHistd0rphiITSMIoneSPDInAccP500700MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP500700MC->GetNbinsX());
1196 for(Int_t i=0;i<15;i++) {
1197 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP500700MC->FindBin(-d0cut[i]);
1198 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP500700MC->FindBin(+d0cut[i]);
1199 Float_t intPcut500700=fHistd0rphiITSMIoneSPDInAccP500700MC->Integral(bin1,bin2);
1200 Float_t intScut500700=fHistd0rphiITSMIoneSPDInAccS500700MC->Integral(bin1,bin2);
1201 Float_t intSfromStrangecut500700=fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->Integral(bin1,bin2);
1202 Float_t intScut500700Strp30 = intScut500700 + 0.3*intSfromStrangecut500700;
1203 Float_t intScut500700Strm30 = intScut500700 - 0.3*intSfromStrangecut500700;
1204 Float_t intScut500700Matp10 = intScut500700 + 0.1*(intScut500700-intSfromStrangecut500700);
1205 Float_t intScut500700Matm10 = intScut500700 - 0.1*(intScut500700-intSfromStrangecut500700);
1206 fracP500700[i]=intPcut500700/intPtot500700;
1207 fracS500700[i]=1.-intScut500700/(intPcut500700+intScut500700);
1208 fracS500700Strp30[i]=1.-intScut500700Strp30/(intPcut500700+intScut500700Strp30);
1209 fracS500700Strm30[i]=1.-intScut500700Strm30/(intPcut500700+intScut500700Strm30);
1210 fracS500700Matp10[i]=1.-intScut500700Matp10/(intPcut500700+intScut500700Matp10);
1211 fracS500700Matm10[i]=1.-intScut500700Matm10/(intPcut500700+intScut500700Matm10);
1212 fracSfromStrange500700[i]=1.-intSfromStrangecut500700/(intPcut500700+intScut500700);
1213 }
1214 TGraph *gfracP500700=new TGraph(15,d0cut,fracP500700);
1215 gfracP500700->SetMarkerColor(2);
1216 gfracP500700->SetMarkerStyle(20);
1217 gfracP500700->Draw("ap");
1218 TGraph *gfracS500700=new TGraph(15,d0cut,fracS500700);
1219 gfracS500700->SetMarkerColor(4);
1220 gfracS500700->SetMarkerStyle(21);
1221 gfracS500700->Draw("p");
1222 TGraph *gfracSfromStrange500700=new TGraph(15,d0cut,fracSfromStrange500700);
1223 gfracSfromStrange500700->SetMarkerColor(8);
1224 gfracSfromStrange500700->SetMarkerStyle(22);
1225 gfracSfromStrange500700->Draw("p");
1226
1227 c3->cd(4);
1228 Float_t fracP10001500[15],fracS10001500[15],fracSfromStrange10001500[15],fracS10001500Strp30[15],fracS10001500Strm30[15],fracS10001500Matm10[15],fracS10001500Matp10[15];
1229 Float_t intPtot10001500=fHistd0rphiITSMIoneSPDInAccP10001500MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP10001500MC->GetNbinsX());
1230 for(Int_t i=0;i<15;i++) {
1231 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP10001500MC->FindBin(-d0cut[i]);
1232 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP10001500MC->FindBin(+d0cut[i]);
1233 Float_t intPcut10001500=fHistd0rphiITSMIoneSPDInAccP10001500MC->Integral(bin1,bin2);
1234 Float_t intScut10001500=fHistd0rphiITSMIoneSPDInAccS10001500MC->Integral(bin1,bin2);
1235 Float_t intSfromStrangecut10001500=fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->Integral(bin1,bin2);
1236 Float_t intScut10001500Strp30 = intScut10001500 + 0.3*intSfromStrangecut10001500;
1237 Float_t intScut10001500Strm30 = intScut10001500 - 0.3*intSfromStrangecut10001500;
1238 Float_t intScut10001500Matp10 = intScut10001500 + 0.1*(intScut10001500-intSfromStrangecut10001500);
1239 Float_t intScut10001500Matm10 = intScut10001500 - 0.1*(intScut10001500-intSfromStrangecut10001500);
1240 fracP10001500[i]=intPcut10001500/intPtot10001500;
1241 fracS10001500[i]=1.-intScut10001500/(intPcut10001500+intScut10001500);
1242 fracS10001500Strp30[i]=1.-intScut10001500Strp30/(intPcut10001500+intScut10001500Strp30);
1243 fracS10001500Strm30[i]=1.-intScut10001500Strm30/(intPcut10001500+intScut10001500Strm30);
1244 fracS10001500Matp10[i]=1.-intScut10001500Matp10/(intPcut10001500+intScut10001500Matp10);
1245 fracS10001500Matm10[i]=1.-intScut10001500Matm10/(intPcut10001500+intScut10001500Matm10);
1246 fracSfromStrange10001500[i]=1.-intSfromStrangecut10001500/(intPcut10001500+intScut10001500);
1247 }
1248 TGraph *gfracP10001500=new TGraph(15,d0cut,fracP10001500);
1249 gfracP10001500->SetMarkerColor(2);
1250 gfracP10001500->SetMarkerStyle(20);
1251 gfracP10001500->Draw("ap");
1252 TGraph *gfracS10001500=new TGraph(15,d0cut,fracS10001500);
1253 gfracS10001500->SetMarkerColor(4);
1254 gfracS10001500->SetMarkerStyle(21);
1255 gfracS10001500->Draw("p");
1256 TGraph *gfracSfromStrange10001500=new TGraph(15,d0cut,fracSfromStrange10001500);
1257 gfracSfromStrange10001500->SetMarkerColor(8);
1258 gfracSfromStrange10001500->SetMarkerStyle(22);
1259 gfracSfromStrange10001500->Draw("p");
8fa56655 1260
fa516524 1261 c3->cd(5);
1262 Float_t fracP25004000[15],fracS25004000[15],fracSfromStrange25004000[15],fracS25004000Strp30[15],fracS25004000Strm30[15],fracS25004000Matm10[15],fracS25004000Matp10[15];
1263 Float_t intPtot25004000=fHistd0rphiITSMIoneSPDInAccP25004000MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP25004000MC->GetNbinsX());
1264 for(Int_t i=0;i<15;i++) {
1265 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP25004000MC->FindBin(-d0cut[i]);
1266 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP25004000MC->FindBin(+d0cut[i]);
1267 Float_t intPcut25004000=fHistd0rphiITSMIoneSPDInAccP25004000MC->Integral(bin1,bin2);
1268 Float_t intScut25004000=fHistd0rphiITSMIoneSPDInAccS25004000MC->Integral(bin1,bin2);
1269 Float_t intSfromStrangecut25004000=fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->Integral(bin1,bin2);
1270 Float_t intScut25004000Strp30 = intScut25004000 + 0.3*intSfromStrangecut25004000;
1271 Float_t intScut25004000Strm30 = intScut25004000 - 0.3*intSfromStrangecut25004000;
1272 Float_t intScut25004000Matp10 = intScut25004000 + 0.1*(intScut25004000-intSfromStrangecut25004000);
1273 Float_t intScut25004000Matm10 = intScut25004000 - 0.1*(intScut25004000-intSfromStrangecut25004000);
1274 fracP25004000[i]=intPcut25004000/intPtot25004000;
1275 fracS25004000[i]=1.-intScut25004000/(intPcut25004000+intScut25004000);
1276 fracS25004000Strp30[i]=1.-intScut25004000Strp30/(intPcut25004000+intScut25004000Strp30);
1277 fracS25004000Strm30[i]=1.-intScut25004000Strm30/(intPcut25004000+intScut25004000Strm30);
1278 fracS25004000Matp10[i]=1.-intScut25004000Matp10/(intPcut25004000+intScut25004000Matp10);
1279 fracS25004000Matm10[i]=1.-intScut25004000Matm10/(intPcut25004000+intScut25004000Matm10);
1280 fracSfromStrange25004000[i]=1.-intSfromStrangecut25004000/(intPcut25004000+intScut25004000);
1281 }
1282 TGraph *gfracP25004000=new TGraph(15,d0cut,fracP25004000);
1283 gfracP25004000->SetMarkerColor(2);
1284 gfracP25004000->SetMarkerStyle(20);
1285 gfracP25004000->Draw("ap");
1286 TGraph *gfracS25004000=new TGraph(15,d0cut,fracS25004000);
1287 gfracS25004000->SetMarkerColor(4);
1288 gfracS25004000->SetMarkerStyle(21);
1289 gfracS25004000->Draw("p");
1290 TGraph *gfracSfromStrange25004000=new TGraph(15,d0cut,fracSfromStrange25004000);
1291 gfracSfromStrange25004000->SetMarkerColor(8);
1292 gfracSfromStrange25004000->SetMarkerStyle(22);
1293 gfracSfromStrange25004000->Draw("p");
1294
1295 c3->cd(6);
1296 Float_t fracP40008000[15],fracS40008000[15],fracSfromStrange40008000[15],fracS40008000Strp30[15],fracS40008000Strm30[15],fracS40008000Matm10[15],fracS40008000Matp10[15];
1297 Float_t intPtot40008000=fHistd0rphiITSMIoneSPDInAccP40008000MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP40008000MC->GetNbinsX());
1298 for(Int_t i=0;i<15;i++) {
1299 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP40008000MC->FindBin(-d0cut[i]);
1300 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP40008000MC->FindBin(+d0cut[i]);
1301 Float_t intPcut40008000=fHistd0rphiITSMIoneSPDInAccP40008000MC->Integral(bin1,bin2);
1302 Float_t intScut40008000=fHistd0rphiITSMIoneSPDInAccS40008000MC->Integral(bin1,bin2);
1303 Float_t intSfromStrangecut40008000=fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->Integral(bin1,bin2);
1304 Float_t intScut40008000Strp30 = intScut40008000 + 0.3*intSfromStrangecut40008000;
1305 Float_t intScut40008000Strm30 = intScut40008000 - 0.3*intSfromStrangecut40008000;
1306 Float_t intScut40008000Matp10 = intScut40008000 + 0.1*(intScut40008000-intSfromStrangecut40008000);
1307 Float_t intScut40008000Matm10 = intScut40008000 - 0.1*(intScut40008000-intSfromStrangecut40008000);
1308 fracP40008000[i]=intPcut40008000/intPtot40008000;
1309 fracS40008000[i]=1.-intScut40008000/(intPcut40008000+intScut40008000);
1310 fracS40008000Strp30[i]=1.-intScut40008000Strp30/(intPcut40008000+intScut40008000Strp30);
1311 fracS40008000Strm30[i]=1.-intScut40008000Strm30/(intPcut40008000+intScut40008000Strm30);
1312 fracS40008000Matp10[i]=1.-intScut40008000Matp10/(intPcut40008000+intScut40008000Matp10);
1313 fracS40008000Matm10[i]=1.-intScut40008000Matm10/(intPcut40008000+intScut40008000Matm10);
1314 fracSfromStrange40008000[i]=1.-intSfromStrangecut40008000/(intPcut40008000+intScut40008000);
1315 }
1316 TGraph *gfracP40008000=new TGraph(15,d0cut,fracP40008000);
1317 gfracP40008000->SetMarkerColor(2);
1318 gfracP40008000->SetMarkerStyle(20);
1319 gfracP40008000->Draw("ap");
1320 TGraph *gfracS40008000=new TGraph(15,d0cut,fracS40008000);
1321 gfracS40008000->SetMarkerColor(4);
1322 gfracS40008000->SetMarkerStyle(21);
1323 gfracS40008000->Draw("p");
1324 TGraph *gfracSfromStrange40008000=new TGraph(15,d0cut,fracSfromStrange40008000);
1325 gfracSfromStrange40008000->SetMarkerColor(8);
1326 gfracSfromStrange40008000->SetMarkerStyle(22);
1327 gfracSfromStrange40008000->Draw("p");
fa516524 1328
8fa56655 1329
fa516524 1330 TCanvas *c4 = new TCanvas("c4","c4");
1331 c4->Divide(3,1);
1332 c4_1->SetLogx();
1333 c4_2->SetLogx();
1334 c4_3->SetLogx();
1335
1336 c4->cd(1);
1337 Float_t intDatacut150200[15],intDataPcut150200[15],intDataPall150200[15];
1338 for(Int_t i=0;i<15;i++) {
1339 Int_t bin1=fHistd0rphiITSMIoneSPDInAcc150200->FindBin(-d0cut[i]);
1340 Int_t bin2=fHistd0rphiITSMIoneSPDInAcc150200->FindBin(+d0cut[i]);
1341 intDatacut150200[i]=fHistd0rphiITSMIoneSPDInAcc150200->Integral(bin1,bin2);
1342 intDataPcut150200[i]=intDatacut150200[i]*fracS150200[i];
1343 intDataPall150200[i]=intDataPcut150200[i]/fracP150200[i];
1344 }
1345 TGraph *gintDatacut150200=new TGraph(15,d0cut,intDatacut150200);
1346 gintDatacut150200->SetMarkerColor(1);
1347 gintDatacut150200->SetMarkerStyle(20);
1348 gintDatacut150200->Draw("ap");
1349 TGraph *gintDataPcut150200=new TGraph(15,d0cut,intDataPcut150200);
1350 gintDataPcut150200->SetMarkerColor(1);
1351 gintDataPcut150200->SetMarkerStyle(24);
1352 gintDataPcut150200->Draw("p");
1353 TGraph *gintDataPall150200=new TGraph(15,d0cut,intDataPall150200);
1354 gintDataPall150200->SetMarkerColor(2);
1355 gintDataPall150200->SetMarkerStyle(22);
1356 gintDataPall150200->Draw("p");
1357
1358 c4->cd(2);
1359 Float_t intDatacut500700[15],intDataPcut500700[15],intDataPall500700[15];
1360 for(Int_t i=0;i<15;i++) {
1361 Int_t bin1=fHistd0rphiITSMIoneSPDInAcc500700->FindBin(-d0cut[i]);
1362 Int_t bin2=fHistd0rphiITSMIoneSPDInAcc500700->FindBin(+d0cut[i]);
1363 intDatacut500700[i]=fHistd0rphiITSMIoneSPDInAcc500700->Integral(bin1,bin2);
1364 intDataPcut500700[i]=intDatacut500700[i]*fracS500700[i];
1365 intDataPall500700[i]=intDataPcut500700[i]/fracP500700[i];
1366 }
1367 TGraph *gintDatacut500700=new TGraph(15,d0cut,intDatacut500700);
1368 gintDatacut500700->SetMarkerColor(1);
1369 gintDatacut500700->SetMarkerStyle(20);
1370 gintDatacut500700->Draw("ap");
1371 TGraph *gintDataPcut500700=new TGraph(15,d0cut,intDataPcut500700);
1372 gintDataPcut500700->SetMarkerColor(1);
1373 gintDataPcut500700->SetMarkerStyle(24);
1374 gintDataPcut500700->Draw("p");
1375 TGraph *gintDataPall500700=new TGraph(15,d0cut,intDataPall500700);
1376 gintDataPall500700->SetMarkerColor(2);
1377 gintDataPall500700->SetMarkerStyle(22);
1378 gintDataPall500700->Draw("p");
1379
1380 c4->cd(3);
1381 Float_t intDatacut10001500[15],intDataPcut10001500[15],intDataPall10001500[15];
1382 for(Int_t i=0;i<15;i++) {
1383 Int_t bin1=fHistd0rphiITSMIoneSPDInAcc10001500->FindBin(-d0cut[i]);
1384 Int_t bin2=fHistd0rphiITSMIoneSPDInAcc10001500->FindBin(+d0cut[i]);
1385 intDatacut10001500[i]=fHistd0rphiITSMIoneSPDInAcc10001500->Integral(bin1,bin2);
1386 intDataPcut10001500[i]=intDatacut10001500[i]*fracS10001500[i];
1387 intDataPall10001500[i]=intDataPcut10001500[i]/fracP10001500[i];
1388 }
1389 TGraph *gintDatacut10001500=new TGraph(15,d0cut,intDatacut10001500);
1390 gintDatacut10001500->SetMarkerColor(1);
1391 gintDatacut10001500->SetMarkerStyle(20);
1392 gintDatacut10001500->Draw("ap");
1393 TGraph *gintDataPcut10001500=new TGraph(15,d0cut,intDataPcut10001500);
1394 gintDataPcut10001500->SetMarkerColor(1);
1395 gintDataPcut10001500->SetMarkerStyle(24);
1396 gintDataPcut10001500->Draw("p");
1397 TGraph *gintDataPall10001500=new TGraph(15,d0cut,intDataPall10001500);
1398 gintDataPall10001500->SetMarkerColor(2);
1399 gintDataPall10001500->SetMarkerStyle(22);
1400 gintDataPall10001500->Draw("p");
1401
1402
1403 TCanvas *c5 = new TCanvas("c5","c5");
1404 c5->Divide(3,1);
1405 c5_1->SetLogx();
1406 c5_2->SetLogx();
1407 c5_3->SetLogx();
1408
1409 c5->cd(1);
1410 Float_t intDataPall150200Strp30[15],intDataPall150200Strm30[15],intDataPall150200Matp10[15],intDataPall150200Matm10[15];
1411 for(Int_t i=0;i<15;i++) {
1412 intDataPall150200Strp30[i]=intDatacut150200[i]*fracS150200Strp30[i]/fracP150200[i];
1413 intDataPall150200Strm30[i]=intDatacut150200[i]*fracS150200Strm30[i]/fracP150200[i];
1414 intDataPall150200Matp10[i]=intDatacut150200[i]*fracS150200Matp10[i]/fracP150200[i];
1415 intDataPall150200Matm10[i]=intDatacut150200[i]*fracS150200Matm10[i]/fracP150200[i];
1416 }
1417 gintDataPall150200->Draw("ap");
1418
1419 TGraph *gintDataPall150200Strp30=new TGraph(15,d0cut,intDataPall150200Strp30);
1420 gintDataPall150200Strp30->SetMarkerColor(1);
1421 gintDataPall150200Strp30->SetMarkerStyle(22);
1422 gintDataPall150200Strp30->Draw("p");
1423 TGraph *gintDataPall150200Strm30=new TGraph(15,d0cut,intDataPall150200Strm30);
1424 gintDataPall150200Strm30->SetMarkerColor(1);
1425 gintDataPall150200Strm30->SetMarkerStyle(22);
1426 gintDataPall150200Strm30->Draw("p");
1427 TGraph *gintDataPall150200Matp10=new TGraph(15,d0cut,intDataPall150200Matp10);
1428 gintDataPall150200Matp10->SetMarkerColor(3);
1429 gintDataPall150200Matp10->SetMarkerStyle(22);
1430 gintDataPall150200Matp10->Draw("p");
1431 TGraph *gintDataPall150200Matm10=new TGraph(15,d0cut,intDataPall150200Matm10);
1432 gintDataPall150200Matm10->SetMarkerColor(3);
1433 gintDataPall150200Matm10->SetMarkerStyle(22);
1434 gintDataPall150200Matm10->Draw("p");
1435
1436 c5->cd(2);
1437 Float_t intDataPall500700Strp30[15],intDataPall500700Strm30[15],intDataPall500700Matp10[15],intDataPall500700Matm10[15];
1438 for(Int_t i=0;i<15;i++) {
1439 intDataPall500700Strp30[i]=intDatacut500700[i]*fracS500700Strp30[i]/fracP500700[i];
1440 intDataPall500700Strm30[i]=intDatacut500700[i]*fracS500700Strm30[i]/fracP500700[i];
1441 intDataPall500700Matp10[i]=intDatacut500700[i]*fracS500700Matp10[i]/fracP500700[i];
1442 intDataPall500700Matm10[i]=intDatacut500700[i]*fracS500700Matm10[i]/fracP500700[i];
1443 }
1444 gintDataPall500700->Draw("ap");
1445
1446 TGraph *gintDataPall500700Strp30=new TGraph(15,d0cut,intDataPall500700Strp30);
1447 gintDataPall500700Strp30->SetMarkerColor(1);
1448 gintDataPall500700Strp30->SetMarkerStyle(22);
1449 gintDataPall500700Strp30->Draw("p");
1450 TGraph *gintDataPall500700Strm30=new TGraph(15,d0cut,intDataPall500700Strm30);
1451 gintDataPall500700Strm30->SetMarkerColor(1);
1452 gintDataPall500700Strm30->SetMarkerStyle(22);
1453 gintDataPall500700Strm30->Draw("p");
1454 TGraph *gintDataPall500700Matp10=new TGraph(15,d0cut,intDataPall500700Matp10);
1455 gintDataPall500700Matp10->SetMarkerColor(3);
1456 gintDataPall500700Matp10->SetMarkerStyle(22);
1457 gintDataPall500700Matp10->Draw("p");
1458 TGraph *gintDataPall500700Matm10=new TGraph(15,d0cut,intDataPall500700Matm10);
1459 gintDataPall500700Matm10->SetMarkerColor(3);
1460 gintDataPall500700Matm10->SetMarkerStyle(22);
1461 gintDataPall500700Matm10->Draw("p");
1462
1463 c5->cd(3);
1464 Float_t intDataPall10001500Strp30[15],intDataPall10001500Strm30[15],intDataPall10001500Matp10[15],intDataPall10001500Matm10[15];
1465 for(Int_t i=0;i<15;i++) {
1466 intDataPall10001500Strp30[i]=intDatacut10001500[i]*fracS10001500Strp30[i]/fracP10001500[i];
1467 intDataPall10001500Strm30[i]=intDatacut10001500[i]*fracS10001500Strm30[i]/fracP10001500[i];
1468 intDataPall10001500Matp10[i]=intDatacut10001500[i]*fracS10001500Matp10[i]/fracP10001500[i];
1469 intDataPall10001500Matm10[i]=intDatacut10001500[i]*fracS10001500Matm10[i]/fracP10001500[i];
1470 }
1471 gintDataPall10001500->Draw("ap");
1472
1473 TGraph *gintDataPall10001500Strp30=new TGraph(15,d0cut,intDataPall10001500Strp30);
1474 gintDataPall10001500Strp30->SetMarkerColor(1);
1475 gintDataPall10001500Strp30->SetMarkerStyle(22);
1476 gintDataPall10001500Strp30->Draw("p");
1477 TGraph *gintDataPall10001500Strm30=new TGraph(15,d0cut,intDataPall10001500Strm30);
1478 gintDataPall10001500Strm30->SetMarkerColor(1);
1479 gintDataPall10001500Strm30->SetMarkerStyle(22);
1480 gintDataPall10001500Strm30->Draw("p");
1481 TGraph *gintDataPall10001500Matp10=new TGraph(15,d0cut,intDataPall10001500Matp10);
1482 gintDataPall10001500Matp10->SetMarkerColor(3);
1483 gintDataPall10001500Matp10->SetMarkerStyle(22);
1484 gintDataPall10001500Matp10->Draw("p");
1485 TGraph *gintDataPall10001500Matm10=new TGraph(15,d0cut,intDataPall10001500Matm10);
1486 gintDataPall10001500Matm10->SetMarkerColor(3);
1487 gintDataPall10001500Matm10->SetMarkerStyle(22);
1488 gintDataPall10001500Matm10->Draw("p");
8fa56655 1489
fa516524 1490 return;
1491}
1492//---------------------------------------------------------------------------
1493void PlotImpPar_z() {
1494
1495 TFile *fMC= new TFile("ITS.Performance_lhc10a8_100k.root");
1496
1497 TList *list=(TList*)fMC->Get("cOutputITS");
1498 TH1F *fHistd0zITSMIoneSPDInAccP150200MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP150200");
1499 TH1F *fHistd0zITSMIoneSPDInAccS150200MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS150200");
1500 TH1F *fHistd0zITSMIoneSPDInAccP500700MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP500700");
1501 TH1F *fHistd0zITSMIoneSPDInAccS500700MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS500700");
1502 TH1F *fHistd0zITSMIoneSPDInAccP10001500MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP10001500");
1503 TH1F *fHistd0zITSMIoneSPDInAccS10001500MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS10001500");
1504 TH1F *fHistd0zITSMIoneSPDInAcc150200MC=(TH1F*)fHistd0zITSMIoneSPDInAccP150200MC->Clone("fHistd0zITSMIoneSPDInAcc150200MC");
1505 fHistd0zITSMIoneSPDInAcc150200MC->Add(fHistd0zITSMIoneSPDInAccS150200MC);
1506 fHistd0zITSMIoneSPDInAcc150200MC->Scale(1./fHistd0zITSMIoneSPDInAcc150200MC->GetEntries());
1507 TH1F *fHistd0zITSMIoneSPDInAcc500700MC=(TH1F*)fHistd0zITSMIoneSPDInAccP500700MC->Clone("fHistd0zITSMIoneSPDInAcc500700MC");
1508 fHistd0zITSMIoneSPDInAcc500700MC->Add(fHistd0zITSMIoneSPDInAccS500700MC);
1509 fHistd0zITSMIoneSPDInAcc500700MC->Scale(1./fHistd0zITSMIoneSPDInAcc500700MC->GetEntries());
1510 TH1F *fHistd0zITSMIoneSPDInAcc10001500MC=(TH1F*)fHistd0zITSMIoneSPDInAccP10001500MC->Clone("fHistd0zITSMIoneSPDInAcc10001500MC");
1511 fHistd0zITSMIoneSPDInAcc10001500MC->Add(fHistd0zITSMIoneSPDInAccS10001500MC);
1512 fHistd0zITSMIoneSPDInAcc10001500MC->Scale(1./fHistd0zITSMIoneSPDInAcc10001500MC->GetEntries());
1513
1514
1515 TFile *f= new TFile("ITS.Performance_104892.root");
1516
1517 TList *list=(TList*)f->Get("cOutputITS");
1518 TH1F *fHistd0zITSMIoneSPDInAccP150200 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP150200");
1519 TH1F *fHistd0zITSMIoneSPDInAccS150200 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS150200");
1520 TH1F *fHistd0zITSMIoneSPDInAccP500700 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP500700");
1521 TH1F *fHistd0zITSMIoneSPDInAccS500700 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS500700");
1522 TH1F *fHistd0zITSMIoneSPDInAccP10001500 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP10001500");
1523 TH1F *fHistd0zITSMIoneSPDInAccS10001500 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS10001500");
1524 TH1F *fHistd0zITSMIoneSPDInAcc150200=(TH1F*)fHistd0zITSMIoneSPDInAccP150200->Clone("fHistd0zITSMIoneSPDInAcc150200");
1525 fHistd0zITSMIoneSPDInAcc150200->Add(fHistd0zITSMIoneSPDInAccS150200);
1526 fHistd0zITSMIoneSPDInAcc150200->Scale(1./fHistd0zITSMIoneSPDInAcc150200->GetEntries());
1527 TH1F *fHistd0zITSMIoneSPDInAcc500700=(TH1F*)fHistd0zITSMIoneSPDInAccP500700->Clone("fHistd0zITSMIoneSPDInAcc500700");
1528 fHistd0zITSMIoneSPDInAcc500700->Add(fHistd0zITSMIoneSPDInAccS500700);
1529 fHistd0zITSMIoneSPDInAcc500700->Scale(1./fHistd0zITSMIoneSPDInAcc500700->GetEntries());
1530 TH1F *fHistd0zITSMIoneSPDInAcc10001500=(TH1F*)fHistd0zITSMIoneSPDInAccP10001500->Clone("fHistd0zITSMIoneSPDInAcc10001500");
1531 fHistd0zITSMIoneSPDInAcc10001500->Add(fHistd0zITSMIoneSPDInAccS10001500);
1532 fHistd0zITSMIoneSPDInAcc10001500->Scale(1./fHistd0zITSMIoneSPDInAcc10001500->GetEntries());
1533
1534
1535 TCanvas *c1 = new TCanvas("c1","c1");
1536 c1->Divide(3,1);
1537 c1->cd(1);
1538 fHistd0zITSMIoneSPDInAcc150200MC->SetLineColor(2);
1539 fHistd0zITSMIoneSPDInAcc150200MC->Draw();
1540 fHistd0zITSMIoneSPDInAcc150200->SetLineColor(4);
1541 fHistd0zITSMIoneSPDInAcc150200->Draw("same");
1542 c1->cd(2);
1543 fHistd0zITSMIoneSPDInAcc500700MC->SetLineColor(2);
1544 fHistd0zITSMIoneSPDInAcc500700MC->Draw();
1545 fHistd0zITSMIoneSPDInAcc500700->SetLineColor(4);
1546 fHistd0zITSMIoneSPDInAcc500700->Draw("same");
1547 c1->cd(3);
1548 fHistd0zITSMIoneSPDInAcc10001500MC->SetLineColor(2);
1549 fHistd0zITSMIoneSPDInAcc10001500MC->Draw();
1550 fHistd0zITSMIoneSPDInAcc10001500->SetLineColor(4);
1551 fHistd0zITSMIoneSPDInAcc10001500->Draw("same");
1552
1553 TCanvas *c2 = new TCanvas("c2","c2");
1554 c2->Divide(3,1);
1555 c2_1->SetLogy();
1556 c2_2->SetLogy();
1557 c2_3->SetLogy();
1558 c2->cd(1);
1559 fHistd0zITSMIoneSPDInAccP150200MC->SetMinimum(1);
1560 fHistd0zITSMIoneSPDInAccS150200MC->SetMinimum(1);
1561 fHistd0zITSMIoneSPDInAccP150200MC->SetLineColor(1);
1562 fHistd0zITSMIoneSPDInAccP150200MC->Draw();
1563 fHistd0zITSMIoneSPDInAccS150200MC->SetLineColor(6);
1564 fHistd0zITSMIoneSPDInAccS150200MC->Draw("same");
1565 c2->cd(2);
1566 fHistd0zITSMIoneSPDInAccP500700MC->SetMinimum(1);
1567 fHistd0zITSMIoneSPDInAccS500700MC->SetMinimum(1);
1568 fHistd0zITSMIoneSPDInAccP500700MC->SetLineColor(1);
1569 fHistd0zITSMIoneSPDInAccP500700MC->Draw();
1570 fHistd0zITSMIoneSPDInAccS500700MC->SetLineColor(6);
1571 fHistd0zITSMIoneSPDInAccS500700MC->Draw("same");
1572 c2->cd(3);
1573 fHistd0zITSMIoneSPDInAccP10001500MC->SetMinimum(1);
1574 fHistd0zITSMIoneSPDInAccS10001500MC->SetMinimum(1);
1575 fHistd0zITSMIoneSPDInAccP10001500MC->SetLineColor(1);
1576 fHistd0zITSMIoneSPDInAccP10001500MC->Draw();
1577 fHistd0zITSMIoneSPDInAccS10001500MC->SetLineColor(6);
1578 fHistd0zITSMIoneSPDInAccS10001500MC->Draw("same");
1579
1580
1581 TCanvas *c3 = new TCanvas("c3","c3");
1582 c3->Divide(3,1);
1583 c3_1->SetLogx();
1584 c3_2->SetLogx();
1585 c3_3->SetLogx();
1586 Float_t d0cut[15]={0.05,0.06,0.08,0.10,0.15,0.2,0.25,0.30,0.35,0.40,0.50,0.60,0.80,1.,3.40};
1587
1588 c3->cd(1);
1589 Float_t fracP150200[15],fracS150200[15];
1590 Float_t intPtot150200=fHistd0zITSMIoneSPDInAccP150200MC->Integral(1,fHistd0zITSMIoneSPDInAccP150200MC->GetNbinsX());
1591 for(Int_t i=0;i<15;i++) {
1592 Int_t bin1=fHistd0zITSMIoneSPDInAccP150200MC->FindBin(-d0cut[i]);
1593 Int_t bin2=fHistd0zITSMIoneSPDInAccP150200MC->FindBin(+d0cut[i]);
1594 Float_t intPcut150200=fHistd0zITSMIoneSPDInAccP150200MC->Integral(bin1,bin2);
1595 Float_t intScut150200=fHistd0zITSMIoneSPDInAccS150200MC->Integral(bin1,bin2);
1596 fracP150200[i]=intPcut150200/intPtot150200;
1597 fracS150200[i]=1.-intScut150200/(intPcut150200+intScut150200);
1598 }
1599 TGraph *gfracP150200=new TGraph(15,d0cut,fracP150200);
1600 gfracP150200->SetMarkerColor(2);
1601 gfracP150200->SetMarkerStyle(20);
1602 gfracP150200->Draw("ap");
1603 TGraph *gfracS150200=new TGraph(15,d0cut,fracS150200);
1604 gfracS150200->SetMarkerColor(4);
1605 gfracS150200->SetMarkerStyle(21);
1606 gfracS150200->Draw("p");
1607
1608 c3->cd(2);
1609 Float_t fracP500700[15],fracS500700[15];
1610 Float_t intPtot500700=fHistd0zITSMIoneSPDInAccP500700MC->Integral(1,fHistd0zITSMIoneSPDInAccP500700MC->GetNbinsX());
1611 for(Int_t i=0;i<15;i++) {
1612 Int_t bin1=fHistd0zITSMIoneSPDInAccP500700MC->FindBin(-d0cut[i]);
1613 Int_t bin2=fHistd0zITSMIoneSPDInAccP500700MC->FindBin(+d0cut[i]);
1614 Float_t intPcut500700=fHistd0zITSMIoneSPDInAccP500700MC->Integral(bin1,bin2);
1615 Float_t intScut500700=fHistd0zITSMIoneSPDInAccS500700MC->Integral(bin1,bin2);
1616 fracP500700[i]=intPcut500700/intPtot500700;
1617 fracS500700[i]=1.-intScut500700/(intPcut500700+intScut500700);
1618 }
1619 TGraph *gfracP500700=new TGraph(15,d0cut,fracP500700);
1620 gfracP500700->SetMarkerColor(2);
1621 gfracP500700->SetMarkerStyle(20);
1622 gfracP500700->Draw("ap");
1623 TGraph *gfracS500700=new TGraph(15,d0cut,fracS500700);
1624 gfracS500700->SetMarkerColor(4);
1625 gfracS500700->SetMarkerStyle(21);
1626 gfracS500700->Draw("p");
1627
1628 c3->cd(3);
1629 Float_t fracP10001500[15],fracS10001500[15];
1630 Float_t intPtot10001500=fHistd0zITSMIoneSPDInAccP10001500MC->Integral(1,fHistd0zITSMIoneSPDInAccP10001500MC->GetNbinsX());
1631 for(Int_t i=0;i<15;i++) {
1632 Int_t bin1=fHistd0zITSMIoneSPDInAccP10001500MC->FindBin(-d0cut[i]);
1633 Int_t bin2=fHistd0zITSMIoneSPDInAccP10001500MC->FindBin(+d0cut[i]);
1634 Float_t intPcut10001500=fHistd0zITSMIoneSPDInAccP10001500MC->Integral(bin1,bin2);
1635 Float_t intScut10001500=fHistd0zITSMIoneSPDInAccS10001500MC->Integral(bin1,bin2);
1636 fracP10001500[i]=intPcut10001500/intPtot10001500;
1637 fracS10001500[i]=1.-intScut10001500/(intPcut10001500+intScut10001500);
1638 }
1639 TGraph *gfracP10001500=new TGraph(15,d0cut,fracP10001500);
1640 gfracP10001500->SetMarkerColor(2);
1641 gfracP10001500->SetMarkerStyle(20);
1642 gfracP10001500->Draw("ap");
1643 TGraph *gfracS10001500=new TGraph(15,d0cut,fracS10001500);
1644 gfracS10001500->SetMarkerColor(4);
1645 gfracS10001500->SetMarkerStyle(21);
1646 gfracS10001500->Draw("p");
1647
1648 return;
1649}
1650//----------------------------------------------------------------------------
1651void Corrections() {
1652
1653 TFile *f_cutits= new TFile("ITS.Performance_lhc09d10_500k_noz0cut_nodcaTPC.root");
1654
1655 TList *list=(TList*)f_cutits->Get("cOutputITS");
1656
1657 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
1658 Float_t nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
1659
1660 TH1F *fHistPtITSTPCsel = (TH1F*)list->FindObject("fHistPtITSTPCsel");
1661 NormalizePtHist(fHistPtITSTPCsel,nEventsSelWithVertex);
1662 TH1F *fHistPtITSTPCselP = (TH1F*)list->FindObject("fHistPtITSTPCselP");
1663 NormalizePtHist(fHistPtITSTPCselP,nEventsSelWithVertex);
1664 TH1F *fHistPtITSTPCselS = (TH1F*)list->FindObject("fHistPtITSTPCselS");
1665 NormalizePtHist(fHistPtITSTPCselS,nEventsSelWithVertex);
1666 TH1F *fHistPtITSTPCselPfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselPfromStrange");
1667 NormalizePtHist(fHistPtITSTPCselPfromStrange,nEventsSelWithVertex);
1668 TH1F *fHistPtITSTPCselSfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
1669 NormalizePtHist(fHistPtITSTPCselSfromStrange,nEventsSelWithVertex);
1670 TH1F *fHistPtITSTPCselSfromMat = (TH1F*)list->FindObject("fHistPtITSTPCselSfromMat");
1671 NormalizePtHist(fHistPtITSTPCselSfromMat,nEventsSelWithVertex);
1672
1673
1674 TFile *f_cuttpc= new TFile("ITS.Performance_lhc09d10_500k_noz0cut.root");
1675
1676 TList *list=(TList*)f_cuttpc->Get("cOutputITS");
1677
1678 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
1679 nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
1680
1681 TH1F *fHistPtTPCInAcc = (TH1F*)list->FindObject("fHistPtTPCInAcc");
1682 NormalizePtHist(fHistPtTPCInAcc,nEventsSelWithVertex);
1683 TH1F *fHistPtTPCInAccP = (TH1F*)list->FindObject("fHistPtTPCInAccP");
1684 NormalizePtHist(fHistPtTPCInAccP,nEventsSelWithVertex);
1685 TH1F *fHistPtTPCInAccS = (TH1F*)list->FindObject("fHistPtTPCInAccS");
1686 NormalizePtHist(fHistPtTPCInAccS,nEventsSelWithVertex);
1687 TH1F *fHistPtTPCInAccPfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccPfromStrange");
1688 NormalizePtHist(fHistPtTPCInAccPfromStrange,nEventsSelWithVertex);
1689 TH1F *fHistPtTPCInAccSfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccSfromStrange");
1690 NormalizePtHist(fHistPtTPCInAccSfromStrange,nEventsSelWithVertex);
1691 TH1F *fHistPtTPCInAccSfromMat = (TH1F*)list->FindObject("fHistPtTPCInAccSfromMat");
1692 NormalizePtHist(fHistPtTPCInAccSfromMat,nEventsSelWithVertex);
1693
1694
1695 TFile *f_nocut= new TFile("ITS.Performance_lhc09d10_500k_nod0z0cut.root");
1696
1697 TList *list=(TList*)f_nocut->Get("cOutputITS");
1698
1699 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
1700 nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
1701
1702 TH1F *fHistPtITSTPCselnocut = (TH1F*)list->FindObject("fHistPtITSTPCsel");
1703 NormalizePtHist(fHistPtITSTPCselnocut,nEventsSelWithVertex);
1704 TH1F *fHistPtITSTPCselnocutP = (TH1F*)list->FindObject("fHistPtITSTPCselP");
1705 NormalizePtHist(fHistPtITSTPCselnocutP,nEventsSelWithVertex);
1706 TH1F *fHistPtITSTPCselnocutS = (TH1F*)list->FindObject("fHistPtITSTPCselS");
1707 NormalizePtHist(fHistPtITSTPCselnocutS,nEventsSelWithVertex);
1708 TH1F *fHistPtITSTPCselnocutPfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselPfromStrange");
1709 NormalizePtHist(fHistPtITSTPCselnocutPfromStrange,nEventsSelWithVertex);
1710 TH1F *fHistPtITSTPCselnocutSfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
1711 NormalizePtHist(fHistPtITSTPCselnocutSfromStrange,nEventsSelWithVertex);
1712 TH1F *fHistPtITSTPCselnocutSfromMat = (TH1F*)list->FindObject("fHistPtITSTPCselSfromMat");
1713 NormalizePtHist(fHistPtITSTPCselnocutSfromMat,nEventsSelWithVertex);
1714
1715 TH1F *fHistPtTPCInAccnocut = (TH1F*)list->FindObject("fHistPtTPCInAcc");
1716 NormalizePtHist(fHistPtTPCInAccnocut,nEventsSelWithVertex);
1717 TH1F *fHistPtTPCInAccnocutP = (TH1F*)list->FindObject("fHistPtTPCInAccP");
1718 NormalizePtHist(fHistPtTPCInAccnocutP,nEventsSelWithVertex);
1719 TH1F *fHistPtTPCInAccnocutS = (TH1F*)list->FindObject("fHistPtTPCInAccS");
1720 NormalizePtHist(fHistPtTPCInAccnocutS,nEventsSelWithVertex);
1721 TH1F *fHistPtTPCInAccnocutPfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccPfromStrange");
1722 NormalizePtHist(fHistPtTPCInAccnocutPfromStrange,nEventsSelWithVertex);
1723 TH1F *fHistPtTPCInAccnocutSfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccSfromStrange");
1724 NormalizePtHist(fHistPtTPCInAccnocutSfromStrange,nEventsSelWithVertex);
1725 TH1F *fHistPtTPCInAccnocutSfromMat = (TH1F*)list->FindObject("fHistPtTPCInAccSfromMat");
1726 NormalizePtHist(fHistPtTPCInAccnocutSfromMat,nEventsSelWithVertex);
1727
1728 // cut efficiencies
1729
1730 TH1F *fHistPtITSTPCeffselP = (TH1F*)fHistPtITSTPCselP->Clone("fHistPtITSTPCeffselP");
1731 fHistPtITSTPCeffselP->Divide(fHistPtITSTPCselnocutP);
1732 TH1F *fHistPtITSTPCeffselS = (TH1F*)fHistPtITSTPCselS->Clone("fHistPtITSTPCeffselS");
1733 fHistPtITSTPCeffselS->Divide(fHistPtITSTPCselnocutS);
1734 TH1F *fHistPtITSTPCeffselSfromStrange = (TH1F*)fHistPtITSTPCselSfromStrange->Clone("fHistPtITSTPCeffselSfromStrange");
1735 fHistPtITSTPCeffselSfromStrange->Divide(fHistPtITSTPCselnocutSfromStrange);
1736 TH1F *fHistPtITSTPCeffselSfromMat = (TH1F*)fHistPtITSTPCselSfromMat->Clone("fHistPtITSTPCeffselSfromMat");
1737 fHistPtITSTPCeffselSfromMat->Divide(fHistPtITSTPCselnocutSfromMat);
1738
1739 TH1F *fHistPtTPCeffInAccP = (TH1F*)fHistPtTPCInAccP->Clone("fHistPtTPCeffInAccP");
1740 fHistPtTPCeffInAccP->Divide(fHistPtTPCInAccnocutP);
1741 TH1F *fHistPtTPCeffInAccS = (TH1F*)fHistPtTPCInAccS->Clone("fHistPtTPCeffInAccS");
1742 fHistPtTPCeffInAccS->Divide(fHistPtTPCInAccnocutS);
1743 TH1F *fHistPtTPCeffInAccSfromStrange = (TH1F*)fHistPtTPCInAccSfromStrange->Clone("fHistPtTPCeffInAccSfromStrange");
1744 fHistPtTPCeffInAccSfromStrange->Divide(fHistPtTPCInAccnocutSfromStrange);
1745 TH1F *fHistPtTPCeffInAccSfromMat = (TH1F*)fHistPtTPCInAccSfromMat->Clone("fHistPtTPCeffInAccSfromMat");
1746 fHistPtTPCeffInAccSfromMat->Divide(fHistPtTPCInAccnocutSfromMat);
1747
1748
1749 TLegend *l0=new TLegend(0.5,0.5,0.9,0.9);
1750 TCanvas *c0=new TCanvas("c0","c0");
1751 c0->Divide(2,1);
1752 c0->cd(1);
1753 TH1F *fHistPtITSTPCselFracS = (TH1F*)fHistPtITSTPCselS->Clone("fHistPtITSTPCselFracS");
1754 fHistPtITSTPCselFracS->Divide(fHistPtITSTPCsel);
1755 fHistPtITSTPCselFracS->SetLineColor(2);
1756 l0->AddEntry(fHistPtITSTPCselFracS,"secondaries","l");
1757 fHistPtITSTPCselFracS->Draw();
1758 TH1F *fHistPtITSTPCselFracSfromStrange = (TH1F*)fHistPtITSTPCselSfromStrange->Clone("fHistPtITSTPCselFracSfromStrange");
1759 fHistPtITSTPCselFracSfromStrange->Divide(fHistPtITSTPCsel);
1760 fHistPtITSTPCselFracSfromStrange->SetLineColor(6);
1761 l0->AddEntry(fHistPtITSTPCselFracSfromStrange,"sec. from strange","l");
1762 fHistPtITSTPCselFracSfromStrange->Draw("same");
1763 TH1F *fHistPtITSTPCselFracSfromMat = (TH1F*)fHistPtITSTPCselSfromMat->Clone("fHistPtITSTPCselFracSfromMat");
1764 fHistPtITSTPCselFracSfromMat->Divide(fHistPtITSTPCsel);
1765 fHistPtITSTPCselFracSfromMat->SetLineColor(kOrange+7);
1766 l0->AddEntry(fHistPtITSTPCselFracSfromMat,"sec. from material","l");
1767 fHistPtITSTPCselFracSfromMat->Draw("same");
1768 l0->Draw();
1769 c0->cd(2);
1770 TH1F *fHistPtTPCInAccFracS = (TH1F*)fHistPtTPCInAccS->Clone("fHistPtTPCInAccFracS");
1771 fHistPtTPCInAccFracS->Divide(fHistPtTPCInAcc);
1772 fHistPtTPCInAccFracS->SetLineColor(2);
1773 fHistPtTPCInAccFracS->Draw();
1774 TH1F *fHistPtTPCInAccFracSfromStrange = (TH1F*)fHistPtTPCInAccSfromStrange->Clone("fHistPtTPCInAccFracSfromStrange");
1775 fHistPtTPCInAccFracSfromStrange->Divide(fHistPtTPCInAcc);
1776 fHistPtTPCInAccFracSfromStrange->SetLineColor(6);
1777 fHistPtTPCInAccFracSfromStrange->Draw("same");
1778 TH1F *fHistPtTPCInAccFracSfromMat = (TH1F*)fHistPtTPCInAccSfromMat->Clone("fHistPtTPCInAccFracSfromMat");
1779 fHistPtTPCInAccFracSfromMat->Divide(fHistPtTPCInAcc);
1780 fHistPtTPCInAccFracSfromMat->SetLineColor(kOrange+7);
1781 fHistPtTPCInAccFracSfromMat->Draw("same");
1782
1783 TLegend *l1=new TLegend(0.5,0.5,0.9,0.9);
1784 TCanvas *c1=new TCanvas("c1","c1");
1785 c1->Divide(2,1);
1786 c1->cd(1);
1787 fHistPtITSTPCeffselP->SetYTitle("dca cut efficiency");
1788 fHistPtITSTPCeffselP->SetLineColor(1);
1789 l1->AddEntry(fHistPtITSTPCeffselP,"primaries","l");
1790 fHistPtITSTPCeffselP->Draw();
1791 fHistPtITSTPCeffselS->SetLineColor(2);
1792 l1->AddEntry(fHistPtITSTPCeffselS,"secondaries","l");
1793 fHistPtITSTPCeffselS->Draw("same");
1794 fHistPtITSTPCeffselSfromStrange->SetLineColor(6);
1795 l1->AddEntry(fHistPtITSTPCeffselSfromStrange,"sec. from strange","l");
1796 fHistPtITSTPCeffselSfromStrange->Draw("same");
1797 fHistPtITSTPCeffselSfromMat->SetLineColor(kOrange+7);
1798 l1->AddEntry(fHistPtITSTPCeffselSfromMat,"sec. from material","l");
1799 fHistPtITSTPCeffselSfromMat->Draw("same");
1800 l1->Draw();
1801 c1->cd(2);
1802 fHistPtTPCeffInAccP->SetYTitle("dca cut efficiency");
1803 fHistPtTPCeffInAccP->SetLineColor(1);
1804 fHistPtTPCeffInAccP->Draw();
1805 fHistPtTPCeffInAccS->SetLineColor(2);
1806 fHistPtTPCeffInAccS->Draw("same");
1807 fHistPtTPCeffInAccSfromStrange->SetLineColor(6);
1808 fHistPtTPCeffInAccSfromStrange->Draw("same");
1809 fHistPtTPCeffInAccSfromMat->SetLineColor(kOrange+7);
1810 fHistPtTPCeffInAccSfromMat->Draw("same");
1811
1812
1813
1814 Float_t weightStrange=1.;
1815 Float_t weightMat=1.;
1816
1817 TH1F *fHistPtITSTPCselCocktail = MakeCocktail(fHistPtITSTPCselP,
1818 fHistPtITSTPCselPfromStrange,
1819 fHistPtITSTPCselS,
1820 fHistPtITSTPCselSfromStrange,
1821 fHistPtITSTPCselSfromMat,
1822 weightStrange,
1823 weightMat,
1824 "fHistPtITSTPCselCocktail");
1825
1826 TH1F *fHistPtITSTPCselPCocktail = CorrectToP(fHistPtITSTPCselCocktail,
1827 fHistPtITSTPCselSfromStrange,
1828 fHistPtITSTPCselSfromMat,
1829 weightStrange,
1830 weightMat,
1831 "fHistPtITSTPCselPCocktail");
1832
1833 TH1F *fHistPtITSTPCallPCocktail = CorrectToPnocut(fHistPtITSTPCselPCocktail,
1834 fHistPtITSTPCeffselP,
1835 "fHistPtITSTPCallPCocktail");
1836
1837
1838 TH1F *fHistPtTPCInAccCocktail = MakeCocktail(fHistPtTPCInAccP,
1839 fHistPtTPCInAccPfromStrange,
1840 fHistPtTPCInAccS,
1841 fHistPtTPCInAccSfromStrange,
1842 fHistPtTPCInAccSfromMat,
1843 weightStrange,
1844 weightMat,
1845 "fHistPtTPCInAccCocktail");
1846
1847 TH1F *fHistPtTPCInAccPCocktail = CorrectToP(fHistPtTPCInAccCocktail,
1848 fHistPtTPCInAccSfromStrange,
1849 fHistPtTPCInAccSfromMat,
1850 weightStrange,
1851 weightMat,
1852 "fHistPtTPCInAccPCocktail");
1853
1854 TH1F *fHistPtTPCallPCocktail = CorrectToPnocut(fHistPtTPCInAccPCocktail,
1855 fHistPtTPCeffInAccP,
1856 "fHistPtTPCallPCocktail");
1857
1858
1859
1860 TLegend *l2=new TLegend(0.5,0.5,0.9,0.9);
1861 TCanvas *c2 = new TCanvas("c2","c2");
1862 c2->Divide(2,1);
1863 c2->cd(1);
1864 fHistPtITSTPCselCocktail->SetLineColor(4);
1865 l2->AddEntry(fHistPtITSTPCselCocktail,"all, with dca cut","l");
1866 fHistPtITSTPCselCocktail->Draw();
1867 fHistPtITSTPCselPCocktail->SetLineColor(7);
1868 l2->AddEntry(fHistPtITSTPCselPCocktail,"primaries, with dca cut","l");
1869 fHistPtITSTPCselPCocktail->Draw("same");
1870 fHistPtITSTPCallPCocktail->SetLineColor(6);
1871 l2->AddEntry(fHistPtITSTPCallPCocktail,"primaries, w/o dca cut","l");
1872 fHistPtITSTPCallPCocktail->Draw("same");
1873 l2->Draw();
1874 c2->cd(2);
1875 fHistPtTPCInAccCocktail->SetLineColor(4);
1876 fHistPtTPCInAccCocktail->Draw();
1877 fHistPtTPCInAccPCocktail->SetLineColor(7);
1878 fHistPtTPCInAccPCocktail->Draw("same");
1879 fHistPtTPCallPCocktail->SetLineColor(6);
1880 fHistPtTPCallPCocktail->Draw("same");
1881
1882
1883 // systematic from secondaries
1884 weightStrange=1.3;
1885 weightMat=1.0;
1886 TH1F *fHistPtITSTPCselPCocktail1 = CorrectToP(fHistPtITSTPCselCocktail,
1887 fHistPtITSTPCselSfromStrange,
1888 fHistPtITSTPCselSfromMat,
1889 weightStrange,
1890 weightMat,
1891 "fHistPtITSTPCselPCocktail1");
1892 TH1F *fHistPtITSTPCallPCocktail1 = CorrectToPnocut(fHistPtITSTPCselPCocktail1,
1893 fHistPtITSTPCeffselP,
1894 "fHistPtITSTPCallPCocktail1");
1895 weightStrange=0.7;
1896 weightMat=1.0;
1897 TH1F *fHistPtITSTPCselPCocktail2 = CorrectToP(fHistPtITSTPCselCocktail,
1898 fHistPtITSTPCselSfromStrange,
1899 fHistPtITSTPCselSfromMat,
1900 weightStrange,
1901 weightMat,
1902 "fHistPtITSTPCselPCocktail2");
1903 TH1F *fHistPtITSTPCallPCocktail2 = CorrectToPnocut(fHistPtITSTPCselPCocktail2,
1904 fHistPtITSTPCeffselP,
1905 "fHistPtITSTPCallPCocktail2");
1906 weightStrange=1.0;
1907 weightMat=1.1;
1908 TH1F *fHistPtITSTPCselPCocktail3 = CorrectToP(fHistPtITSTPCselCocktail,
1909 fHistPtITSTPCselSfromStrange,
1910 fHistPtITSTPCselSfromMat,
1911 weightStrange,
1912 weightMat,
1913 "fHistPtITSTPCselPCocktail3");
1914 TH1F *fHistPtITSTPCallPCocktail3 = CorrectToPnocut(fHistPtITSTPCselPCocktail3,
1915 fHistPtITSTPCeffselP,
1916 "fHistPtITSTPCallPCocktail3");
1917 weightStrange=1.0;
1918 weightMat=0.9;
1919 TH1F *fHistPtITSTPCselPCocktail4 = CorrectToP(fHistPtITSTPCselCocktail,
1920 fHistPtITSTPCselSfromStrange,
1921 fHistPtITSTPCselSfromMat,
1922 weightStrange,
1923 weightMat,
1924 "fHistPtITSTPCselPCocktail4");
1925 TH1F *fHistPtITSTPCallPCocktail4 = CorrectToPnocut(fHistPtITSTPCselPCocktail4,
1926 fHistPtITSTPCeffselP,
1927 "fHistPtITSTPCallPCocktail4");
1928 weightStrange=1.3;
1929 weightMat=1.1;
1930 TH1F *fHistPtITSTPCselPCocktail5 = CorrectToP(fHistPtITSTPCselCocktail,
1931 fHistPtITSTPCselSfromStrange,
1932 fHistPtITSTPCselSfromMat,
1933 weightStrange,
1934 weightMat,
1935 "fHistPtITSTPCselPCocktail5");
1936 TH1F *fHistPtITSTPCallPCocktail5 = CorrectToPnocut(fHistPtITSTPCselPCocktail5,
1937 fHistPtITSTPCeffselP,
1938 "fHistPtITSTPCallPCocktail5");
1939 weightStrange=0.7;
1940 weightMat=0.9;
1941 TH1F *fHistPtITSTPCselPCocktail6 = CorrectToP(fHistPtITSTPCselCocktail,
1942 fHistPtITSTPCselSfromStrange,
1943 fHistPtITSTPCselSfromMat,
1944 weightStrange,
1945 weightMat,
1946 "fHistPtITSTPCselPCocktail6");
1947 TH1F *fHistPtITSTPCallPCocktail6 = CorrectToPnocut(fHistPtITSTPCselPCocktail6,
1948 fHistPtITSTPCeffselP,
1949 "fHistPtITSTPCallPCocktail6");
1950
1951 weightStrange=1.3;
1952 weightMat=1.0;
1953 TH1F *fHistPtTPCInAccPCocktail1 = CorrectToP(fHistPtTPCInAccCocktail,
1954 fHistPtTPCInAccSfromStrange,
1955 fHistPtTPCInAccSfromMat,
1956 weightStrange,
1957 weightMat,
1958 "fHistPtTPCInAccPCocktail1");
1959 TH1F *fHistPtTPCallPCocktail1 = CorrectToPnocut(fHistPtTPCInAccPCocktail1,
1960 fHistPtTPCeffInAccP,
1961 "fHistPtTPCallPCocktail1");
1962 weightStrange=0.7;
1963 weightMat=1.0;
1964 TH1F *fHistPtTPCInAccPCocktail2 = CorrectToP(fHistPtTPCInAccCocktail,
1965 fHistPtTPCInAccSfromStrange,
1966 fHistPtTPCInAccSfromMat,
1967 weightStrange,
1968 weightMat,
1969 "fHistPtTPCInAccPCocktail2");
1970 TH1F *fHistPtTPCallPCocktail2 = CorrectToPnocut(fHistPtTPCInAccPCocktail2,
1971 fHistPtTPCeffInAccP,
1972 "fHistPtTPCallPCocktail2");
1973 weightStrange=1.0;
1974 weightMat=1.1;
1975 TH1F *fHistPtTPCInAccPCocktail3 = CorrectToP(fHistPtTPCInAccCocktail,
1976 fHistPtTPCInAccSfromStrange,
1977 fHistPtTPCInAccSfromMat,
1978 weightStrange,
1979 weightMat,
1980 "fHistPtTPCInAccPCocktail3");
1981 TH1F *fHistPtTPCallPCocktail3 = CorrectToPnocut(fHistPtTPCInAccPCocktail3,
1982 fHistPtTPCeffInAccP,
1983 "fHistPtTPCallPCocktail3");
1984 weightStrange=1.0;
1985 weightMat=0.9;
1986 TH1F *fHistPtTPCInAccPCocktail4 = CorrectToP(fHistPtTPCInAccCocktail,
1987 fHistPtTPCInAccSfromStrange,
1988 fHistPtTPCInAccSfromMat,
1989 weightStrange,
1990 weightMat,
1991 "fHistPtTPCInAccPCocktail4");
1992 TH1F *fHistPtTPCallPCocktail4 = CorrectToPnocut(fHistPtTPCInAccPCocktail4,
1993 fHistPtTPCeffInAccP,
1994 "fHistPtTPCallPCocktail4");
1995 weightStrange=1.3;
1996 weightMat=1.1;
1997 TH1F *fHistPtTPCInAccPCocktail5 = CorrectToP(fHistPtTPCInAccCocktail,
1998 fHistPtTPCInAccSfromStrange,
1999 fHistPtTPCInAccSfromMat,
2000 weightStrange,
2001 weightMat,
2002 "fHistPtTPCInAccPCocktail5");
2003 TH1F *fHistPtTPCallPCocktail5 = CorrectToPnocut(fHistPtTPCInAccPCocktail5,
2004 fHistPtTPCeffInAccP,
2005 "fHistPtTPCallPCocktail5");
2006 weightStrange=0.7;
2007 weightMat=0.9;
2008 TH1F *fHistPtTPCInAccPCocktail6 = CorrectToP(fHistPtTPCInAccCocktail,
2009 fHistPtTPCInAccSfromStrange,
2010 fHistPtTPCInAccSfromMat,
2011 weightStrange,
2012 weightMat,
2013 "fHistPtTPCInAccPCocktail6");
2014 TH1F *fHistPtTPCallPCocktail6 = CorrectToPnocut(fHistPtTPCInAccPCocktail6,
2015 fHistPtTPCeffInAccP,
2016 "fHistPtTPCallPCocktail6");
2017
2018 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
2019 TCanvas *c3 = new TCanvas("c3","c3");
2020 c3->Divide(2,1);
2021 c3->cd(1);
2022 l3->AddEntry(fHistPtITSTPCallPCocktail,"central","l");
2023 fHistPtITSTPCallPCocktail->Draw();
2024 l3->AddEntry(fHistPtITSTPCallPCocktail1,"strange #pm 30%","l");
2025 fHistPtITSTPCallPCocktail1->SetLineColor(1);
2026 fHistPtITSTPCallPCocktail2->SetLineColor(1);
2027 fHistPtITSTPCallPCocktail1->Draw("same");
2028 fHistPtITSTPCallPCocktail2->Draw("same");
2029 l3->AddEntry(fHistPtITSTPCallPCocktail3,"material #pm 10%","l");
2030 fHistPtITSTPCallPCocktail3->SetLineColor(8);
2031 fHistPtITSTPCallPCocktail4->SetLineColor(8);
2032 fHistPtITSTPCallPCocktail3->Draw("same");
2033 fHistPtITSTPCallPCocktail4->Draw("same");
2034 l3->AddEntry(fHistPtITSTPCallPCocktail5,"strange #pm 30% & material #pm 10%","l");
2035 fHistPtITSTPCallPCocktail5->SetLineColor(4);
2036 fHistPtITSTPCallPCocktail6->SetLineColor(4);
2037 fHistPtITSTPCallPCocktail5->Draw("same");
2038 fHistPtITSTPCallPCocktail6->Draw("same");
2039 l3->Draw();
2040 c3->cd(2);
2041 fHistPtTPCallPCocktail->Draw();
2042 fHistPtTPCallPCocktail1->SetLineColor(1);
2043 fHistPtTPCallPCocktail2->SetLineColor(1);
2044 fHistPtTPCallPCocktail1->Draw("same");
2045 fHistPtTPCallPCocktail2->Draw("same");
2046 fHistPtTPCallPCocktail3->SetLineColor(8);
2047 fHistPtTPCallPCocktail4->SetLineColor(8);
2048 fHistPtTPCallPCocktail3->Draw("same");
2049 fHistPtTPCallPCocktail4->Draw("same");
2050 fHistPtTPCallPCocktail5->SetLineColor(4);
2051 fHistPtTPCallPCocktail6->SetLineColor(4);
2052 fHistPtTPCallPCocktail5->Draw("same");
2053 fHistPtTPCallPCocktail6->Draw("same");
2054
2055 /*
2056 TCanvas *c4 = new TCanvas("c4","c4");
2057 c4->Divide(2,1);
2058 c4->cd(1);
2059 fHistPtITSTPCallPCocktail2->Add(fHistPtITSTPCallPCocktail,-1);
2060 fHistPtITSTPCallPCocktail2->Divide(fHistPtITSTPCallPCocktail);
2061 fHistPtITSTPCallPCocktail2->Draw();
2062 fHistPtITSTPCallPCocktail4->Add(fHistPtITSTPCallPCocktail,-1);
2063 fHistPtITSTPCallPCocktail4->Divide(fHistPtITSTPCallPCocktail);
2064 fHistPtITSTPCallPCocktail4->Draw("same");
2065 fHistPtITSTPCallPCocktail6->Add(fHistPtITSTPCallPCocktail,-1);
2066 fHistPtITSTPCallPCocktail6->Divide(fHistPtITSTPCallPCocktail);
2067 fHistPtITSTPCallPCocktail6->Draw("same");
2068 l3->Draw();
2069 c4->cd(2);
2070 fHistPtTPCallPCocktail2->Add(fHistPtTPCallPCocktail,-1);
2071 fHistPtTPCallPCocktail2->Divide(fHistPtTPCallPCocktail);
2072 fHistPtTPCallPCocktail2->Draw();
2073 fHistPtTPCallPCocktail4->Add(fHistPtTPCallPCocktail,-1);
2074 fHistPtTPCallPCocktail4->Divide(fHistPtTPCallPCocktail);
2075 fHistPtTPCallPCocktail4->Draw("same");
2076 fHistPtTPCallPCocktail6->Add(fHistPtTPCallPCocktail,-1);
2077 fHistPtTPCallPCocktail6->Divide(fHistPtTPCallPCocktail);
2078 fHistPtTPCallPCocktail6->Draw("same");
2079 */
2080
2081 return;
2082}
2083//-------------------------------------------------------------
2084void NormalizePtHist(TH1F *h,Float_t n) {
2085
2086 for(Int_t i=1; i<=h->GetNbinsX(); i++) {
2087 if(h->GetBinContent(i)) {
2088 h->SetBinContent(i,h->GetBinContent(i)/h->GetBinWidth(i));
2089 h->SetBinError(i,h->GetBinError(i)/h->GetBinWidth(i));
2090 }
2091 }
2092 h->Scale(1./n);
2093
2094 return;
2095}
2096//----------------------------------------------------------------------
2097TH1F *MakeCocktail(TH1F *fHistPtselP,
2098 TH1F *fHistPtselPfromStrange,
2099 TH1F *fHistPtselS,
2100 TH1F *fHistPtselSfromStrange,
2101 TH1F *fHistPtselSfromMat,
2102 Float_t weightStrange,
2103 Float_t weightMat,TString name) {
2104
2105 // build histogram with yield passing cut
2106 TH1F *fHistPtselCocktail = (TH1F*)fHistPtselP->Clone(name.Data());
2107 fHistPtselCocktail->Add(fHistPtselS);
2108 fHistPtselCocktail->Add(fHistPtselPfromStrange,weightStrange-1.);
2109 fHistPtselCocktail->Add(fHistPtselSfromStrange,weightStrange-1.);
2110 fHistPtselCocktail->Add(fHistPtselSfromMat,weightMat-1.);
2111
2112
2113 return fHistPtselCocktail;
2114}
2115//----------------------------------------------------------------------
2116TH1F *CorrectToP(TH1F *fHistPtselCocktail,
2117 TH1F *fHistPtselSfromStrange,
2118 TH1F *fHistPtselSfromMat,
2119 Float_t weightStrange,
2120 Float_t weightMat,TString name) {
2121
2122
2123 // build histogram with yield of primaries passing cut
2124 TH1F* fHistPtselPCocktail = (TH1F*)fHistPtselCocktail->Clone(name.Data());
2125 fHistPtselPCocktail->Add(fHistPtselSfromStrange,-weightStrange);
2126 fHistPtselPCocktail->Add(fHistPtselSfromMat,-weightMat);
2127
2128 return fHistPtselPCocktail;
2129}
2130//----------------------------------------------------------------------
2131TH1F *CorrectToPnocut(TH1F *fHistPtselPCocktail,
2132 TH1F *fHistPteffselP,TString name) {
2133
2134 // build histogram with yield of primaries without cut
2135 TH1F *fHistPtallPCocktail = (TH1F*)fHistPtselPCocktail->Clone(name.Data());
2136 //printf("%f\n",fHistPtallPCocktail->GetBinContent(6));
2137 fHistPtallPCocktail->Divide(fHistPteffselP);
2138 //printf("%f\n",fHistPtallPCocktail->GetBinContent(6));
2139
2140 return fHistPtallPCocktail;
2141}
2142//----------------------------------------------------------------------
2143void CompareTPCPt() {
2144
2145 TFile *f_tpcrefit= new TFile("ITS.Performance_104892pass2_etale05.root");
2146
2147 TList *list=(TList*)f_tpcrefit->Get("cOutputITS");
2148
2149 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
2150 Float_t nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
2151
2152 TH1F *fHistPtTPCInAcc = (TH1F*)list->FindObject("fHistPtTPCInAcc");
2153 NormalizePtHist(fHistPtTPCInAcc,nEventsSelWithVertex);
2154 TH1F *fHistPtTPCInAccNoTRDout = (TH1F*)list->FindObject("fHistPtTPCInAccNoTRDout");
2155 NormalizePtHist(fHistPtTPCInAccNoTRDout,nEventsSelWithVertex);
2156 TH1F *fHistPtTPCInAccNoTOFout = (TH1F*)list->FindObject("fHistPtTPCInAccNoTOFout");
2157 NormalizePtHist(fHistPtTPCInAccNoTOFout,nEventsSelWithVertex);
2158 TH1F *fHistPtTPCInAccWithPtTPCAtVtx = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtVtx");
2159 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtVtx,nEventsSelWithVertex);
2160 TH1F *fHistPtTPCInAccWithPtTPCAtInnerWall = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtInnerWall");
2161 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtInnerWall,nEventsSelWithVertex);
2162
2163
2164 TFile *f_notpcrefit= new TFile("ITS.Performance_104892pass3_etale05.root");
2165
2166 TList *list=(TList*)f_notpcrefit->Get("cOutputITS");
2167
2168 TH1F *fHistNEventsNoRefit = (TH1F*)list->FindObject("fHistNEvents");
2169 nEventsSelWithVertex = fHistNEventsNoRefit->GetBinContent(5);
2170
2171 TH1F *fHistPtTPCInAccNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAcc");
2172 NormalizePtHist(fHistPtTPCInAccNoRefit,nEventsSelWithVertex);
2173 TH1F *fHistPtTPCInAccNoTRDoutNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccNoTRDout");
2174 NormalizePtHist(fHistPtTPCInAccNoTRDoutNoRefit,nEventsSelWithVertex);
2175 TH1F *fHistPtTPCInAccNoTOFoutNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccNoTOFout");
2176 NormalizePtHist(fHistPtTPCInAccNoTOFoutNoRefit,nEventsSelWithVertex);
2177 TH1F *fHistPtTPCInAccWithPtTPCAtVtxNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtVtx");
2178 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtVtxNoRefit,nEventsSelWithVertex);
2179 TH1F *fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtInnerWall");
2180 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit,nEventsSelWithVertex);
2181
2182
2183
2184 TLegend *l1 = new TLegend(0.5,0.5,0.9,0.9);
2185 TCanvas *c1=new TCanvas("c1","c1",0,0,1000,600);
2186 c1->Divide(2,1);
2187 c1->cd(1);
2188 fHistPtTPCInAcc->SetMarkerStyle(20);
2189 l1->AddEntry(fHistPtTPCInAcc,"p_{t} measurement:","");
2190 l1->AddEntry(fHistPtTPCInAcc,"at vtx, from main params","p");
2191 fHistPtTPCInAcc->Draw();
2192 fHistPtTPCInAccWithPtTPCAtVtx->SetMarkerStyle(21);
2193 fHistPtTPCInAccWithPtTPCAtVtx->SetMarkerColor(2);
2194 l1->AddEntry(fHistPtTPCInAccWithPtTPCAtVtx,"at vtx, from TPC params","p");
2195 fHistPtTPCInAccWithPtTPCAtVtx->Draw("same");
2196 fHistPtTPCInAccWithPtTPCAtInnerWall->SetMarkerStyle(25);
2197 fHistPtTPCInAccWithPtTPCAtInnerWall->SetMarkerColor(2);
2198 l1->AddEntry(fHistPtTPCInAccWithPtTPCAtInnerWall,"at r=80cm, from TPC params","p");
2199 fHistPtTPCInAccWithPtTPCAtInnerWall->Draw("same");
2200 fHistPtTPCInAccNoTOFout->SetMarkerStyle(23);
2201 fHistPtTPCInAccNoTOFout->SetMarkerColor(3);
2202 fHistPtTPCInAccNoTOFout->Draw("same");
2203 fHistPtTPCInAccNoTRDout->SetMarkerStyle(24);
2204 fHistPtTPCInAccNoTRDout->SetMarkerColor(4);
2205 fHistPtTPCInAccNoTRDout->Draw("same");
2206 l1->Draw();
2207 c1->cd(2);
2208 fHistPtTPCInAccNoRefit->SetMarkerStyle(20);
2209 fHistPtTPCInAccNoRefit->Draw();
2210 fHistPtTPCInAccWithPtTPCAtVtxNoRefit->SetMarkerStyle(21);
2211 fHistPtTPCInAccWithPtTPCAtVtxNoRefit->SetMarkerColor(2);
2212 fHistPtTPCInAccWithPtTPCAtVtxNoRefit->Draw("same");
2213 fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit->SetMarkerStyle(25);
2214 fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit->SetMarkerColor(2);
2215 fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit->Draw("same");
2216 fHistPtTPCInAccNoTOFoutNoRefit->SetMarkerStyle(23);
2217 fHistPtTPCInAccNoTOFoutNoRefit->SetMarkerColor(3);
2218 fHistPtTPCInAccNoTOFoutNoRefit->Draw("same");
2219 fHistPtTPCInAccNoTRDoutNoRefit->SetMarkerStyle(24);
2220 fHistPtTPCInAccNoTRDoutNoRefit->SetMarkerColor(4);
2221 fHistPtTPCInAccNoTRDoutNoRefit->Draw("same");
2222 //l1->Draw();
2223
2224 return;
2225}
2226
2227TH1F* gHistTemplateStrange;
2228TH1F* gHistTemplatePandMat;
2229Float_t gd0min=0.15;
2230Float_t gd0max=1.5;
2231
2232
2233Double_t FitMCTemplate(Double_t *x, Double_t *par) {
2234 Double_t xx = x[0];
2235 if(TMath::Abs(xx)<gd0min) return 0;
2236 Int_t bin = gHistTemplateStrange->GetXaxis()->FindBin(xx);
2237 Double_t pandmat = par[0]*gHistTemplatePandMat->GetBinContent(bin);
2238 Double_t strange = par[1]*gHistTemplateStrange->GetBinContent(bin);
2239 return strange + pandmat;
2240}
2241
2242void FitImpPar_rphi() {
2243
2244 Int_t rebin=1;
2245
2246 TFile *fMC= new TFile("ITS.Performance_lhc10a8a12_trkvtx_noTPCdca_120310.root");
2247
2248 TList *list=(TList*)fMC->Get("cOutputITS");
2249 TH1F *fHistd0rphiITSMIoneSPDInAccPMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
2250 TH1F *fHistd0rphiITSMIoneSPDInAccSMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
2251 TH1F *fHistd0rphiITSMIoneSPDInAccSfromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200fromMat");
2252 fHistd0rphiITSMIoneSPDInAccPMC->Rebin(rebin);
2253 fHistd0rphiITSMIoneSPDInAccSMC->Rebin(rebin);
2254 fHistd0rphiITSMIoneSPDInAccSfromMatMC->Rebin(rebin);
2255
2256 TH1F *fHistd0rphiITSMIoneSPDInAccSfromStrangeMC=(TH1F*)fHistd0rphiITSMIoneSPDInAccSMC->Clone("fHistd0rphiITSMIoneSPDInAccSfromStrangeMC");
2257 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Add(fHistd0rphiITSMIoneSPDInAccSfromMatMC,-1.);
2258 TH1F *fHistd0rphiITSMIoneSPDInAccMC=(TH1F*)fHistd0rphiITSMIoneSPDInAccPMC->Clone("fHistd0rphiITSMIoneSPDInAccMC");
2259 fHistd0rphiITSMIoneSPDInAccMC->Add(fHistd0rphiITSMIoneSPDInAccSMC);
2260 //fHistd0rphiITSMIoneSPDInAccMC->Scale(1./fHistd0rphiITSMIoneSPDInAccMC->GetEntries());
2261 TH1F *fHistd0rphiITSMIoneSPDInAccPandMatMC=(TH1F*)fHistd0rphiITSMIoneSPDInAccPMC->Clone("fHistd0rphiITSMIoneSPDInAccPandMatMC");
2262 fHistd0rphiITSMIoneSPDInAccPandMatMC->Add(fHistd0rphiITSMIoneSPDInAccSfromMatMC);
2263
2264 // templates
2265 gHistTemplateStrange = (TH1F*)fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Clone("gHistTemplateStrange");
2266 gHistTemplatePandMat = (TH1F*)fHistd0rphiITSMIoneSPDInAccPandMatMC->Clone("gHistTemplatePandMat");
2267
2268
2269
2270
2271 TFile *f= new TFile("ITS.Performance_104065_104892_pass4_trkvtx_noTPCdca.root");
2272 //TFile *f= new TFile("ITS.Performance_lhc10a8_300k_trkvtx_noTPCdca.root");
2273
2274 TList *list=(TList*)f->Get("cOutputITS");
2275 TH1F *fHistd0rphiITSMIoneSPDInAccP = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
2276 TH1F *fHistd0rphiITSMIoneSPDInAccS = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
2277 fHistd0rphiITSMIoneSPDInAccP->Rebin(rebin);
2278 fHistd0rphiITSMIoneSPDInAccS->Rebin(rebin);
2279
2280 TH1F *fHistd0rphiITSMIoneSPDInAcc=(TH1F*)fHistd0rphiITSMIoneSPDInAccP->Clone("fHistd0rphiITSMIoneSPDInAcc");
2281 fHistd0rphiITSMIoneSPDInAcc->Add(fHistd0rphiITSMIoneSPDInAccS);
2282
2283
2284 TF1 *fitMCtemplate = new TF1("fitMCtemplate",FitMCTemplate,-gd0max,+gd0max,2);
2285
2286 TH1F* fHistd0rphiITSMIoneSPDInAccCopy = (TH1F*)fHistd0rphiITSMIoneSPDInAcc->Clone("fHistd0rphiITSMIoneSPDInAccCopy");
2287 for(Int_t ib=1;ib<=fHistd0rphiITSMIoneSPDInAccCopy->GetNbinsX();ib++) {
2288 if(TMath::Abs(fHistd0rphiITSMIoneSPDInAccCopy->GetBinCenter(ib))<gd0min) {
2289 fHistd0rphiITSMIoneSPDInAccCopy->SetBinContent(ib,0);
2290 fHistd0rphiITSMIoneSPDInAccCopy->SetBinError(ib,0);
2291 }
2292 }
2293 fHistd0rphiITSMIoneSPDInAccCopy->Fit("fitMCtemplate","RL");
2294
2295
2296 fHistd0rphiITSMIoneSPDInAccPandMatMC->Scale(fitMCtemplate->GetParameter(0));
2297 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Scale(fitMCtemplate->GetParameter(1));
2298 TH1F *fHistd0rphiITSMIoneSPDInAccMCFit=(TH1F*)fHistd0rphiITSMIoneSPDInAccPandMatMC->Clone("fHistd0rphiITSMIoneSPDInAccMCFit");
2299 fHistd0rphiITSMIoneSPDInAccMCFit->Add(fHistd0rphiITSMIoneSPDInAccSfromStrangeMC);
2300
2301 TCanvas *c1 = new TCanvas("c1","c1",1000,1000);
2302 c1->SetLogy();
2303 fHistd0rphiITSMIoneSPDInAccCopy->SetMinimum(1);
2304 fHistd0rphiITSMIoneSPDInAccCopy->SetMaximum(2*fHistd0rphiITSMIoneSPDInAcc->GetMaximum());
2305 fHistd0rphiITSMIoneSPDInAcc->SetMinimum(1);
2306 fHistd0rphiITSMIoneSPDInAccMC->SetMinimum(1);
2307 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->SetMinimum(1);
2308 fHistd0rphiITSMIoneSPDInAccPandMatMC->SetMinimum(1);
2309 fHistd0rphiITSMIoneSPDInAccCopy->SetLineColor(4);
2310 fHistd0rphiITSMIoneSPDInAccCopy->Draw();
2311 fHistd0rphiITSMIoneSPDInAcc->SetLineColor(4);
2312 fHistd0rphiITSMIoneSPDInAcc->Draw("same");
2313 fHistd0rphiITSMIoneSPDInAccMCFit->SetLineColor(2);
2314 fHistd0rphiITSMIoneSPDInAccMCFit->Draw("same");
2315 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->SetLineColor(3);
2316 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Draw("same");
2317 fHistd0rphiITSMIoneSPDInAccPandMatMC->SetLineColor(15);
2318 fHistd0rphiITSMIoneSPDInAccPandMatMC->Draw("same");
2319
2320
2321
2322 TCanvas *c3 = new TCanvas("c3","c3");
2323 c3->SetLogx();
2324 c3->SetGridx();
2325 c3->SetGridy();
2326 Float_t d0cut[15]={0.0301,0.0401,0.0501,0.0601,0.0801,0.101,0.151,0.201,0.251,0.301,0.401,0.601,0.801,1.001,1.401};
2327
2328 Float_t fracSfromStrange[15],fracSfromStrangeMC[15],fracSfromMatMC[15],fracS[15],fracSMC[15],fracSRatio[15];
2329 for(Int_t i=0;i<15;i++) {
2330 Int_t bin1=fHistd0rphiITSMIoneSPDInAccPandMatMC->FindBin(-d0cut[i]);
2331 Int_t bin2=fHistd0rphiITSMIoneSPDInAccPandMatMC->FindBin(+d0cut[i]);
2332 Float_t intDatacut=fHistd0rphiITSMIoneSPDInAcc->Integral(bin1,bin2);
2333 Float_t intMCcut=fHistd0rphiITSMIoneSPDInAccMC->Integral(bin1,bin2);
2334 Float_t intSfromStrangecut=fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Integral(bin1,bin2);
2335 Float_t intSfromMatcut=fHistd0rphiITSMIoneSPDInAccSfromMatMC->Integral(bin1,bin2);
2336 fracSfromStrange[i]=intSfromStrangecut/intDatacut;
2337 fracSfromStrangeMC[i]=intSfromStrangecut/fitMCtemplate->GetParameter(1)/intMCcut;
2338 fracSfromMatMC[i]=intSfromMatcut/intMCcut;
2339
2340 fracS[i]=fracSfromStrange[i]+fracSfromMatMC[i];
2341 fracSMC[i]=fracSfromStrangeMC[i]+fracSfromMatMC[i];
2342
2343 fracSRatio[i]=fracS[i]/fracSMC[i];
2344 }
2345 TGraph *gfracSfromStrange=new TGraph(15,d0cut,fracSfromStrange);
2346 gfracSfromStrange->SetMarkerColor(2);
2347 gfracSfromStrange->SetMarkerStyle(20);
2348 gfracSfromStrange->Draw("ap");
2349
2350 TGraph *gfracSfromStrangeMC=new TGraph(15,d0cut,fracSfromStrangeMC);
2351 gfracSfromStrangeMC->SetMarkerColor(1);
2352 gfracSfromStrangeMC->SetMarkerStyle(22);
2353 gfracSfromStrangeMC->Draw("p");
2354
2355 TGraph *gfracSfromMatMC=new TGraph(15,d0cut,fracSfromMatMC);
2356 gfracSfromMatMC->SetMarkerColor(4);
2357 gfracSfromMatMC->SetMarkerStyle(21);
2358 gfracSfromMatMC->Draw("p");
2359
2360 TGraph *gfracS=new TGraph(15,d0cut,fracS);
2361 gfracS->SetMarkerColor(2);
2362 gfracS->SetMarkerStyle(24);
2363 gfracS->Draw("p");
2364
2365 TGraph *gfracSMC=new TGraph(15,d0cut,fracSMC);
2366 gfracSMC->SetMarkerColor(1);
2367 gfracSMC->SetMarkerStyle(25);
2368 gfracSMC->Draw("p");
2369
2370
2371 TCanvas *c4 = new TCanvas("c4","c4");
2372 c4->SetLogx();
2373 c4->SetGridx();
2374 c4->SetGridy();
2375
2376 TGraph *gfracSRatio=new TGraph(15,d0cut,fracSRatio);
2377 gfracSRatio->SetMarkerColor(9);
2378 gfracSRatio->SetMarkerStyle(21);
2379 gfracSRatio->Draw("ap");
2380
2381
2382 return;
2383}
2384//-----------------------------------------------------------------------------
2385void PlotEffVSErrors() {
2386
2387 TFile *f1= new TFile("eff_104892_pd_testnew1.root");
2388
2389 TH1F *fHistPtITSMI6InAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMI6InAcc");
2390 TH1F *fHistPtITSMIge2InAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMIge2InAcc");
2391 TH1F *fHistPtITSMISPDInAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMISPDInAcc");
2392 TH1F *fHistPtITSMIoneSPDInAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMIoneSPDInAcc");
2393
2394 fHistPtITSMI6InAcctestnew1->SetMarkerStyle(20);
2395 fHistPtITSMIge2InAcctestnew1->SetMarkerStyle(20);
2396 fHistPtITSMISPDInAcctestnew1->SetMarkerStyle(20);
2397 fHistPtITSMIoneSPDInAcctestnew1->SetMarkerStyle(20);
2398 fHistPtITSMI6InAcctestnew1->SetMarkerColor(2);
2399 fHistPtITSMIge2InAcctestnew1->SetMarkerColor(1);
2400 fHistPtITSMISPDInAcctestnew1->SetMarkerColor(9);
2401 fHistPtITSMIoneSPDInAcctestnew1->SetMarkerColor(15);
2402
2403
2404 TFile *f2= new TFile("eff_104892_pd_testnew2.root");
2405
2406 TH1F *fHistPtITSMI6InAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMI6InAcc");
2407 TH1F *fHistPtITSMIge2InAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMIge2InAcc");
2408 TH1F *fHistPtITSMISPDInAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMISPDInAcc");
2409 TH1F *fHistPtITSMIoneSPDInAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMIoneSPDInAcc");
2410
2411 fHistPtITSMI6InAcctestnew2->SetMarkerStyle(21);
2412 fHistPtITSMIge2InAcctestnew2->SetMarkerStyle(21);
2413 fHistPtITSMISPDInAcctestnew2->SetMarkerStyle(21);
2414 fHistPtITSMIoneSPDInAcctestnew2->SetMarkerStyle(21);
2415 fHistPtITSMI6InAcctestnew2->SetMarkerColor(2);
2416 fHistPtITSMIge2InAcctestnew2->SetMarkerColor(1);
2417 fHistPtITSMISPDInAcctestnew2->SetMarkerColor(9);
2418 fHistPtITSMIoneSPDInAcctestnew2->SetMarkerColor(15);
2419
2420
2421 TFile *f3= new TFile("eff_104892_pd_testnew3.root");
2422
2423 TH1F *fHistPtITSMI6InAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMI6InAcc");
2424 TH1F *fHistPtITSMIge2InAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMIge2InAcc");
2425 TH1F *fHistPtITSMISPDInAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMISPDInAcc");
2426 TH1F *fHistPtITSMIoneSPDInAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMIoneSPDInAcc");
2427
2428 fHistPtITSMI6InAcctestnew3->SetMarkerStyle(22);
2429 fHistPtITSMIge2InAcctestnew3->SetMarkerStyle(22);
2430 fHistPtITSMISPDInAcctestnew3->SetMarkerStyle(22);
2431 fHistPtITSMIoneSPDInAcctestnew3->SetMarkerStyle(22);
2432 fHistPtITSMI6InAcctestnew3->SetMarkerColor(2);
2433 fHistPtITSMIge2InAcctestnew3->SetMarkerColor(1);
2434 fHistPtITSMISPDInAcctestnew3->SetMarkerColor(9);
2435 fHistPtITSMIoneSPDInAcctestnew3->SetMarkerColor(15);
2436
2437
2438 TFile *f5= new TFile("eff_104892_pd_testnew5.root");
2439
2440 TH1F *fHistPtITSMI6InAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMI6InAcc");
2441 TH1F *fHistPtITSMIge2InAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMIge2InAcc");
2442 TH1F *fHistPtITSMISPDInAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMISPDInAcc");
2443 TH1F *fHistPtITSMIoneSPDInAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMIoneSPDInAcc");
2444
2445 fHistPtITSMI6InAcctestnew5->SetMarkerStyle(24);
2446 fHistPtITSMIge2InAcctestnew5->SetMarkerStyle(24);
2447 fHistPtITSMISPDInAcctestnew5->SetMarkerStyle(24);
2448 fHistPtITSMIoneSPDInAcctestnew5->SetMarkerStyle(24);
2449 fHistPtITSMI6InAcctestnew5->SetMarkerColor(2);
2450 fHistPtITSMIge2InAcctestnew5->SetMarkerColor(1);
2451 fHistPtITSMISPDInAcctestnew5->SetMarkerColor(9);
2452 fHistPtITSMIoneSPDInAcctestnew5->SetMarkerColor(15);
2453
2454
2455 TFile *f6= new TFile("eff_104892_pd_testnew6.root");
2456
2457 TH1F *fHistPtITSMI6InAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMI6InAcc");
2458 TH1F *fHistPtITSMIge2InAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMIge2InAcc");
2459 TH1F *fHistPtITSMISPDInAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMISPDInAcc");
2460 TH1F *fHistPtITSMIoneSPDInAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMIoneSPDInAcc");
2461
2462 fHistPtITSMI6InAcctestnew6->SetMarkerStyle(25);
2463 fHistPtITSMIge2InAcctestnew6->SetMarkerStyle(25);
2464 fHistPtITSMISPDInAcctestnew6->SetMarkerStyle(25);
2465 fHistPtITSMIoneSPDInAcctestnew6->SetMarkerStyle(25);
2466 fHistPtITSMI6InAcctestnew6->SetMarkerColor(2);
2467 fHistPtITSMIge2InAcctestnew6->SetMarkerColor(1);
2468 fHistPtITSMISPDInAcctestnew6->SetMarkerColor(9);
2469 fHistPtITSMIoneSPDInAcctestnew6->SetMarkerColor(15);
2470
2471
2472 TFile *f7= new TFile("eff_104892_pd_testnew7.root");
2473
2474 TH1F *fHistPtITSMI6InAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMI6InAcc");
2475 TH1F *fHistPtITSMIge2InAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMIge2InAcc");
2476 TH1F *fHistPtITSMISPDInAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMISPDInAcc");
2477 TH1F *fHistPtITSMIoneSPDInAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMIoneSPDInAcc");
2478
2479 fHistPtITSMI6InAcctestnew7->SetMarkerStyle(23);
2480 fHistPtITSMIge2InAcctestnew7->SetMarkerStyle(23);
2481 fHistPtITSMISPDInAcctestnew7->SetMarkerStyle(23);
2482 fHistPtITSMIoneSPDInAcctestnew7->SetMarkerStyle(23);
2483 fHistPtITSMI6InAcctestnew7->SetMarkerColor(2);
2484 fHistPtITSMIge2InAcctestnew7->SetMarkerColor(1);
2485 fHistPtITSMISPDInAcctestnew7->SetMarkerColor(9);
2486 fHistPtITSMIoneSPDInAcctestnew7->SetMarkerColor(15);
2487
2488
2489 TFile *f8= new TFile("eff_104892_pd_testnew8.root");
2490
2491 TH1F *fHistPtITSMI6InAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMI6InAcc");
2492 TH1F *fHistPtITSMIge2InAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMIge2InAcc");
2493 TH1F *fHistPtITSMISPDInAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMISPDInAcc");
2494 TH1F *fHistPtITSMIoneSPDInAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMIoneSPDInAcc");
2495
2496 fHistPtITSMI6InAcctestnew8->SetMarkerStyle(28);
2497 fHistPtITSMIge2InAcctestnew8->SetMarkerStyle(28);
2498 fHistPtITSMISPDInAcctestnew8->SetMarkerStyle(28);
2499 fHistPtITSMIoneSPDInAcctestnew8->SetMarkerStyle(28);
2500 fHistPtITSMI6InAcctestnew8->SetMarkerColor(2);
2501 fHistPtITSMIge2InAcctestnew8->SetMarkerColor(1);
2502 fHistPtITSMISPDInAcctestnew8->SetMarkerColor(9);
2503 fHistPtITSMIoneSPDInAcctestnew8->SetMarkerColor(15);
2504
2505
2506 TCanvas *c= new TCanvas("c","c");
2507 fHistPtITSMI6InAcctestnew1->Draw();
2508 fHistPtITSMIge2InAcctestnew1->Draw("same");
2509 fHistPtITSMISPDInAcctestnew1->Draw("same");
2510 fHistPtITSMIoneSPDInAcctestnew1->Draw("same");
2511 fHistPtITSMI6InAcctestnew2->Draw("same");
2512 fHistPtITSMIge2InAcctestnew2->Draw("same");
2513 fHistPtITSMISPDInAcctestnew2->Draw("same");
2514 fHistPtITSMIoneSPDInAcctestnew2->Draw("same");
2515 fHistPtITSMI6InAcctestnew3->Draw("same");
2516 fHistPtITSMIge2InAcctestnew3->Draw("same");
2517 fHistPtITSMISPDInAcctestnew3->Draw("same");
2518 fHistPtITSMIoneSPDInAcctestnew3->Draw("same");
2519 fHistPtITSMI6InAcctestnew5->Draw("same");
2520 fHistPtITSMIge2InAcctestnew5->Draw("same");
2521 fHistPtITSMISPDInAcctestnew5->Draw("same");
2522 fHistPtITSMIoneSPDInAcctestnew5->Draw("same");
2523 fHistPtITSMI6InAcctestnew6->Draw("same");
2524 fHistPtITSMIge2InAcctestnew6->Draw("same");
2525 fHistPtITSMISPDInAcctestnew6->Draw("same");
2526 fHistPtITSMIoneSPDInAcctestnew6->Draw("same");
2527 fHistPtITSMI6InAcctestnew7->Draw("same");
2528 fHistPtITSMIge2InAcctestnew7->Draw("same");
2529 fHistPtITSMISPDInAcctestnew7->Draw("same");
2530 fHistPtITSMIoneSPDInAcctestnew7->Draw("same");
2531 fHistPtITSMI6InAcctestnew8->Draw("same");
2532 fHistPtITSMIge2InAcctestnew8->Draw("same");
2533 fHistPtITSMISPDInAcctestnew8->Draw("same");
2534 fHistPtITSMIoneSPDInAcctestnew8->Draw("same");
2535
2536
2537 return;
2538}
8fa56655 2539//--------------------------------------------------------------------------
2540void ReweightStrange(TH1F *hPt,TH1F* hPtPfromStrange,TH1F* hPtSfromStrange) {
2541
2542 for(Int_t i=1;i<=hPt->GetNbinsX();i++) {
2543 Double_t pt=hPt->GetBinCenter(i);
2544 Double_t weight=1.;
2545 Double_t weightP=1.;
2546 if(pt<.25) {
2547 weight=1.3;//1.;
2548 } else if(pt>=0.25 && pt<0.5) {
2549 weight=1.5;//1.3;
2550 } else if(pt>=0.5 && pt<1.1) {
2551 weight=1.7;//1.44;
2552 } else if(pt>=1.1) {
2553 weight=2;//1.7;
2554 }
2555
2556 weightP*=1.3;
2557 hPt->SetBinContent(i,hPt->GetBinContent(i)+(weight-1.)*hPtSfromStrange->GetBinContent(i));
2558 if(hPtPfromStrange) hPt->SetBinContent(i,hPt->GetBinContent(i)+(weightP-1.)*hPtPfromStrange->GetBinContent(i));
2559 }
2560
2561 return;
2562}