5 // Dynamically link some shared libs
7 if (gClassTable->GetID("AliRun") < 0) {
8 gROOT->LoadMacro("loadlibs.C");
15 TFile f("SDD_histos_test.root");
20 a = local->ProjectionX();
21 t = local->ProjectionY();
24 TF1 *faa = new TF1("faa","gaus",-100.,100.);
25 a->Fit("faa","R","Q",-100.,100.);
26 TF1 *fat = new TF1("fat","gaus",-50,50);
27 t->Fit("fat","R","Q",-50,50);
40 c1->SaveAs("ITS_res_1.ps");
42 TH1F *anode_resolution = new TH1F("anoder","Anode resolution vs Drift Path",nbins,0.,dmax);
44 Float_t res_anodes[nbins];
45 Float_t errres_anodes[nbins];
48 for(Int_t i=0;i<nbins;i++){
51 TString *aa = new TString("aa_");
55 anodes[i] = at->ProjectionY(aa->Data(),i,i+1);
56 TF1 *fa = new TF1("fa","gaus",-1.*dmin,dmin);
57 anodes[i]->Fit("fa","R","Q",-1.*dmin,dmin);
58 res_anodes[i] = fa->GetParameter(2);
59 Float_t RMS = anodes[i]->GetRMS();
60 //if(res_anodes[i] > RMS)
62 errres_anodes[i] = fa->GetParError(2);
63 anode_resolution->Fill(i*dmax/nbins+dmax/(2*nbins),res_anodes[i]);
64 anode_resolution->SetBinError(i+1,(Stat_t) errres_anodes[i]);
65 anode_resolution->SetMarkerColor(2);
66 anode_resolution->SetLineColor(2);
71 TH1F *time_resolution = new TH1F("timer","Time resolution vs Drift Path",nbins,0.,dmax);
73 Float_t res_times[nbins];
74 Float_t errres_times[nbins];
75 for(Int_t i=0;i<nbins;i++){
76 TString *ta = new TString("tt_");
80 times[i] = tt->ProjectionY(ta->Data(),i,i+1);
81 TF1 *ft = new TF1("ft","gaus",-50,50);
82 times[i]->Fit("ft","R","Q",-50,50);
83 res_times[i] = ft->GetParameter(2);
84 Float_t RMS = times[i]->GetRMS();
85 //if(res_times[i] > RMS)
87 errres_times[i] = ft->GetParError(2);
88 time_resolution->Fill(i*dmax/nbins+dmax/(2*nbins),res_times[i]);
89 time_resolution->SetBinError(i+1,(Stat_t) errres_times[i]);
90 time_resolution->SetMarkerColor(6);
91 time_resolution->SetLineColor(6);
100 TMarker *m1 = new TMarker(x1,y1,21);
101 TMarker *m2 = new TMarker(x2,y2,22);
102 Text_t *text1 = "Anode";
103 Text_t *text2 = "Time";
104 TText *t1 = new TText(x1 + 250,y1-2,text1);
105 TText *t2 = new TText(x2 + 250,y2-2,text2);
106 //text1->SetLineColor(2);
107 //text2->SetLineColor(4);
109 anode_resolution->SetMarkerStyle(21);
110 anode_resolution->SetMaximum(100.);
111 anode_resolution->SetMinimum(0.);
112 anode_resolution->Draw("Ep");
119 time_resolution->SetMarkerStyle(23);
120 time_resolution->Draw("Ep,same");
121 c1->SaveAs("ITS_res.ps");
128 dtrp->SetLineColor(2);
133 dtrpall->SetLineColor(1);
134 //dtrpall->SetLineStyle(2);
135 dtrpall->SetLineColor(2);
136 dtrpall->Draw("SAME");
138 c1->SaveAs("ITS_dtr_1.ps");
144 c1->SaveAs("ITS_at.ps");
148 c1->SaveAs("ITS_tt.ps");
153 dtrp->SetLineColor(1);
154 //dtrp->SetLineStyle(2);
155 dtrp->SetLineColor(2);
158 c1->SaveAs("ITS_dtr_2.ps");
160 effh->SetMinimum(0.9);
162 effp->SetLineColor(2);
164 c1->SaveAs("ITS_eff_1.ps");
168 rec_vs_time->SetLineColor(2);
169 rec_vs_time->Draw("SAME");
170 c1->SaveAs("ITS_eff_2.ps");
176 nanodes_pfx->SetLineColor(2);
177 nanodes_pfx->Draw("SAME");
178 c1->SaveAs("ITS_clsize.ps");
182 occupancy4->Draw("SAME");
183 c1->SaveAs("ITS_occ.ps");
190 xy3_px->Draw("SAME");
191 xz3_px->Draw("SAME");
193 c1->SaveAs("ITS_xyz_3.ps");
200 xy4_px->Draw("SAME");
201 xz4_px->Draw("SAME");
203 c1->SaveAs("ITS_xyz_4.ps");
206 c1->SaveAs("ITS_ampl_1.ps");
210 c1->SaveAs("ITS_ampl_2.ps");
212 TF1 *fhc = new TF1("fhc","gaus",-5,5);
213 hitpnt->Fit("fhc","R","Q",-5,5);
215 c1->SaveAs("ITS_hitpnt.ps");
218 anoder->SetMinimum(0.);
220 anoder->SetXTitle("Drift Path (mm)");
221 anoder->SetYTitle("Resolution (um)");
223 TMarker *mk2 = new TMarker(16.,62.,21);
224 mk2->SetMarkerColor(2);
226 TMarker *mk3 = new TMarker(16.,54.,23);
227 mk3->SetMarkerColor(6);
229 Text_t *text = "294 um pitch detector";
230 TText *t3 = new TText(2,90,text);
231 Text_t *text0 = "Spatial Resolution";
232 TText *t0 = new TText(2,82,text0);
233 Text_t *text2 = "Simulation (Anode)";
234 TText *t2 = new TText(18,60,text2);
235 Text_t *text4 = "Simulation (Time)";
236 TText *t4 = new TText(18,52,text4);
244 c1->SaveAs("ITS_res_check_294.ps");
247 nanodes_pfx->SetXTitle("Drift Time (ns)");
248 nanodes_pfx->SetYTitle("Anodes/Cluster");
249 nanodes_pfx->SetMaximum(3.);
250 nanodes_pfx->SetMarkerStyle(21);
251 nanodes_pfx->SetLineColor(2);
252 nanodes_pfx->SetMarkerColor(2);
255 TMarker *mk2 = new TMarker(4000.,0.3,21);
256 mk2->SetMarkerColor(2);
258 Text_t *text = "294 um pitch detector";
259 TText *t3 = new TText(200,2.7,text);
260 Text_t *text0 = "Average Number of Anodes/Cluster";
261 TText *t0 = new TText(200,2.4,text0);
262 Text_t *text2 = "Simulation";
263 TText *t2 = new TText(4200,0.2,text2);
267 c1->SaveAs("ITS_and_check_294.ps");
270 nsampls_pfx->SetXTitle("Drift Time (ns)");
271 nsampls_pfx->SetYTitle("Time bins/Anode/Cluster");
272 nsampls_pfx->SetMaximum(10.);
273 nsampls_pfx->SetMarkerStyle(21);
274 nsampls_pfx->SetLineColor(2);
275 nsampls_pfx->SetMarkerColor(2);
277 TMarker *mk2 = new TMarker(4000.,1.,21);
278 mk2->SetMarkerColor(2);
280 Text_t *text = "294 um pitch detector";
281 TText *t3 = new TText(200,9.,text);
282 Text_t *text0 = "Average Number of Time bins/Anode/Cluster";
283 TText *t0 = new TText(200,8.,text0);
284 Text_t *text2 = "Simulation";
285 TText *t2 = new TText(4200,0.8,text2);
289 c1->SaveAs("ITS_tim_check_294.ps");
293 amplit_pfx->SetLineColor(2);
294 amplit_pfx->SetMaximum(500.);
295 amplit_pfx->SetMarkerStyle(21);
296 amplit_pfx->SetMarkerColor(2);
298 TMarker *mk2 = new TMarker(500.,50,21);
299 mk2->SetMarkerColor(2);
301 Text_t *text = "294 um pitch detector";
302 TText *t3 = new TText(1000,450.,text);
303 Text_t *text0 = "Peak Amplitude";
304 TText *t0 = new TText(1000,400.,text0);
305 Text_t *text2 = "Simulation";
306 TText *t2 = new TText(700,40.,text2);
310 c1->SaveAs("ITS_amp_check_294.ps");
314 chp_pfx->SetLineColor(2);
315 chp_pfx->SetMaximum(2000.);
316 chp_pfx->SetMarkerStyle(21);
317 chp_pfx->SetMarkerColor(2);
319 TMarker *mk2 = new TMarker(500.,200.,21);
320 mk2->SetMarkerColor(2);
322 Text_t *text = "294 um pitch detector";
323 TText *t3 = new TText(300,1800.,text);
324 Text_t *text0 = "Total Charge";
325 TText *t0 = new TText(300,1600.,text0);
326 Text_t *text2 = "Simulation";
327 TText *t2 = new TText(700,150.,text2);
331 c1->SaveAs("ITS_cha_check_294.ps");
333 TH1F *eff = f.Get("rec_vs_time");
334 TH1F *efh = f.Get("hit_vs_time");
337 TH1F *effn = new TH1F("effn","Efficiency vs. drift path (mm)",18,0.,36.);
338 effn->SetMinimum(0.9);
340 for(Int_t i=1;i<=36;i++) {
341 Float_t cont = eff->GetBinContent(i);
343 cont += eff->GetBinContent(i);
345 effn->SetBinContent(i/2,cont);
348 effn->SetXTitle("Drift Path (mm)");
349 effn->SetYTitle("Reconstruction Efficiency");
350 effn->SetMaximum(1.2);
351 effn->SetMinimum(0.6);
352 effn->SetMarkerStyle(21);
353 effn->SetLineColor(2);
354 effn->SetMarkerColor(2);
356 TMarker *mk2 = new TMarker(20.,0.7,21);
357 mk2->SetMarkerColor(2);
359 Text_t *text = "294 um pitch detector";
360 TText *t3 = new TText(2.,1.13,text);
361 Text_t *text2 = "Simulation";
362 TText *t2 = new TText(22,0.685,text2);
366 c1->SaveAs("ITS_eff_check_294.ps");
369 TH1F *pa = (TH1F *) amplit_pfx;
370 TH1F *pc = (TH1F *) chp_pfx;
376 TH1F *nsd = new TH1F("nsd","nsd",28,0.,7000.);
377 for(Int_t i=1;i<=28;i++) {
378 Float_t sc = sd->GetBinContent(i);
379 nsd->SetBinContent(i,sc);
381 nsd->SetMarkerStyle(21);
382 nsd->SetMarkerColor(2);
383 nsd->SetLineColor(2);
384 nsd->SetMaximum(0.4);
386 TMarker *mk2 = new TMarker(300.,0.05,21);
387 mk2->SetMarkerColor(2);
389 Text_t *text0 = "294 um pitch detector";
390 TText *t0 = new TText(300.,0.35,text0);
391 Text_t *text = "Peak Amplitude / Total Charge";
392 TText *t3 = new TText(300.,0.3,text);
393 Text_t *text2 = "Simulation";
394 TText *t2 = new TText(500,0.04,text2);
399 c1->SaveAs("ITS_coa_check_294.ps");