Update
[u/mrichter/AliRoot.git] / PWG1 / macros / PlotITSTrackingHists.C
CommitLineData
b51e971f 1Bool_t PlotITSTrackingHists(TString fname="ITS.Performance.root",
2 Float_t *ioValues=0,Float_t *ioErrors=0)
3{
2308c814 4 //
5 // Macro to plot the histos from the task AliAnalysisTaskITSTrackingCheck
6 // A. Dainese 28.11.09
7 //
8
b51e971f 9 Bool_t plotAlignmentChecks=kFALSE;
fa516524 10 //gStyle->SetOptStat(0);
2308c814 11
8fa56655 12 if(fname.Contains("alien")) TGrid::Connect("alien://");
13
14 TFile *f= TFile::Open(fname.Data());
b51e971f 15 if(!f) return kFALSE;
2308c814 16
fa516524 17 TList *list=(TList*)f->Get("cOutputITS");
b51e971f 18 TList *listSPD=0;
af874c53 19 TDirectoryFile *dir=0;
8fa56655 20 if(!list) {
af874c53 21 dir=(TDirectoryFile*)f->GetDirectory("ITS_Performance");
b51e971f 22 if(dir) list = (TList*)dir->Get("cOutputITS");
23 // count active SPD HSs
24 dir=(TDirectoryFile*)f->GetDirectory("SPD_Performance");
25 if(dir) listSPD = (TList*)dir->Get("coutput1");
8fa56655 26 }
b51e971f 27
af874c53 28 if(!list) return kFALSE;
b51e971f 29
30 TH1F *hnHSsSPD=new TH1F("hnHSsSPD","Active HSs in SPD layers 1 and 2; layer; HSs",2,0.5,2.5);
31 if(listSPD) {
af874c53 32 //listSPD->Print();
b51e971f 33 TH1F *hFiredChip = (TH1F*)listSPD->FindObject("hFiredChip");
34 Int_t nHSsInner=0,nHSsOuter=0;
35 for(Int_t i=0;i<400;i++) if(hFiredChip->GetBinContent(i)>0) nHSsInner++;
36 for(Int_t i=400;i<1200;i++) if(hFiredChip->GetBinContent(i)>0) nHSsOuter++;
37 nHSsInner = (Int_t)(nHSsInner/10);
38 nHSsOuter = (Int_t)(nHSsOuter/10);
39 hnHSsSPD->SetBinContent(1,nHSsInner);
40 hnHSsSPD->SetBinContent(2,nHSsOuter);
41 if(ioValues) ioValues[0]=(Float_t)nHSsInner/40.;
42 if(ioValues) ioValues[1]=(Float_t)nHSsOuter/80.;
43 }
44
45 TCanvas *cSPD=new TCanvas("cSPD","cSPD");
46 hnHSsSPD->SetMaximum(90);
47 hnHSsSPD->SetMinimum(0);
48 hnHSsSPD->Draw();
49
2308c814 50 TH1F *fHistNclsITSSA = (TH1F*)list->FindObject("fHistNclsITSSA");
51 TH1F *fHistClusterMapITSSA = (TH1F*)list->FindObject("fHistClusterMapITSSA");
52 TH1F *fHistClusterMapITSSAok = (TH1F*)list->FindObject("fHistClusterMapITSSAok");
53 TH1F *fHistClusterMapITSSAbad = (TH1F*)list->FindObject("fHistClusterMapITSSAbad");
54 TH1F *fHistClusterMapITSSAskipped = (TH1F*)list->FindObject("fHistClusterMapITSSAskipped");
55 TH1F *fHistClusterMapITSSAoutinz = (TH1F*)list->FindObject("fHistClusterMapITSSAoutinz");
56 TH1F *fHistClusterMapITSSAokoutinzbad = (TH1F*)list->FindObject("fHistClusterMapITSSAokoutinzbad");
57 TH1F *fHistClusterMapITSSAnorefit = (TH1F*)list->FindObject("fHistClusterMapITSSAnorefit");
58 TH1F *fHistClusterMapITSSAnocls = (TH1F*)list->FindObject("fHistClusterMapITSSAnocls");
59 TH1F *fHistNclsITSSAInAcc = (TH1F*)list->FindObject("fHistNclsITSSAInAcc");
60 TH1F *fHistClusterMapITSSAInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAInAcc");
61 TH1F *fHistClusterMapITSSAokInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAokInAcc");
62 TH1F *fHistClusterMapITSSAbadInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAbadInAcc");
fa516524 63 TH1F *fHistClusterMapModuleITSMIokInAcc = (TH1F*)list->FindObject("fHistClusterMapModuleITSMIokInAcc");
64 TH1F *fHistClusterMapModuleITSMIbadInAcc = (TH1F*)list->FindObject("fHistClusterMapModuleITSMIbadInAcc");
2308c814 65 TH1F *fHistClusterMapITSSAskippedInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAskippedInAcc");
66 TH1F *fHistClusterMapITSSAoutinzInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAoutinzInAcc");
67 TH1F *fHistClusterMapITSSAokoutinzbadInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAokoutinzbadInAcc");
68 TH1F *fHistClusterMapITSSAnorefitInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAnorefitInAcc");
69 TH1F *fHistClusterMapITSSAnoclsInAcc = (TH1F*)list->FindObject("fHistClusterMapITSSAnoclsInAcc");
fa516524 70 TH1F *fHistClusterMapModuleITSMInoclsInAcc = (TH1F*)list->FindObject("fHistClusterMapModuleITSMInoclsInAcc");
2308c814 71 TH1F *fHistNclsITSMI = (TH1F*)list->FindObject("fHistNclsITSMI");
72 TH1F *fHistClusterMapITSMI = (TH1F*)list->FindObject("fHistClusterMapITSMI");
73 TH1F *fHistClusterMapITSMIok = (TH1F*)list->FindObject("fHistClusterMapITSMIok");
74 TH1F *fHistClusterMapITSMIbad = (TH1F*)list->FindObject("fHistClusterMapITSMIbad");
75 TH1F *fHistClusterMapITSMIskipped = (TH1F*)list->FindObject("fHistClusterMapITSMIskipped");
76 TH1F *fHistClusterMapITSMIoutinz = (TH1F*)list->FindObject("fHistClusterMapITSMIoutinz");
77 TH1F *fHistClusterMapITSMIokoutinzbad = (TH1F*)list->FindObject("fHistClusterMapITSMIokoutinzbad");
78 TH1F *fHistClusterMapITSMInorefit = (TH1F*)list->FindObject("fHistClusterMapITSMInorefit");
79 TH1F *fHistClusterMapITSMInocls = (TH1F*)list->FindObject("fHistClusterMapITSMInocls");
80
c2893e82 81 TH1F *fHistPhiTPCInAcc = (TH1F*)list->FindObject("fHistPhiTPCInAcc");
82 TH1F *fHistPhiITSMIokbadoutinz6InAcc = (TH1F*)list->FindObject("fHistPhiITSMIokbadoutinz6InAcc");
83
84 TH1F *fHistPtTPCInAcc = (TH1F*)list->FindObject("fHistPtTPCInAcc");
8fa56655 85 TH1F *fHistPtTPCInAccSfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccSfromStrange");
86 TH1F *fHistPtTPCInAccPfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccPfromStrange");
fa516524 87 TH1F *fHistPtTPCInAccMCtwoSPD = (TH1F*)list->FindObject("fHistPtTPCInAccMCtwoSPD");
88 TH1F *fHistPtTPCInAccMConeSPD = (TH1F*)list->FindObject("fHistPtTPCInAccMConeSPD");
c2893e82 89 TH1F *fHistPtITSMI6InAcc = (TH1F*)list->FindObject("fHistPtITSMI6InAcc");
90 TH1F *fHistPtITSMI5InAcc = (TH1F*)list->FindObject("fHistPtITSMI5InAcc");
91 TH1F *fHistPtITSMI4InAcc = (TH1F*)list->FindObject("fHistPtITSMI4InAcc");
92 TH1F *fHistPtITSMI3InAcc = (TH1F*)list->FindObject("fHistPtITSMI3InAcc");
93 TH1F *fHistPtITSMI2InAcc = (TH1F*)list->FindObject("fHistPtITSMI2InAcc");
94 TH1F *fHistPtITSMISPDInAcc = (TH1F*)list->FindObject("fHistPtITSMISPDInAcc");
fa516524 95 TH1F *fHistPtITSMIoneSPDInAcc = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAcc");
af874c53 96 TH1F *fHistPtITSMI6InAccFake = (TH1F*)list->FindObject("fHistPtITSMI6InAccFake");
97 TH1F *fHistPtITSMI5InAccFake = (TH1F*)list->FindObject("fHistPtITSMI5InAccFake");
98 TH1F *fHistPtITSMI4InAccFake = (TH1F*)list->FindObject("fHistPtITSMI4InAccFake");
99 TH1F *fHistPtITSMI3InAccFake = (TH1F*)list->FindObject("fHistPtITSMI3InAccFake");
100 TH1F *fHistPtITSMI2InAccFake = (TH1F*)list->FindObject("fHistPtITSMI2InAccFake");
101 TH1F *fHistPtITSMISPDInAccFake = (TH1F*)list->FindObject("fHistPtITSMISPDInAccFake");
102 TH1F *fHistPtITSMIoneSPDInAccFake = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAccFake");
8fa56655 103 TH1F *fHistPtITSMIoneSPDthreeSDDSSDInAcc = (TH1F*)list->FindObject("fHistPtITSMIoneSPDthreeSDDSSDInAcc");
c2893e82 104 TH1F *fHistPtITSMIokbadoutinz6InAcc = (TH1F*)list->FindObject("fHistPtITSMIokbadoutinz6InAcc");
105 TH1F *fHistPtITSMIokbadoutinz5InAcc = (TH1F*)list->FindObject("fHistPtITSMIokbadoutinz5InAcc");
106 TH1F *fHistPtITSMIokbadoutinz4InAcc = (TH1F*)list->FindObject("fHistPtITSMIokbadoutinz4InAcc");
fa516524 107 TH1F *fHistPtTPCInAccP = (TH1F*)list->FindObject("fHistPtTPCInAccP");
108 TH1F *fHistPtITSMI6InAccP = (TH1F*)list->FindObject("fHistPtITSMI6InAccP");
109 TH1F *fHistPtITSMI5InAccP = (TH1F*)list->FindObject("fHistPtITSMI5InAccP");
110 TH1F *fHistPtITSMI4InAccP = (TH1F*)list->FindObject("fHistPtITSMI4InAccP");
111 TH1F *fHistPtITSMI3InAccP = (TH1F*)list->FindObject("fHistPtITSMI3InAccP");
112 TH1F *fHistPtITSMI2InAccP = (TH1F*)list->FindObject("fHistPtITSMI2InAccP");
113 TH1F *fHistPtITSMISPDInAccP = (TH1F*)list->FindObject("fHistPtITSMISPDInAccP");
114 TH1F *fHistPtITSMIoneSPDInAccP = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAccP");
115 TH1F *fHistPtTPCInAccS = (TH1F*)list->FindObject("fHistPtTPCInAccS");
116 TH1F *fHistPtITSMI6InAccS = (TH1F*)list->FindObject("fHistPtITSMI6InAccS");
117 TH1F *fHistPtITSMI5InAccS = (TH1F*)list->FindObject("fHistPtITSMI5InAccS");
118 TH1F *fHistPtITSMI4InAccS = (TH1F*)list->FindObject("fHistPtITSMI4InAccS");
119 TH1F *fHistPtITSMI3InAccS = (TH1F*)list->FindObject("fHistPtITSMI3InAccS");
120 TH1F *fHistPtITSMI2InAccS = (TH1F*)list->FindObject("fHistPtITSMI2InAccS");
121 TH1F *fHistPtITSMISPDInAccS = (TH1F*)list->FindObject("fHistPtITSMISPDInAccS");
122 TH1F *fHistPtITSMIoneSPDInAccS = (TH1F*)list->FindObject("fHistPtITSMIoneSPDInAccS");
123
124 TH1F *fHistRProdVtxInAccP = (TH1F*)list->FindObject("fHistRProdVtxInAccP");
125 TH1F *fHistRProdVtxInAccS = (TH1F*)list->FindObject("fHistRProdVtxInAccS");
126
127 TH1F *fHistxlocSDDok = (TH1F*)list->FindObject("fHistxlocSDDok");
128 TH1F *fHistxlocSDDall = (TH1F*)list->FindObject("fHistxlocSDDall");
129 TH1F *fHistzlocSDDok = (TH1F*)list->FindObject("fHistzlocSDDok");
130 TH1F *fHistzlocSDDall = (TH1F*)list->FindObject("fHistzlocSDDall");
131
132 TH1F *fHistPtITSTPCsel = (TH1F*)list->FindObject("fHistPtITSTPCsel");
133 TH1F *fHistPtITSTPCselP = (TH1F*)list->FindObject("fHistPtITSTPCselP");
134 TH1F *fHistPtITSTPCselS = (TH1F*)list->FindObject("fHistPtITSTPCselS");
af874c53 135 TH1F *fHistPtITSTPCselFake = (TH1F*)list->FindObject("fHistPtITSTPCselFake");
fa516524 136 TH1F *fHistPtITSTPCselPfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
137 TH1F *fHistPtITSTPCselSfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
138 TH1F *fHistPtITSTPCselSfromMat = (TH1F*)list->FindObject("fHistPtITSTPCselSfromMat");
139
fa516524 140 TH1F *fHistPtTPCInAccSfromMat = (TH1F*)list->FindObject("fHistPtTPCInAccSfromMat");
141
af874c53 142
8fa56655 143 //ReweightStrange(fHistPtTPCInAcc,fHistPtTPCInAccPfromStrange,fHistPtTPCInAccSfromStrange);
144 //ReweightStrange(fHistPtITSTPCsel,fHistPtITSTPCselPfromStrange,fHistPtITSTPCselSfromStrange);
c2893e82 145
146 //---------------------------------------------------------------
fa516524 147 TH1F *fHistPtITSMIge2InAcc = (TH1F*)fHistPtITSMI6InAcc->Clone("fHistPtITSMIge2InAcc");
148 fHistPtITSMIge2InAcc->Add(fHistPtITSMI5InAcc);
149 fHistPtITSMIge2InAcc->Add(fHistPtITSMI4InAcc);
150 fHistPtITSMIge2InAcc->Add(fHistPtITSMI3InAcc);
151 fHistPtITSMIge2InAcc->Add(fHistPtITSMI2InAcc);
af874c53 152 TH1F *fHistPtITSMIge2InAccFake = 0;
153 if(fHistPtITSMI6InAccFake) {
154 fHistPtITSMIge2InAccFake=(TH1F*)fHistPtITSMI6InAccFake->Clone("fHistPtITSMIge2InAccFake");
155 fHistPtITSMIge2InAccFake->Add(fHistPtITSMI5InAccFake);
156 fHistPtITSMIge2InAccFake->Add(fHistPtITSMI4InAccFake);
157 fHistPtITSMIge2InAccFake->Add(fHistPtITSMI3InAccFake);
158 fHistPtITSMIge2InAccFake->Add(fHistPtITSMI2InAccFake);
159 }
fa516524 160 TH1F *fHistPtITSMIge2InAccP = (TH1F*)fHistPtITSMI6InAccP->Clone("fHistPtITSMIge2InAccP");
161 fHistPtITSMIge2InAccP->Add(fHistPtITSMI5InAccP);
162 fHistPtITSMIge2InAccP->Add(fHistPtITSMI4InAccP);
163 fHistPtITSMIge2InAccP->Add(fHistPtITSMI3InAccP);
164 fHistPtITSMIge2InAccP->Add(fHistPtITSMI2InAccP);
165 TH1F *fHistPtITSMIge2InAccS = (TH1F*)fHistPtITSMI6InAccS->Clone("fHistPtITSMIge2InAccS");
166 fHistPtITSMIge2InAccS->Add(fHistPtITSMI5InAccS);
167 fHistPtITSMIge2InAccS->Add(fHistPtITSMI4InAccS);
168 fHistPtITSMIge2InAccS->Add(fHistPtITSMI3InAccS);
169 fHistPtITSMIge2InAccS->Add(fHistPtITSMI2InAccS);
170
af874c53 171 // fake fraction
172 if(fHistPtITSMIge2InAccFake) {
173 fHistPtITSMIge2InAccFake->Divide(fHistPtITSMIge2InAccFake,fHistPtITSMIge2InAcc,1,1,"B");
174 fHistPtITSMI2InAccFake->Divide(fHistPtITSMI2InAccFake,fHistPtITSMI2InAcc,1,1,"B");
175 fHistPtITSMI3InAccFake->Divide(fHistPtITSMI3InAccFake,fHistPtITSMI3InAcc,1,1,"B");
176 fHistPtITSMI4InAccFake->Divide(fHistPtITSMI4InAccFake,fHistPtITSMI4InAcc,1,1,"B");
177 fHistPtITSMI5InAccFake->Divide(fHistPtITSMI5InAccFake,fHistPtITSMI5InAcc,1,1,"B");
178 fHistPtITSMI6InAccFake->Divide(fHistPtITSMI6InAccFake,fHistPtITSMI6InAcc,1,1,"B");
179 fHistPtITSMISPDInAccFake->Divide(fHistPtITSMISPDInAccFake,fHistPtITSMISPDInAcc,1,1,"B");
180 fHistPtITSMIoneSPDInAccFake->Divide(fHistPtITSMIoneSPDInAccFake,fHistPtITSMIoneSPDInAcc,1,1,"B");
181 if (fHistPtITSTPCselFake)fHistPtITSTPCselFake->Divide(fHistPtITSTPCselFake,fHistPtITSTPCsel,1,1,"B");
182 }
183
fa516524 184 TH1F* fHistPtITSMISPDInAccMC=(TH1F*)fHistPtITSMISPDInAcc->Clone("fHistPtITSMISPDInAccMC");
185 TH1F* fHistPtITSMIoneSPDInAccMC=(TH1F*)fHistPtITSMIoneSPDInAcc->Clone("fHistPtITSMIoneSPDInAccMC");
186
c2893e82 187
2308c814 188 TLegend *l1=new TLegend(0.5,0.5,0.9,0.9);
189 TLegend *l2=new TLegend(0.5,0.5,0.9,0.9);
190
191 TCanvas *c1= new TCanvas("c1","c1",10,10,600,500);
192 fHistNclsITSSA->SetMinimum(0);
193 fHistNclsITSSA->SetLineColor(1);
194 l1->AddEntry(fHistNclsITSSA,"ITS-SA","l");
195 fHistNclsITSSA->Draw();
196 fHistNclsITSSAInAcc->SetLineColor(4);
197 l1->AddEntry(fHistNclsITSSAInAcc,"ITS-SA in acc.","l");
198 fHistNclsITSSAInAcc->Draw("same");
199 fHistNclsITSMI->SetLineColor(2);
200 l1->AddEntry(fHistNclsITSMI,"ITS from TPC","l");
201 fHistNclsITSMI->Draw("same");
202 l1->Draw();
203
204
205 TCanvas *c2 =new TCanvas("c2","c2",10,10,1200,800);
206 c2->Divide(3,2);
207 c2->cd(1);
208 //
209 fHistClusterMapITSSAokoutinzbad->SetLineColor(1);
210 fHistClusterMapITSSAokoutinzbad->SetMarkerColor(1);
211 fHistClusterMapITSSAokoutinzbad->SetMarkerStyle(20);
212 fHistClusterMapITSSAokoutinzbad->Draw();
c2893e82 213 fHistClusterMapITSMIokoutinzbad->SetLineColor(2);
214 fHistClusterMapITSMIokoutinzbad->SetMarkerColor(2);
2308c814 215 fHistClusterMapITSMIokoutinzbad->SetMarkerStyle(20);
216 fHistClusterMapITSMIokoutinzbad->Draw("same");
217 l1->Draw();
218 //
219 c2->cd(2);
220 fHistClusterMapITSSAok->SetLineColor(1);
221 fHistClusterMapITSSAok->SetMarkerColor(1);
222 fHistClusterMapITSSAok->SetMarkerStyle(21);
223 fHistClusterMapITSSAok->Draw();
224 fHistClusterMapITSMIok->SetLineColor(2);
225 fHistClusterMapITSMIok->SetMarkerColor(2);
226 fHistClusterMapITSMIok->SetMarkerStyle(21);
227 fHistClusterMapITSMIok->Draw("same");
228 //
229 c2->cd(3);
230 fHistClusterMapITSSAoutinz->SetLineColor(1);
231 fHistClusterMapITSSAoutinz->SetMarkerColor(1);
232 fHistClusterMapITSSAoutinz->SetMarkerStyle(22);
233 fHistClusterMapITSSAoutinz->Draw();
234 fHistClusterMapITSMIoutinz->SetLineColor(2);
235 fHistClusterMapITSMIoutinz->SetMarkerColor(2);
236 fHistClusterMapITSMIoutinz->SetMarkerStyle(22);
237 fHistClusterMapITSMIoutinz->Draw("same");
238 //
239 c2->cd(4);
240 fHistClusterMapITSSAbad->SetLineColor(1);
241 fHistClusterMapITSSAbad->SetMarkerColor(1);
242 fHistClusterMapITSSAbad->SetMarkerStyle(23);
243 fHistClusterMapITSSAbad->Draw();
244 fHistClusterMapITSMIbad->SetLineColor(2);
245 fHistClusterMapITSMIbad->SetMarkerColor(2);
246 fHistClusterMapITSMIbad->SetMarkerStyle(23);
247 fHistClusterMapITSMIbad->Draw("same");
248 //
249 c2->cd(5);
250 fHistClusterMapITSSAnocls->SetLineColor(1);
251 fHistClusterMapITSSAnocls->SetMarkerColor(1);
252 fHistClusterMapITSSAnocls->SetMarkerStyle(24);
253 fHistClusterMapITSSAnocls->Draw();
254 fHistClusterMapITSMInocls->SetLineColor(2);
255 fHistClusterMapITSMInocls->SetMarkerColor(2);
256 fHistClusterMapITSMInocls->SetMarkerStyle(24);
257 fHistClusterMapITSMInocls->Draw("same");
258
fa516524 259 TCanvas *c3 =new TCanvas("c3","c3",10,10,1200,800);
260 c3->Divide(1,2);
261 c3->cd(1);
262 fHistClusterMapModuleITSMIokInAcc->SetLineColor(1);
263 fHistClusterMapModuleITSMIokInAcc->Draw();
264 l2->AddEntry(fHistClusterMapModuleITSMIokInAcc,"ok","l");
265 fHistClusterMapModuleITSMIbadInAcc->SetLineColor(3);
266 fHistClusterMapModuleITSMIbadInAcc->Draw("same");
267 l2->AddEntry(fHistClusterMapModuleITSMIbadInAcc,"bad","l");
268 fHistClusterMapModuleITSMInoclsInAcc->SetLineColor(2);
269 fHistClusterMapModuleITSMInoclsInAcc->Draw("same");
270 l2->AddEntry(fHistClusterMapModuleITSMInoclsInAcc,"no cls","l");
2308c814 271 l2->Draw();
fa516524 272 c3->cd(2);
273 TH1F *fHistClusterMapModuleITSMIallInAcc=(TH1F*)fHistClusterMapModuleITSMIokInAcc->Clone("fHistClusterMapModuleITSMIallInAcc");
274 fHistClusterMapModuleITSMIallInAcc->Add(fHistClusterMapModuleITSMIbadInAcc);
275 fHistClusterMapModuleITSMIallInAcc->Add(fHistClusterMapModuleITSMInoclsInAcc);
276 TH1F *fHistClusterMapModuleITSMIokRatioInAcc=(TH1F*)fHistClusterMapModuleITSMIokInAcc->Clone("fHistClusterMapModuleITSMIokRatioInAcc");
277 fHistClusterMapModuleITSMIokRatioInAcc->Divide(fHistClusterMapModuleITSMIallInAcc);
278 for(Int_t ib=1;ib<=fHistClusterMapModuleITSMIokRatioInAcc->GetNbinsX();ib++) {
279 fHistClusterMapModuleITSMIokRatioInAcc->SetBinError(ib,0);
280 if(fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)) fHistClusterMapModuleITSMIokRatioInAcc->SetBinError(ib,TMath::Sqrt(fHistClusterMapModuleITSMIokRatioInAcc->GetBinContent(ib)*(1.-fHistClusterMapModuleITSMIokRatioInAcc->GetBinContent(ib))/fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)));
281 }
282 fHistClusterMapModuleITSMIokRatioInAcc->Draw();
283 TH1F *fHistClusterMapModuleITSMIbadRatioInAcc=(TH1F*)fHistClusterMapModuleITSMIbadInAcc->Clone("fHistClusterMapModuleITSMIbadRatioInAcc");
284 fHistClusterMapModuleITSMIbadRatioInAcc->Divide(fHistClusterMapModuleITSMIallInAcc);
285 for(Int_t ib=1;ib<=fHistClusterMapModuleITSMIokRatioInAcc->GetNbinsX();ib++) {
286 fHistClusterMapModuleITSMIbadRatioInAcc->SetBinError(ib,0);
287 if(fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)) fHistClusterMapModuleITSMIbadRatioInAcc->SetBinError(ib,TMath::Sqrt(fHistClusterMapModuleITSMIbadRatioInAcc->GetBinContent(ib)*(1.-fHistClusterMapModuleITSMIbadRatioInAcc->GetBinContent(ib))/fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)));
288 }
289 fHistClusterMapModuleITSMIbadRatioInAcc->Draw("same");
290 TH1F *fHistClusterMapModuleITSMInoclsRatioInAcc=(TH1F*)fHistClusterMapModuleITSMInoclsInAcc->Clone("fHistClusterMapModuleITSMInoclsRatioInAcc");
291 fHistClusterMapModuleITSMInoclsRatioInAcc->Divide(fHistClusterMapModuleITSMIallInAcc);
292 for(Int_t ib=1;ib<=fHistClusterMapModuleITSMIokRatioInAcc->GetNbinsX();ib++) {
293 fHistClusterMapModuleITSMInoclsRatioInAcc->SetBinError(ib,0);
294 if(fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)) fHistClusterMapModuleITSMInoclsRatioInAcc->SetBinError(ib,TMath::Sqrt(fHistClusterMapModuleITSMInoclsRatioInAcc->GetBinContent(ib)*(1.-fHistClusterMapModuleITSMInoclsRatioInAcc->GetBinContent(ib))/fHistClusterMapModuleITSMIallInAcc->GetBinContent(ib)));
295 }
296 fHistClusterMapModuleITSMInoclsRatioInAcc->Draw("same");
2308c814 297
fa516524 298 TCanvas *c3b = new TCanvas("c3b","c3b");
299 c3b->Divide(2,1);
300 c3b->cd(1);
301 fHistxlocSDDok->Divide(fHistxlocSDDall);
302 fHistxlocSDDok->Draw();
303 c3b->cd(2);
304 fHistzlocSDDok->Divide(fHistzlocSDDall);
305 fHistzlocSDDok->Draw();
2308c814 306
c2893e82 307 TCanvas *c4 =new TCanvas("c4","c4",10,10,500,500);
308 c4->SetGridy();
309 fHistPhiITSMIokbadoutinz6InAcc->Divide(fHistPhiTPCInAcc);
310 fHistPhiITSMIokbadoutinz6InAcc->SetMinimum(0);
311 fHistPhiITSMIokbadoutinz6InAcc->SetMaximum(1.5);
312 fHistPhiITSMIokbadoutinz6InAcc->SetYTitle("ITS+TPC / TPC");
313 fHistPhiITSMIokbadoutinz6InAcc->SetTitle("Fraction of tracks with 6 layers ok");
314 fHistPhiITSMIokbadoutinz6InAcc->Draw();
315
fa516524 316 TCanvas *c5c =new TCanvas("c5c","c5c",10,10,600,600);
317 c5c->SetGridy();
318 TH1F *fHistPtTPCInAccSecFrac = (TH1F*)fHistPtTPCInAccS->Clone("fHistPtTPCInAccSecFrac");
319 fHistPtTPCInAccSecFrac->Divide(fHistPtTPCInAcc);
320 fHistPtTPCInAccSecFrac->SetLineColor(kOrange+7);
321 fHistPtTPCInAccSecFrac->SetTitle("Fraction of secondaries");
322 fHistPtTPCInAccSecFrac->SetYTitle("sec/all");
323 fHistPtTPCInAccSecFrac->Draw();
324 TH1F *fHistPtITSMI2InAccSecFrac = (TH1F*)fHistPtITSMI2InAccS->Clone("fHistPtITSMI2InAccSecFrac");
325 fHistPtITSMI2InAccSecFrac->Divide(fHistPtITSMI2InAcc);
326 fHistPtITSMI2InAccSecFrac->SetLineColor(7);
327 fHistPtITSMI2InAccSecFrac->Draw("same");
328 TH1F *fHistPtITSMIge2InAccSecFrac = (TH1F*)fHistPtITSMIge2InAccS->Clone("fHistPtITSMIge2InAccSecFrac");
329 fHistPtITSMIge2InAccSecFrac->Divide(fHistPtITSMIge2InAcc);
330 fHistPtITSMIge2InAccSecFrac->Draw("same");
331 TH1F *fHistPtITSMI3InAccSecFrac = (TH1F*)fHistPtITSMI3InAccS->Clone("fHistPtITSMI3InAccSecFrac");
332 fHistPtITSMI3InAccSecFrac->Divide(fHistPtITSMI3InAcc);
333 fHistPtITSMI3InAccSecFrac->SetLineColor(6);
334 fHistPtITSMI3InAccSecFrac->Draw("same");
335 TH1F *fHistPtITSMI4InAccSecFrac = (TH1F*)fHistPtITSMI4InAccS->Clone("fHistPtITSMI4InAccSecFrac");
336 fHistPtITSMI4InAccSecFrac->Divide(fHistPtITSMI4InAcc);
337 fHistPtITSMI4InAccSecFrac->SetLineColor(4);
338 fHistPtITSMI4InAccSecFrac->Draw("same");
339 TH1F *fHistPtITSMI5InAccSecFrac = (TH1F*)fHistPtITSMI5InAccS->Clone("fHistPtITSMI5InAccSecFrac");
340 fHistPtITSMI5InAccSecFrac->Divide(fHistPtITSMI5InAcc);
341 fHistPtITSMI5InAccSecFrac->SetLineColor(3);
342 fHistPtITSMI5InAccSecFrac->Draw("same");
343 TH1F *fHistPtITSMI6InAccSecFrac = (TH1F*)fHistPtITSMI6InAccS->Clone("fHistPtITSMI6InAccSecFrac");
344 fHistPtITSMI6InAccSecFrac->Divide(fHistPtITSMI6InAcc);
345 fHistPtITSMI6InAccSecFrac->SetLineColor(2);
346 fHistPtITSMI6InAccSecFrac->SetLineColor(2);
347 fHistPtITSMI6InAccSecFrac->Draw("same");
348 TH1F *fHistPtITSMISPDInAccSecFrac = (TH1F*)fHistPtITSMISPDInAccS->Clone("fHistPtITSMISPDInAccSecFrac");
349 fHistPtITSMISPDInAccSecFrac->Divide(fHistPtITSMISPDInAcc);
350 fHistPtITSMISPDInAccSecFrac->SetLineColor(9);
351 fHistPtITSMISPDInAccSecFrac->Draw("same");
352 TH1F *fHistPtITSMIoneSPDInAccSecFrac = (TH1F*)fHistPtITSMIoneSPDInAccS->Clone("fHistPtITSMIoneSPDInAccSecFrac");
353 fHistPtITSMIoneSPDInAccSecFrac->Divide(fHistPtITSMIoneSPDInAcc);
354 fHistPtITSMIoneSPDInAccSecFrac->SetLineColor(15);
355 fHistPtITSMIoneSPDInAccSecFrac->Draw("same");
356 TH1F *fHistPtITSTPCselSecFrac = (TH1F*)fHistPtITSTPCselS->Clone("fHistPtITSTPCselSecFrac");
357 fHistPtITSTPCselSecFrac->Divide(fHistPtITSTPCsel);
358 fHistPtITSTPCselSecFrac->SetLineColor(15);
359 fHistPtITSTPCselSecFrac->Draw("same");
360
361
c2893e82 362 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
363 TLegend *l4=new TLegend(0.5,0.5,0.9,0.9);
364 TCanvas *c5 =new TCanvas("c5","c5",10,10,1200,600);
365 c5->Divide(2,1);
366 c5_1->SetGridy();
367 c5_2->SetGridy();
8fa56655 368 c5_1->SetLogx();
369 c5_2->SetLogx();
c2893e82 370 c5->cd(1);
c2893e82 371 fHistPtITSMIge2InAcc->SetMaximum(1.5);
372 fHistPtITSMIge2InAcc->SetMinimum(0);
373 fHistPtITSMIge2InAcc->SetTitle("Fraction of prolonged tracks with N ITS points");
374 fHistPtITSMIge2InAcc->SetYTitle("ITS+TPC / TPC");
8fa56655 375 fHistPtITSMIge2InAcc->Divide(fHistPtITSMIge2InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 376 fHistPtITSMIge2InAcc->Draw();
377 l3->AddEntry(fHistPtITSMIge2InAcc,">=2 cls","l");
8fa56655 378 fHistPtITSMI6InAcc->Divide(fHistPtITSMI6InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 379 fHistPtITSMI6InAcc->SetLineColor(2);
380 l3->AddEntry(fHistPtITSMI6InAcc,"6 cls","l");
381 fHistPtITSMI6InAcc->Draw("same");
8fa56655 382 fHistPtITSMI5InAcc->Divide(fHistPtITSMI5InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 383 fHistPtITSMI5InAcc->SetLineColor(3);
384 l3->AddEntry(fHistPtITSMI5InAcc,"5 cls","l");
385 fHistPtITSMI5InAcc->Draw("same");
8fa56655 386 fHistPtITSMI4InAcc->Divide(fHistPtITSMI4InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 387 fHistPtITSMI4InAcc->SetLineColor(4);
388 l3->AddEntry(fHistPtITSMI4InAcc,"4 cls","l");
389 fHistPtITSMI4InAcc->Draw("same");
8fa56655 390 fHistPtITSMI3InAcc->Divide(fHistPtITSMI3InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 391 fHistPtITSMI3InAcc->SetLineColor(6);
392 l3->AddEntry(fHistPtITSMI3InAcc,"3 cls","l");
393 fHistPtITSMI3InAcc->Draw("same");
8fa56655 394 fHistPtITSMI2InAcc->Divide(fHistPtITSMI2InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 395 fHistPtITSMI2InAcc->SetLineColor(7);
396 l3->AddEntry(fHistPtITSMI2InAcc,"2 cls","l");
397 fHistPtITSMI2InAcc->Draw("same");
8fa56655 398 fHistPtITSMISPDInAcc->Divide(fHistPtITSMISPDInAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 399 fHistPtITSMISPDInAcc->SetLineColor(9);
400 l3->AddEntry(fHistPtITSMISPDInAcc,"2SPD + any","l");
401 fHistPtITSMISPDInAcc->Draw("same");
8fa56655 402 fHistPtITSMIoneSPDInAcc->Divide(fHistPtITSMIoneSPDInAcc,fHistPtTPCInAcc,1,1,"B");
fa516524 403 fHistPtITSMIoneSPDInAcc->SetLineColor(15);
404 l3->AddEntry(fHistPtITSMIoneSPDInAcc,">=1SPD + any","l");
405 fHistPtITSMIoneSPDInAcc->Draw("same");
8fa56655 406 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Divide(fHistPtITSMIoneSPDthreeSDDSSDInAcc,fHistPtTPCInAcc,1,1,"B");
407 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->SetLineColor(kOrange);
408 //l3->AddEntry(fHistPtITSMIoneSPDthreeSDDSSDInAcc,">=1SPD + >=3SDDSSD","l");
409 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Draw("same");
410 fHistPtITSTPCsel->Divide(fHistPtITSTPCsel,fHistPtTPCInAcc,1,1,"B");
fa516524 411 fHistPtITSTPCsel->SetLineColor(kAzure+1);
412 l3->AddEntry(fHistPtITSTPCsel,">=1SPD + any + d_{0} cut","l");
413 fHistPtITSTPCsel->Draw("same");
c2893e82 414 fHistPtITSMIge2InAcc->Draw("same");
415 l3->Draw();
b51e971f 416 if(ioValues) {
417 Int_t index,ptbin;
418 ptbin=fHistPtITSMIge2InAcc->FindBin(0.201);
419 index=2;
420 ioValues[index]=fHistPtITSMIge2InAcc->GetBinContent(ptbin);
421 ioErrors[index]=fHistPtITSMIge2InAcc->GetBinError(ptbin);
422 ptbin=fHistPtITSMIge2InAcc->FindBin(1.001);
423 index=3;
424 ioValues[index]=fHistPtITSMIge2InAcc->GetBinContent(ptbin);
425 ioErrors[index]=fHistPtITSMIge2InAcc->GetBinError(ptbin);
426 ptbin=fHistPtITSMIge2InAcc->FindBin(10.001);
427 index=4;
428 ioValues[index]=fHistPtITSMIge2InAcc->GetBinContent(ptbin);
429 ioErrors[index]=fHistPtITSMIge2InAcc->GetBinError(ptbin);
430 ptbin=fHistPtITSMI6InAcc->FindBin(0.201);
431 index=5;
432 ioValues[index]=fHistPtITSMI6InAcc->GetBinContent(ptbin);
433 ioErrors[index]=fHistPtITSMI6InAcc->GetBinError(ptbin);
434 ptbin=fHistPtITSMI6InAcc->FindBin(1.001);
435 index=6;
436 ioValues[index]=fHistPtITSMI6InAcc->GetBinContent(ptbin);
437 ioErrors[index]=fHistPtITSMI6InAcc->GetBinError(ptbin);
438 ptbin=fHistPtITSMI6InAcc->FindBin(10.001);
439 index=7;
440 ioValues[index]=fHistPtITSMI6InAcc->GetBinContent(ptbin);
441 ioErrors[index]=fHistPtITSMI6InAcc->GetBinError(ptbin);
442 ptbin=fHistPtITSMISPDInAcc->FindBin(0.201);
443 index=8;
444 ioValues[index]=fHistPtITSMISPDInAcc->GetBinContent(ptbin);
445 ioErrors[index]=fHistPtITSMISPDInAcc->GetBinError(ptbin);
446 ptbin=fHistPtITSMISPDInAcc->FindBin(1.001);
447 index=9;
448 ioValues[index]=fHistPtITSMISPDInAcc->GetBinContent(ptbin);
449 ioErrors[index]=fHistPtITSMISPDInAcc->GetBinError(ptbin);
450 ptbin=fHistPtITSMISPDInAcc->FindBin(10.001);
451 index=10;
452 ioValues[index]=fHistPtITSMISPDInAcc->GetBinContent(ptbin);
453 ioErrors[index]=fHistPtITSMISPDInAcc->GetBinError(ptbin);
454 ptbin=fHistPtITSMIoneSPDInAcc->FindBin(0.201);
455 index=11;
456 ioValues[index]=fHistPtITSMIoneSPDInAcc->GetBinContent(ptbin);
457 ioErrors[index]=fHistPtITSMIoneSPDInAcc->GetBinError(ptbin);
458 ptbin=fHistPtITSMIoneSPDInAcc->FindBin(1.001);
459 index=12;
460 ioValues[index]=fHistPtITSMIoneSPDInAcc->GetBinContent(ptbin);
461 ioErrors[index]=fHistPtITSMIoneSPDInAcc->GetBinError(ptbin);
462 ptbin=fHistPtITSMIoneSPDInAcc->FindBin(10.001);
463 index=13;
464 ioValues[index]=fHistPtITSMIoneSPDInAcc->GetBinContent(ptbin);
465 ioErrors[index]=fHistPtITSMIoneSPDInAcc->GetBinError(ptbin);
466 }
c2893e82 467 c5->cd(2);
468 TH1F *fHistPtITSMIokbadoutinzge4InAcc = (TH1F*)fHistPtITSMIokbadoutinz6InAcc->Clone("fHistPtITSMIokbadoutinzge4InAcc");
469 fHistPtITSMIokbadoutinzge4InAcc->Add(fHistPtITSMIokbadoutinz5InAcc);
470 fHistPtITSMIokbadoutinzge4InAcc->Add(fHistPtITSMIokbadoutinz4InAcc);
471 fHistPtITSMIokbadoutinzge4InAcc->SetMaximum(1.5);
472 fHistPtITSMIokbadoutinzge4InAcc->SetMinimum(0);
473 fHistPtITSMIokbadoutinzge4InAcc->SetTitle("Fraction of prolonged tracks with N ITS layers \"ok\"");
474 fHistPtITSMIokbadoutinzge4InAcc->SetYTitle("ITS+TPC / TPC");
8fa56655 475 fHistPtITSMIokbadoutinzge4InAcc->Divide(fHistPtITSMIokbadoutinzge4InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 476 fHistPtITSMIokbadoutinzge4InAcc->SetLineColor(1);
477 fHistPtITSMIokbadoutinzge4InAcc->Draw();
8fa56655 478 fHistPtITSMIokbadoutinz6InAcc->Divide(fHistPtITSMIokbadoutinz6InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 479 fHistPtITSMIokbadoutinz6InAcc->SetLineColor(2);
480 fHistPtITSMIokbadoutinz6InAcc->Draw("same");
8fa56655 481 fHistPtITSMIokbadoutinz5InAcc->Divide(fHistPtITSMIokbadoutinz5InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 482 fHistPtITSMIokbadoutinz5InAcc->SetLineColor(3);
483 fHistPtITSMIokbadoutinz5InAcc->Draw("same");
8fa56655 484 fHistPtITSMIokbadoutinz4InAcc->Divide(fHistPtITSMIokbadoutinz4InAcc,fHistPtTPCInAcc,1,1,"B");
c2893e82 485 fHistPtITSMIokbadoutinz4InAcc->SetLineColor(4);
486 fHistPtITSMIokbadoutinz4InAcc->Draw("same");
487 fHistPtITSMIokbadoutinzge4InAcc->Draw("same");
488 l4->AddEntry(fHistPtITSMIokbadoutinzge4InAcc,">=4 layers","l");
489 l4->AddEntry(fHistPtITSMIokbadoutinz6InAcc,"6 layers","l");
490 l4->AddEntry(fHistPtITSMIokbadoutinz5InAcc,"5 layers","l");
491 l4->AddEntry(fHistPtITSMIokbadoutinz4InAcc,"4 layers","l");
492 l4->Draw();
493
af874c53 494 if(fHistPtITSMIge2InAccFake) {
495 TCanvas *c5f =new TCanvas("c5f","c5f",10,10,600,600);
496 c5f->SetGridy();
497 c5f->SetLogx();
498 fHistPtITSMIge2InAccFake->SetMaximum(1.5);
499 fHistPtITSMIge2InAccFake->SetMinimum(0);
500 fHistPtITSMIge2InAccFake->SetTitle("Fraction of fake tracks with N ITS points");
501 fHistPtITSMIge2InAccFake->SetYTitle("Fraction of fakes");
502 fHistPtITSMIge2InAccFake->Draw();
503 fHistPtITSMI6InAccFake->SetLineColor(2);
504 fHistPtITSMI6InAccFake->Draw("same");
505 fHistPtITSMI5InAccFake->SetLineColor(3);
506 //fHistPtITSMI5InAccFake->Draw("same");
507 fHistPtITSMI4InAccFake->SetLineColor(4);
508 //fHistPtITSMI4InAccFake->Draw("same");
509 fHistPtITSMI3InAccFake->SetLineColor(6);
510 //fHistPtITSMI3InAccFake->Draw("same");
511 fHistPtITSMI2InAccFake->SetLineColor(7);
512 //fHistPtITSMI2InAccFake->Draw("same");
513 fHistPtITSMISPDInAccFake->SetLineColor(9);
514 fHistPtITSMISPDInAccFake->Draw("same");
515 fHistPtITSMIoneSPDInAccFake->SetLineColor(15);
516 fHistPtITSMIoneSPDInAccFake->Draw("same");
517 if(fHistPtITSTPCselFake) {
518 fHistPtITSTPCselFake->SetLineColor(kAzure+1);
519 fHistPtITSTPCselFake->Draw("same");
520 }
521 fHistPtITSMIge2InAccFake->Draw("same");
522 l3->Draw();
523 }
524
c2893e82 525
fa516524 526 TLegend *l4d=new TLegend(0.5,0.5,0.9,0.9);
527 TCanvas *c5d =new TCanvas("c5d","c5d",10,10,600,600);
528 c5d->SetGridy();
529 c5d->SetGridy();
530 fHistPtITSMISPDInAccMC->SetMaximum(1.5);
531 fHistPtITSMISPDInAccMC->SetMinimum(0);
532 fHistPtITSMISPDInAccMC->SetTitle("Fraction of prolonged tracks with N ITS points");
533 fHistPtITSMISPDInAccMC->SetYTitle("ITS+TPC / TPC");
8fa56655 534 fHistPtITSMISPDInAccMC->Divide(fHistPtITSMISPDInAccMC,fHistPtTPCInAccMCtwoSPD,1,1,"B");
fa516524 535 fHistPtITSMISPDInAccMC->SetLineColor(9);
536 l4d->AddEntry(fHistPtITSMISPDInAccMC,"2SPD + any","l");
537 fHistPtITSMISPDInAccMC->Draw();
8fa56655 538 fHistPtITSMIoneSPDInAccMC->Divide(fHistPtITSMIoneSPDInAccMC,fHistPtTPCInAccMConeSPD,1,1,"B");
fa516524 539 fHistPtITSMIoneSPDInAccMC->SetLineColor(15);
540 l4d->AddEntry(fHistPtITSMIoneSPDInAccMC,">=1SPD + any","l");
541 fHistPtITSMIoneSPDInAccMC->Draw("same");
542 l4d->Draw();
543
544 TFile *eff=new TFile("eff.root","recreate");
545 fHistPtITSMIge2InAcc->Write();
546 fHistPtITSMI6InAcc->Write();
547 fHistPtITSMI5InAcc->Write();
548 fHistPtITSMI4InAcc->Write();
549 fHistPtITSMI3InAcc->Write();
550 fHistPtITSMI2InAcc->Write();
551 fHistPtITSMISPDInAcc->Write();
552 fHistPtITSMIoneSPDInAcc->Write();
8fa56655 553 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Write();
fa516524 554 fHistPtITSTPCsel->Write();
8fa56655 555 fHistNclsITSMI->Write();
fa516524 556 fHistClusterMapModuleITSMIokRatioInAcc->Write();
557 fHistClusterMapModuleITSMIbadRatioInAcc->Write();
558 fHistClusterMapModuleITSMInoclsRatioInAcc->Write();
559 eff->Close();
560
561 c5c->cd();
562 l3->Draw();
563
564
565 TCanvas *c5b =new TCanvas("c5b","c5b",10,10,600,600);
566 c5b->SetLogy();
567 fHistRProdVtxInAccP->SetLineColor(2);
568 fHistRProdVtxInAccP->SetMinimum(1);
569 fHistRProdVtxInAccS->SetMinimum(1);
570 fHistRProdVtxInAccP->Draw();
571 fHistRProdVtxInAccS->Draw("sames");
572
573 TCanvas *c5a =new TCanvas("c5a","c5a",10,10,1200,600);
574 c5a->Divide(2,1);
8fa56655 575 c5a_1->SetLogx();
576 c5a_2->SetLogx();
fa516524 577 c5a_1->SetGridy();
578 c5a_2->SetGridy();
579 c5a->cd(1);
580 fHistPtITSMIge2InAccP->SetMaximum(1.5);
581 fHistPtITSMIge2InAccP->SetMinimum(0);
582 fHistPtITSMIge2InAccP->SetTitle("Fraction of prolonged tracks with N ITS points");
583 fHistPtITSMIge2InAccP->SetYTitle("ITS+TPC / TPC");
584 fHistPtITSMIge2InAccP->Draw();
8fa56655 585 fHistPtITSMIge2InAccP->Divide(fHistPtITSMIge2InAccP,fHistPtTPCInAccP,1,1,"B");
586 fHistPtITSMI6InAccP->Divide(fHistPtITSMI6InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 587 fHistPtITSMI6InAccP->SetLineColor(2);
588 fHistPtITSMI6InAccP->Draw("same");
8fa56655 589 fHistPtITSMI5InAccP->Divide(fHistPtITSMI5InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 590 fHistPtITSMI5InAccP->SetLineColor(3);
591 fHistPtITSMI5InAccP->Draw("same");
8fa56655 592 fHistPtITSMI4InAccP->Divide(fHistPtITSMI4InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 593 fHistPtITSMI4InAccP->SetLineColor(4);
594 fHistPtITSMI4InAccP->Draw("same");
8fa56655 595 fHistPtITSMI3InAccP->Divide(fHistPtITSMI3InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 596 fHistPtITSMI3InAccP->SetLineColor(6);
597 fHistPtITSMI3InAccP->Draw("same");
8fa56655 598 fHistPtITSMI2InAccP->Divide(fHistPtITSMI2InAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 599 fHistPtITSMI2InAccP->SetLineColor(7);
600 fHistPtITSMI2InAccP->Draw("same");
8fa56655 601 fHistPtITSMISPDInAccP->Divide(fHistPtITSMISPDInAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 602 fHistPtITSMISPDInAccP->SetLineColor(9);
603 fHistPtITSMISPDInAccP->Draw("same");
8fa56655 604 fHistPtITSMIoneSPDInAccP->Divide(fHistPtITSMIoneSPDInAccP,fHistPtTPCInAccP,1,1,"B");
fa516524 605 fHistPtITSMIoneSPDInAccP->SetLineColor(15);
606 fHistPtITSMIoneSPDInAccP->Draw("same");
8fa56655 607 fHistPtITSTPCselP->Divide(fHistPtITSTPCselP,fHistPtTPCInAccP,1,1,"B");
fa516524 608 fHistPtITSTPCselP->SetLineColor(kAzure+1);
609 fHistPtITSTPCselP->Draw("same");
610 fHistPtITSMIge2InAccP->Draw("same");
611 l3->Draw();
612 c5a->cd(2);
613 fHistPtITSMIge2InAccS->SetMaximum(1.5);
614 fHistPtITSMIge2InAccS->SetMinimum(0);
615 fHistPtITSMIge2InAccS->SetTitle("Fraction of prolonged tracks with N ITS points");
616 fHistPtITSMIge2InAccS->SetYTitle("ITS+TPC / TPC");
8fa56655 617 fHistPtITSMIge2InAccS->Divide(fHistPtITSMIge2InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 618 fHistPtITSMIge2InAccS->Draw();
8fa56655 619 fHistPtITSMI6InAccS->Divide(fHistPtITSMI6InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 620 fHistPtITSMI6InAccS->SetLineColor(2);
621 fHistPtITSMI6InAccS->Draw("same");
8fa56655 622 fHistPtITSMI5InAccS->Divide(fHistPtITSMI5InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 623 fHistPtITSMI5InAccS->SetLineColor(3);
624 fHistPtITSMI5InAccS->Draw("same");
8fa56655 625 fHistPtITSMI4InAccS->Divide(fHistPtITSMI4InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 626 fHistPtITSMI4InAccS->SetLineColor(4);
627 fHistPtITSMI4InAccS->Draw("same");
8fa56655 628 fHistPtITSMI3InAccS->Divide(fHistPtITSMI3InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 629 fHistPtITSMI3InAccS->SetLineColor(6);
630 fHistPtITSMI3InAccS->Draw("same");
8fa56655 631 fHistPtITSMI2InAccS->Divide(fHistPtITSMI2InAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 632 fHistPtITSMI2InAccS->SetLineColor(7);
633 fHistPtITSMI2InAccS->Draw("same");
8fa56655 634 fHistPtITSMISPDInAccS->Divide(fHistPtITSMISPDInAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 635 fHistPtITSMISPDInAccS->SetLineColor(9);
636 fHistPtITSMISPDInAccS->Draw("same");
8fa56655 637 fHistPtITSMIoneSPDInAccS->Divide(fHistPtITSMIoneSPDInAccS,fHistPtTPCInAccS,1,1,"B");
fa516524 638 fHistPtITSMIoneSPDInAccS->SetLineColor(15);
639 fHistPtITSMIoneSPDInAccS->Draw("same");
8fa56655 640 fHistPtITSTPCselS->Divide(fHistPtITSTPCselS,fHistPtTPCInAccS,1,1,"B");
fa516524 641 fHistPtITSTPCselS->SetLineColor(kAzure+1);
642 fHistPtITSTPCselS->Draw("same");
643 fHistPtITSMIge2InAccS->Draw("same");
644 l3->Draw();
645
646
b51e971f 647 if(!plotAlignmentChecks) return kTRUE;
fa516524 648
c2893e82 649 // PLOT ALIGNMENT CHECKS
650 //
651 TH1F *hSPDTrackletsTBdxy = new TH1F("hSPDTrackletsTBdxy","SPD tracklets; SPD tracklet to SPD vertex distance in (x,y) [cm]; entries",100,-0.1,0.1);
652 TH1F *hSPDTrackletsLRdxy = new TH1F("hSPDTrackletsLRdxy","SPD tracklets; SPD tracklet to SPD vertex distance in (x,y) [cm]; entries",100,-0.1,0.1);
653 TH1F *hSPDTrackletsTBdz = new TH1F("hSPDTrackletsTBdz","SPD tracklets; SPD tracklet to SPD vertex distance in z [cm]; entries",100,-0.1,0.1);
654 TH1F *hSPDTrackletsLRdz = new TH1F("hSPDTrackletsLRdz","SPD tracklets; SPD tracklet to SPD vertex distance in z [cm]; entries",100,-0.1,0.1);
655
656 TNtuple *fNtupleITSAlignSPDTracklets = (TNtuple*)list->FindObject("fNtupleITSAlignSPDTracklets");
657 Float_t dxy,dz,phi,pt;
658 fNtupleITSAlignSPDTracklets->SetBranchAddress("pt",&pt);
659 fNtupleITSAlignSPDTracklets->SetBranchAddress("phi",&phi);
660 fNtupleITSAlignSPDTracklets->SetBranchAddress("dxy",&dxy);
661 fNtupleITSAlignSPDTracklets->SetBranchAddress("dz",&dz);
662
663 for(Int_t i=0;i<fNtupleITSAlignSPDTracklets->GetEntries();i++) {
664 fNtupleITSAlignSPDTracklets->GetEvent(i);
fa516524 665 if(pt<.01) continue;
c2893e82 666 if(TMath::Abs(TMath::Abs(phi)-0.5*TMath::Pi())<0.25*TMath::Pi()) {
667 // top-bottom
668 hSPDTrackletsTBdxy->Fill(dxy);
669 hSPDTrackletsTBdz->Fill(dz);
670 } else {
671 // left-right
672 hSPDTrackletsLRdxy->Fill(dxy);
673 hSPDTrackletsLRdz->Fill(dz);
674 }
675 }
676
677 TLegend *l6=new TLegend(0.5,0.5,0.9,0.9);
678
679 TCanvas *c6 = new TCanvas("c6","c6",0,0,1000,500);
680 c6->Divide(2,1);
681 c6->cd(1);
682 hSPDTrackletsTBdxy->SetLineColor(4);
683 hSPDTrackletsTBdxy->Draw();
684 hSPDTrackletsLRdxy->SetLineColor(2);
fa516524 685 hSPDTrackletsLRdxy->Draw("sames");
c2893e82 686 l6->AddEntry(hSPDTrackletsTBdxy,"top-bottom","l");
687 l6->AddEntry(hSPDTrackletsLRdxy,"left-right","l");
688 l6->Draw();
689 c6->cd(2);
690 hSPDTrackletsTBdz->SetLineColor(4);
691 hSPDTrackletsTBdz->Draw();
692 hSPDTrackletsLRdz->SetLineColor(2);
fa516524 693 hSPDTrackletsLRdz->Draw("sames");
c2893e82 694 l6->Draw();
695
696
697 TH1F *hSPDExtraClsTBdxy = new TH1F("hSPDExtraClsTBdxy","SPD extra clusters; track-to-point distance in (x,y) [cm]; entries",100,-0.1,0.1);
698 TH1F *hSPDExtraClsLRdxy = new TH1F("hSPDExtraClsLRdxy","SPD extra clusters; track-to-point distance in (x,y) [cm]; entries",100,-0.1,0.1);
699 TH1F *hSPDExtraClsTBdz = new TH1F("hSPDExtraClsTBdz","SPD extra clusters; track-to-point distance in z [cm]; entries",100,-0.1,0.1);
700 TH1F *hSPDExtraClsLRdz = new TH1F("hSPDExtraClsLRdz","SPD extra clusters; track-to-point distance in z [cm]; entries",100,-0.1,0.1);
701
702 TNtuple *fNtupleITSAlignExtra = (TNtuple*)list->FindObject("fNtupleITSAlignExtra");
703 Float_t layer,npoints,x,y,z;
704 fNtupleITSAlignExtra->SetBranchAddress("layer",&layer);
705 fNtupleITSAlignExtra->SetBranchAddress("npoints",&npoints);
706 fNtupleITSAlignExtra->SetBranchAddress("x",&x);
707 fNtupleITSAlignExtra->SetBranchAddress("y",&y);
708 fNtupleITSAlignExtra->SetBranchAddress("z",&z);
709 fNtupleITSAlignExtra->SetBranchAddress("dxy",&dxy);
710 fNtupleITSAlignExtra->SetBranchAddress("dz",&dz);
711 fNtupleITSAlignExtra->SetBranchAddress("pt",&pt);
712
713 for(Int_t i=0;i<fNtupleITSAlignExtra->GetEntries();i++) {
714 fNtupleITSAlignExtra->GetEvent(i);
fa516524 715 if(pt<0.1) continue;
c2893e82 716 if(layer!=0 && layer!=1) continue;
fa516524 717 if(npoints<3) continue;
c2893e82 718 phi = TMath::ATan2(y,x);
719 if(TMath::Abs(TMath::Abs(phi)-0.5*TMath::Pi())<0.25*TMath::Pi()) {
720 // top-bottom
721 hSPDExtraClsTBdxy->Fill(dxy);
722 hSPDExtraClsTBdz->Fill(dz);
723 } else {
724 // left-right
725 hSPDExtraClsLRdxy->Fill(dxy);
726 hSPDExtraClsLRdz->Fill(dz);
727 }
728 }
729
730 TCanvas *c7 = new TCanvas("c7","c7",0,0,1000,500);
731 c7->Divide(2,1);
732 c7->cd(1);
733 hSPDExtraClsTBdxy->SetLineColor(4);
734 hSPDExtraClsTBdxy->Draw();
735 hSPDExtraClsLRdxy->SetLineColor(2);
736 hSPDExtraClsLRdxy->Draw("same");
737 l6->Draw();
738 c7->cd(2);
739 hSPDExtraClsTBdz->SetLineColor(4);
740 hSPDExtraClsTBdz->Draw();
741 hSPDExtraClsLRdz->SetLineColor(2);
742 hSPDExtraClsLRdz->Draw("same");
743 l6->Draw();
744
745
b51e971f 746 return kTRUE;
2308c814 747}
fa516524 748//-----------------------------------------------------------------------------
749void PlotEffRatio() {
750
8fa56655 751 TFile *f= new TFile("eff_117220_117223_pass1.root");
fa516524 752
753 TH1F *fHistPtITSMI6InAcc = (TH1F*)f->Get("fHistPtITSMI6InAcc");
754 TH1F *fHistPtITSMI5InAcc = (TH1F*)f->Get("fHistPtITSMI5InAcc");
755 TH1F *fHistPtITSMI4InAcc = (TH1F*)f->Get("fHistPtITSMI4InAcc");
756 TH1F *fHistPtITSMI3InAcc = (TH1F*)f->Get("fHistPtITSMI3InAcc");
757 TH1F *fHistPtITSMI2InAcc = (TH1F*)f->Get("fHistPtITSMI2InAcc");
758 TH1F *fHistPtITSMIge2InAcc = (TH1F*)f->Get("fHistPtITSMIge2InAcc");
759 TH1F *fHistPtITSMISPDInAcc = (TH1F*)f->Get("fHistPtITSMISPDInAcc");
760 TH1F *fHistPtITSMIoneSPDInAcc = (TH1F*)f->Get("fHistPtITSMIoneSPDInAcc");
8fa56655 761 TH1F *fHistPtITSMIoneSPDthreeSDDSSDInAcc = (TH1F*)f->Get("fHistPtITSMIoneSPDthreeSDDSSDInAcc");
fa516524 762 TH1F *fHistPtITSTPCsel = (TH1F*)f->Get("fHistPtITSTPCsel");
763 TH1F *fHistClusterMapModuleITSMIokRatioInAcc = (TH1F*)f->Get("fHistClusterMapModuleITSMIokRatioInAcc");
8fa56655 764 TH1F *fHistNclsITSMI = (TH1F*)f->Get("fHistNclsITSMI");
765
fa516524 766
8fa56655 767 TFile *fMC= new TFile("eff_lhc10c4.root");
fa516524 768
769 TH1F *fHistPtITSMI6InAccMC = (TH1F*)fMC->Get("fHistPtITSMI6InAcc");
770 TH1F *fHistPtITSMI5InAccMC = (TH1F*)fMC->Get("fHistPtITSMI5InAcc");
771 TH1F *fHistPtITSMI4InAccMC = (TH1F*)fMC->Get("fHistPtITSMI4InAcc");
772 TH1F *fHistPtITSMI3InAccMC = (TH1F*)fMC->Get("fHistPtITSMI3InAcc");
773 TH1F *fHistPtITSMI2InAccMC = (TH1F*)fMC->Get("fHistPtITSMI2InAcc");
774 TH1F *fHistPtITSMIge2InAccMC = (TH1F*)fMC->Get("fHistPtITSMIge2InAcc");
775 TH1F *fHistPtITSMISPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMISPDInAcc");
776 TH1F *fHistPtITSMIoneSPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMIoneSPDInAcc");
8fa56655 777 TH1F *fHistPtITSMIoneSPDthreeSDDSSDInAccMC = (TH1F*)fMC->Get("fHistPtITSMIoneSPDthreeSDDSSDInAcc");
fa516524 778 TH1F *fHistPtITSTPCselMC = (TH1F*)fMC->Get("fHistPtITSTPCsel");
779 TH1F *fHistClusterMapModuleITSMIokRatioInAccMC = (TH1F*)fMC->Get("fHistClusterMapModuleITSMIokRatioInAcc");
8fa56655 780 TH1F *fHistNclsITSMIMC = (TH1F*)fMC->Get("fHistNclsITSMIMC");
fa516524 781
8fa56655 782 /*
783 TCanvas *c0 = new TCanvas("c0","c0",0,0,600,500);
784 c0->SetGridy();
785 fHistNclsITSMI->SetLineColor(4);
786 fHistNclsITSMI->SetMarkerColor(4);
787 fHistNclsITSMI->SetLineStyle(1);
788 fHistNclsITSMI->SetMarkerStyle(20);
789 fHistNclsITSMI->Draw();
790 fHistNclsITSMIMC->SetLineColor(4);
791 fHistNclsITSMIMC->SetMarkerColor(4);
792 fHistNclsITSMIMC->SetLineStyle(2);
793 fHistNclsITSMIMC->SetMarkerStyle(24);
794 fHistNclsITSMIMC->Draw("same");
795 */
fa516524 796 TCanvas *c = new TCanvas("c","c",0,0,600,500);
797 c->SetGridy();
8fa56655 798 c->SetLogx();
799
fa516524 800 fHistPtITSMI6InAcc->Divide(fHistPtITSMI6InAccMC);
801 fHistPtITSMI6InAcc->Draw();
802 fHistPtITSMI5InAcc->Divide(fHistPtITSMI5InAccMC);
803 fHistPtITSMI5InAcc->Draw("same");
804 fHistPtITSMI4InAcc->Divide(fHistPtITSMI4InAccMC);
805 fHistPtITSMI4InAcc->Draw("same");
806 fHistPtITSMI3InAcc->Divide(fHistPtITSMI3InAccMC);
807 fHistPtITSMI3InAcc->Draw("same");
808 fHistPtITSMI2InAcc->Divide(fHistPtITSMI2InAccMC);
809 fHistPtITSMI2InAcc->Draw("same");
810 fHistPtITSMIge2InAcc->Divide(fHistPtITSMIge2InAccMC);
811 fHistPtITSMIge2InAcc->Draw("same");
812 fHistPtITSMISPDInAcc->Divide(fHistPtITSMISPDInAccMC);
813 fHistPtITSMISPDInAcc->Draw("same");
814 fHistPtITSMIoneSPDInAcc->Divide(fHistPtITSMIoneSPDInAccMC);
815 fHistPtITSMIoneSPDInAcc->Draw("same");
8fa56655 816 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Divide(fHistPtITSMIoneSPDthreeSDDSSDInAccMC);
817 //fHistPtITSMIoneSPDthreeSDDSSDInAcc->Draw("same");
818
fa516524 819 fHistPtITSTPCsel->Divide(fHistPtITSTPCselMC);
820 fHistPtITSTPCsel->Draw("same");
8fa56655 821
fa516524 822 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
823 l3->AddEntry(fHistPtITSMIge2InAcc,">=2 cls","l");
824 l3->AddEntry(fHistPtITSMI6InAcc,"6 cls","l");
825 l3->AddEntry(fHistPtITSMI5InAcc,"5 cls","l");
826 l3->AddEntry(fHistPtITSMI4InAcc,"4 cls","l");
827 l3->AddEntry(fHistPtITSMI3InAcc,"3 cls","l");
828 l3->AddEntry(fHistPtITSMI2InAcc,"2 cls","l");
829 l3->AddEntry(fHistPtITSMISPDInAcc,"2SPD + any","l");
830 l3->AddEntry(fHistPtITSMIoneSPDInAcc,">=1SPD + any","l");
8fa56655 831 //l3->AddEntry(fHistPtITSMIoneSPDthreeSDDSSDInAcc,">=1SPD + >=3SDDSSD","l");
fa516524 832 l3->AddEntry(fHistPtITSTPCsel,">=1SPD + any + d_{0} cut","l");
833 l3->Draw();
8fa56655 834
fa516524 835 TCanvas *cc = new TCanvas("cc","cc",0,0,600,500);
836 cc->Divide(1,2);
837 cc->cd(1);
838 fHistClusterMapModuleITSMIokRatioInAccMC->SetLineColor(4);
839 fHistClusterMapModuleITSMIokRatioInAccMC->Draw();
840 fHistClusterMapModuleITSMIokRatioInAcc->Draw("same");
841 cc->cd(2);
842 for(Int_t i=1;i<=fHistClusterMapModuleITSMIokRatioInAccMC->GetNbinsX();i++) {
843 if(fHistClusterMapModuleITSMIokRatioInAccMC->GetBinContent(i)<0.02) {
844 fHistClusterMapModuleITSMIokRatioInAccMC->SetBinContent(i,1);
845 if(fHistClusterMapModuleITSMIokRatioInAcc->GetBinContent(i)<0.02) {
846 fHistClusterMapModuleITSMIokRatioInAcc->SetBinContent(i,1);
847 }
848 }
849 }
850 TH1F* fHistClusterMapDataOverMC=(TH1F*)fHistClusterMapModuleITSMIokRatioInAcc->Clone("fHistClusterMapDataOverMC");
851 fHistClusterMapDataOverMC->Divide(fHistClusterMapModuleITSMIokRatioInAccMC);
852 fHistClusterMapDataOverMC->Draw();
853
854 return;
855}
856
8fa56655 857//-----------------------------------------------------------------------------
858void PlotEffOfficial(Bool_t drawRatio=kTRUE) {
859
860 gStyle->SetOptStat(0);
861
862 gROOT->LoadMacro("/Users/dainesea/ALICEWorkInProgress.C");
863
864 TFile *f= new TFile("eff_115328_115393_minipass.root");
865
866 TH1F *fHistPtITSMI6InAcc = (TH1F*)f->Get("fHistPtITSMI6InAcc");
867 TH1F *fHistPtITSMI5InAcc = (TH1F*)f->Get("fHistPtITSMI5InAcc");
868 TH1F *fHistPtITSMI4InAcc = (TH1F*)f->Get("fHistPtITSMI4InAcc");
869 TH1F *fHistPtITSMI3InAcc = (TH1F*)f->Get("fHistPtITSMI3InAcc");
870 TH1F *fHistPtITSMI2InAcc = (TH1F*)f->Get("fHistPtITSMI2InAcc");
871 TH1F *fHistPtITSMIge2InAcc = (TH1F*)f->Get("fHistPtITSMIge2InAcc");
872 fHistPtITSMIge2InAcc->SetLineColor(1);
873 fHistPtITSMIge2InAcc->SetLineStyle(1);
874 fHistPtITSMIge2InAcc->SetMarkerColor(1);
875 fHistPtITSMIge2InAcc->SetMarkerStyle(21);
876 TH1F *fHistPtITSMISPDInAcc = (TH1F*)f->Get("fHistPtITSMISPDInAcc");
877 TH1F *fHistPtITSMIoneSPDInAcc = (TH1F*)f->Get("fHistPtITSMIoneSPDInAcc");
878 fHistPtITSMIoneSPDInAcc->SetLineColor(2);
879 fHistPtITSMIoneSPDInAcc->SetLineStyle(1);
880 fHistPtITSMIoneSPDInAcc->SetMarkerColor(2);
881 fHistPtITSMIoneSPDInAcc->SetMarkerStyle(20);
882 TH1F *fHistPtITSTPCsel = (TH1F*)f->Get("fHistPtITSTPCsel");
883 TH1F *fHistClusterMapModuleITSMIokRatioInAcc = (TH1F*)f->Get("fHistClusterMapModuleITSMIokRatioInAcc");
884 TH1F *fHistNclsITSMI = (TH1F*)f->Get("fHistNclsITSMI");
885
886
887 TFile *fMC= new TFile("eff_lhc10b2.root");
888
889 TH1F *fHistPtITSMI6InAccMC = (TH1F*)fMC->Get("fHistPtITSMI6InAcc");
890 TH1F *fHistPtITSMI5InAccMC = (TH1F*)fMC->Get("fHistPtITSMI5InAcc");
891 TH1F *fHistPtITSMI4InAccMC = (TH1F*)fMC->Get("fHistPtITSMI4InAcc");
892 TH1F *fHistPtITSMI3InAccMC = (TH1F*)fMC->Get("fHistPtITSMI3InAcc");
893 TH1F *fHistPtITSMI2InAccMC = (TH1F*)fMC->Get("fHistPtITSMI2InAcc");
894 TH1F *fHistPtITSMIge2InAccMC = (TH1F*)fMC->Get("fHistPtITSMIge2InAcc");
895 fHistPtITSMIge2InAccMC->SetLineColor(1);
896 fHistPtITSMIge2InAccMC->SetLineStyle(2);
897 fHistPtITSMIge2InAccMC->SetMarkerColor(1);
898 fHistPtITSMIge2InAccMC->SetMarkerStyle(25);
899 TH1F *fHistPtITSMISPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMISPDInAcc");
900 TH1F *fHistPtITSMIoneSPDInAccMC = (TH1F*)fMC->Get("fHistPtITSMIoneSPDInAcc");
901 fHistPtITSMIoneSPDInAccMC->SetLineColor(2);
902 fHistPtITSMIoneSPDInAccMC->SetLineStyle(2);
903 fHistPtITSMIoneSPDInAccMC->SetMarkerColor(2);
904 fHistPtITSMIoneSPDInAccMC->SetMarkerStyle(24);
905 TH1F *fHistPtITSTPCselMC = (TH1F*)fMC->Get("fHistPtITSTPCsel");
906 TH1F *fHistClusterMapModuleITSMIokRatioInAccMC = (TH1F*)fMC->Get("fHistClusterMapModuleITSMIokRatioInAcc");
907 TH1F *fHistNclsITSMIMC = (TH1F*)fMC->Get("fHistNclsITSMI");
908
909
910 TCanvas *c0 = new TCanvas("c0","c0",0,0,600,500);
911 c0->SetGridy();
912 fHistNclsITSMI->SetLineColor(4);
913 fHistNclsITSMI->SetMarkerColor(4);
914 fHistNclsITSMI->SetLineStyle(1);
915 fHistNclsITSMI->SetMarkerStyle(20);
916 fHistNclsITSMI->Scale(1./fHistNclsITSMI->Integral());
917 fHistNclsITSMI->Draw();
918 fHistNclsITSMIMC->SetLineColor(4);
919 fHistNclsITSMIMC->SetMarkerColor(4);
920 fHistNclsITSMIMC->SetLineStyle(2);
921 fHistNclsITSMIMC->SetMarkerStyle(24);
922 fHistNclsITSMIMC->Scale(1./fHistNclsITSMIMC->Integral());
923 fHistNclsITSMIMC->Draw("same");
924
925 TLegend *l0=new TLegend(0.5,0.5,0.9,0.9);
926 l0->SetFillStyle(0);
927 l0->SetBorderSize(0);
928 l0->AddEntry(fHistNclsITSMI,"Data","lp");
929 l0->AddEntry(fHistNclsITSMIMC,"MC","lp");
930 l0->Draw();
931
932 ALICEWorkInProgress(c0,"20/05/2010");
933
934 TCanvas *c = new TCanvas("c","c",0,0,600,500);
935 c->SetGridy();
936 c->SetLogx();
937
938 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
939 l3->SetFillStyle(0);
940 l3->SetBorderSize(0);
941
942 if(drawRatio) {
943 //fHistPtITSMI6InAcc->Divide(fHistPtITSMI6InAccMC);
944 //fHistPtITSMI6InAcc->Draw();
945 //fHistPtITSMI5InAcc->Divide(fHistPtITSMI5InAccMC);
946 //fHistPtITSMI5InAcc->Draw("same");
947 //fHistPtITSMI4InAcc->Divide(fHistPtITSMI4InAccMC);
948 //fHistPtITSMI4InAcc->Draw("same");
949 //fHistPtITSMI3InAcc->Divide(fHistPtITSMI3InAccMC);
950 //fHistPtITSMI3InAcc->Draw("same");
951 //fHistPtITSMI2InAcc->Divide(fHistPtITSMI2InAccMC);
952 //fHistPtITSMI2InAcc->Draw("same");
953 fHistPtITSMIge2InAcc->SetYTitle("Data efficiency / MC efficiency");
954 fHistPtITSMIge2InAcc->Divide(fHistPtITSMIge2InAccMC);
955 fHistPtITSMIge2InAcc->Draw();
956 //fHistPtITSMISPDInAcc->Divide(fHistPtITSMISPDInAccMC);
957 //fHistPtITSMISPDInAcc->Draw("same");
958 fHistPtITSMIoneSPDInAcc->Divide(fHistPtITSMIoneSPDInAccMC);
959 fHistPtITSMIoneSPDInAcc->Draw("same");
960
961 //fHistPtITSTPCsel->Divide(fHistPtITSTPCselMC);
962 //fHistPtITSTPCsel->Draw("same");
963 l3->AddEntry(fHistPtITSMIge2InAcc,"at least 2 ITS hits","lp");
964 //l3->AddEntry(fHistPtITSMI6InAcc,"6 cls","l");
965 //l3->AddEntry(fHistPtITSMI5InAcc,"5 cls","l");
966 //l3->AddEntry(fHistPtITSMI4InAcc,"4 cls","l");
967 //l3->AddEntry(fHistPtITSMI3InAcc,"3 cls","l");
968 //l3->AddEntry(fHistPtITSMI2InAcc,"2 cls","l");
969 //l3->AddEntry(fHistPtITSMISPDInAcc,"2 SPD hits","lp");
970 l3->AddEntry(fHistPtITSMIoneSPDInAcc,"at least 1 SPD hit","lp");
971 //l3->AddEntry(fHistPtITSTPCsel,">=1SPD + any + d_{0} cut","l");
972
973 } else {
974 fHistPtITSMIge2InAcc->SetYTitle("ITS prolongation efficiency");
975 fHistPtITSMIge2InAcc->Draw();
976 fHistPtITSMIge2InAccMC->Draw("same");
977 fHistPtITSMIoneSPDInAcc->Draw("same");
978 fHistPtITSMIoneSPDInAccMC->Draw("same");
979 l3->AddEntry(fHistPtITSMIge2InAcc,"at least 2 ITS hits (Data)","lp");
980 l3->AddEntry(fHistPtITSMIoneSPDInAcc,"at least 1 SPD hit (Data)","lp");
981 l3->AddEntry(fHistPtITSMIge2InAccMC,"at least 2 ITS hits (MC)","lp");
982 l3->AddEntry(fHistPtITSMIoneSPDInAccMC,"at least 1 SPD hit (MC)","lp");
983 }
984
985 l3->Draw();
986
987 ALICEWorkInProgress(c,"20/05/2010");
988
989 return;
990}
991
fa516524 992void PlotImpPar_rphi(Int_t rebin=1) {
993
994
71f9d353 995 TFile *fMC= new TFile("AnalysisResults_onlynonfakes.root");
fa516524 996
997 TList *list=(TList*)fMC->Get("cOutputITS");
71f9d353 998 TDirectoryFile *dir=0;
999 if(!list) {
1000 dir=(TDirectoryFile*)fMC->GetDirectory("ITS_Performance");
1001 if(dir) list = (TList*)dir->Get("cOutputITS");
1002 }
1003
1004 if(!list) return kFALSE;
1005
fa516524 1006 TH1F *fHistd0rphiITSMIoneSPDInAccP150200MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
1007 TH1F *fHistd0rphiITSMIoneSPDInAccS150200MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
1008 TH1F *fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200fromStrange");
1009 TH1F *fHistd0rphiITSMIoneSPDInAccS150200fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200fromMat");
8fa56655 1010 TH1F *fHistd0rphiITSMIoneSPDInAccP350450MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP350450");
fa516524 1011 TH1F *fHistd0rphiITSMIoneSPDInAccS350450MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450");
1012 TH1F *fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450fromStrange");
8fa56655 1013 TH1F *fHistd0rphiITSMIoneSPDInAccS350450fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450fromMat");
fa516524 1014 TH1F *fHistd0rphiITSMIoneSPDInAccP500700MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP500700");
1015 TH1F *fHistd0rphiITSMIoneSPDInAccS500700MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700");
1016 TH1F *fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700fromStrange");
1017 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from211MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from211");
1018 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from22MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from22");
1019 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from310MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from310");
1020 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from321MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from321");
1021 TH1F *fHistd0rphiITSMIoneSPDInAccS500700from3122MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700from3122");
1022 TH1F *fHistd0rphiITSMIoneSPDInAccS500700fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700fromMat");
1023 TH1F *fHistd0rphiITSMIoneSPDInAccP10001500MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP10001500");
1024 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500");
1025 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500fromStrange");
1026 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500fromMat");
8fa56655 1027 TH1F *fHistd0rphiITSMIoneSPDInAccP25004000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP25004000");
fa516524 1028 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000");
1029 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000fromStrange");
1030 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000fromMat");
1031 TH1F *fHistd0rphiITSMIoneSPDInAccP40008000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP40008000");
1032 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000MC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000");
1033 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000fromStrange");
8fa56655 1034 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000fromMat");
fa516524 1035
1036 TH1F *fHistd0rphiITSMIoneSPDInAcc150200MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP150200MC->Clone("fHistd0rphiITSMIoneSPDInAcc150200MC");
1037 fHistd0rphiITSMIoneSPDInAcc150200MC->Add(fHistd0rphiITSMIoneSPDInAccS150200MC);
1038 fHistd0rphiITSMIoneSPDInAcc150200MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc150200MC->GetEntries());
8fa56655 1039 TH1F *fHistd0rphiITSMIoneSPDInAcc350450MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP350450MC->Clone("fHistd0rphiITSMIoneSPDInAcc350450MC");
1040 fHistd0rphiITSMIoneSPDInAcc350450MC->Add(fHistd0rphiITSMIoneSPDInAccS350450MC);
1041 fHistd0rphiITSMIoneSPDInAcc350450MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc350450MC->GetEntries());
fa516524 1042 TH1F *fHistd0rphiITSMIoneSPDInAcc500700MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP500700MC->Clone("fHistd0rphiITSMIoneSPDInAcc500700MC");
1043 fHistd0rphiITSMIoneSPDInAcc500700MC->Add(fHistd0rphiITSMIoneSPDInAccS500700MC);
1044 fHistd0rphiITSMIoneSPDInAcc500700MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc500700MC->GetEntries());
1045 TH1F *fHistd0rphiITSMIoneSPDInAcc10001500MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP10001500MC->Clone("fHistd0rphiITSMIoneSPDInAcc10001500MC");
1046 fHistd0rphiITSMIoneSPDInAcc10001500MC->Add(fHistd0rphiITSMIoneSPDInAccS10001500MC);
1047 fHistd0rphiITSMIoneSPDInAcc10001500MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc10001500MC->GetEntries());
8fa56655 1048 TH1F *fHistd0rphiITSMIoneSPDInAcc25004000MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP25004000MC->Clone("fHistd0rphiITSMIoneSPDInAcc25004000MC");
fa516524 1049 fHistd0rphiITSMIoneSPDInAcc25004000MC->Add(fHistd0rphiITSMIoneSPDInAccS25004000MC);
1050 fHistd0rphiITSMIoneSPDInAcc25004000MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc25004000MC->GetEntries());
1051 TH1F *fHistd0rphiITSMIoneSPDInAcc40008000MC=(TH1F*)fHistd0rphiITSMIoneSPDInAccP40008000MC->Clone("fHistd0rphiITSMIoneSPDInAcc40008000MC");
1052 fHistd0rphiITSMIoneSPDInAcc40008000MC->Add(fHistd0rphiITSMIoneSPDInAccS40008000MC);
1053 fHistd0rphiITSMIoneSPDInAcc40008000MC->Scale(1./fHistd0rphiITSMIoneSPDInAcc40008000MC->GetEntries());
8fa56655 1054
fa516524 1055
71f9d353 1056 TFile *f= new TFile("AnalysisResults_onlynonfakes.root");
1057 list=(TList*)f->Get("cOutputITS");
1058 if(!list) {
1059 dir=(TDirectoryFile*)f->GetDirectory("ITS_Performance");
1060 if(dir) list = (TList*)dir->Get("cOutputITS");
1061 }
1062
1063 if(!list) return kFALSE;
fa516524 1064
fa516524 1065 TH1F *fHistd0rphiITSMIoneSPDInAccP150200 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
1066 TH1F *fHistd0rphiITSMIoneSPDInAccS150200 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
8fa56655 1067 TH1F *fHistd0rphiITSMIoneSPDInAccP350450 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP350450");
1068 TH1F *fHistd0rphiITSMIoneSPDInAccS350450 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS350450");
fa516524 1069 TH1F *fHistd0rphiITSMIoneSPDInAccP500700 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP500700");
1070 TH1F *fHistd0rphiITSMIoneSPDInAccS500700 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS500700");
1071 TH1F *fHistd0rphiITSMIoneSPDInAccP10001500 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP10001500");
1072 TH1F *fHistd0rphiITSMIoneSPDInAccS10001500 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS10001500");
8fa56655 1073 TH1F *fHistd0rphiITSMIoneSPDInAccP25004000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP25004000");
fa516524 1074 TH1F *fHistd0rphiITSMIoneSPDInAccS25004000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS25004000");
1075 TH1F *fHistd0rphiITSMIoneSPDInAccP40008000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP40008000");
8fa56655 1076 TH1F *fHistd0rphiITSMIoneSPDInAccS40008000 = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS40008000");
fa516524 1077 TH1F *fHistd0rphiITSMIoneSPDInAcc150200=(TH1F*)fHistd0rphiITSMIoneSPDInAccP150200->Clone("fHistd0rphiITSMIoneSPDInAcc150200");
1078 fHistd0rphiITSMIoneSPDInAcc150200->Add(fHistd0rphiITSMIoneSPDInAccS150200);
1079 fHistd0rphiITSMIoneSPDInAcc150200->Scale(1./fHistd0rphiITSMIoneSPDInAcc150200->GetEntries());
8fa56655 1080 TH1F *fHistd0rphiITSMIoneSPDInAcc350450=(TH1F*)fHistd0rphiITSMIoneSPDInAccP350450->Clone("fHistd0rphiITSMIoneSPDInAcc350450");
fa516524 1081 fHistd0rphiITSMIoneSPDInAcc350450->Add(fHistd0rphiITSMIoneSPDInAccS350450);
8fa56655 1082 fHistd0rphiITSMIoneSPDInAcc350450->Scale(1./fHistd0rphiITSMIoneSPDInAcc350450->GetEntries());
fa516524 1083 TH1F *fHistd0rphiITSMIoneSPDInAcc500700=(TH1F*)fHistd0rphiITSMIoneSPDInAccP500700->Clone("fHistd0rphiITSMIoneSPDInAcc500700");
1084 fHistd0rphiITSMIoneSPDInAcc500700->Add(fHistd0rphiITSMIoneSPDInAccS500700);
1085 fHistd0rphiITSMIoneSPDInAcc500700->Scale(1./fHistd0rphiITSMIoneSPDInAcc500700->GetEntries());
1086 TH1F *fHistd0rphiITSMIoneSPDInAcc10001500=(TH1F*)fHistd0rphiITSMIoneSPDInAccP10001500->Clone("fHistd0rphiITSMIoneSPDInAcc10001500");
1087 fHistd0rphiITSMIoneSPDInAcc10001500->Add(fHistd0rphiITSMIoneSPDInAccS10001500);
1088 fHistd0rphiITSMIoneSPDInAcc10001500->Scale(1./fHistd0rphiITSMIoneSPDInAcc10001500->GetEntries());
8fa56655 1089 TH1F *fHistd0rphiITSMIoneSPDInAcc25004000=(TH1F*)fHistd0rphiITSMIoneSPDInAccP25004000->Clone("fHistd0rphiITSMIoneSPDInAcc25004000");
fa516524 1090 fHistd0rphiITSMIoneSPDInAcc25004000->Add(fHistd0rphiITSMIoneSPDInAccS25004000);
1091 fHistd0rphiITSMIoneSPDInAcc25004000->Scale(1./fHistd0rphiITSMIoneSPDInAcc25004000->GetEntries());
1092 TH1F *fHistd0rphiITSMIoneSPDInAcc40008000=(TH1F*)fHistd0rphiITSMIoneSPDInAccP40008000->Clone("fHistd0rphiITSMIoneSPDInAcc40008000");
1093 fHistd0rphiITSMIoneSPDInAcc40008000->Add(fHistd0rphiITSMIoneSPDInAccS40008000);
8fa56655 1094 fHistd0rphiITSMIoneSPDInAcc40008000->Scale(1./fHistd0rphiITSMIoneSPDInAcc40008000->GetEntries());
fa516524 1095
1096
1097 TCanvas *c1 = new TCanvas("c1","c1");
1098 c1->Divide(3,2);
1099 c1->cd(1);
1100 fHistd0rphiITSMIoneSPDInAcc150200MC->Rebin(rebin);
1101 fHistd0rphiITSMIoneSPDInAcc150200->Rebin(rebin);
1102 fHistd0rphiITSMIoneSPDInAcc150200MC->SetLineColor(2);
1103 fHistd0rphiITSMIoneSPDInAcc150200MC->Draw();
1104 fHistd0rphiITSMIoneSPDInAcc150200->SetLineColor(4);
1105 fHistd0rphiITSMIoneSPDInAcc150200->Draw("same");
8fa56655 1106 c1->cd(2);
fa516524 1107 fHistd0rphiITSMIoneSPDInAcc350450MC->Rebin(rebin);
1108 fHistd0rphiITSMIoneSPDInAcc350450->Rebin(rebin);
1109 fHistd0rphiITSMIoneSPDInAcc350450MC->SetLineColor(2);
1110 fHistd0rphiITSMIoneSPDInAcc350450MC->Draw();
1111 fHistd0rphiITSMIoneSPDInAcc350450->SetLineColor(4);
8fa56655 1112 fHistd0rphiITSMIoneSPDInAcc350450->Draw("same");
fa516524 1113 c1->cd(3);
1114 fHistd0rphiITSMIoneSPDInAcc500700MC->Rebin(rebin);
1115 fHistd0rphiITSMIoneSPDInAcc500700->Rebin(rebin);
1116 fHistd0rphiITSMIoneSPDInAcc500700MC->SetLineColor(2);
1117 fHistd0rphiITSMIoneSPDInAcc500700MC->Draw();
1118 fHistd0rphiITSMIoneSPDInAcc500700->SetLineColor(4);
1119 fHistd0rphiITSMIoneSPDInAcc500700->Draw("same");
1120 c1->cd(4);
1121 fHistd0rphiITSMIoneSPDInAcc10001500MC->Rebin(rebin);
1122 fHistd0rphiITSMIoneSPDInAcc10001500->Rebin(rebin);
1123 fHistd0rphiITSMIoneSPDInAcc10001500MC->SetLineColor(2);
1124 fHistd0rphiITSMIoneSPDInAcc10001500MC->Draw();
1125 fHistd0rphiITSMIoneSPDInAcc10001500->SetLineColor(4);
1126 fHistd0rphiITSMIoneSPDInAcc10001500->Draw("same");
8fa56655 1127 c1->cd(5);
fa516524 1128 fHistd0rphiITSMIoneSPDInAcc25004000MC->Rebin(rebin);
1129 fHistd0rphiITSMIoneSPDInAcc25004000->Rebin(rebin);
1130 fHistd0rphiITSMIoneSPDInAcc25004000MC->SetLineColor(2);
1131 fHistd0rphiITSMIoneSPDInAcc25004000MC->Draw();
1132 fHistd0rphiITSMIoneSPDInAcc25004000->SetLineColor(4);
1133 fHistd0rphiITSMIoneSPDInAcc25004000->Draw("same");
1134 c1->cd(6);
1135 fHistd0rphiITSMIoneSPDInAcc40008000MC->Rebin(rebin);
1136 fHistd0rphiITSMIoneSPDInAcc40008000->Rebin(rebin);
1137 fHistd0rphiITSMIoneSPDInAcc40008000MC->SetLineColor(2);
1138 fHistd0rphiITSMIoneSPDInAcc40008000MC->Draw();
1139 fHistd0rphiITSMIoneSPDInAcc40008000->SetLineColor(4);
1140 fHistd0rphiITSMIoneSPDInAcc40008000->Draw("same");
8fa56655 1141
1142
fa516524 1143 TCanvas *c1a = new TCanvas("c1a","c1a");
1144 c1a->Divide(3,1);
1145 c1a->cd(1);
1146 TH1F* fHistd0rphiITSMIoneSPDInAcc150200Ratio=(TH1F*)fHistd0rphiITSMIoneSPDInAcc150200->Clone("fHistd0rphiITSMIoneSPDInAcc150200Ratio");
1147 fHistd0rphiITSMIoneSPDInAcc150200Ratio->Divide(fHistd0rphiITSMIoneSPDInAcc150200MC);
1148 fHistd0rphiITSMIoneSPDInAcc150200Ratio->Draw();
1149 c1a->cd(2);
1150 TH1F* fHistd0rphiITSMIoneSPDInAcc500700Ratio=(TH1F*)fHistd0rphiITSMIoneSPDInAcc500700->Clone("fHistd0rphiITSMIoneSPDInAcc500700Ratio");
1151 fHistd0rphiITSMIoneSPDInAcc500700Ratio->Divide(fHistd0rphiITSMIoneSPDInAcc500700MC);
1152 fHistd0rphiITSMIoneSPDInAcc500700Ratio->Draw();
1153 c1a->cd(3);
1154 TH1F* fHistd0rphiITSMIoneSPDInAcc10001500Ratio=(TH1F*)fHistd0rphiITSMIoneSPDInAcc10001500->Clone("fHistd0rphiITSMIoneSPDInAcc10001500Ratio");
1155 fHistd0rphiITSMIoneSPDInAcc10001500Ratio->Divide(fHistd0rphiITSMIoneSPDInAcc10001500MC);
1156 fHistd0rphiITSMIoneSPDInAcc10001500Ratio->Draw();
1157
1158
1159
1160 TCanvas *c2 = new TCanvas("c2","c2");
1161 c2->Divide(3,2);
1162 c2_1->SetLogy();
1163 c2_2->SetLogy();
1164 c2_3->SetLogy();
1165 c2_4->SetLogy();
1166 c2_5->SetLogy();
1167 c2_6->SetLogy();
1168 c2->cd(1);
1169 fHistd0rphiITSMIoneSPDInAccP150200MC->SetMinimum(1);
1170 fHistd0rphiITSMIoneSPDInAccS150200MC->SetMinimum(1);
1171 fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->SetMinimum(1);
1172 fHistd0rphiITSMIoneSPDInAccS150200fromMatMC->SetMinimum(1);
1173 fHistd0rphiITSMIoneSPDInAccP150200MC->SetLineColor(1);
1174 fHistd0rphiITSMIoneSPDInAccP150200MC->Draw();
1175 fHistd0rphiITSMIoneSPDInAccS150200MC->SetLineColor(6);
1176 fHistd0rphiITSMIoneSPDInAccS150200MC->Draw("same");
1177 fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->SetLineColor(8);
1178 fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->Draw("same");
1179 fHistd0rphiITSMIoneSPDInAccS150200fromMatMC->SetLineColor(9);
1180 fHistd0rphiITSMIoneSPDInAccS150200fromMatMC->Draw("same");
8fa56655 1181 c2->cd(2);
fa516524 1182 fHistd0rphiITSMIoneSPDInAccP350450MC->SetMinimum(1);
1183 fHistd0rphiITSMIoneSPDInAccS350450MC->SetMinimum(1);
1184 fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->SetMinimum(1);
1185 fHistd0rphiITSMIoneSPDInAccS350450fromMatMC->SetMinimum(1);
1186 fHistd0rphiITSMIoneSPDInAccP350450MC->SetLineColor(1);
1187 fHistd0rphiITSMIoneSPDInAccP350450MC->Draw();
1188 fHistd0rphiITSMIoneSPDInAccS350450MC->SetLineColor(6);
1189 fHistd0rphiITSMIoneSPDInAccS350450MC->Draw("same");
1190 fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->SetLineColor(8);
1191 fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->Draw("same");
1192 fHistd0rphiITSMIoneSPDInAccS350450fromMatMC->SetLineColor(9);
8fa56655 1193 fHistd0rphiITSMIoneSPDInAccS350450fromMatMC->Draw("same");
fa516524 1194 c2->cd(3);
1195 fHistd0rphiITSMIoneSPDInAccP500700MC->SetMinimum(1);
1196 fHistd0rphiITSMIoneSPDInAccS500700MC->SetMinimum(1);
1197 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetMinimum(1);
1198 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->SetMinimum(1);
1199 fHistd0rphiITSMIoneSPDInAccP500700MC->SetLineColor(1);
1200 fHistd0rphiITSMIoneSPDInAccP500700MC->Draw();
1201 fHistd0rphiITSMIoneSPDInAccS500700MC->SetLineColor(6);
1202 fHistd0rphiITSMIoneSPDInAccS500700MC->Draw("same");
1203 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetLineColor(8);
1204 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->Draw("same");
1205 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->SetLineColor(9);
1206 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->Draw("same");
1207 c2->cd(4);
1208 fHistd0rphiITSMIoneSPDInAccP10001500MC->SetMinimum(1);
1209 fHistd0rphiITSMIoneSPDInAccS10001500MC->SetMinimum(1);
1210 fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->SetMinimum(1);
1211 fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC->SetMinimum(1);
1212 fHistd0rphiITSMIoneSPDInAccP10001500MC->SetLineColor(1);
1213 fHistd0rphiITSMIoneSPDInAccP10001500MC->Draw();
1214 fHistd0rphiITSMIoneSPDInAccS10001500MC->SetLineColor(6);
1215 fHistd0rphiITSMIoneSPDInAccS10001500MC->Draw("same");
1216 fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->SetLineColor(8);
1217 fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->Draw("same");
1218 fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC->SetLineColor(9);
1219 fHistd0rphiITSMIoneSPDInAccS10001500fromMatMC->Draw("same");
fa516524 1220 c2->cd(5);
1221 fHistd0rphiITSMIoneSPDInAccP25004000MC->SetMinimum(1);
1222 fHistd0rphiITSMIoneSPDInAccS25004000MC->SetMinimum(1);
1223 fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->SetMinimum(1);
1224 fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC->SetMinimum(1);
1225 fHistd0rphiITSMIoneSPDInAccP25004000MC->SetLineColor(1);
1226 fHistd0rphiITSMIoneSPDInAccP25004000MC->Draw();
1227 fHistd0rphiITSMIoneSPDInAccS25004000MC->SetLineColor(6);
1228 fHistd0rphiITSMIoneSPDInAccS25004000MC->Draw("same");
1229 fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->SetLineColor(8);
1230 fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->Draw("same");
1231 fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC->SetLineColor(9);
1232 fHistd0rphiITSMIoneSPDInAccS25004000fromMatMC->Draw("same");
1233 c2->cd(6);
1234 fHistd0rphiITSMIoneSPDInAccP40008000MC->SetMinimum(1);
1235 fHistd0rphiITSMIoneSPDInAccS40008000MC->SetMinimum(1);
1236 fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->SetMinimum(1);
1237 fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC->SetMinimum(1);
1238 fHistd0rphiITSMIoneSPDInAccP40008000MC->SetLineColor(1);
1239 fHistd0rphiITSMIoneSPDInAccP40008000MC->Draw();
1240 fHistd0rphiITSMIoneSPDInAccS40008000MC->SetLineColor(6);
1241 fHistd0rphiITSMIoneSPDInAccS40008000MC->Draw("same");
1242 fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->SetLineColor(8);
1243 fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->Draw("same");
1244 fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC->SetLineColor(9);
1245 fHistd0rphiITSMIoneSPDInAccS40008000fromMatMC->Draw("same");
8fa56655 1246
fa516524 1247 TCanvas *c2b = new TCanvas("c2b","c2b");
1248 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetMinimum(1);
1249 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->SetLineColor(8);
1250 fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->Draw();
1251 fHistd0rphiITSMIoneSPDInAccS500700from310MC->SetMinimum(1);
1252 fHistd0rphiITSMIoneSPDInAccS500700from310MC->SetLineColor(2);
1253 fHistd0rphiITSMIoneSPDInAccS500700from310MC->Draw("same");
1254 fHistd0rphiITSMIoneSPDInAccS500700from321MC->SetMinimum(1);
1255 fHistd0rphiITSMIoneSPDInAccS500700from321MC->SetLineColor(5);
1256 fHistd0rphiITSMIoneSPDInAccS500700from321MC->Draw("same");
1257 fHistd0rphiITSMIoneSPDInAccS500700from3122MC->SetMinimum(1);
1258 fHistd0rphiITSMIoneSPDInAccS500700from3122MC->SetLineColor(1);
1259 fHistd0rphiITSMIoneSPDInAccS500700from3122MC->Draw("same");
1260
1261 TCanvas *c2c = new TCanvas("c2c","c2c");
1262 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->SetMinimum(1);
1263 fHistd0rphiITSMIoneSPDInAccS500700fromMatMC->Draw();
1264 fHistd0rphiITSMIoneSPDInAccS500700from211MC->SetMinimum(1);
1265 fHistd0rphiITSMIoneSPDInAccS500700from211MC->SetLineColor(2);
1266 fHistd0rphiITSMIoneSPDInAccS500700from211MC->Draw("same");
1267 fHistd0rphiITSMIoneSPDInAccS500700from22MC->SetMinimum(1);
1268 fHistd0rphiITSMIoneSPDInAccS500700from22MC->SetLineColor(1);
1269 fHistd0rphiITSMIoneSPDInAccS500700from22MC->Draw("same");
1270
1271
1272
1273 TCanvas *c3 = new TCanvas("c3","c3");
1274 c3->Divide(3,2);
1275 c3_1->SetLogx();
1276 c3_2->SetLogx();
1277 c3_3->SetLogx();
1278 c3_4->SetLogx();
1279 c3_5->SetLogx();
1280 c3_6->SetLogx();
1281 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 1282
fa516524 1283 c3->cd(1);
1284 Float_t fracP150200[15],fracS150200[15],fracSfromStrange150200[15],fracS150200Strp30[15],fracS150200Strm30[15],fracS150200Matm10[15],fracS150200Matp10[15];
1285 Float_t intPtot150200=fHistd0rphiITSMIoneSPDInAccP150200MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP150200MC->GetNbinsX());
1286 for(Int_t i=0;i<15;i++) {
1287 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP150200MC->FindBin(-d0cut[i]);
1288 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP150200MC->FindBin(+d0cut[i]);
1289 Float_t intPcut150200=fHistd0rphiITSMIoneSPDInAccP150200MC->Integral(bin1,bin2);
1290 Float_t intScut150200=fHistd0rphiITSMIoneSPDInAccS150200MC->Integral(bin1,bin2);
1291 Float_t intSfromStrangecut150200=fHistd0rphiITSMIoneSPDInAccS150200fromStrangeMC->Integral(bin1,bin2);
1292 Float_t intScut150200Strp30 = intScut150200 + 0.3*intSfromStrangecut150200;
1293 Float_t intScut150200Strm30 = intScut150200 - 0.3*intSfromStrangecut150200;
1294 Float_t intScut150200Matp10 = intScut150200 + 0.1*(intScut150200-intSfromStrangecut150200);
1295 Float_t intScut150200Matm10 = intScut150200 - 0.1*(intScut150200-intSfromStrangecut150200);
1296 fracP150200[i]=intPcut150200/intPtot150200;
1297 fracS150200[i]=1.-intScut150200/(intPcut150200+intScut150200);
1298 fracS150200Strp30[i]=1.-intScut150200Strp30/(intPcut150200+intScut150200Strp30);
1299 fracS150200Strm30[i]=1.-intScut150200Strm30/(intPcut150200+intScut150200Strm30);
1300 fracS150200Matp10[i]=1.-intScut150200Matp10/(intPcut150200+intScut150200Matp10);
1301 fracS150200Matm10[i]=1.-intScut150200Matm10/(intPcut150200+intScut150200Matm10);
1302 fracSfromStrange150200[i]=1.-intSfromStrangecut150200/(intPcut150200+intScut150200);
1303 }
1304 TGraph *gfracP150200=new TGraph(15,d0cut,fracP150200);
1305 gfracP150200->SetMarkerColor(2);
1306 gfracP150200->SetMarkerStyle(20);
1307 gfracP150200->Draw("ap");
1308 TGraph *gfracS150200=new TGraph(15,d0cut,fracS150200);
1309 gfracS150200->SetMarkerColor(4);
1310 gfracS150200->SetMarkerStyle(21);
1311 gfracS150200->Draw("p");
1312 TGraph *gfracSfromStrange150200=new TGraph(15,d0cut,fracSfromStrange150200);
1313 gfracSfromStrange150200->SetMarkerColor(8);
1314 gfracSfromStrange150200->SetMarkerStyle(22);
8fa56655 1315 gfracSfromStrange150200->Draw("p");
1316
fa516524 1317 c3->cd(2);
1318 Float_t fracP350450[15],fracS350450[15],fracSfromStrange350450[15],fracS350450Strp30[15],fracS350450Strm30[15],fracS350450Matm10[15],fracS350450Matp10[15];
1319 Float_t intPtot350450=fHistd0rphiITSMIoneSPDInAccP350450MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP350450MC->GetNbinsX());
1320 for(Int_t i=0;i<15;i++) {
1321 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP350450MC->FindBin(-d0cut[i]);
1322 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP350450MC->FindBin(+d0cut[i]);
1323 Float_t intPcut350450=fHistd0rphiITSMIoneSPDInAccP350450MC->Integral(bin1,bin2);
1324 Float_t intScut350450=fHistd0rphiITSMIoneSPDInAccS350450MC->Integral(bin1,bin2);
1325 Float_t intSfromStrangecut350450=fHistd0rphiITSMIoneSPDInAccS350450fromStrangeMC->Integral(bin1,bin2);
1326 Float_t intScut350450Strp30 = intScut350450 + 0.3*intSfromStrangecut350450;
1327 Float_t intScut350450Strm30 = intScut350450 - 0.3*intSfromStrangecut350450;
1328 Float_t intScut350450Matp10 = intScut350450 + 0.1*(intScut350450-intSfromStrangecut350450);
1329 Float_t intScut350450Matm10 = intScut350450 - 0.1*(intScut350450-intSfromStrangecut350450);
1330 fracP350450[i]=intPcut350450/intPtot350450;
1331 fracS350450[i]=1.-intScut350450/(intPcut350450+intScut350450);
1332 fracS350450Strp30[i]=1.-intScut350450Strp30/(intPcut350450+intScut350450Strp30);
1333 fracS350450Strm30[i]=1.-intScut350450Strm30/(intPcut350450+intScut350450Strm30);
1334 fracS350450Matp10[i]=1.-intScut350450Matp10/(intPcut350450+intScut350450Matp10);
1335 fracS350450Matm10[i]=1.-intScut350450Matm10/(intPcut350450+intScut350450Matm10);
1336 fracSfromStrange350450[i]=1.-intSfromStrangecut350450/(intPcut350450+intScut350450);
1337 }
1338 TGraph *gfracP350450=new TGraph(15,d0cut,fracP350450);
1339 gfracP350450->SetMarkerColor(2);
1340 gfracP350450->SetMarkerStyle(20);
1341 gfracP350450->Draw("ap");
1342 TGraph *gfracS350450=new TGraph(15,d0cut,fracS350450);
1343 gfracS350450->SetMarkerColor(4);
1344 gfracS350450->SetMarkerStyle(21);
1345 gfracS350450->Draw("p");
1346 TGraph *gfracSfromStrange350450=new TGraph(15,d0cut,fracSfromStrange350450);
1347 gfracSfromStrange350450->SetMarkerColor(8);
1348 gfracSfromStrange350450->SetMarkerStyle(22);
1349 gfracSfromStrange350450->Draw("p");
8fa56655 1350
fa516524 1351 c3->cd(3);
1352 Float_t fracP500700[15],fracS500700[15],fracSfromStrange500700[15],fracS500700Strp30[15],fracS500700Strm30[15],fracS500700Matm10[15],fracS500700Matp10[15];
1353 Float_t intPtot500700=fHistd0rphiITSMIoneSPDInAccP500700MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP500700MC->GetNbinsX());
1354 for(Int_t i=0;i<15;i++) {
1355 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP500700MC->FindBin(-d0cut[i]);
1356 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP500700MC->FindBin(+d0cut[i]);
1357 Float_t intPcut500700=fHistd0rphiITSMIoneSPDInAccP500700MC->Integral(bin1,bin2);
1358 Float_t intScut500700=fHistd0rphiITSMIoneSPDInAccS500700MC->Integral(bin1,bin2);
1359 Float_t intSfromStrangecut500700=fHistd0rphiITSMIoneSPDInAccS500700fromStrangeMC->Integral(bin1,bin2);
1360 Float_t intScut500700Strp30 = intScut500700 + 0.3*intSfromStrangecut500700;
1361 Float_t intScut500700Strm30 = intScut500700 - 0.3*intSfromStrangecut500700;
1362 Float_t intScut500700Matp10 = intScut500700 + 0.1*(intScut500700-intSfromStrangecut500700);
1363 Float_t intScut500700Matm10 = intScut500700 - 0.1*(intScut500700-intSfromStrangecut500700);
1364 fracP500700[i]=intPcut500700/intPtot500700;
1365 fracS500700[i]=1.-intScut500700/(intPcut500700+intScut500700);
1366 fracS500700Strp30[i]=1.-intScut500700Strp30/(intPcut500700+intScut500700Strp30);
1367 fracS500700Strm30[i]=1.-intScut500700Strm30/(intPcut500700+intScut500700Strm30);
1368 fracS500700Matp10[i]=1.-intScut500700Matp10/(intPcut500700+intScut500700Matp10);
1369 fracS500700Matm10[i]=1.-intScut500700Matm10/(intPcut500700+intScut500700Matm10);
1370 fracSfromStrange500700[i]=1.-intSfromStrangecut500700/(intPcut500700+intScut500700);
1371 }
1372 TGraph *gfracP500700=new TGraph(15,d0cut,fracP500700);
1373 gfracP500700->SetMarkerColor(2);
1374 gfracP500700->SetMarkerStyle(20);
1375 gfracP500700->Draw("ap");
1376 TGraph *gfracS500700=new TGraph(15,d0cut,fracS500700);
1377 gfracS500700->SetMarkerColor(4);
1378 gfracS500700->SetMarkerStyle(21);
1379 gfracS500700->Draw("p");
1380 TGraph *gfracSfromStrange500700=new TGraph(15,d0cut,fracSfromStrange500700);
1381 gfracSfromStrange500700->SetMarkerColor(8);
1382 gfracSfromStrange500700->SetMarkerStyle(22);
1383 gfracSfromStrange500700->Draw("p");
1384
1385 c3->cd(4);
1386 Float_t fracP10001500[15],fracS10001500[15],fracSfromStrange10001500[15],fracS10001500Strp30[15],fracS10001500Strm30[15],fracS10001500Matm10[15],fracS10001500Matp10[15];
1387 Float_t intPtot10001500=fHistd0rphiITSMIoneSPDInAccP10001500MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP10001500MC->GetNbinsX());
1388 for(Int_t i=0;i<15;i++) {
1389 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP10001500MC->FindBin(-d0cut[i]);
1390 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP10001500MC->FindBin(+d0cut[i]);
1391 Float_t intPcut10001500=fHistd0rphiITSMIoneSPDInAccP10001500MC->Integral(bin1,bin2);
1392 Float_t intScut10001500=fHistd0rphiITSMIoneSPDInAccS10001500MC->Integral(bin1,bin2);
1393 Float_t intSfromStrangecut10001500=fHistd0rphiITSMIoneSPDInAccS10001500fromStrangeMC->Integral(bin1,bin2);
1394 Float_t intScut10001500Strp30 = intScut10001500 + 0.3*intSfromStrangecut10001500;
1395 Float_t intScut10001500Strm30 = intScut10001500 - 0.3*intSfromStrangecut10001500;
1396 Float_t intScut10001500Matp10 = intScut10001500 + 0.1*(intScut10001500-intSfromStrangecut10001500);
1397 Float_t intScut10001500Matm10 = intScut10001500 - 0.1*(intScut10001500-intSfromStrangecut10001500);
1398 fracP10001500[i]=intPcut10001500/intPtot10001500;
1399 fracS10001500[i]=1.-intScut10001500/(intPcut10001500+intScut10001500);
1400 fracS10001500Strp30[i]=1.-intScut10001500Strp30/(intPcut10001500+intScut10001500Strp30);
1401 fracS10001500Strm30[i]=1.-intScut10001500Strm30/(intPcut10001500+intScut10001500Strm30);
1402 fracS10001500Matp10[i]=1.-intScut10001500Matp10/(intPcut10001500+intScut10001500Matp10);
1403 fracS10001500Matm10[i]=1.-intScut10001500Matm10/(intPcut10001500+intScut10001500Matm10);
1404 fracSfromStrange10001500[i]=1.-intSfromStrangecut10001500/(intPcut10001500+intScut10001500);
1405 }
1406 TGraph *gfracP10001500=new TGraph(15,d0cut,fracP10001500);
1407 gfracP10001500->SetMarkerColor(2);
1408 gfracP10001500->SetMarkerStyle(20);
1409 gfracP10001500->Draw("ap");
1410 TGraph *gfracS10001500=new TGraph(15,d0cut,fracS10001500);
1411 gfracS10001500->SetMarkerColor(4);
1412 gfracS10001500->SetMarkerStyle(21);
1413 gfracS10001500->Draw("p");
1414 TGraph *gfracSfromStrange10001500=new TGraph(15,d0cut,fracSfromStrange10001500);
1415 gfracSfromStrange10001500->SetMarkerColor(8);
1416 gfracSfromStrange10001500->SetMarkerStyle(22);
1417 gfracSfromStrange10001500->Draw("p");
8fa56655 1418
fa516524 1419 c3->cd(5);
1420 Float_t fracP25004000[15],fracS25004000[15],fracSfromStrange25004000[15],fracS25004000Strp30[15],fracS25004000Strm30[15],fracS25004000Matm10[15],fracS25004000Matp10[15];
1421 Float_t intPtot25004000=fHistd0rphiITSMIoneSPDInAccP25004000MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP25004000MC->GetNbinsX());
1422 for(Int_t i=0;i<15;i++) {
1423 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP25004000MC->FindBin(-d0cut[i]);
1424 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP25004000MC->FindBin(+d0cut[i]);
1425 Float_t intPcut25004000=fHistd0rphiITSMIoneSPDInAccP25004000MC->Integral(bin1,bin2);
1426 Float_t intScut25004000=fHistd0rphiITSMIoneSPDInAccS25004000MC->Integral(bin1,bin2);
1427 Float_t intSfromStrangecut25004000=fHistd0rphiITSMIoneSPDInAccS25004000fromStrangeMC->Integral(bin1,bin2);
1428 Float_t intScut25004000Strp30 = intScut25004000 + 0.3*intSfromStrangecut25004000;
1429 Float_t intScut25004000Strm30 = intScut25004000 - 0.3*intSfromStrangecut25004000;
1430 Float_t intScut25004000Matp10 = intScut25004000 + 0.1*(intScut25004000-intSfromStrangecut25004000);
1431 Float_t intScut25004000Matm10 = intScut25004000 - 0.1*(intScut25004000-intSfromStrangecut25004000);
1432 fracP25004000[i]=intPcut25004000/intPtot25004000;
1433 fracS25004000[i]=1.-intScut25004000/(intPcut25004000+intScut25004000);
1434 fracS25004000Strp30[i]=1.-intScut25004000Strp30/(intPcut25004000+intScut25004000Strp30);
1435 fracS25004000Strm30[i]=1.-intScut25004000Strm30/(intPcut25004000+intScut25004000Strm30);
1436 fracS25004000Matp10[i]=1.-intScut25004000Matp10/(intPcut25004000+intScut25004000Matp10);
1437 fracS25004000Matm10[i]=1.-intScut25004000Matm10/(intPcut25004000+intScut25004000Matm10);
1438 fracSfromStrange25004000[i]=1.-intSfromStrangecut25004000/(intPcut25004000+intScut25004000);
1439 }
1440 TGraph *gfracP25004000=new TGraph(15,d0cut,fracP25004000);
1441 gfracP25004000->SetMarkerColor(2);
1442 gfracP25004000->SetMarkerStyle(20);
1443 gfracP25004000->Draw("ap");
1444 TGraph *gfracS25004000=new TGraph(15,d0cut,fracS25004000);
1445 gfracS25004000->SetMarkerColor(4);
1446 gfracS25004000->SetMarkerStyle(21);
1447 gfracS25004000->Draw("p");
1448 TGraph *gfracSfromStrange25004000=new TGraph(15,d0cut,fracSfromStrange25004000);
1449 gfracSfromStrange25004000->SetMarkerColor(8);
1450 gfracSfromStrange25004000->SetMarkerStyle(22);
1451 gfracSfromStrange25004000->Draw("p");
1452
1453 c3->cd(6);
1454 Float_t fracP40008000[15],fracS40008000[15],fracSfromStrange40008000[15],fracS40008000Strp30[15],fracS40008000Strm30[15],fracS40008000Matm10[15],fracS40008000Matp10[15];
1455 Float_t intPtot40008000=fHistd0rphiITSMIoneSPDInAccP40008000MC->Integral(1,fHistd0rphiITSMIoneSPDInAccP40008000MC->GetNbinsX());
1456 for(Int_t i=0;i<15;i++) {
1457 Int_t bin1=fHistd0rphiITSMIoneSPDInAccP40008000MC->FindBin(-d0cut[i]);
1458 Int_t bin2=fHistd0rphiITSMIoneSPDInAccP40008000MC->FindBin(+d0cut[i]);
1459 Float_t intPcut40008000=fHistd0rphiITSMIoneSPDInAccP40008000MC->Integral(bin1,bin2);
1460 Float_t intScut40008000=fHistd0rphiITSMIoneSPDInAccS40008000MC->Integral(bin1,bin2);
1461 Float_t intSfromStrangecut40008000=fHistd0rphiITSMIoneSPDInAccS40008000fromStrangeMC->Integral(bin1,bin2);
1462 Float_t intScut40008000Strp30 = intScut40008000 + 0.3*intSfromStrangecut40008000;
1463 Float_t intScut40008000Strm30 = intScut40008000 - 0.3*intSfromStrangecut40008000;
1464 Float_t intScut40008000Matp10 = intScut40008000 + 0.1*(intScut40008000-intSfromStrangecut40008000);
1465 Float_t intScut40008000Matm10 = intScut40008000 - 0.1*(intScut40008000-intSfromStrangecut40008000);
1466 fracP40008000[i]=intPcut40008000/intPtot40008000;
1467 fracS40008000[i]=1.-intScut40008000/(intPcut40008000+intScut40008000);
1468 fracS40008000Strp30[i]=1.-intScut40008000Strp30/(intPcut40008000+intScut40008000Strp30);
1469 fracS40008000Strm30[i]=1.-intScut40008000Strm30/(intPcut40008000+intScut40008000Strm30);
1470 fracS40008000Matp10[i]=1.-intScut40008000Matp10/(intPcut40008000+intScut40008000Matp10);
1471 fracS40008000Matm10[i]=1.-intScut40008000Matm10/(intPcut40008000+intScut40008000Matm10);
1472 fracSfromStrange40008000[i]=1.-intSfromStrangecut40008000/(intPcut40008000+intScut40008000);
1473 }
1474 TGraph *gfracP40008000=new TGraph(15,d0cut,fracP40008000);
1475 gfracP40008000->SetMarkerColor(2);
1476 gfracP40008000->SetMarkerStyle(20);
1477 gfracP40008000->Draw("ap");
1478 TGraph *gfracS40008000=new TGraph(15,d0cut,fracS40008000);
1479 gfracS40008000->SetMarkerColor(4);
1480 gfracS40008000->SetMarkerStyle(21);
1481 gfracS40008000->Draw("p");
1482 TGraph *gfracSfromStrange40008000=new TGraph(15,d0cut,fracSfromStrange40008000);
1483 gfracSfromStrange40008000->SetMarkerColor(8);
1484 gfracSfromStrange40008000->SetMarkerStyle(22);
1485 gfracSfromStrange40008000->Draw("p");
fa516524 1486
8fa56655 1487
fa516524 1488 TCanvas *c4 = new TCanvas("c4","c4");
1489 c4->Divide(3,1);
1490 c4_1->SetLogx();
1491 c4_2->SetLogx();
1492 c4_3->SetLogx();
1493
1494 c4->cd(1);
1495 Float_t intDatacut150200[15],intDataPcut150200[15],intDataPall150200[15];
1496 for(Int_t i=0;i<15;i++) {
1497 Int_t bin1=fHistd0rphiITSMIoneSPDInAcc150200->FindBin(-d0cut[i]);
1498 Int_t bin2=fHistd0rphiITSMIoneSPDInAcc150200->FindBin(+d0cut[i]);
1499 intDatacut150200[i]=fHistd0rphiITSMIoneSPDInAcc150200->Integral(bin1,bin2);
1500 intDataPcut150200[i]=intDatacut150200[i]*fracS150200[i];
1501 intDataPall150200[i]=intDataPcut150200[i]/fracP150200[i];
1502 }
1503 TGraph *gintDatacut150200=new TGraph(15,d0cut,intDatacut150200);
1504 gintDatacut150200->SetMarkerColor(1);
1505 gintDatacut150200->SetMarkerStyle(20);
1506 gintDatacut150200->Draw("ap");
1507 TGraph *gintDataPcut150200=new TGraph(15,d0cut,intDataPcut150200);
1508 gintDataPcut150200->SetMarkerColor(1);
1509 gintDataPcut150200->SetMarkerStyle(24);
1510 gintDataPcut150200->Draw("p");
1511 TGraph *gintDataPall150200=new TGraph(15,d0cut,intDataPall150200);
1512 gintDataPall150200->SetMarkerColor(2);
1513 gintDataPall150200->SetMarkerStyle(22);
1514 gintDataPall150200->Draw("p");
1515
1516 c4->cd(2);
1517 Float_t intDatacut500700[15],intDataPcut500700[15],intDataPall500700[15];
1518 for(Int_t i=0;i<15;i++) {
1519 Int_t bin1=fHistd0rphiITSMIoneSPDInAcc500700->FindBin(-d0cut[i]);
1520 Int_t bin2=fHistd0rphiITSMIoneSPDInAcc500700->FindBin(+d0cut[i]);
1521 intDatacut500700[i]=fHistd0rphiITSMIoneSPDInAcc500700->Integral(bin1,bin2);
1522 intDataPcut500700[i]=intDatacut500700[i]*fracS500700[i];
1523 intDataPall500700[i]=intDataPcut500700[i]/fracP500700[i];
1524 }
1525 TGraph *gintDatacut500700=new TGraph(15,d0cut,intDatacut500700);
1526 gintDatacut500700->SetMarkerColor(1);
1527 gintDatacut500700->SetMarkerStyle(20);
1528 gintDatacut500700->Draw("ap");
1529 TGraph *gintDataPcut500700=new TGraph(15,d0cut,intDataPcut500700);
1530 gintDataPcut500700->SetMarkerColor(1);
1531 gintDataPcut500700->SetMarkerStyle(24);
1532 gintDataPcut500700->Draw("p");
1533 TGraph *gintDataPall500700=new TGraph(15,d0cut,intDataPall500700);
1534 gintDataPall500700->SetMarkerColor(2);
1535 gintDataPall500700->SetMarkerStyle(22);
1536 gintDataPall500700->Draw("p");
1537
1538 c4->cd(3);
1539 Float_t intDatacut10001500[15],intDataPcut10001500[15],intDataPall10001500[15];
1540 for(Int_t i=0;i<15;i++) {
1541 Int_t bin1=fHistd0rphiITSMIoneSPDInAcc10001500->FindBin(-d0cut[i]);
1542 Int_t bin2=fHistd0rphiITSMIoneSPDInAcc10001500->FindBin(+d0cut[i]);
1543 intDatacut10001500[i]=fHistd0rphiITSMIoneSPDInAcc10001500->Integral(bin1,bin2);
1544 intDataPcut10001500[i]=intDatacut10001500[i]*fracS10001500[i];
1545 intDataPall10001500[i]=intDataPcut10001500[i]/fracP10001500[i];
1546 }
1547 TGraph *gintDatacut10001500=new TGraph(15,d0cut,intDatacut10001500);
1548 gintDatacut10001500->SetMarkerColor(1);
1549 gintDatacut10001500->SetMarkerStyle(20);
1550 gintDatacut10001500->Draw("ap");
1551 TGraph *gintDataPcut10001500=new TGraph(15,d0cut,intDataPcut10001500);
1552 gintDataPcut10001500->SetMarkerColor(1);
1553 gintDataPcut10001500->SetMarkerStyle(24);
1554 gintDataPcut10001500->Draw("p");
1555 TGraph *gintDataPall10001500=new TGraph(15,d0cut,intDataPall10001500);
1556 gintDataPall10001500->SetMarkerColor(2);
1557 gintDataPall10001500->SetMarkerStyle(22);
1558 gintDataPall10001500->Draw("p");
1559
1560
1561 TCanvas *c5 = new TCanvas("c5","c5");
1562 c5->Divide(3,1);
1563 c5_1->SetLogx();
1564 c5_2->SetLogx();
1565 c5_3->SetLogx();
1566
1567 c5->cd(1);
1568 Float_t intDataPall150200Strp30[15],intDataPall150200Strm30[15],intDataPall150200Matp10[15],intDataPall150200Matm10[15];
1569 for(Int_t i=0;i<15;i++) {
1570 intDataPall150200Strp30[i]=intDatacut150200[i]*fracS150200Strp30[i]/fracP150200[i];
1571 intDataPall150200Strm30[i]=intDatacut150200[i]*fracS150200Strm30[i]/fracP150200[i];
1572 intDataPall150200Matp10[i]=intDatacut150200[i]*fracS150200Matp10[i]/fracP150200[i];
1573 intDataPall150200Matm10[i]=intDatacut150200[i]*fracS150200Matm10[i]/fracP150200[i];
1574 }
1575 gintDataPall150200->Draw("ap");
1576
1577 TGraph *gintDataPall150200Strp30=new TGraph(15,d0cut,intDataPall150200Strp30);
1578 gintDataPall150200Strp30->SetMarkerColor(1);
1579 gintDataPall150200Strp30->SetMarkerStyle(22);
1580 gintDataPall150200Strp30->Draw("p");
1581 TGraph *gintDataPall150200Strm30=new TGraph(15,d0cut,intDataPall150200Strm30);
1582 gintDataPall150200Strm30->SetMarkerColor(1);
1583 gintDataPall150200Strm30->SetMarkerStyle(22);
1584 gintDataPall150200Strm30->Draw("p");
1585 TGraph *gintDataPall150200Matp10=new TGraph(15,d0cut,intDataPall150200Matp10);
1586 gintDataPall150200Matp10->SetMarkerColor(3);
1587 gintDataPall150200Matp10->SetMarkerStyle(22);
1588 gintDataPall150200Matp10->Draw("p");
1589 TGraph *gintDataPall150200Matm10=new TGraph(15,d0cut,intDataPall150200Matm10);
1590 gintDataPall150200Matm10->SetMarkerColor(3);
1591 gintDataPall150200Matm10->SetMarkerStyle(22);
1592 gintDataPall150200Matm10->Draw("p");
1593
1594 c5->cd(2);
1595 Float_t intDataPall500700Strp30[15],intDataPall500700Strm30[15],intDataPall500700Matp10[15],intDataPall500700Matm10[15];
1596 for(Int_t i=0;i<15;i++) {
1597 intDataPall500700Strp30[i]=intDatacut500700[i]*fracS500700Strp30[i]/fracP500700[i];
1598 intDataPall500700Strm30[i]=intDatacut500700[i]*fracS500700Strm30[i]/fracP500700[i];
1599 intDataPall500700Matp10[i]=intDatacut500700[i]*fracS500700Matp10[i]/fracP500700[i];
1600 intDataPall500700Matm10[i]=intDatacut500700[i]*fracS500700Matm10[i]/fracP500700[i];
1601 }
1602 gintDataPall500700->Draw("ap");
1603
1604 TGraph *gintDataPall500700Strp30=new TGraph(15,d0cut,intDataPall500700Strp30);
1605 gintDataPall500700Strp30->SetMarkerColor(1);
1606 gintDataPall500700Strp30->SetMarkerStyle(22);
1607 gintDataPall500700Strp30->Draw("p");
1608 TGraph *gintDataPall500700Strm30=new TGraph(15,d0cut,intDataPall500700Strm30);
1609 gintDataPall500700Strm30->SetMarkerColor(1);
1610 gintDataPall500700Strm30->SetMarkerStyle(22);
1611 gintDataPall500700Strm30->Draw("p");
1612 TGraph *gintDataPall500700Matp10=new TGraph(15,d0cut,intDataPall500700Matp10);
1613 gintDataPall500700Matp10->SetMarkerColor(3);
1614 gintDataPall500700Matp10->SetMarkerStyle(22);
1615 gintDataPall500700Matp10->Draw("p");
1616 TGraph *gintDataPall500700Matm10=new TGraph(15,d0cut,intDataPall500700Matm10);
1617 gintDataPall500700Matm10->SetMarkerColor(3);
1618 gintDataPall500700Matm10->SetMarkerStyle(22);
1619 gintDataPall500700Matm10->Draw("p");
1620
1621 c5->cd(3);
1622 Float_t intDataPall10001500Strp30[15],intDataPall10001500Strm30[15],intDataPall10001500Matp10[15],intDataPall10001500Matm10[15];
1623 for(Int_t i=0;i<15;i++) {
1624 intDataPall10001500Strp30[i]=intDatacut10001500[i]*fracS10001500Strp30[i]/fracP10001500[i];
1625 intDataPall10001500Strm30[i]=intDatacut10001500[i]*fracS10001500Strm30[i]/fracP10001500[i];
1626 intDataPall10001500Matp10[i]=intDatacut10001500[i]*fracS10001500Matp10[i]/fracP10001500[i];
1627 intDataPall10001500Matm10[i]=intDatacut10001500[i]*fracS10001500Matm10[i]/fracP10001500[i];
1628 }
1629 gintDataPall10001500->Draw("ap");
1630
1631 TGraph *gintDataPall10001500Strp30=new TGraph(15,d0cut,intDataPall10001500Strp30);
1632 gintDataPall10001500Strp30->SetMarkerColor(1);
1633 gintDataPall10001500Strp30->SetMarkerStyle(22);
1634 gintDataPall10001500Strp30->Draw("p");
1635 TGraph *gintDataPall10001500Strm30=new TGraph(15,d0cut,intDataPall10001500Strm30);
1636 gintDataPall10001500Strm30->SetMarkerColor(1);
1637 gintDataPall10001500Strm30->SetMarkerStyle(22);
1638 gintDataPall10001500Strm30->Draw("p");
1639 TGraph *gintDataPall10001500Matp10=new TGraph(15,d0cut,intDataPall10001500Matp10);
1640 gintDataPall10001500Matp10->SetMarkerColor(3);
1641 gintDataPall10001500Matp10->SetMarkerStyle(22);
1642 gintDataPall10001500Matp10->Draw("p");
1643 TGraph *gintDataPall10001500Matm10=new TGraph(15,d0cut,intDataPall10001500Matm10);
1644 gintDataPall10001500Matm10->SetMarkerColor(3);
1645 gintDataPall10001500Matm10->SetMarkerStyle(22);
1646 gintDataPall10001500Matm10->Draw("p");
8fa56655 1647
fa516524 1648 return;
1649}
1650//---------------------------------------------------------------------------
1651void PlotImpPar_z() {
1652
1653 TFile *fMC= new TFile("ITS.Performance_lhc10a8_100k.root");
1654
1655 TList *list=(TList*)fMC->Get("cOutputITS");
1656 TH1F *fHistd0zITSMIoneSPDInAccP150200MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP150200");
1657 TH1F *fHistd0zITSMIoneSPDInAccS150200MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS150200");
1658 TH1F *fHistd0zITSMIoneSPDInAccP500700MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP500700");
1659 TH1F *fHistd0zITSMIoneSPDInAccS500700MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS500700");
1660 TH1F *fHistd0zITSMIoneSPDInAccP10001500MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP10001500");
1661 TH1F *fHistd0zITSMIoneSPDInAccS10001500MC = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS10001500");
1662 TH1F *fHistd0zITSMIoneSPDInAcc150200MC=(TH1F*)fHistd0zITSMIoneSPDInAccP150200MC->Clone("fHistd0zITSMIoneSPDInAcc150200MC");
1663 fHistd0zITSMIoneSPDInAcc150200MC->Add(fHistd0zITSMIoneSPDInAccS150200MC);
1664 fHistd0zITSMIoneSPDInAcc150200MC->Scale(1./fHistd0zITSMIoneSPDInAcc150200MC->GetEntries());
1665 TH1F *fHistd0zITSMIoneSPDInAcc500700MC=(TH1F*)fHistd0zITSMIoneSPDInAccP500700MC->Clone("fHistd0zITSMIoneSPDInAcc500700MC");
1666 fHistd0zITSMIoneSPDInAcc500700MC->Add(fHistd0zITSMIoneSPDInAccS500700MC);
1667 fHistd0zITSMIoneSPDInAcc500700MC->Scale(1./fHistd0zITSMIoneSPDInAcc500700MC->GetEntries());
1668 TH1F *fHistd0zITSMIoneSPDInAcc10001500MC=(TH1F*)fHistd0zITSMIoneSPDInAccP10001500MC->Clone("fHistd0zITSMIoneSPDInAcc10001500MC");
1669 fHistd0zITSMIoneSPDInAcc10001500MC->Add(fHistd0zITSMIoneSPDInAccS10001500MC);
1670 fHistd0zITSMIoneSPDInAcc10001500MC->Scale(1./fHistd0zITSMIoneSPDInAcc10001500MC->GetEntries());
1671
1672
1673 TFile *f= new TFile("ITS.Performance_104892.root");
1674
1675 TList *list=(TList*)f->Get("cOutputITS");
1676 TH1F *fHistd0zITSMIoneSPDInAccP150200 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP150200");
1677 TH1F *fHistd0zITSMIoneSPDInAccS150200 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS150200");
1678 TH1F *fHistd0zITSMIoneSPDInAccP500700 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP500700");
1679 TH1F *fHistd0zITSMIoneSPDInAccS500700 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS500700");
1680 TH1F *fHistd0zITSMIoneSPDInAccP10001500 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccP10001500");
1681 TH1F *fHistd0zITSMIoneSPDInAccS10001500 = (TH1F*)list->FindObject("fHistd0zITSMIoneSPDInAccS10001500");
1682 TH1F *fHistd0zITSMIoneSPDInAcc150200=(TH1F*)fHistd0zITSMIoneSPDInAccP150200->Clone("fHistd0zITSMIoneSPDInAcc150200");
1683 fHistd0zITSMIoneSPDInAcc150200->Add(fHistd0zITSMIoneSPDInAccS150200);
1684 fHistd0zITSMIoneSPDInAcc150200->Scale(1./fHistd0zITSMIoneSPDInAcc150200->GetEntries());
1685 TH1F *fHistd0zITSMIoneSPDInAcc500700=(TH1F*)fHistd0zITSMIoneSPDInAccP500700->Clone("fHistd0zITSMIoneSPDInAcc500700");
1686 fHistd0zITSMIoneSPDInAcc500700->Add(fHistd0zITSMIoneSPDInAccS500700);
1687 fHistd0zITSMIoneSPDInAcc500700->Scale(1./fHistd0zITSMIoneSPDInAcc500700->GetEntries());
1688 TH1F *fHistd0zITSMIoneSPDInAcc10001500=(TH1F*)fHistd0zITSMIoneSPDInAccP10001500->Clone("fHistd0zITSMIoneSPDInAcc10001500");
1689 fHistd0zITSMIoneSPDInAcc10001500->Add(fHistd0zITSMIoneSPDInAccS10001500);
1690 fHistd0zITSMIoneSPDInAcc10001500->Scale(1./fHistd0zITSMIoneSPDInAcc10001500->GetEntries());
1691
1692
1693 TCanvas *c1 = new TCanvas("c1","c1");
1694 c1->Divide(3,1);
1695 c1->cd(1);
1696 fHistd0zITSMIoneSPDInAcc150200MC->SetLineColor(2);
1697 fHistd0zITSMIoneSPDInAcc150200MC->Draw();
1698 fHistd0zITSMIoneSPDInAcc150200->SetLineColor(4);
1699 fHistd0zITSMIoneSPDInAcc150200->Draw("same");
1700 c1->cd(2);
1701 fHistd0zITSMIoneSPDInAcc500700MC->SetLineColor(2);
1702 fHistd0zITSMIoneSPDInAcc500700MC->Draw();
1703 fHistd0zITSMIoneSPDInAcc500700->SetLineColor(4);
1704 fHistd0zITSMIoneSPDInAcc500700->Draw("same");
1705 c1->cd(3);
1706 fHistd0zITSMIoneSPDInAcc10001500MC->SetLineColor(2);
1707 fHistd0zITSMIoneSPDInAcc10001500MC->Draw();
1708 fHistd0zITSMIoneSPDInAcc10001500->SetLineColor(4);
1709 fHistd0zITSMIoneSPDInAcc10001500->Draw("same");
1710
1711 TCanvas *c2 = new TCanvas("c2","c2");
1712 c2->Divide(3,1);
1713 c2_1->SetLogy();
1714 c2_2->SetLogy();
1715 c2_3->SetLogy();
1716 c2->cd(1);
1717 fHistd0zITSMIoneSPDInAccP150200MC->SetMinimum(1);
1718 fHistd0zITSMIoneSPDInAccS150200MC->SetMinimum(1);
1719 fHistd0zITSMIoneSPDInAccP150200MC->SetLineColor(1);
1720 fHistd0zITSMIoneSPDInAccP150200MC->Draw();
1721 fHistd0zITSMIoneSPDInAccS150200MC->SetLineColor(6);
1722 fHistd0zITSMIoneSPDInAccS150200MC->Draw("same");
1723 c2->cd(2);
1724 fHistd0zITSMIoneSPDInAccP500700MC->SetMinimum(1);
1725 fHistd0zITSMIoneSPDInAccS500700MC->SetMinimum(1);
1726 fHistd0zITSMIoneSPDInAccP500700MC->SetLineColor(1);
1727 fHistd0zITSMIoneSPDInAccP500700MC->Draw();
1728 fHistd0zITSMIoneSPDInAccS500700MC->SetLineColor(6);
1729 fHistd0zITSMIoneSPDInAccS500700MC->Draw("same");
1730 c2->cd(3);
1731 fHistd0zITSMIoneSPDInAccP10001500MC->SetMinimum(1);
1732 fHistd0zITSMIoneSPDInAccS10001500MC->SetMinimum(1);
1733 fHistd0zITSMIoneSPDInAccP10001500MC->SetLineColor(1);
1734 fHistd0zITSMIoneSPDInAccP10001500MC->Draw();
1735 fHistd0zITSMIoneSPDInAccS10001500MC->SetLineColor(6);
1736 fHistd0zITSMIoneSPDInAccS10001500MC->Draw("same");
1737
1738
1739 TCanvas *c3 = new TCanvas("c3","c3");
1740 c3->Divide(3,1);
1741 c3_1->SetLogx();
1742 c3_2->SetLogx();
1743 c3_3->SetLogx();
1744 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};
1745
1746 c3->cd(1);
1747 Float_t fracP150200[15],fracS150200[15];
1748 Float_t intPtot150200=fHistd0zITSMIoneSPDInAccP150200MC->Integral(1,fHistd0zITSMIoneSPDInAccP150200MC->GetNbinsX());
1749 for(Int_t i=0;i<15;i++) {
1750 Int_t bin1=fHistd0zITSMIoneSPDInAccP150200MC->FindBin(-d0cut[i]);
1751 Int_t bin2=fHistd0zITSMIoneSPDInAccP150200MC->FindBin(+d0cut[i]);
1752 Float_t intPcut150200=fHistd0zITSMIoneSPDInAccP150200MC->Integral(bin1,bin2);
1753 Float_t intScut150200=fHistd0zITSMIoneSPDInAccS150200MC->Integral(bin1,bin2);
1754 fracP150200[i]=intPcut150200/intPtot150200;
1755 fracS150200[i]=1.-intScut150200/(intPcut150200+intScut150200);
1756 }
1757 TGraph *gfracP150200=new TGraph(15,d0cut,fracP150200);
1758 gfracP150200->SetMarkerColor(2);
1759 gfracP150200->SetMarkerStyle(20);
1760 gfracP150200->Draw("ap");
1761 TGraph *gfracS150200=new TGraph(15,d0cut,fracS150200);
1762 gfracS150200->SetMarkerColor(4);
1763 gfracS150200->SetMarkerStyle(21);
1764 gfracS150200->Draw("p");
1765
1766 c3->cd(2);
1767 Float_t fracP500700[15],fracS500700[15];
1768 Float_t intPtot500700=fHistd0zITSMIoneSPDInAccP500700MC->Integral(1,fHistd0zITSMIoneSPDInAccP500700MC->GetNbinsX());
1769 for(Int_t i=0;i<15;i++) {
1770 Int_t bin1=fHistd0zITSMIoneSPDInAccP500700MC->FindBin(-d0cut[i]);
1771 Int_t bin2=fHistd0zITSMIoneSPDInAccP500700MC->FindBin(+d0cut[i]);
1772 Float_t intPcut500700=fHistd0zITSMIoneSPDInAccP500700MC->Integral(bin1,bin2);
1773 Float_t intScut500700=fHistd0zITSMIoneSPDInAccS500700MC->Integral(bin1,bin2);
1774 fracP500700[i]=intPcut500700/intPtot500700;
1775 fracS500700[i]=1.-intScut500700/(intPcut500700+intScut500700);
1776 }
1777 TGraph *gfracP500700=new TGraph(15,d0cut,fracP500700);
1778 gfracP500700->SetMarkerColor(2);
1779 gfracP500700->SetMarkerStyle(20);
1780 gfracP500700->Draw("ap");
1781 TGraph *gfracS500700=new TGraph(15,d0cut,fracS500700);
1782 gfracS500700->SetMarkerColor(4);
1783 gfracS500700->SetMarkerStyle(21);
1784 gfracS500700->Draw("p");
1785
1786 c3->cd(3);
1787 Float_t fracP10001500[15],fracS10001500[15];
1788 Float_t intPtot10001500=fHistd0zITSMIoneSPDInAccP10001500MC->Integral(1,fHistd0zITSMIoneSPDInAccP10001500MC->GetNbinsX());
1789 for(Int_t i=0;i<15;i++) {
1790 Int_t bin1=fHistd0zITSMIoneSPDInAccP10001500MC->FindBin(-d0cut[i]);
1791 Int_t bin2=fHistd0zITSMIoneSPDInAccP10001500MC->FindBin(+d0cut[i]);
1792 Float_t intPcut10001500=fHistd0zITSMIoneSPDInAccP10001500MC->Integral(bin1,bin2);
1793 Float_t intScut10001500=fHistd0zITSMIoneSPDInAccS10001500MC->Integral(bin1,bin2);
1794 fracP10001500[i]=intPcut10001500/intPtot10001500;
1795 fracS10001500[i]=1.-intScut10001500/(intPcut10001500+intScut10001500);
1796 }
1797 TGraph *gfracP10001500=new TGraph(15,d0cut,fracP10001500);
1798 gfracP10001500->SetMarkerColor(2);
1799 gfracP10001500->SetMarkerStyle(20);
1800 gfracP10001500->Draw("ap");
1801 TGraph *gfracS10001500=new TGraph(15,d0cut,fracS10001500);
1802 gfracS10001500->SetMarkerColor(4);
1803 gfracS10001500->SetMarkerStyle(21);
1804 gfracS10001500->Draw("p");
1805
1806 return;
1807}
1808//----------------------------------------------------------------------------
1809void Corrections() {
1810
1811 TFile *f_cutits= new TFile("ITS.Performance_lhc09d10_500k_noz0cut_nodcaTPC.root");
1812
1813 TList *list=(TList*)f_cutits->Get("cOutputITS");
1814
1815 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
1816 Float_t nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
1817
1818 TH1F *fHistPtITSTPCsel = (TH1F*)list->FindObject("fHistPtITSTPCsel");
1819 NormalizePtHist(fHistPtITSTPCsel,nEventsSelWithVertex);
1820 TH1F *fHistPtITSTPCselP = (TH1F*)list->FindObject("fHistPtITSTPCselP");
1821 NormalizePtHist(fHistPtITSTPCselP,nEventsSelWithVertex);
1822 TH1F *fHistPtITSTPCselS = (TH1F*)list->FindObject("fHistPtITSTPCselS");
1823 NormalizePtHist(fHistPtITSTPCselS,nEventsSelWithVertex);
1824 TH1F *fHistPtITSTPCselPfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselPfromStrange");
1825 NormalizePtHist(fHistPtITSTPCselPfromStrange,nEventsSelWithVertex);
1826 TH1F *fHistPtITSTPCselSfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
1827 NormalizePtHist(fHistPtITSTPCselSfromStrange,nEventsSelWithVertex);
1828 TH1F *fHistPtITSTPCselSfromMat = (TH1F*)list->FindObject("fHistPtITSTPCselSfromMat");
1829 NormalizePtHist(fHistPtITSTPCselSfromMat,nEventsSelWithVertex);
1830
1831
1832 TFile *f_cuttpc= new TFile("ITS.Performance_lhc09d10_500k_noz0cut.root");
1833
1834 TList *list=(TList*)f_cuttpc->Get("cOutputITS");
1835
1836 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
1837 nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
1838
1839 TH1F *fHistPtTPCInAcc = (TH1F*)list->FindObject("fHistPtTPCInAcc");
1840 NormalizePtHist(fHistPtTPCInAcc,nEventsSelWithVertex);
1841 TH1F *fHistPtTPCInAccP = (TH1F*)list->FindObject("fHistPtTPCInAccP");
1842 NormalizePtHist(fHistPtTPCInAccP,nEventsSelWithVertex);
1843 TH1F *fHistPtTPCInAccS = (TH1F*)list->FindObject("fHistPtTPCInAccS");
1844 NormalizePtHist(fHistPtTPCInAccS,nEventsSelWithVertex);
1845 TH1F *fHistPtTPCInAccPfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccPfromStrange");
1846 NormalizePtHist(fHistPtTPCInAccPfromStrange,nEventsSelWithVertex);
1847 TH1F *fHistPtTPCInAccSfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccSfromStrange");
1848 NormalizePtHist(fHistPtTPCInAccSfromStrange,nEventsSelWithVertex);
1849 TH1F *fHistPtTPCInAccSfromMat = (TH1F*)list->FindObject("fHistPtTPCInAccSfromMat");
1850 NormalizePtHist(fHistPtTPCInAccSfromMat,nEventsSelWithVertex);
1851
1852
1853 TFile *f_nocut= new TFile("ITS.Performance_lhc09d10_500k_nod0z0cut.root");
1854
1855 TList *list=(TList*)f_nocut->Get("cOutputITS");
1856
1857 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
1858 nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
1859
1860 TH1F *fHistPtITSTPCselnocut = (TH1F*)list->FindObject("fHistPtITSTPCsel");
1861 NormalizePtHist(fHistPtITSTPCselnocut,nEventsSelWithVertex);
1862 TH1F *fHistPtITSTPCselnocutP = (TH1F*)list->FindObject("fHistPtITSTPCselP");
1863 NormalizePtHist(fHistPtITSTPCselnocutP,nEventsSelWithVertex);
1864 TH1F *fHistPtITSTPCselnocutS = (TH1F*)list->FindObject("fHistPtITSTPCselS");
1865 NormalizePtHist(fHistPtITSTPCselnocutS,nEventsSelWithVertex);
1866 TH1F *fHistPtITSTPCselnocutPfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselPfromStrange");
1867 NormalizePtHist(fHistPtITSTPCselnocutPfromStrange,nEventsSelWithVertex);
1868 TH1F *fHistPtITSTPCselnocutSfromStrange = (TH1F*)list->FindObject("fHistPtITSTPCselSfromStrange");
1869 NormalizePtHist(fHistPtITSTPCselnocutSfromStrange,nEventsSelWithVertex);
1870 TH1F *fHistPtITSTPCselnocutSfromMat = (TH1F*)list->FindObject("fHistPtITSTPCselSfromMat");
1871 NormalizePtHist(fHistPtITSTPCselnocutSfromMat,nEventsSelWithVertex);
1872
1873 TH1F *fHistPtTPCInAccnocut = (TH1F*)list->FindObject("fHistPtTPCInAcc");
1874 NormalizePtHist(fHistPtTPCInAccnocut,nEventsSelWithVertex);
1875 TH1F *fHistPtTPCInAccnocutP = (TH1F*)list->FindObject("fHistPtTPCInAccP");
1876 NormalizePtHist(fHistPtTPCInAccnocutP,nEventsSelWithVertex);
1877 TH1F *fHistPtTPCInAccnocutS = (TH1F*)list->FindObject("fHistPtTPCInAccS");
1878 NormalizePtHist(fHistPtTPCInAccnocutS,nEventsSelWithVertex);
1879 TH1F *fHistPtTPCInAccnocutPfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccPfromStrange");
1880 NormalizePtHist(fHistPtTPCInAccnocutPfromStrange,nEventsSelWithVertex);
1881 TH1F *fHistPtTPCInAccnocutSfromStrange = (TH1F*)list->FindObject("fHistPtTPCInAccSfromStrange");
1882 NormalizePtHist(fHistPtTPCInAccnocutSfromStrange,nEventsSelWithVertex);
1883 TH1F *fHistPtTPCInAccnocutSfromMat = (TH1F*)list->FindObject("fHistPtTPCInAccSfromMat");
1884 NormalizePtHist(fHistPtTPCInAccnocutSfromMat,nEventsSelWithVertex);
1885
1886 // cut efficiencies
1887
1888 TH1F *fHistPtITSTPCeffselP = (TH1F*)fHistPtITSTPCselP->Clone("fHistPtITSTPCeffselP");
1889 fHistPtITSTPCeffselP->Divide(fHistPtITSTPCselnocutP);
1890 TH1F *fHistPtITSTPCeffselS = (TH1F*)fHistPtITSTPCselS->Clone("fHistPtITSTPCeffselS");
1891 fHistPtITSTPCeffselS->Divide(fHistPtITSTPCselnocutS);
1892 TH1F *fHistPtITSTPCeffselSfromStrange = (TH1F*)fHistPtITSTPCselSfromStrange->Clone("fHistPtITSTPCeffselSfromStrange");
1893 fHistPtITSTPCeffselSfromStrange->Divide(fHistPtITSTPCselnocutSfromStrange);
1894 TH1F *fHistPtITSTPCeffselSfromMat = (TH1F*)fHistPtITSTPCselSfromMat->Clone("fHistPtITSTPCeffselSfromMat");
1895 fHistPtITSTPCeffselSfromMat->Divide(fHistPtITSTPCselnocutSfromMat);
1896
1897 TH1F *fHistPtTPCeffInAccP = (TH1F*)fHistPtTPCInAccP->Clone("fHistPtTPCeffInAccP");
1898 fHistPtTPCeffInAccP->Divide(fHistPtTPCInAccnocutP);
1899 TH1F *fHistPtTPCeffInAccS = (TH1F*)fHistPtTPCInAccS->Clone("fHistPtTPCeffInAccS");
1900 fHistPtTPCeffInAccS->Divide(fHistPtTPCInAccnocutS);
1901 TH1F *fHistPtTPCeffInAccSfromStrange = (TH1F*)fHistPtTPCInAccSfromStrange->Clone("fHistPtTPCeffInAccSfromStrange");
1902 fHistPtTPCeffInAccSfromStrange->Divide(fHistPtTPCInAccnocutSfromStrange);
1903 TH1F *fHistPtTPCeffInAccSfromMat = (TH1F*)fHistPtTPCInAccSfromMat->Clone("fHistPtTPCeffInAccSfromMat");
1904 fHistPtTPCeffInAccSfromMat->Divide(fHistPtTPCInAccnocutSfromMat);
1905
1906
1907 TLegend *l0=new TLegend(0.5,0.5,0.9,0.9);
1908 TCanvas *c0=new TCanvas("c0","c0");
1909 c0->Divide(2,1);
1910 c0->cd(1);
1911 TH1F *fHistPtITSTPCselFracS = (TH1F*)fHistPtITSTPCselS->Clone("fHistPtITSTPCselFracS");
1912 fHistPtITSTPCselFracS->Divide(fHistPtITSTPCsel);
1913 fHistPtITSTPCselFracS->SetLineColor(2);
1914 l0->AddEntry(fHistPtITSTPCselFracS,"secondaries","l");
1915 fHistPtITSTPCselFracS->Draw();
1916 TH1F *fHistPtITSTPCselFracSfromStrange = (TH1F*)fHistPtITSTPCselSfromStrange->Clone("fHistPtITSTPCselFracSfromStrange");
1917 fHistPtITSTPCselFracSfromStrange->Divide(fHistPtITSTPCsel);
1918 fHistPtITSTPCselFracSfromStrange->SetLineColor(6);
1919 l0->AddEntry(fHistPtITSTPCselFracSfromStrange,"sec. from strange","l");
1920 fHistPtITSTPCselFracSfromStrange->Draw("same");
1921 TH1F *fHistPtITSTPCselFracSfromMat = (TH1F*)fHistPtITSTPCselSfromMat->Clone("fHistPtITSTPCselFracSfromMat");
1922 fHistPtITSTPCselFracSfromMat->Divide(fHistPtITSTPCsel);
1923 fHistPtITSTPCselFracSfromMat->SetLineColor(kOrange+7);
1924 l0->AddEntry(fHistPtITSTPCselFracSfromMat,"sec. from material","l");
1925 fHistPtITSTPCselFracSfromMat->Draw("same");
1926 l0->Draw();
1927 c0->cd(2);
1928 TH1F *fHistPtTPCInAccFracS = (TH1F*)fHistPtTPCInAccS->Clone("fHistPtTPCInAccFracS");
1929 fHistPtTPCInAccFracS->Divide(fHistPtTPCInAcc);
1930 fHistPtTPCInAccFracS->SetLineColor(2);
1931 fHistPtTPCInAccFracS->Draw();
1932 TH1F *fHistPtTPCInAccFracSfromStrange = (TH1F*)fHistPtTPCInAccSfromStrange->Clone("fHistPtTPCInAccFracSfromStrange");
1933 fHistPtTPCInAccFracSfromStrange->Divide(fHistPtTPCInAcc);
1934 fHistPtTPCInAccFracSfromStrange->SetLineColor(6);
1935 fHistPtTPCInAccFracSfromStrange->Draw("same");
1936 TH1F *fHistPtTPCInAccFracSfromMat = (TH1F*)fHistPtTPCInAccSfromMat->Clone("fHistPtTPCInAccFracSfromMat");
1937 fHistPtTPCInAccFracSfromMat->Divide(fHistPtTPCInAcc);
1938 fHistPtTPCInAccFracSfromMat->SetLineColor(kOrange+7);
1939 fHistPtTPCInAccFracSfromMat->Draw("same");
1940
1941 TLegend *l1=new TLegend(0.5,0.5,0.9,0.9);
1942 TCanvas *c1=new TCanvas("c1","c1");
1943 c1->Divide(2,1);
1944 c1->cd(1);
1945 fHistPtITSTPCeffselP->SetYTitle("dca cut efficiency");
1946 fHistPtITSTPCeffselP->SetLineColor(1);
1947 l1->AddEntry(fHistPtITSTPCeffselP,"primaries","l");
1948 fHistPtITSTPCeffselP->Draw();
1949 fHistPtITSTPCeffselS->SetLineColor(2);
1950 l1->AddEntry(fHistPtITSTPCeffselS,"secondaries","l");
1951 fHistPtITSTPCeffselS->Draw("same");
1952 fHistPtITSTPCeffselSfromStrange->SetLineColor(6);
1953 l1->AddEntry(fHistPtITSTPCeffselSfromStrange,"sec. from strange","l");
1954 fHistPtITSTPCeffselSfromStrange->Draw("same");
1955 fHistPtITSTPCeffselSfromMat->SetLineColor(kOrange+7);
1956 l1->AddEntry(fHistPtITSTPCeffselSfromMat,"sec. from material","l");
1957 fHistPtITSTPCeffselSfromMat->Draw("same");
1958 l1->Draw();
1959 c1->cd(2);
1960 fHistPtTPCeffInAccP->SetYTitle("dca cut efficiency");
1961 fHistPtTPCeffInAccP->SetLineColor(1);
1962 fHistPtTPCeffInAccP->Draw();
1963 fHistPtTPCeffInAccS->SetLineColor(2);
1964 fHistPtTPCeffInAccS->Draw("same");
1965 fHistPtTPCeffInAccSfromStrange->SetLineColor(6);
1966 fHistPtTPCeffInAccSfromStrange->Draw("same");
1967 fHistPtTPCeffInAccSfromMat->SetLineColor(kOrange+7);
1968 fHistPtTPCeffInAccSfromMat->Draw("same");
1969
1970
1971
1972 Float_t weightStrange=1.;
1973 Float_t weightMat=1.;
1974
1975 TH1F *fHistPtITSTPCselCocktail = MakeCocktail(fHistPtITSTPCselP,
1976 fHistPtITSTPCselPfromStrange,
1977 fHistPtITSTPCselS,
1978 fHistPtITSTPCselSfromStrange,
1979 fHistPtITSTPCselSfromMat,
1980 weightStrange,
1981 weightMat,
1982 "fHistPtITSTPCselCocktail");
1983
1984 TH1F *fHistPtITSTPCselPCocktail = CorrectToP(fHistPtITSTPCselCocktail,
1985 fHistPtITSTPCselSfromStrange,
1986 fHistPtITSTPCselSfromMat,
1987 weightStrange,
1988 weightMat,
1989 "fHistPtITSTPCselPCocktail");
1990
1991 TH1F *fHistPtITSTPCallPCocktail = CorrectToPnocut(fHistPtITSTPCselPCocktail,
1992 fHistPtITSTPCeffselP,
1993 "fHistPtITSTPCallPCocktail");
1994
1995
1996 TH1F *fHistPtTPCInAccCocktail = MakeCocktail(fHistPtTPCInAccP,
1997 fHistPtTPCInAccPfromStrange,
1998 fHistPtTPCInAccS,
1999 fHistPtTPCInAccSfromStrange,
2000 fHistPtTPCInAccSfromMat,
2001 weightStrange,
2002 weightMat,
2003 "fHistPtTPCInAccCocktail");
2004
2005 TH1F *fHistPtTPCInAccPCocktail = CorrectToP(fHistPtTPCInAccCocktail,
2006 fHistPtTPCInAccSfromStrange,
2007 fHistPtTPCInAccSfromMat,
2008 weightStrange,
2009 weightMat,
2010 "fHistPtTPCInAccPCocktail");
2011
2012 TH1F *fHistPtTPCallPCocktail = CorrectToPnocut(fHistPtTPCInAccPCocktail,
2013 fHistPtTPCeffInAccP,
2014 "fHistPtTPCallPCocktail");
2015
2016
2017
2018 TLegend *l2=new TLegend(0.5,0.5,0.9,0.9);
2019 TCanvas *c2 = new TCanvas("c2","c2");
2020 c2->Divide(2,1);
2021 c2->cd(1);
2022 fHistPtITSTPCselCocktail->SetLineColor(4);
2023 l2->AddEntry(fHistPtITSTPCselCocktail,"all, with dca cut","l");
2024 fHistPtITSTPCselCocktail->Draw();
2025 fHistPtITSTPCselPCocktail->SetLineColor(7);
2026 l2->AddEntry(fHistPtITSTPCselPCocktail,"primaries, with dca cut","l");
2027 fHistPtITSTPCselPCocktail->Draw("same");
2028 fHistPtITSTPCallPCocktail->SetLineColor(6);
2029 l2->AddEntry(fHistPtITSTPCallPCocktail,"primaries, w/o dca cut","l");
2030 fHistPtITSTPCallPCocktail->Draw("same");
2031 l2->Draw();
2032 c2->cd(2);
2033 fHistPtTPCInAccCocktail->SetLineColor(4);
2034 fHistPtTPCInAccCocktail->Draw();
2035 fHistPtTPCInAccPCocktail->SetLineColor(7);
2036 fHistPtTPCInAccPCocktail->Draw("same");
2037 fHistPtTPCallPCocktail->SetLineColor(6);
2038 fHistPtTPCallPCocktail->Draw("same");
2039
2040
2041 // systematic from secondaries
2042 weightStrange=1.3;
2043 weightMat=1.0;
2044 TH1F *fHistPtITSTPCselPCocktail1 = CorrectToP(fHistPtITSTPCselCocktail,
2045 fHistPtITSTPCselSfromStrange,
2046 fHistPtITSTPCselSfromMat,
2047 weightStrange,
2048 weightMat,
2049 "fHistPtITSTPCselPCocktail1");
2050 TH1F *fHistPtITSTPCallPCocktail1 = CorrectToPnocut(fHistPtITSTPCselPCocktail1,
2051 fHistPtITSTPCeffselP,
2052 "fHistPtITSTPCallPCocktail1");
2053 weightStrange=0.7;
2054 weightMat=1.0;
2055 TH1F *fHistPtITSTPCselPCocktail2 = CorrectToP(fHistPtITSTPCselCocktail,
2056 fHistPtITSTPCselSfromStrange,
2057 fHistPtITSTPCselSfromMat,
2058 weightStrange,
2059 weightMat,
2060 "fHistPtITSTPCselPCocktail2");
2061 TH1F *fHistPtITSTPCallPCocktail2 = CorrectToPnocut(fHistPtITSTPCselPCocktail2,
2062 fHistPtITSTPCeffselP,
2063 "fHistPtITSTPCallPCocktail2");
2064 weightStrange=1.0;
2065 weightMat=1.1;
2066 TH1F *fHistPtITSTPCselPCocktail3 = CorrectToP(fHistPtITSTPCselCocktail,
2067 fHistPtITSTPCselSfromStrange,
2068 fHistPtITSTPCselSfromMat,
2069 weightStrange,
2070 weightMat,
2071 "fHistPtITSTPCselPCocktail3");
2072 TH1F *fHistPtITSTPCallPCocktail3 = CorrectToPnocut(fHistPtITSTPCselPCocktail3,
2073 fHistPtITSTPCeffselP,
2074 "fHistPtITSTPCallPCocktail3");
2075 weightStrange=1.0;
2076 weightMat=0.9;
2077 TH1F *fHistPtITSTPCselPCocktail4 = CorrectToP(fHistPtITSTPCselCocktail,
2078 fHistPtITSTPCselSfromStrange,
2079 fHistPtITSTPCselSfromMat,
2080 weightStrange,
2081 weightMat,
2082 "fHistPtITSTPCselPCocktail4");
2083 TH1F *fHistPtITSTPCallPCocktail4 = CorrectToPnocut(fHistPtITSTPCselPCocktail4,
2084 fHistPtITSTPCeffselP,
2085 "fHistPtITSTPCallPCocktail4");
2086 weightStrange=1.3;
2087 weightMat=1.1;
2088 TH1F *fHistPtITSTPCselPCocktail5 = CorrectToP(fHistPtITSTPCselCocktail,
2089 fHistPtITSTPCselSfromStrange,
2090 fHistPtITSTPCselSfromMat,
2091 weightStrange,
2092 weightMat,
2093 "fHistPtITSTPCselPCocktail5");
2094 TH1F *fHistPtITSTPCallPCocktail5 = CorrectToPnocut(fHistPtITSTPCselPCocktail5,
2095 fHistPtITSTPCeffselP,
2096 "fHistPtITSTPCallPCocktail5");
2097 weightStrange=0.7;
2098 weightMat=0.9;
2099 TH1F *fHistPtITSTPCselPCocktail6 = CorrectToP(fHistPtITSTPCselCocktail,
2100 fHistPtITSTPCselSfromStrange,
2101 fHistPtITSTPCselSfromMat,
2102 weightStrange,
2103 weightMat,
2104 "fHistPtITSTPCselPCocktail6");
2105 TH1F *fHistPtITSTPCallPCocktail6 = CorrectToPnocut(fHistPtITSTPCselPCocktail6,
2106 fHistPtITSTPCeffselP,
2107 "fHistPtITSTPCallPCocktail6");
2108
2109 weightStrange=1.3;
2110 weightMat=1.0;
2111 TH1F *fHistPtTPCInAccPCocktail1 = CorrectToP(fHistPtTPCInAccCocktail,
2112 fHistPtTPCInAccSfromStrange,
2113 fHistPtTPCInAccSfromMat,
2114 weightStrange,
2115 weightMat,
2116 "fHistPtTPCInAccPCocktail1");
2117 TH1F *fHistPtTPCallPCocktail1 = CorrectToPnocut(fHistPtTPCInAccPCocktail1,
2118 fHistPtTPCeffInAccP,
2119 "fHistPtTPCallPCocktail1");
2120 weightStrange=0.7;
2121 weightMat=1.0;
2122 TH1F *fHistPtTPCInAccPCocktail2 = CorrectToP(fHistPtTPCInAccCocktail,
2123 fHistPtTPCInAccSfromStrange,
2124 fHistPtTPCInAccSfromMat,
2125 weightStrange,
2126 weightMat,
2127 "fHistPtTPCInAccPCocktail2");
2128 TH1F *fHistPtTPCallPCocktail2 = CorrectToPnocut(fHistPtTPCInAccPCocktail2,
2129 fHistPtTPCeffInAccP,
2130 "fHistPtTPCallPCocktail2");
2131 weightStrange=1.0;
2132 weightMat=1.1;
2133 TH1F *fHistPtTPCInAccPCocktail3 = CorrectToP(fHistPtTPCInAccCocktail,
2134 fHistPtTPCInAccSfromStrange,
2135 fHistPtTPCInAccSfromMat,
2136 weightStrange,
2137 weightMat,
2138 "fHistPtTPCInAccPCocktail3");
2139 TH1F *fHistPtTPCallPCocktail3 = CorrectToPnocut(fHistPtTPCInAccPCocktail3,
2140 fHistPtTPCeffInAccP,
2141 "fHistPtTPCallPCocktail3");
2142 weightStrange=1.0;
2143 weightMat=0.9;
2144 TH1F *fHistPtTPCInAccPCocktail4 = CorrectToP(fHistPtTPCInAccCocktail,
2145 fHistPtTPCInAccSfromStrange,
2146 fHistPtTPCInAccSfromMat,
2147 weightStrange,
2148 weightMat,
2149 "fHistPtTPCInAccPCocktail4");
2150 TH1F *fHistPtTPCallPCocktail4 = CorrectToPnocut(fHistPtTPCInAccPCocktail4,
2151 fHistPtTPCeffInAccP,
2152 "fHistPtTPCallPCocktail4");
2153 weightStrange=1.3;
2154 weightMat=1.1;
2155 TH1F *fHistPtTPCInAccPCocktail5 = CorrectToP(fHistPtTPCInAccCocktail,
2156 fHistPtTPCInAccSfromStrange,
2157 fHistPtTPCInAccSfromMat,
2158 weightStrange,
2159 weightMat,
2160 "fHistPtTPCInAccPCocktail5");
2161 TH1F *fHistPtTPCallPCocktail5 = CorrectToPnocut(fHistPtTPCInAccPCocktail5,
2162 fHistPtTPCeffInAccP,
2163 "fHistPtTPCallPCocktail5");
2164 weightStrange=0.7;
2165 weightMat=0.9;
2166 TH1F *fHistPtTPCInAccPCocktail6 = CorrectToP(fHistPtTPCInAccCocktail,
2167 fHistPtTPCInAccSfromStrange,
2168 fHistPtTPCInAccSfromMat,
2169 weightStrange,
2170 weightMat,
2171 "fHistPtTPCInAccPCocktail6");
2172 TH1F *fHistPtTPCallPCocktail6 = CorrectToPnocut(fHistPtTPCInAccPCocktail6,
2173 fHistPtTPCeffInAccP,
2174 "fHistPtTPCallPCocktail6");
2175
2176 TLegend *l3=new TLegend(0.5,0.5,0.9,0.9);
2177 TCanvas *c3 = new TCanvas("c3","c3");
2178 c3->Divide(2,1);
2179 c3->cd(1);
2180 l3->AddEntry(fHistPtITSTPCallPCocktail,"central","l");
2181 fHistPtITSTPCallPCocktail->Draw();
2182 l3->AddEntry(fHistPtITSTPCallPCocktail1,"strange #pm 30%","l");
2183 fHistPtITSTPCallPCocktail1->SetLineColor(1);
2184 fHistPtITSTPCallPCocktail2->SetLineColor(1);
2185 fHistPtITSTPCallPCocktail1->Draw("same");
2186 fHistPtITSTPCallPCocktail2->Draw("same");
2187 l3->AddEntry(fHistPtITSTPCallPCocktail3,"material #pm 10%","l");
2188 fHistPtITSTPCallPCocktail3->SetLineColor(8);
2189 fHistPtITSTPCallPCocktail4->SetLineColor(8);
2190 fHistPtITSTPCallPCocktail3->Draw("same");
2191 fHistPtITSTPCallPCocktail4->Draw("same");
2192 l3->AddEntry(fHistPtITSTPCallPCocktail5,"strange #pm 30% & material #pm 10%","l");
2193 fHistPtITSTPCallPCocktail5->SetLineColor(4);
2194 fHistPtITSTPCallPCocktail6->SetLineColor(4);
2195 fHistPtITSTPCallPCocktail5->Draw("same");
2196 fHistPtITSTPCallPCocktail6->Draw("same");
2197 l3->Draw();
2198 c3->cd(2);
2199 fHistPtTPCallPCocktail->Draw();
2200 fHistPtTPCallPCocktail1->SetLineColor(1);
2201 fHistPtTPCallPCocktail2->SetLineColor(1);
2202 fHistPtTPCallPCocktail1->Draw("same");
2203 fHistPtTPCallPCocktail2->Draw("same");
2204 fHistPtTPCallPCocktail3->SetLineColor(8);
2205 fHistPtTPCallPCocktail4->SetLineColor(8);
2206 fHistPtTPCallPCocktail3->Draw("same");
2207 fHistPtTPCallPCocktail4->Draw("same");
2208 fHistPtTPCallPCocktail5->SetLineColor(4);
2209 fHistPtTPCallPCocktail6->SetLineColor(4);
2210 fHistPtTPCallPCocktail5->Draw("same");
2211 fHistPtTPCallPCocktail6->Draw("same");
2212
2213 /*
2214 TCanvas *c4 = new TCanvas("c4","c4");
2215 c4->Divide(2,1);
2216 c4->cd(1);
2217 fHistPtITSTPCallPCocktail2->Add(fHistPtITSTPCallPCocktail,-1);
2218 fHistPtITSTPCallPCocktail2->Divide(fHistPtITSTPCallPCocktail);
2219 fHistPtITSTPCallPCocktail2->Draw();
2220 fHistPtITSTPCallPCocktail4->Add(fHistPtITSTPCallPCocktail,-1);
2221 fHistPtITSTPCallPCocktail4->Divide(fHistPtITSTPCallPCocktail);
2222 fHistPtITSTPCallPCocktail4->Draw("same");
2223 fHistPtITSTPCallPCocktail6->Add(fHistPtITSTPCallPCocktail,-1);
2224 fHistPtITSTPCallPCocktail6->Divide(fHistPtITSTPCallPCocktail);
2225 fHistPtITSTPCallPCocktail6->Draw("same");
2226 l3->Draw();
2227 c4->cd(2);
2228 fHistPtTPCallPCocktail2->Add(fHistPtTPCallPCocktail,-1);
2229 fHistPtTPCallPCocktail2->Divide(fHistPtTPCallPCocktail);
2230 fHistPtTPCallPCocktail2->Draw();
2231 fHistPtTPCallPCocktail4->Add(fHistPtTPCallPCocktail,-1);
2232 fHistPtTPCallPCocktail4->Divide(fHistPtTPCallPCocktail);
2233 fHistPtTPCallPCocktail4->Draw("same");
2234 fHistPtTPCallPCocktail6->Add(fHistPtTPCallPCocktail,-1);
2235 fHistPtTPCallPCocktail6->Divide(fHistPtTPCallPCocktail);
2236 fHistPtTPCallPCocktail6->Draw("same");
2237 */
2238
2239 return;
2240}
2241//-------------------------------------------------------------
2242void NormalizePtHist(TH1F *h,Float_t n) {
2243
2244 for(Int_t i=1; i<=h->GetNbinsX(); i++) {
2245 if(h->GetBinContent(i)) {
2246 h->SetBinContent(i,h->GetBinContent(i)/h->GetBinWidth(i));
2247 h->SetBinError(i,h->GetBinError(i)/h->GetBinWidth(i));
2248 }
2249 }
2250 h->Scale(1./n);
2251
2252 return;
2253}
2254//----------------------------------------------------------------------
2255TH1F *MakeCocktail(TH1F *fHistPtselP,
2256 TH1F *fHistPtselPfromStrange,
2257 TH1F *fHistPtselS,
2258 TH1F *fHistPtselSfromStrange,
2259 TH1F *fHistPtselSfromMat,
2260 Float_t weightStrange,
2261 Float_t weightMat,TString name) {
2262
2263 // build histogram with yield passing cut
2264 TH1F *fHistPtselCocktail = (TH1F*)fHistPtselP->Clone(name.Data());
2265 fHistPtselCocktail->Add(fHistPtselS);
2266 fHistPtselCocktail->Add(fHistPtselPfromStrange,weightStrange-1.);
2267 fHistPtselCocktail->Add(fHistPtselSfromStrange,weightStrange-1.);
2268 fHistPtselCocktail->Add(fHistPtselSfromMat,weightMat-1.);
2269
2270
2271 return fHistPtselCocktail;
2272}
2273//----------------------------------------------------------------------
2274TH1F *CorrectToP(TH1F *fHistPtselCocktail,
2275 TH1F *fHistPtselSfromStrange,
2276 TH1F *fHistPtselSfromMat,
2277 Float_t weightStrange,
2278 Float_t weightMat,TString name) {
2279
2280
2281 // build histogram with yield of primaries passing cut
2282 TH1F* fHistPtselPCocktail = (TH1F*)fHistPtselCocktail->Clone(name.Data());
2283 fHistPtselPCocktail->Add(fHistPtselSfromStrange,-weightStrange);
2284 fHistPtselPCocktail->Add(fHistPtselSfromMat,-weightMat);
2285
2286 return fHistPtselPCocktail;
2287}
2288//----------------------------------------------------------------------
2289TH1F *CorrectToPnocut(TH1F *fHistPtselPCocktail,
2290 TH1F *fHistPteffselP,TString name) {
2291
2292 // build histogram with yield of primaries without cut
2293 TH1F *fHistPtallPCocktail = (TH1F*)fHistPtselPCocktail->Clone(name.Data());
2294 //printf("%f\n",fHistPtallPCocktail->GetBinContent(6));
2295 fHistPtallPCocktail->Divide(fHistPteffselP);
2296 //printf("%f\n",fHistPtallPCocktail->GetBinContent(6));
2297
2298 return fHistPtallPCocktail;
2299}
2300//----------------------------------------------------------------------
2301void CompareTPCPt() {
2302
2303 TFile *f_tpcrefit= new TFile("ITS.Performance_104892pass2_etale05.root");
2304
2305 TList *list=(TList*)f_tpcrefit->Get("cOutputITS");
2306
2307 TH1F *fHistNEvents = (TH1F*)list->FindObject("fHistNEvents");
2308 Float_t nEventsSelWithVertex = fHistNEvents->GetBinContent(5);
2309
2310 TH1F *fHistPtTPCInAcc = (TH1F*)list->FindObject("fHistPtTPCInAcc");
2311 NormalizePtHist(fHistPtTPCInAcc,nEventsSelWithVertex);
2312 TH1F *fHistPtTPCInAccNoTRDout = (TH1F*)list->FindObject("fHistPtTPCInAccNoTRDout");
2313 NormalizePtHist(fHistPtTPCInAccNoTRDout,nEventsSelWithVertex);
2314 TH1F *fHistPtTPCInAccNoTOFout = (TH1F*)list->FindObject("fHistPtTPCInAccNoTOFout");
2315 NormalizePtHist(fHistPtTPCInAccNoTOFout,nEventsSelWithVertex);
2316 TH1F *fHistPtTPCInAccWithPtTPCAtVtx = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtVtx");
2317 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtVtx,nEventsSelWithVertex);
2318 TH1F *fHistPtTPCInAccWithPtTPCAtInnerWall = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtInnerWall");
2319 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtInnerWall,nEventsSelWithVertex);
2320
2321
2322 TFile *f_notpcrefit= new TFile("ITS.Performance_104892pass3_etale05.root");
2323
2324 TList *list=(TList*)f_notpcrefit->Get("cOutputITS");
2325
2326 TH1F *fHistNEventsNoRefit = (TH1F*)list->FindObject("fHistNEvents");
2327 nEventsSelWithVertex = fHistNEventsNoRefit->GetBinContent(5);
2328
2329 TH1F *fHistPtTPCInAccNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAcc");
2330 NormalizePtHist(fHistPtTPCInAccNoRefit,nEventsSelWithVertex);
2331 TH1F *fHistPtTPCInAccNoTRDoutNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccNoTRDout");
2332 NormalizePtHist(fHistPtTPCInAccNoTRDoutNoRefit,nEventsSelWithVertex);
2333 TH1F *fHistPtTPCInAccNoTOFoutNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccNoTOFout");
2334 NormalizePtHist(fHistPtTPCInAccNoTOFoutNoRefit,nEventsSelWithVertex);
2335 TH1F *fHistPtTPCInAccWithPtTPCAtVtxNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtVtx");
2336 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtVtxNoRefit,nEventsSelWithVertex);
2337 TH1F *fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit = (TH1F*)list->FindObject("fHistPtTPCInAccWithPtTPCAtInnerWall");
2338 NormalizePtHist(fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit,nEventsSelWithVertex);
2339
2340
2341
2342 TLegend *l1 = new TLegend(0.5,0.5,0.9,0.9);
2343 TCanvas *c1=new TCanvas("c1","c1",0,0,1000,600);
2344 c1->Divide(2,1);
2345 c1->cd(1);
2346 fHistPtTPCInAcc->SetMarkerStyle(20);
2347 l1->AddEntry(fHistPtTPCInAcc,"p_{t} measurement:","");
2348 l1->AddEntry(fHistPtTPCInAcc,"at vtx, from main params","p");
2349 fHistPtTPCInAcc->Draw();
2350 fHistPtTPCInAccWithPtTPCAtVtx->SetMarkerStyle(21);
2351 fHistPtTPCInAccWithPtTPCAtVtx->SetMarkerColor(2);
2352 l1->AddEntry(fHistPtTPCInAccWithPtTPCAtVtx,"at vtx, from TPC params","p");
2353 fHistPtTPCInAccWithPtTPCAtVtx->Draw("same");
2354 fHistPtTPCInAccWithPtTPCAtInnerWall->SetMarkerStyle(25);
2355 fHistPtTPCInAccWithPtTPCAtInnerWall->SetMarkerColor(2);
2356 l1->AddEntry(fHistPtTPCInAccWithPtTPCAtInnerWall,"at r=80cm, from TPC params","p");
2357 fHistPtTPCInAccWithPtTPCAtInnerWall->Draw("same");
2358 fHistPtTPCInAccNoTOFout->SetMarkerStyle(23);
2359 fHistPtTPCInAccNoTOFout->SetMarkerColor(3);
2360 fHistPtTPCInAccNoTOFout->Draw("same");
2361 fHistPtTPCInAccNoTRDout->SetMarkerStyle(24);
2362 fHistPtTPCInAccNoTRDout->SetMarkerColor(4);
2363 fHistPtTPCInAccNoTRDout->Draw("same");
2364 l1->Draw();
2365 c1->cd(2);
2366 fHistPtTPCInAccNoRefit->SetMarkerStyle(20);
2367 fHistPtTPCInAccNoRefit->Draw();
2368 fHistPtTPCInAccWithPtTPCAtVtxNoRefit->SetMarkerStyle(21);
2369 fHistPtTPCInAccWithPtTPCAtVtxNoRefit->SetMarkerColor(2);
2370 fHistPtTPCInAccWithPtTPCAtVtxNoRefit->Draw("same");
2371 fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit->SetMarkerStyle(25);
2372 fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit->SetMarkerColor(2);
2373 fHistPtTPCInAccWithPtTPCAtInnerWallNoRefit->Draw("same");
2374 fHistPtTPCInAccNoTOFoutNoRefit->SetMarkerStyle(23);
2375 fHistPtTPCInAccNoTOFoutNoRefit->SetMarkerColor(3);
2376 fHistPtTPCInAccNoTOFoutNoRefit->Draw("same");
2377 fHistPtTPCInAccNoTRDoutNoRefit->SetMarkerStyle(24);
2378 fHistPtTPCInAccNoTRDoutNoRefit->SetMarkerColor(4);
2379 fHistPtTPCInAccNoTRDoutNoRefit->Draw("same");
2380 //l1->Draw();
2381
2382 return;
2383}
2384
2385TH1F* gHistTemplateStrange;
2386TH1F* gHistTemplatePandMat;
2387Float_t gd0min=0.15;
2388Float_t gd0max=1.5;
2389
2390
2391Double_t FitMCTemplate(Double_t *x, Double_t *par) {
2392 Double_t xx = x[0];
2393 if(TMath::Abs(xx)<gd0min) return 0;
2394 Int_t bin = gHistTemplateStrange->GetXaxis()->FindBin(xx);
2395 Double_t pandmat = par[0]*gHistTemplatePandMat->GetBinContent(bin);
2396 Double_t strange = par[1]*gHistTemplateStrange->GetBinContent(bin);
2397 return strange + pandmat;
2398}
2399
2400void FitImpPar_rphi() {
2401
2402 Int_t rebin=1;
2403
2404 TFile *fMC= new TFile("ITS.Performance_lhc10a8a12_trkvtx_noTPCdca_120310.root");
2405
2406 TList *list=(TList*)fMC->Get("cOutputITS");
2407 TH1F *fHistd0rphiITSMIoneSPDInAccPMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
2408 TH1F *fHistd0rphiITSMIoneSPDInAccSMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
2409 TH1F *fHistd0rphiITSMIoneSPDInAccSfromMatMC = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200fromMat");
2410 fHistd0rphiITSMIoneSPDInAccPMC->Rebin(rebin);
2411 fHistd0rphiITSMIoneSPDInAccSMC->Rebin(rebin);
2412 fHistd0rphiITSMIoneSPDInAccSfromMatMC->Rebin(rebin);
2413
2414 TH1F *fHistd0rphiITSMIoneSPDInAccSfromStrangeMC=(TH1F*)fHistd0rphiITSMIoneSPDInAccSMC->Clone("fHistd0rphiITSMIoneSPDInAccSfromStrangeMC");
2415 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Add(fHistd0rphiITSMIoneSPDInAccSfromMatMC,-1.);
2416 TH1F *fHistd0rphiITSMIoneSPDInAccMC=(TH1F*)fHistd0rphiITSMIoneSPDInAccPMC->Clone("fHistd0rphiITSMIoneSPDInAccMC");
2417 fHistd0rphiITSMIoneSPDInAccMC->Add(fHistd0rphiITSMIoneSPDInAccSMC);
2418 //fHistd0rphiITSMIoneSPDInAccMC->Scale(1./fHistd0rphiITSMIoneSPDInAccMC->GetEntries());
2419 TH1F *fHistd0rphiITSMIoneSPDInAccPandMatMC=(TH1F*)fHistd0rphiITSMIoneSPDInAccPMC->Clone("fHistd0rphiITSMIoneSPDInAccPandMatMC");
2420 fHistd0rphiITSMIoneSPDInAccPandMatMC->Add(fHistd0rphiITSMIoneSPDInAccSfromMatMC);
2421
2422 // templates
2423 gHistTemplateStrange = (TH1F*)fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Clone("gHistTemplateStrange");
2424 gHistTemplatePandMat = (TH1F*)fHistd0rphiITSMIoneSPDInAccPandMatMC->Clone("gHistTemplatePandMat");
2425
2426
2427
2428
2429 TFile *f= new TFile("ITS.Performance_104065_104892_pass4_trkvtx_noTPCdca.root");
2430 //TFile *f= new TFile("ITS.Performance_lhc10a8_300k_trkvtx_noTPCdca.root");
2431
2432 TList *list=(TList*)f->Get("cOutputITS");
2433 TH1F *fHistd0rphiITSMIoneSPDInAccP = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccP150200");
2434 TH1F *fHistd0rphiITSMIoneSPDInAccS = (TH1F*)list->FindObject("fHistd0rphiITSMIoneSPDInAccS150200");
2435 fHistd0rphiITSMIoneSPDInAccP->Rebin(rebin);
2436 fHistd0rphiITSMIoneSPDInAccS->Rebin(rebin);
2437
2438 TH1F *fHistd0rphiITSMIoneSPDInAcc=(TH1F*)fHistd0rphiITSMIoneSPDInAccP->Clone("fHistd0rphiITSMIoneSPDInAcc");
2439 fHistd0rphiITSMIoneSPDInAcc->Add(fHistd0rphiITSMIoneSPDInAccS);
2440
2441
2442 TF1 *fitMCtemplate = new TF1("fitMCtemplate",FitMCTemplate,-gd0max,+gd0max,2);
2443
2444 TH1F* fHistd0rphiITSMIoneSPDInAccCopy = (TH1F*)fHistd0rphiITSMIoneSPDInAcc->Clone("fHistd0rphiITSMIoneSPDInAccCopy");
2445 for(Int_t ib=1;ib<=fHistd0rphiITSMIoneSPDInAccCopy->GetNbinsX();ib++) {
2446 if(TMath::Abs(fHistd0rphiITSMIoneSPDInAccCopy->GetBinCenter(ib))<gd0min) {
2447 fHistd0rphiITSMIoneSPDInAccCopy->SetBinContent(ib,0);
2448 fHistd0rphiITSMIoneSPDInAccCopy->SetBinError(ib,0);
2449 }
2450 }
2451 fHistd0rphiITSMIoneSPDInAccCopy->Fit("fitMCtemplate","RL");
2452
2453
2454 fHistd0rphiITSMIoneSPDInAccPandMatMC->Scale(fitMCtemplate->GetParameter(0));
2455 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Scale(fitMCtemplate->GetParameter(1));
2456 TH1F *fHistd0rphiITSMIoneSPDInAccMCFit=(TH1F*)fHistd0rphiITSMIoneSPDInAccPandMatMC->Clone("fHistd0rphiITSMIoneSPDInAccMCFit");
2457 fHistd0rphiITSMIoneSPDInAccMCFit->Add(fHistd0rphiITSMIoneSPDInAccSfromStrangeMC);
2458
2459 TCanvas *c1 = new TCanvas("c1","c1",1000,1000);
2460 c1->SetLogy();
2461 fHistd0rphiITSMIoneSPDInAccCopy->SetMinimum(1);
2462 fHistd0rphiITSMIoneSPDInAccCopy->SetMaximum(2*fHistd0rphiITSMIoneSPDInAcc->GetMaximum());
2463 fHistd0rphiITSMIoneSPDInAcc->SetMinimum(1);
2464 fHistd0rphiITSMIoneSPDInAccMC->SetMinimum(1);
2465 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->SetMinimum(1);
2466 fHistd0rphiITSMIoneSPDInAccPandMatMC->SetMinimum(1);
2467 fHistd0rphiITSMIoneSPDInAccCopy->SetLineColor(4);
2468 fHistd0rphiITSMIoneSPDInAccCopy->Draw();
2469 fHistd0rphiITSMIoneSPDInAcc->SetLineColor(4);
2470 fHistd0rphiITSMIoneSPDInAcc->Draw("same");
2471 fHistd0rphiITSMIoneSPDInAccMCFit->SetLineColor(2);
2472 fHistd0rphiITSMIoneSPDInAccMCFit->Draw("same");
2473 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->SetLineColor(3);
2474 fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Draw("same");
2475 fHistd0rphiITSMIoneSPDInAccPandMatMC->SetLineColor(15);
2476 fHistd0rphiITSMIoneSPDInAccPandMatMC->Draw("same");
2477
2478
2479
2480 TCanvas *c3 = new TCanvas("c3","c3");
2481 c3->SetLogx();
2482 c3->SetGridx();
2483 c3->SetGridy();
2484 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};
2485
2486 Float_t fracSfromStrange[15],fracSfromStrangeMC[15],fracSfromMatMC[15],fracS[15],fracSMC[15],fracSRatio[15];
2487 for(Int_t i=0;i<15;i++) {
2488 Int_t bin1=fHistd0rphiITSMIoneSPDInAccPandMatMC->FindBin(-d0cut[i]);
2489 Int_t bin2=fHistd0rphiITSMIoneSPDInAccPandMatMC->FindBin(+d0cut[i]);
2490 Float_t intDatacut=fHistd0rphiITSMIoneSPDInAcc->Integral(bin1,bin2);
2491 Float_t intMCcut=fHistd0rphiITSMIoneSPDInAccMC->Integral(bin1,bin2);
2492 Float_t intSfromStrangecut=fHistd0rphiITSMIoneSPDInAccSfromStrangeMC->Integral(bin1,bin2);
2493 Float_t intSfromMatcut=fHistd0rphiITSMIoneSPDInAccSfromMatMC->Integral(bin1,bin2);
2494 fracSfromStrange[i]=intSfromStrangecut/intDatacut;
2495 fracSfromStrangeMC[i]=intSfromStrangecut/fitMCtemplate->GetParameter(1)/intMCcut;
2496 fracSfromMatMC[i]=intSfromMatcut/intMCcut;
2497
2498 fracS[i]=fracSfromStrange[i]+fracSfromMatMC[i];
2499 fracSMC[i]=fracSfromStrangeMC[i]+fracSfromMatMC[i];
2500
2501 fracSRatio[i]=fracS[i]/fracSMC[i];
2502 }
2503 TGraph *gfracSfromStrange=new TGraph(15,d0cut,fracSfromStrange);
2504 gfracSfromStrange->SetMarkerColor(2);
2505 gfracSfromStrange->SetMarkerStyle(20);
2506 gfracSfromStrange->Draw("ap");
2507
2508 TGraph *gfracSfromStrangeMC=new TGraph(15,d0cut,fracSfromStrangeMC);
2509 gfracSfromStrangeMC->SetMarkerColor(1);
2510 gfracSfromStrangeMC->SetMarkerStyle(22);
2511 gfracSfromStrangeMC->Draw("p");
2512
2513 TGraph *gfracSfromMatMC=new TGraph(15,d0cut,fracSfromMatMC);
2514 gfracSfromMatMC->SetMarkerColor(4);
2515 gfracSfromMatMC->SetMarkerStyle(21);
2516 gfracSfromMatMC->Draw("p");
2517
2518 TGraph *gfracS=new TGraph(15,d0cut,fracS);
2519 gfracS->SetMarkerColor(2);
2520 gfracS->SetMarkerStyle(24);
2521 gfracS->Draw("p");
2522
2523 TGraph *gfracSMC=new TGraph(15,d0cut,fracSMC);
2524 gfracSMC->SetMarkerColor(1);
2525 gfracSMC->SetMarkerStyle(25);
2526 gfracSMC->Draw("p");
2527
2528
2529 TCanvas *c4 = new TCanvas("c4","c4");
2530 c4->SetLogx();
2531 c4->SetGridx();
2532 c4->SetGridy();
2533
2534 TGraph *gfracSRatio=new TGraph(15,d0cut,fracSRatio);
2535 gfracSRatio->SetMarkerColor(9);
2536 gfracSRatio->SetMarkerStyle(21);
2537 gfracSRatio->Draw("ap");
2538
2539
2540 return;
2541}
2542//-----------------------------------------------------------------------------
2543void PlotEffVSErrors() {
2544
2545 TFile *f1= new TFile("eff_104892_pd_testnew1.root");
2546
2547 TH1F *fHistPtITSMI6InAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMI6InAcc");
2548 TH1F *fHistPtITSMIge2InAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMIge2InAcc");
2549 TH1F *fHistPtITSMISPDInAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMISPDInAcc");
2550 TH1F *fHistPtITSMIoneSPDInAcctestnew1 = (TH1F*)f1->Get("fHistPtITSMIoneSPDInAcc");
2551
2552 fHistPtITSMI6InAcctestnew1->SetMarkerStyle(20);
2553 fHistPtITSMIge2InAcctestnew1->SetMarkerStyle(20);
2554 fHistPtITSMISPDInAcctestnew1->SetMarkerStyle(20);
2555 fHistPtITSMIoneSPDInAcctestnew1->SetMarkerStyle(20);
2556 fHistPtITSMI6InAcctestnew1->SetMarkerColor(2);
2557 fHistPtITSMIge2InAcctestnew1->SetMarkerColor(1);
2558 fHistPtITSMISPDInAcctestnew1->SetMarkerColor(9);
2559 fHistPtITSMIoneSPDInAcctestnew1->SetMarkerColor(15);
2560
2561
2562 TFile *f2= new TFile("eff_104892_pd_testnew2.root");
2563
2564 TH1F *fHistPtITSMI6InAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMI6InAcc");
2565 TH1F *fHistPtITSMIge2InAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMIge2InAcc");
2566 TH1F *fHistPtITSMISPDInAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMISPDInAcc");
2567 TH1F *fHistPtITSMIoneSPDInAcctestnew2 = (TH1F*)f2->Get("fHistPtITSMIoneSPDInAcc");
2568
2569 fHistPtITSMI6InAcctestnew2->SetMarkerStyle(21);
2570 fHistPtITSMIge2InAcctestnew2->SetMarkerStyle(21);
2571 fHistPtITSMISPDInAcctestnew2->SetMarkerStyle(21);
2572 fHistPtITSMIoneSPDInAcctestnew2->SetMarkerStyle(21);
2573 fHistPtITSMI6InAcctestnew2->SetMarkerColor(2);
2574 fHistPtITSMIge2InAcctestnew2->SetMarkerColor(1);
2575 fHistPtITSMISPDInAcctestnew2->SetMarkerColor(9);
2576 fHistPtITSMIoneSPDInAcctestnew2->SetMarkerColor(15);
2577
2578
2579 TFile *f3= new TFile("eff_104892_pd_testnew3.root");
2580
2581 TH1F *fHistPtITSMI6InAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMI6InAcc");
2582 TH1F *fHistPtITSMIge2InAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMIge2InAcc");
2583 TH1F *fHistPtITSMISPDInAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMISPDInAcc");
2584 TH1F *fHistPtITSMIoneSPDInAcctestnew3 = (TH1F*)f3->Get("fHistPtITSMIoneSPDInAcc");
2585
2586 fHistPtITSMI6InAcctestnew3->SetMarkerStyle(22);
2587 fHistPtITSMIge2InAcctestnew3->SetMarkerStyle(22);
2588 fHistPtITSMISPDInAcctestnew3->SetMarkerStyle(22);
2589 fHistPtITSMIoneSPDInAcctestnew3->SetMarkerStyle(22);
2590 fHistPtITSMI6InAcctestnew3->SetMarkerColor(2);
2591 fHistPtITSMIge2InAcctestnew3->SetMarkerColor(1);
2592 fHistPtITSMISPDInAcctestnew3->SetMarkerColor(9);
2593 fHistPtITSMIoneSPDInAcctestnew3->SetMarkerColor(15);
2594
2595
2596 TFile *f5= new TFile("eff_104892_pd_testnew5.root");
2597
2598 TH1F *fHistPtITSMI6InAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMI6InAcc");
2599 TH1F *fHistPtITSMIge2InAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMIge2InAcc");
2600 TH1F *fHistPtITSMISPDInAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMISPDInAcc");
2601 TH1F *fHistPtITSMIoneSPDInAcctestnew5 = (TH1F*)f5->Get("fHistPtITSMIoneSPDInAcc");
2602
2603 fHistPtITSMI6InAcctestnew5->SetMarkerStyle(24);
2604 fHistPtITSMIge2InAcctestnew5->SetMarkerStyle(24);
2605 fHistPtITSMISPDInAcctestnew5->SetMarkerStyle(24);
2606 fHistPtITSMIoneSPDInAcctestnew5->SetMarkerStyle(24);
2607 fHistPtITSMI6InAcctestnew5->SetMarkerColor(2);
2608 fHistPtITSMIge2InAcctestnew5->SetMarkerColor(1);
2609 fHistPtITSMISPDInAcctestnew5->SetMarkerColor(9);
2610 fHistPtITSMIoneSPDInAcctestnew5->SetMarkerColor(15);
2611
2612
2613 TFile *f6= new TFile("eff_104892_pd_testnew6.root");
2614
2615 TH1F *fHistPtITSMI6InAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMI6InAcc");
2616 TH1F *fHistPtITSMIge2InAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMIge2InAcc");
2617 TH1F *fHistPtITSMISPDInAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMISPDInAcc");
2618 TH1F *fHistPtITSMIoneSPDInAcctestnew6 = (TH1F*)f6->Get("fHistPtITSMIoneSPDInAcc");
2619
2620 fHistPtITSMI6InAcctestnew6->SetMarkerStyle(25);
2621 fHistPtITSMIge2InAcctestnew6->SetMarkerStyle(25);
2622 fHistPtITSMISPDInAcctestnew6->SetMarkerStyle(25);
2623 fHistPtITSMIoneSPDInAcctestnew6->SetMarkerStyle(25);
2624 fHistPtITSMI6InAcctestnew6->SetMarkerColor(2);
2625 fHistPtITSMIge2InAcctestnew6->SetMarkerColor(1);
2626 fHistPtITSMISPDInAcctestnew6->SetMarkerColor(9);
2627 fHistPtITSMIoneSPDInAcctestnew6->SetMarkerColor(15);
2628
2629
2630 TFile *f7= new TFile("eff_104892_pd_testnew7.root");
2631
2632 TH1F *fHistPtITSMI6InAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMI6InAcc");
2633 TH1F *fHistPtITSMIge2InAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMIge2InAcc");
2634 TH1F *fHistPtITSMISPDInAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMISPDInAcc");
2635 TH1F *fHistPtITSMIoneSPDInAcctestnew7 = (TH1F*)f7->Get("fHistPtITSMIoneSPDInAcc");
2636
2637 fHistPtITSMI6InAcctestnew7->SetMarkerStyle(23);
2638 fHistPtITSMIge2InAcctestnew7->SetMarkerStyle(23);
2639 fHistPtITSMISPDInAcctestnew7->SetMarkerStyle(23);
2640 fHistPtITSMIoneSPDInAcctestnew7->SetMarkerStyle(23);
2641 fHistPtITSMI6InAcctestnew7->SetMarkerColor(2);
2642 fHistPtITSMIge2InAcctestnew7->SetMarkerColor(1);
2643 fHistPtITSMISPDInAcctestnew7->SetMarkerColor(9);
2644 fHistPtITSMIoneSPDInAcctestnew7->SetMarkerColor(15);
2645
2646
2647 TFile *f8= new TFile("eff_104892_pd_testnew8.root");
2648
2649 TH1F *fHistPtITSMI6InAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMI6InAcc");
2650 TH1F *fHistPtITSMIge2InAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMIge2InAcc");
2651 TH1F *fHistPtITSMISPDInAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMISPDInAcc");
2652 TH1F *fHistPtITSMIoneSPDInAcctestnew8 = (TH1F*)f8->Get("fHistPtITSMIoneSPDInAcc");
2653
2654 fHistPtITSMI6InAcctestnew8->SetMarkerStyle(28);
2655 fHistPtITSMIge2InAcctestnew8->SetMarkerStyle(28);
2656 fHistPtITSMISPDInAcctestnew8->SetMarkerStyle(28);
2657 fHistPtITSMIoneSPDInAcctestnew8->SetMarkerStyle(28);
2658 fHistPtITSMI6InAcctestnew8->SetMarkerColor(2);
2659 fHistPtITSMIge2InAcctestnew8->SetMarkerColor(1);
2660 fHistPtITSMISPDInAcctestnew8->SetMarkerColor(9);
2661 fHistPtITSMIoneSPDInAcctestnew8->SetMarkerColor(15);
2662
2663
2664 TCanvas *c= new TCanvas("c","c");
2665 fHistPtITSMI6InAcctestnew1->Draw();
2666 fHistPtITSMIge2InAcctestnew1->Draw("same");
2667 fHistPtITSMISPDInAcctestnew1->Draw("same");
2668 fHistPtITSMIoneSPDInAcctestnew1->Draw("same");
2669 fHistPtITSMI6InAcctestnew2->Draw("same");
2670 fHistPtITSMIge2InAcctestnew2->Draw("same");
2671 fHistPtITSMISPDInAcctestnew2->Draw("same");
2672 fHistPtITSMIoneSPDInAcctestnew2->Draw("same");
2673 fHistPtITSMI6InAcctestnew3->Draw("same");
2674 fHistPtITSMIge2InAcctestnew3->Draw("same");
2675 fHistPtITSMISPDInAcctestnew3->Draw("same");
2676 fHistPtITSMIoneSPDInAcctestnew3->Draw("same");
2677 fHistPtITSMI6InAcctestnew5->Draw("same");
2678 fHistPtITSMIge2InAcctestnew5->Draw("same");
2679 fHistPtITSMISPDInAcctestnew5->Draw("same");
2680 fHistPtITSMIoneSPDInAcctestnew5->Draw("same");
2681 fHistPtITSMI6InAcctestnew6->Draw("same");
2682 fHistPtITSMIge2InAcctestnew6->Draw("same");
2683 fHistPtITSMISPDInAcctestnew6->Draw("same");
2684 fHistPtITSMIoneSPDInAcctestnew6->Draw("same");
2685 fHistPtITSMI6InAcctestnew7->Draw("same");
2686 fHistPtITSMIge2InAcctestnew7->Draw("same");
2687 fHistPtITSMISPDInAcctestnew7->Draw("same");
2688 fHistPtITSMIoneSPDInAcctestnew7->Draw("same");
2689 fHistPtITSMI6InAcctestnew8->Draw("same");
2690 fHistPtITSMIge2InAcctestnew8->Draw("same");
2691 fHistPtITSMISPDInAcctestnew8->Draw("same");
2692 fHistPtITSMIoneSPDInAcctestnew8->Draw("same");
2693
2694
2695 return;
2696}
8fa56655 2697//--------------------------------------------------------------------------
2698void ReweightStrange(TH1F *hPt,TH1F* hPtPfromStrange,TH1F* hPtSfromStrange) {
2699
2700 for(Int_t i=1;i<=hPt->GetNbinsX();i++) {
2701 Double_t pt=hPt->GetBinCenter(i);
2702 Double_t weight=1.;
2703 Double_t weightP=1.;
2704 if(pt<.25) {
2705 weight=1.3;//1.;
2706 } else if(pt>=0.25 && pt<0.5) {
2707 weight=1.5;//1.3;
2708 } else if(pt>=0.5 && pt<1.1) {
2709 weight=1.7;//1.44;
2710 } else if(pt>=1.1) {
2711 weight=2;//1.7;
2712 }
2713
2714 weightP*=1.3;
2715 hPt->SetBinContent(i,hPt->GetBinContent(i)+(weight-1.)*hPtSfromStrange->GetBinContent(i));
2716 if(hPtPfromStrange) hPt->SetBinContent(i,hPt->GetBinContent(i)+(weightP-1.)*hPtPfromStrange->GetBinContent(i));
2717 }
2718
2719 return;
2720}
b51e971f 2721//--------------------------------------------------------------------------
2722void ITSTrackingTrending(Int_t firstrun,Int_t lastrun,
71f9d353 2723 TString pathBeforeRun="/alice/sim/LHC10d1/",
2724 TString pathAfterRun="/QA14/QAresults.root",
2725 //TString pathBeforeRun="/alice/data/2010/LHC10b/000",
2726 //TString pathAfterRun="/ESDs/pass2/QA9/QAresults.root",
af874c53 2727 TString pathAfterRun2="")
2728{
b51e971f 2729 //
2730 // Make ITS efficiency trending plots from QAresults.root files
2731 //
2732 gStyle->SetOptStat(0);
2733
2734 Float_t ioValues[100],ioErrors[100];
2735 Int_t index;
2736 Int_t nruns=lastrun-firstrun+1;
2737
2738
2739 TH1F *hFracSPD1 = new TH1F("hFracSPD1","SPD inner; run number; Fraction of HSs",nruns,firstrun-0.5,lastrun+0.5);
2740 hFracSPD1->SetLineColor(3);
2741 hFracSPD1->SetMarkerColor(3);
2742 TH1F *hFracSPD2 = new TH1F("hFracSPD2","SPD outer; run number; Fraction of HSs",nruns,firstrun-0.5,lastrun+0.5);
2743 hFracSPD2->SetLineColor(8);
2744 hFracSPD2->SetMarkerColor(8);
2745
2746
2747 TH1F *hEffge2Pt02 = new TH1F("hEffge2Pt02","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2748 hEffge2Pt02->SetLineWidth(2);
2749 hEffge2Pt02->SetLineColor(1);
2750 hEffge2Pt02->SetMarkerColor(1);
2751 TH1F *hEffge2Pt1 = new TH1F("hEffge2Pt1","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2752 hEffge2Pt1->SetLineWidth(2);
2753 hEffge2Pt1->SetLineColor(1);
2754 hEffge2Pt1->SetMarkerColor(1);
2755 TH1F *hEffge2Pt10 = new TH1F("hEffge2Pt10","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2756 hEffge2Pt10->SetLineWidth(2);
2757 hEffge2Pt10->SetLineColor(1);
2758 hEffge2Pt10->SetMarkerColor(1);
2759
2760 TH1F *hEff6Pt02 = new TH1F("hEff6Pt02","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2761 hEff6Pt02->SetLineWidth(2);
2762 hEff6Pt02->SetLineColor(2);
2763 hEff6Pt02->SetMarkerColor(2);
2764 TH1F *hEff6Pt1 = new TH1F("hEff6Pt1","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2765 hEff6Pt1->SetLineWidth(2);
2766 hEff6Pt1->SetLineColor(2);
2767 hEff6Pt1->SetMarkerColor(2);
2768 TH1F *hEff6Pt10 = new TH1F("hEff6Pt10","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2769 hEff6Pt10->SetLineWidth(2);
2770 hEff6Pt10->SetLineColor(2);
2771 hEff6Pt10->SetMarkerColor(2);
2772
2773 TH1F *hEffSPDPt02 = new TH1F("hEffSPDPt02","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2774 hEffSPDPt02->SetLineWidth(2);
2775 hEffSPDPt02->SetLineColor(9);
2776 hEffSPDPt02->SetMarkerColor(9);
2777 TH1F *hEffSPDPt1 = new TH1F("hEffSPDPt1","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2778 hEffSPDPt1->SetLineWidth(2);
2779 hEffSPDPt1->SetLineColor(9);
2780 hEffSPDPt1->SetMarkerColor(9);
2781 TH1F *hEffSPDPt10 = new TH1F("hEffSPDPt10","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2782 hEffSPDPt10->SetLineWidth(2);
2783 hEffSPDPt10->SetLineColor(9);
2784 hEffSPDPt10->SetMarkerColor(9);
2785
2786 TH1F *hEffoneSPDPt02 = new TH1F("hEffoneSPDPt02","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2787 hEffoneSPDPt02->SetLineWidth(2);
2788 hEffoneSPDPt02->SetLineColor(15);
2789 hEffoneSPDPt02->SetMarkerColor(15);
2790 TH1F *hEffoneSPDPt1 = new TH1F("hEffoneSPDPt1","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2791 hEffoneSPDPt1->SetLineWidth(2);
2792 hEffoneSPDPt1->SetLineColor(15);
2793 hEffoneSPDPt1->SetMarkerColor(15);
2794 TH1F *hEffoneSPDPt10 = new TH1F("hEffoneSPDPt10","Efficiency; run number; TPC+ITS / TPC",nruns,firstrun-0.5,lastrun+0.5);
2795 hEffoneSPDPt10->SetLineWidth(2);
2796 hEffoneSPDPt10->SetLineColor(15);
2797 hEffoneSPDPt10->SetMarkerColor(15);
2798
2799 // loop on runs
2800 for(Int_t irun=firstrun; irun<=lastrun; irun++) {
2801 if(!KeepRun(irun)) continue;
2802
2803 TString path=pathBeforeRun;
2804 path+=irun;
2805 path.Append(pathAfterRun.Data());
2806 path.Prepend("alien://");
2807
af874c53 2808 if(!PlotITSTrackingHists(path.Data(),ioValues,ioErrors)) {
2809 if(pathAfterRun2.Data()=="") continue;
2810 TString path2=pathBeforeRun;
2811 path2+=irun;
2812 path2.Append(pathAfterRun2.Data());
2813 path2.Prepend("alien://");
2814 if(!PlotITSTrackingHists(path2.Data(),ioValues,ioErrors)) continue;
2815 }
b51e971f 2816
2817 Int_t bin=hEffge2Pt1->FindBin(irun);
2818
2819
2820 // fill histos
2821 index=0;
2822 hFracSPD1->SetBinContent(bin,ioValues[index]);
2823 hFracSPD1->SetBinError(bin,.01);
2824 index=1;
2825 hFracSPD2->SetBinContent(bin,ioValues[index]);
2826 hFracSPD2->SetBinError(bin,.01);
2827
2828 index=2;
2829 hEffge2Pt02->SetBinContent(bin,ioValues[index]);
2830 hEffge2Pt02->SetBinError(bin,ioErrors[index]);
2831 index=3;
2832 hEffge2Pt1->SetBinContent(bin,ioValues[index]);
2833 hEffge2Pt1->SetBinError(bin,ioErrors[index]);
2834 index=4;
2835 hEffge2Pt10->SetBinContent(bin,ioValues[index]);
2836 hEffge2Pt10->SetBinError(bin,ioErrors[index]);
2837
2838 index=5;
2839 hEff6Pt02->SetBinContent(bin,ioValues[index]);
2840 hEff6Pt02->SetBinError(bin,ioErrors[index]);
2841 index=6;
2842 hEff6Pt1->SetBinContent(bin,ioValues[index]);
2843 hEff6Pt1->SetBinError(bin,ioErrors[index]);
2844 index=7;
2845 hEff6Pt10->SetBinContent(bin,ioValues[index]);
2846 hEff6Pt10->SetBinError(bin,ioErrors[index]);
2847
2848 index=8;
2849 hEffSPDPt02->SetBinContent(bin,ioValues[index]);
2850 hEffSPDPt02->SetBinError(bin,ioErrors[index]);
2851 index=9;
2852 hEffSPDPt1->SetBinContent(bin,ioValues[index]);
2853 hEffSPDPt1->SetBinError(bin,ioErrors[index]);
2854 index=10;
2855 hEffSPDPt10->SetBinContent(bin,ioValues[index]);
2856 hEffSPDPt10->SetBinError(bin,ioErrors[index]);
2857
2858 index=11;
2859 hEffoneSPDPt02->SetBinContent(bin,ioValues[index]);
2860 hEffoneSPDPt02->SetBinError(bin,ioErrors[index]);
2861 index=12;
2862 hEffoneSPDPt1->SetBinContent(bin,ioValues[index]);
2863 hEffoneSPDPt1->SetBinError(bin,ioErrors[index]);
2864 index=13;
2865 hEffoneSPDPt10->SetBinContent(bin,ioValues[index]);
2866 hEffoneSPDPt10->SetBinError(bin,ioErrors[index]);
2867
2868 }
2869
2870 TCanvas *cSPD = new TCanvas("cSPD","cSPD",0,0,1000,300);
2871 cSPD->SetGridy();
2872 hFracSPD1->SetMaximum(1.2);
2873 hFracSPD1->SetMaximum(0);
2874 hFracSPD1->Draw("p");
2875 hFracSPD2->Draw("same,p");
2876 TLegend* lSPD=new TLegend(0.9,0.8,1,1);
2877 lSPD->AddEntry(hFracSPD1,"Frac. SPD1 ON","l");
2878 lSPD->AddEntry(hFracSPD2,"Frac. SPD2 ON","l");
2879 lSPD->Draw();
2880
2881 TCanvas *cPt02 = new TCanvas("cPt02","cPt02",0,0,1000,300);
2882 cPt02->SetGridy();
2883 hEffge2Pt02->SetMaximum(1.2);
2884 hEffge2Pt02->SetMaximum(0);
2885 hEffge2Pt02->Draw();
2886 hEff6Pt02->Draw("same");
2887 hEffSPDPt02->Draw("same");
2888 hEffoneSPDPt02->Draw("same");
2889 TLegend* lPt02=new TLegend(0.9,0.8,1,1);
2890 lPt02->AddEntry(hEffge2Pt02,">=2 cls","l");
2891 lPt02->AddEntry(hEffoneSPDPt02,">=1 SPD + any","l");
2892 lPt02->AddEntry(hEffSPDPt02,"2 SPD + any","l");
2893 lPt02->AddEntry(hEff6Pt02,"6 cls","l");
2894 lPt02->Draw();
2895
2896 TCanvas *cPt1 = new TCanvas("cPt1","cPt1",0,0,1000,300);
2897 cPt1->SetGridy();
2898 hEffge2Pt1->SetMaximum(1.2);
2899 hEffge2Pt1->SetMaximum(0);
2900 hEffge2Pt1->Draw();
2901 hEff6Pt1->Draw("same");
2902 hEffSPDPt1->Draw("same");
2903 hEffoneSPDPt1->Draw("same");
2904 lPt02->Draw();
2905
2906 TCanvas *cPt10 = new TCanvas("cPt10","cPt10",0,0,1000,300);
2907 cPt10->SetGridy();
2908 hEffge2Pt10->SetMaximum(1.2);
2909 hEffge2Pt10->SetMaximum(0);
2910 hEffge2Pt10->Draw("p");
2911 hEff6Pt10->Draw("same,p");
2912 hEffSPDPt10->Draw("same,p");
2913 hEffoneSPDPt10->Draw("same,p");
2914 lPt02->Draw();
2915
2916 return;
2917}
2918//------------------------------------------------------------------------
2919Bool_t KeepRun(Int_t irun) {
2920
2921
71f9d353 2922
2923 // LHC10c good runs
2924 Int_t nruns10b=33;
2925 Int_t goodruns10b[33]={117222, 117220, 117116, 117112, 117109, 117099, 117092, 117086, 117077, 117065, 117063, 117060, 117059, 117054, 117053, 117052, 117050, 117048, 116645, 116643, 116574, 116571, 116562, 116403, 116402, 116288, 116102, 115414, 115401, 115393, 115193, 115186, 114931};
2926
b51e971f 2927 // LHC10c good runs
af874c53 2928 Int_t nruns10c=46;
2929 Int_t goodruns10c[46]={121040, 121039, 120829, 120825, 120824, 120823, 120822, 120821, 120820, 120758, 120750, 120741, 120671, 120617, 120616, 120505, 120504, 120503, 120244, 120079, 120076, 120073, 120072, 120069, 120067, 119862, 119859, 119856, 119853, 119849, 119846, 119845, 119844, 119842, 119841, 119163, 119161, 119159, 118561, 118560, 118558, 118556, 118518, 118512, 118507, 118506};
2930 //
2931
2932 // LHC10d good runs
2933 Int_t nruns10d=80;
2934 Int_t goodruns10d[80]={126437, 126432, 126425, 126424, 126422, 126409, 126408, 126407, 126406, 126405, 126404, 126403, 126359, 126352, 126351, 126350, 126285, 126284, 126283, 126168, 126167, 126160, 126158, 126097, 126090, 126088, 126082, 126081, 126078, 126073, 126008, 126007, 126004, 125855, 125851, 125850, 125849, 125848, 125847, 125844, 125843, 125842, 125633, 125632, 125630, 125628, 125296, 125295, 125186, 125156, 125140, 125139, 125134, 125133, 125101, 125100, 125097, 125085, 125083, 125023, 124751, 124750, 124746, 124702, 124608, 124607, 124606, 124605, 124604, 124381, 124380, 124378, 124367, 124362, 124358, 124355, 124191, 124187, 122375, 122374};
b51e971f 2935 //
2936
af874c53 2937 // LHC10e good runs
2938 Int_t nruns10e=158;
2939 Int_t goodruns10e[158]={130369, 130365, 130360, 130358, 130356, 130354, 130353, 130348, 130343, 130342, 130179, 130178, 130172, 130170, 130168, 130158, 130157, 130156, 130151, 130149, 130148, 129983, 129966, 129962, 129961, 129960, 129959, 129763, 129760, 129750, 129748, 129747, 129745, 129744, 129742, 129738, 129736, 129735, 129734, 129731, 129729, 129726, 129725, 129723, 129667, 129666, 129659, 129655, 129654, 129653, 129652, 129651, 129650, 129649, 129648, 129647, 129641, 129639, 129599, 129598, 129597, 129587, 129586, 129541, 129540, 129536, 129529, 129528, 129527, 129526, 129525, 129524, 129523, 129522, 129521, 129520, 129519, 129516, 129515, 129514, 129513, 129512, 129510, 129508, 129042, 129041, 128913, 128912, 128911, 128910, 128855, 128853, 128850, 128849, 128843, 128836, 128835, 128833, 128824, 128823, 128820, 128819, 128817, 128813, 128777, 128776, 128678, 128677, 128621, 128615, 128611, 128609, 128605, 128596, 128594, 128592, 128590, 128582, 128581, 128507, 128506, 128505, 128504, 128503, 128498, 128495, 128494, 128486, 128483, 128452, 128366, 128260, 128257, 128192, 128191, 128189, 128186, 128185, 128182, 128180, 128175, 128053, 127942, 127941, 127937, 127936, 127935, 127933, 127932, 127931, 127822, 127817, 127815, 127814, 127730, 127729, 127724, 127719};
2940
b51e971f 2941
2942 Bool_t found=kFALSE;
af874c53 2943 Int_t i=0;
2944
71f9d353 2945 for(i=0; i<nruns10b; i++) {
2946 if(irun==goodruns10b[i]) {found=kTRUE; break;}
2947 }
2948 if(found) return kTRUE;
2949
af874c53 2950 for(i=0; i<nruns10c; i++) {
2951 if(irun==goodruns10c[i]) {found=kTRUE; break;}
2952 }
2953 if(found) return kTRUE;
2954
2955 for(i=0; i<nruns10d; i++) {
2956 if(irun==goodruns10d[i]) {found=kTRUE; break;}
2957 }
b51e971f 2958 if(found) return kTRUE;
af874c53 2959
2960 for(i=0; i<nruns10e; i++) {
2961 if(irun==goodruns10e[i]) {found=kTRUE; break;}
2962 }
2963 if(found) return kTRUE;
2964
2965
b51e971f 2966 return kFALSE;
2967}
af874c53 2968//-------------------------------------------------------------------------
2969void FakesWithChi2Cut(TString fname) {
2970
2971 gStyle->SetOptStat(0);
2972
2973 TFile *f= TFile::Open(fname.Data());
2974 if(!f) return kFALSE;
2975
2976 TList *list=(TList*)f->Get("cOutputITS");
2977 TDirectoryFile *dir=0;
2978 if(!list) {
2979 dir=(TDirectoryFile*)f->GetDirectory("ITS_Performance");
2980 if(dir) list = (TList*)dir->Get("cOutputITS");
2981 }
2982
2983 if(!list) return kFALSE;
2984
2985
2986
2987
2988 TH1F *fHistRedChi2AllPt02 = (TH1F*)list->FindObject("fHistITSRedChi2NonFakePt02");
2989 TH1F *fHistRedChi2FakesPt02 = (TH1F*)list->FindObject("fHistITSRedChi2FakePt02");
2990 TH1F *fHistRedChi2NonFakesPt02 = (TH1F*)fHistRedChi2AllPt02->Clone("fHistITSRedChi2NonFakePt02");
2991 fHistRedChi2NonFakesPt02->Add(fHistRedChi2FakesPt02,-1.);
2992
2993 TH1F *fHistFakeFracVSChi2CutPt02 = (TH1F*)fHistRedChi2AllPt02->Clone("fHistFakeFracVSChi2CutPt02");
2994 fHistFakeFracVSChi2CutPt02->SetLineColor(2);
2995 fHistFakeFracVSChi2CutPt02->SetLineWidth(2);
2996 TH1F *fHistNonFakeEffVSChi2CutPt02 = (TH1F*)fHistRedChi2AllPt02->Clone("fHistFakeEffVSChi2CutPt02");
2997 fHistNonFakeEffVSChi2CutPt02->SetLineColor(4);
2998 fHistNonFakeEffVSChi2CutPt02->SetLineWidth(2);
2999
3000 for(Int_t bin=1;bin<=fHistFakeFracVSChi2CutPt02->GetNbinsX();bin++) {
3001 Float_t fakesBelowCut=fHistRedChi2FakesPt02->Integral(1,bin);
3002 Float_t nonfakesBelowCut=fHistRedChi2NonFakesPt02->Integral(1,bin);
3003 Float_t allBelowCut=fHistRedChi2AllPt02->Integral(1,bin);
3004 Float_t nonfakesNoCut=fHistRedChi2NonFakesPt02->Integral();
3005 fHistFakeFracVSChi2CutPt02->SetBinContent(bin,fakesBelowCut/allBelowCut);
3006 fHistNonFakeEffVSChi2CutPt02->SetBinContent(bin,nonfakesBelowCut/nonfakesNoCut);
3007 }
3008
3009 TH1F *fHistRedChi2AllPt05 = (TH1F*)list->FindObject("fHistITSRedChi2NonFakePt05");
3010 TH1F *fHistRedChi2FakesPt05 = (TH1F*)list->FindObject("fHistITSRedChi2FakePt05");
3011 TH1F *fHistRedChi2NonFakesPt05 = (TH1F*)fHistRedChi2AllPt05->Clone("fHistITSRedChi2NonFakePt05");
3012 fHistRedChi2NonFakesPt05->Add(fHistRedChi2FakesPt05,-1.);
3013
3014 TH1F *fHistFakeFracVSChi2CutPt05 = (TH1F*)fHistRedChi2AllPt05->Clone("fHistFakeFracVSChi2CutPt05");
3015 fHistFakeFracVSChi2CutPt05->SetLineColor(2);
3016 fHistFakeFracVSChi2CutPt05->SetLineWidth(2);
3017 TH1F *fHistNonFakeEffVSChi2CutPt05 = (TH1F*)fHistRedChi2AllPt05->Clone("fHistFakeEffVSChi2CutPt05");
3018 fHistNonFakeEffVSChi2CutPt05->SetLineColor(4);
3019 fHistNonFakeEffVSChi2CutPt05->SetLineWidth(2);
3020
3021 for(Int_t bin=1;bin<=fHistFakeFracVSChi2CutPt05->GetNbinsX();bin++) {
3022 Float_t fakesBelowCut=fHistRedChi2FakesPt05->Integral(1,bin);
3023 Float_t nonfakesBelowCut=fHistRedChi2NonFakesPt05->Integral(1,bin);
3024 Float_t allBelowCut=fHistRedChi2AllPt05->Integral(1,bin);
3025 Float_t nonfakesNoCut=fHistRedChi2NonFakesPt05->Integral();
3026 fHistFakeFracVSChi2CutPt05->SetBinContent(bin,fakesBelowCut/allBelowCut);
3027 fHistNonFakeEffVSChi2CutPt05->SetBinContent(bin,nonfakesBelowCut/nonfakesNoCut);
3028 }
3029
3030 TH1F *fHistRedChi2AllPt1 = (TH1F*)list->FindObject("fHistITSRedChi2NonFakePt1");
3031 TH1F *fHistRedChi2FakesPt1 = (TH1F*)list->FindObject("fHistITSRedChi2FakePt1");
3032 TH1F *fHistRedChi2NonFakesPt1 = (TH1F*)fHistRedChi2AllPt1->Clone("fHistITSRedChi2NonFakePt1");
3033 fHistRedChi2NonFakesPt1->Add(fHistRedChi2FakesPt1,-1.);
3034
3035 TH1F *fHistFakeFracVSChi2CutPt1 = (TH1F*)fHistRedChi2AllPt1->Clone("fHistFakeFracVSChi2CutPt1");
3036 fHistFakeFracVSChi2CutPt1->SetLineColor(2);
3037 fHistFakeFracVSChi2CutPt1->SetLineWidth(2);
3038 TH1F *fHistNonFakeEffVSChi2CutPt1 = (TH1F*)fHistRedChi2AllPt1->Clone("fHistFakeEffVSChi2CutPt1");
3039 fHistNonFakeEffVSChi2CutPt1->SetLineColor(4);
3040 fHistNonFakeEffVSChi2CutPt1->SetLineWidth(2);
3041
3042 for(Int_t bin=1;bin<=fHistFakeFracVSChi2CutPt1->GetNbinsX();bin++) {
3043 Float_t fakesBelowCut=fHistRedChi2FakesPt1->Integral(1,bin);
3044 Float_t nonfakesBelowCut=fHistRedChi2NonFakesPt1->Integral(1,bin);
3045 Float_t allBelowCut=fHistRedChi2AllPt1->Integral(1,bin);
3046 Float_t nonfakesNoCut=fHistRedChi2NonFakesPt1->Integral();
3047 fHistFakeFracVSChi2CutPt1->SetBinContent(bin,fakesBelowCut/allBelowCut);
3048 fHistNonFakeEffVSChi2CutPt1->SetBinContent(bin,nonfakesBelowCut/nonfakesNoCut);
3049 }
3050
3051
3052 TCanvas *c=new TCanvas("c","c",0,0,1000,500);
3053 c->Divide(3,1);
3054 c->cd(1);
3055 fHistRedChi2NonFakesPt02->Scale(1./fHistRedChi2NonFakesPt02->Integral());
3056 fHistRedChi2NonFakesPt02->SetLineColor(4);
3057 fHistRedChi2NonFakesPt02->Draw();
3058 fHistRedChi2FakesPt02->Scale(1./fHistRedChi2FakesPt02->Integral());
3059 fHistRedChi2FakesPt02->SetLineColor(2);
3060 fHistRedChi2FakesPt02->Draw("same");
3061 c->cd(2);
3062 fHistRedChi2NonFakesPt05->Scale(1./fHistRedChi2NonFakesPt05->Integral());
3063 fHistRedChi2NonFakesPt05->SetLineColor(4);
3064 fHistRedChi2NonFakesPt05->Draw();
3065 fHistRedChi2FakesPt05->Scale(1./fHistRedChi2FakesPt05->Integral());
3066 fHistRedChi2FakesPt05->SetLineColor(2);
3067 fHistRedChi2FakesPt05->Draw("same");
3068 c->cd(3);
3069 fHistRedChi2NonFakesPt1->Scale(1./fHistRedChi2NonFakesPt1->Integral());
3070 fHistRedChi2NonFakesPt1->SetLineColor(4);
3071 fHistRedChi2NonFakesPt1->Draw();
3072 fHistRedChi2FakesPt1->Scale(1./fHistRedChi2FakesPt1->Integral());
3073 fHistRedChi2FakesPt1->SetLineColor(2);
3074 fHistRedChi2FakesPt1->Draw("same");
3075
3076 TCanvas *cc=new TCanvas("cc","cc",0,0,1000,500);
3077 cc->Divide(3,1);
3078 cc_1->SetLogx();
3079 cc_2->SetLogx();
3080 cc_3->SetLogx();
3081 cc->cd(1);
3082 fHistFakeFracVSChi2CutPt02->SetXTitle("maximum ITS #chi^{2}/nclusters");
3083 fHistFakeFracVSChi2CutPt02->SetMinimum(0);
3084 fHistFakeFracVSChi2CutPt02->SetMaximum(1);
3085 fHistFakeFracVSChi2CutPt02->Draw();
3086 fHistNonFakeEffVSChi2CutPt02->Draw("same");
3087 cc->cd(2);
3088 fHistFakeFracVSChi2CutPt05->SetXTitle("maximum ITS #chi^{2}/nclusters");
3089 fHistFakeFracVSChi2CutPt05->SetMinimum(0);
3090 fHistFakeFracVSChi2CutPt05->SetMaximum(1);
3091 fHistFakeFracVSChi2CutPt05->Draw();
3092 fHistNonFakeEffVSChi2CutPt05->Draw("same");
3093 cc->cd(3);
3094 fHistFakeFracVSChi2CutPt1->SetXTitle("maximum ITS #chi^{2}/nclusters");
3095 fHistFakeFracVSChi2CutPt1->SetMinimum(0);
3096 fHistFakeFracVSChi2CutPt1->SetMaximum(1);
3097 fHistFakeFracVSChi2CutPt1->Draw();
3098 fHistNonFakeEffVSChi2CutPt1->Draw("same");
3099
3100
3101
3102 return;
3103}