don't sort clusters after local reco, do this in AliITSUTrackerGlo
[u/mrichter/AliRoot.git] / ITS / UPGRADE / prepPlots1KMC.C
1 {
2   gROOT->LoadMacro("KMCDetector.cxx+");
3   gROOT->LoadMacro("PrepSummaryKMC.C+");
4   //
5   TObjArray* NewSt100Perf       = PrepSummaryKMC("NewStEff100NoVtx.root",0,"NewStEff100Rerf");
6   TObjArray* NewSt100Cor5       = PrepSummaryKMC("NewStEff100NoVtx.root",1,"NewStEff100Cor5");
7   TObjArray* NewSt100Cor5hs2in  = PrepSummaryKMC("NewStEff100NoVtx.root",2,"NewStEff100Cor5hs2in");
8   TObjArray* NewSt100Cor5hd2in  = PrepSummaryKMC("NewStEff100NoVtx.root",3,"NewStEff100Cor5hd2in");
9   TObjArray* NewSt100Cor5hs2inG = PrepSummaryKMC("NewStEff100NoVtx.root",4,"NewStEff100Cor5hs2inG");
10   TObjArray* NewSt100Cor5hd2inG = PrepSummaryKMC("NewStEff100NoVtx.root",5,"NewStEff100Cor5hd2inG");
11   TObjArray* NewSt100Fake       = PrepSummaryKMC("NewStEff100NoVtx.root",6,"NewStEff100Fake");
12
13   TObjArray* NewSt095Perf       = PrepSummaryKMC("NewStEff095NoVtx.root",0,"NewStEff095Rerf");
14   TObjArray* NewSt095Cor5       = PrepSummaryKMC("NewStEff095NoVtx.root",1,"NewStEff095Cor5");
15   TObjArray* NewSt095Cor5hs2in  = PrepSummaryKMC("NewStEff095NoVtx.root",2,"NewStEff095Cor5hs2in");
16   TObjArray* NewSt095Cor5hd2in  = PrepSummaryKMC("NewStEff095NoVtx.root",3,"NewStEff095Cor5hd2in");
17   TObjArray* NewSt095Cor5hs2inG = PrepSummaryKMC("NewStEff095NoVtx.root",4,"NewStEff095Cor5hs2inG");
18   TObjArray* NewSt095Cor5hd2inG = PrepSummaryKMC("NewStEff095NoVtx.root",5,"NewStEff095Cor5hd2inG");
19   TObjArray* NewSt095Fake       = PrepSummaryKMC("NewStEff095NoVtx.root",6,"NewStEff095Fake");
20
21   //
22   TObjArray* NewRS100Perf       = PrepSummaryKMC("NewRSEff100NoVtx.root",0,"NewRSEff100Rerf");
23   TObjArray* NewRS100Cor5       = PrepSummaryKMC("NewRSEff100NoVtx.root",1,"NewRSEff100Cor5");
24   TObjArray* NewRS100Cor5hs2in  = PrepSummaryKMC("NewRSEff100NoVtx.root",2,"NewRSEff100Cor5hs2in");
25   TObjArray* NewRS100Cor5hd2in  = PrepSummaryKMC("NewRSEff100NoVtx.root",3,"NewRSEff100Cor5hd2in");
26   TObjArray* NewRS100Cor5hs2inG = PrepSummaryKMC("NewRSEff100NoVtx.root",4,"NewRSEff100Cor5hs2inG");
27   TObjArray* NewRS100Cor5hd2inG = PrepSummaryKMC("NewRSEff100NoVtx.root",5,"NewRSEff100Cor5hd2inG");
28   TObjArray* NewRS100Fake       = PrepSummaryKMC("NewRSEff100NoVtx.root",6,"NewRSEff100Fake");
29
30   TObjArray* NewRS095Perf       = PrepSummaryKMC("NewRSEff095NoVtx.root",0,"NewRSEff095Rerf");
31   TObjArray* NewRS095Cor5       = PrepSummaryKMC("NewRSEff095NoVtx.root",1,"NewRSEff095Cor5");
32   TObjArray* NewRS095Cor5hs2in  = PrepSummaryKMC("NewRSEff095NoVtx.root",2,"NewRSEff095Cor5hs2in");
33   TObjArray* NewRS095Cor5hd2in  = PrepSummaryKMC("NewRSEff095NoVtx.root",3,"NewRSEff095Cor5hd2in");
34   TObjArray* NewRS095Cor5hs2inG = PrepSummaryKMC("NewRSEff095NoVtx.root",4,"NewRSEff095Cor5hs2inG");
35   TObjArray* NewRS095Cor5hd2inG = PrepSummaryKMC("NewRSEff095NoVtx.root",5,"NewRSEff095Cor5hd2inG");
36   TObjArray* NewRS095Fake       = PrepSummaryKMC("NewRSEff095NoVtx.root",6,"NewRSEff095Fake");
37
38   gStyle->SetOptStat(0);
39   gStyle->SetOptTitle(0);
40   TCanvas* c1 = new TCanvas();
41   c1->Draw();
42   TH1F* heff = new TH1F("heff","",100,0.1,1.7);
43   heff->GetYaxis()->SetNdivisions(521);
44   heff->SetXTitle("p_{T}");
45   heff->SetYTitle("Rate");  
46   heff->SetMinimum(0);
47   heff->SetMaximum(1.09);  
48   heff->Draw();
49   gPad->SetGrid(1,1);
50   //
51   TGraphErrors* gr;
52   //
53   Int_t col = 0;
54   Int_t mtype = 20;
55   Int_t msize = 1;
56   TLegend *leg1 = new TLegend(0.20,0.25,0.95,0.65," ");
57   leg1->SetNColumns(2);
58   leg1->SetFillColor(0);
59   TLegendEntry* le=0;
60   //
61
62   col = kRed;
63   mtype = 20;
64   gr = (TGraphErrors*)NewSt100Cor5->At(kEff);
65   SetGStyle(gr,col,mtype,msize);
66   gr->Draw("pc");
67   le = leg1->AddEntry(gr,"New St, eff 100%, min 5h","lp");
68   le->SetTextColor(col);
69   //
70   col = kRed+2;
71   mtype = 21;
72   gr = (TGraphErrors*)NewSt100Cor5hs2in->At(kEff);
73   SetGStyle(gr,col,mtype,msize);
74   gr->Draw("pc");
75   le = leg1->AddEntry(gr,"New St, eff 100%, min 5h(2 inner)","lp");
76   le->SetTextColor(col);
77   // 
78   //
79   //-------------------------
80
81   col = kRed;
82   mtype = 24;
83   gr = (TGraphErrors*)NewSt095Cor5->At(kEff);
84   SetGStyle(gr,col,mtype,msize);
85   gr->Draw("pc");
86   le = leg1->AddEntry(gr,"New St, eff 95%, min 5h","lp");
87   le->SetTextColor(col);
88   //
89   col = kRed+2;
90   mtype = 25;
91   gr = (TGraphErrors*)NewSt095Cor5hs2in->At(kEff);
92   SetGStyle(gr,col,mtype,msize);
93   gr->Draw("pc");
94   le = leg1->AddEntry(gr,"New St, eff 95%, min 5h(2 inner)","lp");
95   le->SetTextColor(col);
96   // 
97   //
98   // 
99   col = kRed;
100   mtype = 20;
101   gr = (TGraphErrors*)NewSt100Fake->At(kEff);
102   SetGStyle(gr,col,mtype,msize);
103   gr->SetLineStyle(2);
104   gr->Draw("pc");
105   le = leg1->AddEntry(gr,"New St, eff 100%, Fakes","lp");
106   le->SetTextColor(col);
107   //
108   // 
109   col = kRed+2;
110   mtype = 21;
111   gr = (TGraphErrors*)NewSt095Fake->At(kEff);
112   SetGStyle(gr,col,mtype,msize);
113   gr->SetLineStyle(2);
114   gr->Draw("pc");
115   le = leg1->AddEntry(gr,"New St, eff 95%, Fakes","lp");
116   le->SetTextColor(col);
117   //
118   //
119
120   //-------------------------------------------------------------------------------------
121   //
122   
123   col = kBlue;
124   mtype = 20;
125   gr = (TGraphErrors*)NewRS100Cor5->At(kEff);
126   SetGStyle(gr,col,mtype,msize);
127   gr->Draw("pc");
128   le = leg1->AddEntry(gr,"New+2in dbl, eff 100%, min 5h","lp");
129   le->SetTextColor(col);
130   //
131   col = kGreen+2;
132   mtype = 21;
133   gr = (TGraphErrors*)NewRS100Cor5hd2in->At(kEff);
134   SetGStyle(gr,col,mtype,msize);
135   gr->Draw("pc");
136   le = leg1->AddEntry(gr,"New+2in dbl, eff 100%, min 5h(2 inner pair)","lp");
137   le->SetTextColor(col);
138   // 
139   //
140   //-------------------------
141
142   col = kBlue;
143   mtype = 24;
144   gr = (TGraphErrors*)NewRS095Cor5->At(kEff);
145   SetGStyle(gr,col,mtype,msize);
146   gr->Draw("pc");
147   le = leg1->AddEntry(gr,"New+2in dbl, eff 95%, min 5h","lp");
148   le->SetTextColor(col);
149   //
150   col = kGreen+2;
151   mtype = 25;
152   gr = (TGraphErrors*)NewRS095Cor5hd2in->At(kEff);
153   SetGStyle(gr,col,mtype,msize);
154   gr->Draw("pc");
155   le = leg1->AddEntry(gr,"New+2in dbl, eff 95%, min 5h(2 inner pair)","lp");
156   le->SetTextColor(col);
157   // 
158   //
159   // 
160   col = kBlue;
161   mtype = 20;
162   gr = (TGraphErrors*)NewRS100Fake->At(kEff);
163   SetGStyle(gr,col,mtype,msize);
164   gr->SetLineStyle(2);
165   gr->Draw("pc");
166   le = leg1->AddEntry(gr,"New+2in dbl, eff 100%, Fakes","lp");
167   le->SetTextColor(col);
168   //
169   // 
170   col = kGreen+2;
171   mtype = 21;
172   gr = (TGraphErrors*)NewRS095Fake->At(kEff);
173   SetGStyle(gr,col,mtype,msize);
174   gr->SetLineStyle(2);
175   gr->Draw("pc");
176   le = leg1->AddEntry(gr,"New+2in dbl, eff 95%, Fakes","lp");
177   le->SetTextColor(col);
178   //
179   leg1->Draw();
180   //
181   SaveCanvas(c1,"fig/effFakes_new_st_2indbl","cg");
182
183   //===============================================
184   TCanvas* c2 = new TCanvas();
185   c2->Draw();
186   gPad->Modified();
187   gPad->SetLeftMargin(0.15);
188   gPad->Modified();
189  
190   TLegend *leg2 = new TLegend(0.45,0.5,0.9,0.85,"");
191   leg2->SetFillColor(0);
192   
193   TH1F* hsigD = new TH1F("sigd","",100,0.1,1.7);
194   hsigD->SetXTitle("p_{T}");
195   hsigD->SetYTitle("resolution, #sigma_{r#phi}");  
196   hsigD->SetMinimum(0);
197   hsigD->SetMaximum(0.025);  
198   hsigD->Draw();
199   hsigD->GetYaxis()->SetTitleOffset(1.4);
200   hsigD->GetYaxis()->SetTitleSize(0.05);
201   // 
202   gPad->SetGrid(1,1);
203   //
204   //------------------------------------------------------------
205
206   col = kRed;
207   mtype = 20;
208   gr = (TGraphErrors*)NewSt095Cor5->At(kSigD);
209   SetGStyle(gr,col,mtype,msize);
210   gr->Draw("pc");
211   le = leg2->AddEntry(gr,"New St, eff 95%, min 5h","lp");
212   le->SetTextColor(col);
213   //
214   col = kRed+2;
215   mtype = 25;
216   gr = (TGraphErrors*)NewSt095Cor5hs2in->At(kSigD);
217   SetGStyle(gr,col,mtype,msize);
218   gr->Draw("pc");
219   le = leg2->AddEntry(gr,"New St, eff 95%, min 5h(2 inner)","lp");
220   le->SetTextColor(col);
221   // 
222   //--------------------
223   col = kBlue;
224   mtype = 20;
225   gr = (TGraphErrors*)NewRS095Cor5->At(kSigD);
226   SetGStyle(gr,col,mtype,msize);
227   gr->Draw("pc");
228   le = leg2->AddEntry(gr,"New+2in dbl, eff 95%, min 5h","lp");
229   le->SetTextColor(col);
230   //
231   col = kGreen+2;
232   mtype = 25;
233   gr = (TGraphErrors*)NewRS095Cor5hd2in->At(kSigD);
234   SetGStyle(gr,col,mtype,msize);
235   gr->Draw("pc");
236   le = leg2->AddEntry(gr,"New+2in dbl, eff 95%, min 5h(2 inner pair)","lp");
237   le->SetTextColor(col);
238   // 
239   leg2->Draw();
240   SaveCanvas(c2,"fig/resD_new_st_2indbl","cg");
241
242
243   //----------------------------------------------
244   TCanvas* c3 = new TCanvas();
245   c3->Draw();
246   gPad->Modified();
247   gPad->SetLeftMargin(0.15);
248   gPad->Modified();
249  
250   TLegend *leg3 = new TLegend(0.45,0.5,0.9,0.85,"");
251   leg3->SetFillColor(0);
252   
253   TH1F* hsigZ = new TH1F("sigd","",100,0.1,1.7);
254   hsigZ->SetXTitle("p_{T}");
255   hsigZ->SetYTitle("resolution, #sigma_{Z}");  
256   hsigZ->SetMinimum(0);
257   hsigZ->SetMaximum(0.025);  
258   hsigZ->Draw();
259   hsigZ->GetYaxis()->SetTitleOffset(1.4);
260   hsigZ->GetYaxis()->SetTitleSize(0.05);
261   // 
262   gPad->SetGrid(1,1);
263   //
264
265
266   col = kRed;
267   mtype = 20;
268   gr = (TGraphErrors*)NewSt095Cor5->At(kSigZ);
269   SetGStyle(gr,col,mtype,msize);
270   gr->Draw("pc");
271   le = leg3->AddEntry(gr,"New St, eff 95%, min 5h","lp");
272   le->SetTextColor(col);
273   //
274   col = kRed+2;
275   mtype = 25;
276   gr = (TGraphErrors*)NewSt095Cor5hs2in->At(kSigZ);
277   SetGStyle(gr,col,mtype,msize);
278   gr->Draw("pc");
279   le = leg3->AddEntry(gr,"New St, eff 95%, min 5h(2 inner)","lp");
280   le->SetTextColor(col);
281   // 
282   //--------------------
283   col = kBlue;
284   mtype = 20;
285   gr = (TGraphErrors*)NewRS095Cor5->At(kSigZ);
286   SetGStyle(gr,col,mtype,msize);
287   gr->Draw("pc");
288   le = leg3->AddEntry(gr,"New+2in dbl, eff 95%, min 5h","lp");
289   le->SetTextColor(col);
290   //
291   col = kGreen+2;
292   mtype = 25;
293   gr = (TGraphErrors*)NewRS095Cor5hd2in->At(kSigZ);
294   SetGStyle(gr,col,mtype,msize);
295   gr->Draw("pc");
296   le = leg3->AddEntry(gr,"New+2in dbl, eff 95%, min 5h(2 inner pair)","lp");
297   le->SetTextColor(col);
298   // 
299   //
300   leg3->Draw();
301   SaveCanvas(c3,"fig/resZ_new_st_2indbl","cg");
302
303 }