ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/PixelOnlyTracking/MyHistoStyle_Vertex.C
Revision: 1.5
Committed: Thu Apr 29 12:45:34 2010 UTC (15 years ago) by dinardo
Content type: text/plain
Branch: MAIN
Changes since 1.4: +3 -3 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 dinardo 1.2 // #########################
2     // # MyHistoStyle_Vertex.C #
3     // #########################
4    
5 dinardo 1.1 {
6     // ##################
7     // # STYLE SETTINGS #
8     // ##################
9     gROOT->Reset();
10     gROOT->SetStyle("Plain");
11    
12     gStyle->SetOptStat(111110);
13     gStyle->SetStatX(0.9);
14     gStyle->SetStatY(0.9);
15     gStyle->SetStatW(0.2);
16     gStyle->SetStatH(0.1);
17    
18     gStyle->SetOptFit(1);
19     gStyle->SetOptTitle(false);
20    
21     // ################
22     // # FILE READING #
23     // ################
24 dinardo 1.5 TFile* file0 = TFile::Open("MyPixAnalysis_MC7TeV_TrkPar.root");
25     TFile* file1 = TFile::Open("MyPixAnalysis_MC7TeV_noTrkPar.root");
26     TFile* file2 = TFile::Open("MyPixAnalysis_Data_Run132605.root");
27 dinardo 1.1
28 dinardo 1.3 // ###################
29     // # Histo Variables #
30     // ###################
31     TH1F* histo0;
32     TH1F* histo1;
33     TH1F* histo2;
34    
35 dinardo 1.1 // ########################################
36     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
37     // ########################################
38 dinardo 1.3 histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along X vs DoF");
39     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along X vs DoF");
40     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along X vs DoF");
41 dinardo 1.1
42     TCanvas* c0 = new TCanvas("c0", "c0");
43    
44     histo0->SetFillColor(kBlue);
45     histo0->Draw("bar");
46    
47     histo1->SetMarkerStyle(20);
48     histo1->SetMarkerColor(kBlack);
49     histo1->Draw("same");
50    
51     histo2->SetMarkerStyle(21);
52     histo2->SetMarkerColor(kRed);
53     histo2->Draw("same");
54    
55     histo0->SetStats(false);
56     histo1->SetStats(false);
57     histo2->SetStats(false);
58    
59     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
60     leg->AddEntry(histo0,"MC TrkPar");
61     leg->AddEntry(histo1,"MC Reco");
62     leg->AddEntry(histo2,"Data");
63     leg->SetFillColor(0);
64     leg->SetBorderSize(1);
65     leg->Draw();
66    
67     // ###################
68     // # UPDATE AND SAVE #
69     // ###################
70     c0->Update();
71     c0->SaveAs("Res_X.png");
72    
73     // ########################################
74     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
75     // ########################################
76     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along Y vs DoF");
77     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along Y vs DoF");
78     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along Y vs DoF");
79    
80     TCanvas* c1 = new TCanvas("c1", "c1");
81    
82     histo0->SetFillColor(kBlue);
83     histo0->Draw("bar");
84    
85     histo1->SetMarkerStyle(20);
86     histo1->SetMarkerColor(kBlack);
87     histo1->Draw("same");
88    
89     histo2->SetMarkerStyle(21);
90     histo2->SetMarkerColor(kRed);
91     histo2->Draw("same");
92    
93     histo0->SetStats(false);
94     histo1->SetStats(false);
95     histo2->SetStats(false);
96    
97     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
98     leg->AddEntry(histo0,"MC TrkPar");
99     leg->AddEntry(histo1,"MC Reco");
100     leg->AddEntry(histo2,"Data");
101     leg->SetFillColor(0);
102     leg->SetBorderSize(1);
103     leg->Draw();
104    
105     // ###################
106     // # UPDATE AND SAVE #
107     // ###################
108     c1->Update();
109     c1->SaveAs("Res_Y.png");
110    
111     // ########################################
112     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
113     // ########################################
114     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along Z vs DoF");
115     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along Z vs DoF");
116     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position difference along Z vs DoF");
117    
118     TCanvas* c2 = new TCanvas("c2", "c2");
119    
120     histo0->SetFillColor(kBlue);
121     histo0->SetTitleOffset(1.3,"Y");
122     histo0->Draw("bar");
123    
124     histo1->SetMarkerStyle(20);
125     histo1->SetMarkerColor(kBlack);
126     histo1->Draw("same");
127    
128     histo2->SetMarkerStyle(21);
129     histo2->SetMarkerColor(kRed);
130     histo2->Draw("same");
131    
132     histo0->SetStats(false);
133     histo1->SetStats(false);
134     histo2->SetStats(false);
135    
136     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
137     leg->AddEntry(histo0,"MC TrkPar");
138     leg->AddEntry(histo1,"MC Reco");
139     leg->AddEntry(histo2,"Data");
140     leg->SetFillColor(0);
141     leg->SetBorderSize(1);
142     leg->Draw();
143    
144     // ###################
145     // # UPDATE AND SAVE #
146     // ###################
147     c2->Update();
148     c2->SaveAs("Res_Z.png");
149    
150     // ########################################
151     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
152     // ########################################
153     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along X vs DoF");
154     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along X vs DoF");
155     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along X vs DoF");
156    
157     TCanvas* c3 = new TCanvas("c3", "c3");
158    
159     histo0->SetFillColor(kBlue);
160     histo0->GetYaxis()->SetRangeUser(0.,3.);
161     histo0->Draw("bar");
162    
163     histo1->SetMarkerStyle(20);
164     histo1->SetMarkerColor(kBlack);
165     histo1->Draw("same");
166    
167     histo2->SetMarkerStyle(21);
168     histo2->SetMarkerColor(kRed);
169     histo2->Draw("same");
170    
171     histo0->SetStats(false);
172     histo1->SetStats(false);
173     histo2->SetStats(false);
174    
175     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
176     leg->AddEntry(histo0,"MC TrkPar");
177     leg->AddEntry(histo1,"MC Reco");
178     leg->AddEntry(histo2,"Data");
179     leg->SetFillColor(0);
180     leg->SetBorderSize(1);
181     leg->Draw();
182    
183     // ###################
184     // # UPDATE AND SAVE #
185     // ###################
186     c3->Update();
187     c3->SaveAs("Pull_X.png");
188    
189     // ########################################
190     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
191     // ########################################
192     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along Y vs DoF");
193     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along Y vs DoF");
194     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along Y vs DoF");
195    
196     TCanvas* c4 = new TCanvas("c4", "c4");
197    
198     histo0->SetFillColor(kBlue);
199     histo0->GetYaxis()->SetRangeUser(0.,3.);
200     histo0->Draw("bar");
201    
202     histo1->SetMarkerStyle(20);
203     histo1->SetMarkerColor(kBlack);
204     histo1->Draw("same");
205    
206     histo2->SetMarkerStyle(21);
207     histo2->SetMarkerColor(kRed);
208     histo2->Draw("same");
209    
210     histo0->SetStats(false);
211     histo1->SetStats(false);
212     histo2->SetStats(false);
213    
214     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
215     leg->AddEntry(histo0,"MC TrkPar");
216     leg->AddEntry(histo1,"MC Reco");
217     leg->AddEntry(histo2,"Data");
218     leg->SetFillColor(0);
219     leg->SetBorderSize(1);
220     leg->Draw();
221    
222     // ###################
223     // # UPDATE AND SAVE #
224     // ###################
225     c4->Update();
226     c4->SaveAs("Pull_Y.png");
227    
228     // ########################################
229     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
230     // ########################################
231     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along Z vs DoF");
232     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along Z vs DoF");
233     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Vertex position pull along Z vs DoF");
234    
235     TCanvas* c5 = new TCanvas("c5", "c5");
236    
237     histo0->SetFillColor(kBlue);
238     histo0->GetYaxis()->SetRangeUser(0.,3.);
239     histo0->Draw("bar");
240    
241     histo1->SetMarkerStyle(20);
242     histo1->SetMarkerColor(kBlack);
243     histo1->Draw("same");
244    
245     histo2->SetMarkerStyle(21);
246     histo2->SetMarkerColor(kRed);
247     histo2->Draw("same");
248    
249     histo0->SetStats(false);
250     histo1->SetStats(false);
251     histo2->SetStats(false);
252    
253     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
254     leg->AddEntry(histo0,"MC TrkPar");
255     leg->AddEntry(histo1,"MC Reco");
256     leg->AddEntry(histo2,"Data");
257     leg->SetFillColor(0);
258     leg->SetBorderSize(1);
259     leg->Draw();
260    
261     // ###################
262     // # UPDATE AND SAVE #
263     // ###################
264     c5->Update();
265     c5->SaveAs("Pull_Z.png");
266    
267     // ########################################
268     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
269     // ########################################
270     histo0 = (TH1F*)file0->Get("MyProcess/VxDoF/x_diff_DoF_20");
271     histo1 = (TH1F*)file0->Get("MyProcess/VxDoF/x_diff_DoF_10");
272     histo2 = (TH1F*)file0->Get("MyProcess/VxDoF/x_diff_DoF_4");
273    
274     TCanvas* c6 = new TCanvas("c6", "c6");
275    
276     histo0->SetLineColor(kBlue);
277 dinardo 1.3 histo0->SetLineWidth(2.0);
278 dinardo 1.1 histo0->SetXTitle("Res X [\\mum]");
279     histo0->SetYTitle("Entries [#]");
280     histo0->GetYaxis()->SetRangeUser(0.,550.);
281     histo0->Draw();
282    
283     histo1->SetLineColor(kBlack);
284 dinardo 1.3 histo1->SetLineWidth(2.0);
285 dinardo 1.1 histo1->Draw("same");
286    
287     histo2->SetLineColor(kRed);
288 dinardo 1.3 histo2->SetLineWidth(2.0);
289 dinardo 1.1 histo2->Draw("same");
290    
291     histo0->SetStats(false);
292     histo1->SetStats(false);
293     histo2->SetStats(false);
294    
295     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
296     leg->AddEntry(histo0,"DoF 20");
297     leg->AddEntry(histo1,"DoF 10");
298     leg->AddEntry(histo2,"DoF 4");
299     leg->SetFillColor(0);
300     leg->SetBorderSize(1);
301     leg->Draw();
302    
303     // ###################
304     // # UPDATE AND SAVE #
305     // ###################
306     c6->Update();
307     c6->SaveAs("MC_TrkPar_X_DoF.png");
308    
309     // ########################################
310     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
311     // ########################################
312     histo0 = (TH1F*)file0->Get("MyProcess/VxDoF/y_diff_DoF_20");
313     histo1 = (TH1F*)file0->Get("MyProcess/VxDoF/y_diff_DoF_10");
314     histo2 = (TH1F*)file0->Get("MyProcess/VxDoF/y_diff_DoF_4");
315    
316     TCanvas* c7 = new TCanvas("c7", "c7");
317    
318     histo0->SetLineColor(kBlue);
319 dinardo 1.3 histo0->SetLineWidth(2.0);
320 dinardo 1.1 histo0->SetXTitle("Res Y [\\mum]");
321     histo0->SetYTitle("Entries [#]");
322     histo0->GetYaxis()->SetRangeUser(0.,550.);
323     histo0->Draw();
324    
325     histo1->SetLineColor(kBlack);
326 dinardo 1.3 histo1->SetLineWidth(2.0);
327 dinardo 1.1 histo1->Draw("same");
328    
329     histo2->SetLineColor(kRed);
330 dinardo 1.3 histo2->SetLineWidth(2.0);
331 dinardo 1.1 histo2->Draw("same");
332    
333     histo0->SetStats(false);
334     histo1->SetStats(false);
335     histo2->SetStats(false);
336    
337     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
338     leg->AddEntry(histo0,"DoF 20");
339     leg->AddEntry(histo1,"DoF 10");
340     leg->AddEntry(histo2,"DoF 4");
341     leg->SetFillColor(0);
342     leg->SetBorderSize(1);
343     leg->Draw();
344    
345     // ###################
346     // # UPDATE AND SAVE #
347     // ###################
348     c7->Update();
349     c7->SaveAs("MC_TrkPar_Y_DoF.png");
350    
351     // ########################################
352     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
353     // ########################################
354     histo0 = (TH1F*)file0->Get("MyProcess/VxDoF/z_diff_DoF_20");
355     histo1 = (TH1F*)file0->Get("MyProcess/VxDoF/z_diff_DoF_10");
356     histo2 = (TH1F*)file0->Get("MyProcess/VxDoF/z_diff_DoF_4");
357    
358     TCanvas* c8 = new TCanvas("c8", "c8");
359    
360     histo0->SetLineColor(kBlue);
361 dinardo 1.3 histo0->SetLineWidth(2.0);
362 dinardo 1.1 histo0->SetXTitle("Res Z [cm]");
363     histo0->SetYTitle("Entries [#]");
364     histo0->GetYaxis()->SetRangeUser(0.,550.);
365     histo0->Draw();
366    
367     histo1->SetLineColor(kBlack);
368 dinardo 1.3 histo1->SetLineWidth(2.0);
369 dinardo 1.1 histo1->Draw("same");
370    
371     histo2->SetLineColor(kRed);
372 dinardo 1.3 histo2->SetLineWidth(2.0);
373 dinardo 1.1 histo2->Draw("same");
374    
375     histo0->SetStats(false);
376     histo1->SetStats(false);
377     histo2->SetStats(false);
378    
379     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
380     leg->AddEntry(histo0,"DoF 20");
381     leg->AddEntry(histo1,"DoF 10");
382     leg->AddEntry(histo2,"DoF 4");
383     leg->SetFillColor(0);
384     leg->SetBorderSize(1);
385     leg->Draw();
386    
387     // ###################
388     // # UPDATE AND SAVE #
389     // ###################
390     c8->Update();
391     c8->SaveAs("MC_TrkPar_Z_DoF.png");
392    
393     // ########################################
394     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
395     // ########################################
396     histo0 = (TH1F*)file1->Get("MyProcess/VxDoF/x_diff_DoF_20");
397     histo1 = (TH1F*)file1->Get("MyProcess/VxDoF/x_diff_DoF_10");
398     histo2 = (TH1F*)file1->Get("MyProcess/VxDoF/x_diff_DoF_4");
399    
400     TCanvas* c9 = new TCanvas("c9", "c9");
401    
402     histo0->SetLineColor(kBlue);
403 dinardo 1.3 histo0->SetLineWidth(2.0);
404 dinardo 1.1 histo0->SetXTitle("Res X [\\mum]");
405     histo0->SetYTitle("Entries [#]");
406     histo0->GetYaxis()->SetRangeUser(0.,550.);
407     histo0->Draw();
408    
409     histo1->SetLineColor(kBlack);
410 dinardo 1.3 histo1->SetLineWidth(2.0);
411 dinardo 1.1 histo1->Draw("same");
412    
413     histo2->SetLineColor(kRed);
414 dinardo 1.3 histo2->SetLineWidth(2.0);
415 dinardo 1.1 histo2->Draw("same");
416    
417     histo0->SetStats(false);
418     histo1->SetStats(false);
419     histo2->SetStats(false);
420    
421     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
422     leg->AddEntry(histo0,"DoF 20");
423     leg->AddEntry(histo1,"DoF 10");
424     leg->AddEntry(histo2,"DoF 4");
425     leg->SetFillColor(0);
426     leg->SetBorderSize(1);
427     leg->Draw();
428    
429     // ###################
430     // # UPDATE AND SAVE #
431     // ###################
432     c9->Update();
433     c9->SaveAs("MC_Reco_X_DoF.png");
434    
435     // ########################################
436     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
437     // ########################################
438     histo0 = (TH1F*)file1->Get("MyProcess/VxDoF/y_diff_DoF_20");
439     histo1 = (TH1F*)file1->Get("MyProcess/VxDoF/y_diff_DoF_10");
440     histo2 = (TH1F*)file1->Get("MyProcess/VxDoF/y_diff_DoF_4");
441    
442     TCanvas* c10 = new TCanvas("c10", "c10");
443    
444     histo0->SetLineColor(kBlue);
445 dinardo 1.3 histo0->SetLineWidth(2.0);
446 dinardo 1.1 histo0->SetXTitle("Res Y [\\mum]");
447     histo0->SetYTitle("Entries [#]");
448     histo0->GetYaxis()->SetRangeUser(0.,550.);
449     histo0->Draw();
450    
451     histo1->SetLineColor(kBlack);
452 dinardo 1.3 histo1->SetLineWidth(2.0);
453 dinardo 1.1 histo1->Draw("same");
454    
455     histo2->SetLineColor(kRed);
456 dinardo 1.3 histo2->SetLineWidth(2.0);
457 dinardo 1.1 histo2->Draw("same");
458    
459     histo0->SetStats(false);
460     histo1->SetStats(false);
461     histo2->SetStats(false);
462    
463     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
464     leg->AddEntry(histo0,"DoF 20");
465     leg->AddEntry(histo1,"DoF 10");
466     leg->AddEntry(histo2,"DoF 4");
467     leg->SetFillColor(0);
468     leg->SetBorderSize(1);
469     leg->Draw();
470    
471     // ###################
472     // # UPDATE AND SAVE #
473     // ###################
474     c10->Update();
475     c10->SaveAs("MC_Reco_Y_DoF.png");
476    
477     // ########################################
478     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
479     // ########################################
480     histo0 = (TH1F*)file1->Get("MyProcess/VxDoF/z_diff_DoF_20");
481     histo1 = (TH1F*)file1->Get("MyProcess/VxDoF/z_diff_DoF_10");
482     histo2 = (TH1F*)file1->Get("MyProcess/VxDoF/z_diff_DoF_4");
483    
484     TCanvas* c11 = new TCanvas("c11", "c11");
485    
486     histo0->SetLineColor(kBlue);
487 dinardo 1.3 histo0->SetLineWidth(2.0);
488 dinardo 1.1 histo0->SetXTitle("Res Z [cm]");
489     histo0->SetYTitle("Entries [#]");
490     histo0->GetYaxis()->SetRangeUser(0.,550.);
491     histo0->Draw();
492    
493     histo1->SetLineColor(kBlack);
494 dinardo 1.3 histo1->SetLineWidth(2.0);
495 dinardo 1.1 histo1->Draw("same");
496    
497     histo2->SetLineColor(kRed);
498 dinardo 1.3 histo2->SetLineWidth(2.0);
499 dinardo 1.1 histo2->Draw("same");
500    
501     histo0->SetStats(false);
502     histo1->SetStats(false);
503     histo2->SetStats(false);
504    
505     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
506     leg->AddEntry(histo0,"DoF 20");
507     leg->AddEntry(histo1,"DoF 10");
508     leg->AddEntry(histo2,"DoF 4");
509     leg->SetFillColor(0);
510     leg->SetBorderSize(1);
511     leg->Draw();
512    
513     // ###################
514     // # UPDATE AND SAVE #
515     // ###################
516     c11->Update();
517     c11->SaveAs("MC_Reco_Z_DoF.png");
518    
519     // ########################################
520     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
521     // ########################################
522     histo0 = (TH1F*)file2->Get("MyProcess/VxDoF/x_diff_DoF_20");
523     histo1 = (TH1F*)file2->Get("MyProcess/VxDoF/x_diff_DoF_10");
524     histo2 = (TH1F*)file2->Get("MyProcess/VxDoF/x_diff_DoF_4");
525    
526     TCanvas* c12 = new TCanvas("c12", "c12");
527    
528     histo0->SetLineColor(kBlue);
529 dinardo 1.3 histo0->SetLineWidth(2.0);
530 dinardo 1.1 histo0->SetXTitle("Res X [\\mum]");
531     histo0->SetYTitle("Entries [#]");
532     histo0->GetYaxis()->SetRangeUser(0.,550.);
533     histo0->Draw();
534    
535     histo1->SetLineColor(kBlack);
536 dinardo 1.3 histo1->SetLineWidth(2.0);
537 dinardo 1.1 histo1->Draw("same");
538    
539     histo2->SetLineColor(kRed);
540 dinardo 1.3 histo2->SetLineWidth(2.0);
541 dinardo 1.1 histo2->Draw("same");
542    
543     histo0->SetStats(false);
544     histo1->SetStats(false);
545     histo2->SetStats(false);
546    
547     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
548     leg->AddEntry(histo0,"DoF 20");
549     leg->AddEntry(histo1,"DoF 10");
550     leg->AddEntry(histo2,"DoF 4");
551     leg->SetFillColor(0);
552     leg->SetBorderSize(1);
553     leg->Draw();
554    
555     // ###################
556     // # UPDATE AND SAVE #
557     // ###################
558     c12->Update();
559     c12->SaveAs("Data_X_DoF.png");
560    
561     // ########################################
562     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
563     // ########################################
564     histo0 = (TH1F*)file2->Get("MyProcess/VxDoF/y_diff_DoF_20");
565     histo1 = (TH1F*)file2->Get("MyProcess/VxDoF/y_diff_DoF_10");
566     histo2 = (TH1F*)file2->Get("MyProcess/VxDoF/y_diff_DoF_4");
567    
568     TCanvas* c13 = new TCanvas("c13", "c13");
569    
570     histo0->SetLineColor(kBlue);
571 dinardo 1.3 histo0->SetLineWidth(2.0);
572 dinardo 1.1 histo0->SetXTitle("Res Y [\\mum]");
573     histo0->SetYTitle("Entries [#]");
574     histo0->GetYaxis()->SetRangeUser(0.,550.);
575     histo0->Draw();
576    
577     histo1->SetLineColor(kBlack);
578 dinardo 1.3 histo1->SetLineWidth(2.0);
579 dinardo 1.1 histo1->Draw("same");
580    
581     histo2->SetLineColor(kRed);
582 dinardo 1.3 histo2->SetLineWidth(2.0);
583 dinardo 1.1 histo2->Draw("same");
584    
585     histo0->SetStats(false);
586     histo1->SetStats(false);
587     histo2->SetStats(false);
588    
589     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
590     leg->AddEntry(histo0,"DoF 20");
591     leg->AddEntry(histo1,"DoF 10");
592     leg->AddEntry(histo2,"DoF 4");
593     leg->SetFillColor(0);
594     leg->SetBorderSize(1);
595     leg->Draw();
596    
597     // ###################
598     // # UPDATE AND SAVE #
599     // ###################
600     c12->Update();
601     c12->SaveAs("Data_Y_DoF.png");
602    
603     // ########################################
604     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
605     // ########################################
606     histo0 = (TH1F*)file2->Get("MyProcess/VxDoF/z_diff_DoF_20");
607     histo1 = (TH1F*)file2->Get("MyProcess/VxDoF/z_diff_DoF_10");
608     histo2 = (TH1F*)file2->Get("MyProcess/VxDoF/z_diff_DoF_4");
609    
610     TCanvas* c13 = new TCanvas("c13", "c13");
611    
612     histo0->SetLineColor(kBlue);
613 dinardo 1.3 histo0->SetLineWidth(2.0);
614 dinardo 1.1 histo0->SetXTitle("Res Z [cm]");
615     histo0->SetYTitle("Entries [#]");
616     histo0->GetYaxis()->SetRangeUser(0.,950.);
617     histo0->Draw();
618    
619     histo1->SetLineColor(kBlack);
620 dinardo 1.3 histo1->SetLineWidth(2.0);
621 dinardo 1.1 histo1->Draw("same");
622    
623     histo2->SetLineColor(kRed);
624 dinardo 1.3 histo2->SetLineWidth(2.0);
625 dinardo 1.1 histo2->Draw("same");
626    
627     histo0->SetStats(false);
628     histo1->SetStats(false);
629     histo2->SetStats(false);
630    
631     TLegend* leg = new TLegend(0.7,0.7,0.9,0.9);
632     leg->AddEntry(histo0,"DoF 20");
633     leg->AddEntry(histo1,"DoF 10");
634     leg->AddEntry(histo2,"DoF 4");
635     leg->SetFillColor(0);
636     leg->SetBorderSize(1);
637     leg->Draw();
638    
639     // ###################
640     // # UPDATE AND SAVE #
641     // ###################
642     c13->Update();
643     c13->SaveAs("Data_Z_DoF.png");
644    
645     // ########################################
646     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
647     // ########################################
648 dinardo 1.4 histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/Purity Efficiency Vertices");
649     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/Purity Efficiency Vertices");
650     histo2 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/Purity Efficiency Vertices");
651 dinardo 1.1
652     TCanvas* c14 = new TCanvas("c14", "c14");
653    
654     histo0->SetFillColor(kBlue);
655     histo0->GetYaxis()->SetRangeUser(0.,1.1);
656     histo0->Draw("bar");
657    
658     histo1->SetMarkerStyle(20);
659     histo1->SetMarkerColor(kBlack);
660     histo1->Draw("same");
661    
662     histo2->SetMarkerStyle(21);
663     histo2->SetMarkerColor(kRed);
664     histo2->Draw("same");
665    
666     histo0->SetStats(false);
667     histo1->SetStats(false);
668     histo2->SetStats(false);
669    
670     TLegend* leg = new TLegend(0.8,0.8,1.0,1.0);
671     leg->AddEntry(histo0,"MC TrkPar");
672     leg->AddEntry(histo1,"MC Reco");
673     leg->AddEntry(histo2,"Data");
674     leg->SetFillColor(0);
675     leg->SetBorderSize(1);
676     leg->Draw();
677    
678     // ###################
679     // # UPDATE AND SAVE #
680     // ###################
681     c14->Update();
682 dinardo 1.4 c14->SaveAs("Pur_Eff_Vx.png");
683 dinardo 1.1
684     // ########################################
685     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
686     // ########################################
687     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of pixelvertices tracks");
688     histo1 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of pixelvertices nomatch tracks");
689    
690     TCanvas* c15 = new TCanvas("c15", "c15");
691    
692     histo0->SetFillColor(kBlue);
693     histo0->SetTitleOffset(1.4,"Y");
694     histo0->Draw("bar");
695    
696     histo1->SetFillColor(kRed);
697     histo1->Draw("bar,same");
698    
699     histo0->SetStats(false);
700     histo1->SetStats(false);
701    
702     TLegend* leg = new TLegend(0.6,0.6,0.9,0.9);
703     leg->AddEntry(histo0,"All Tracks");
704     leg->AddEntry(histo1,"Non Matched Tracks");
705     leg->SetFillColor(0);
706     leg->SetBorderSize(1);
707     leg->Draw();
708    
709     // ###################
710     // # UPDATE AND SAVE #
711     // ###################
712     c15->Update();
713     c15->SaveAs("MC_TrkPar_Pix_pt.png");
714    
715     // ########################################
716     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
717     // ########################################
718     histo0 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of pixelvertices tracks");
719     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of pixelvertices nomatch tracks");
720    
721     TCanvas* c16 = new TCanvas("c16", "c16");
722    
723     histo0->SetFillColor(kBlue);
724     histo0->SetTitleOffset(1.4,"Y");
725     histo0->Draw("bar");
726    
727     histo1->SetFillColor(kRed);
728     histo1->Draw("bar,same");
729    
730     histo0->SetStats(false);
731     histo1->SetStats(false);
732    
733     TLegend* leg = new TLegend(0.6,0.6,0.9,0.9);
734     leg->AddEntry(histo0,"All Tracks");
735     leg->AddEntry(histo1,"Non Matched Tracks");
736     leg->SetFillColor(0);
737     leg->SetBorderSize(1);
738     leg->Draw();
739    
740     // ###################
741     // # UPDATE AND SAVE #
742     // ###################
743     c16->Update();
744     c16->SaveAs("MC_Reco_Pix_pt.png");
745    
746     // ########################################
747     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
748     // ########################################
749     histo0 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of pixelvertices tracks");
750     histo1 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of pixelvertices nomatch tracks");
751    
752     TCanvas* c17 = new TCanvas("c17", "c17");
753    
754     histo0->SetFillColor(kBlue);
755     histo0->SetTitleOffset(1.4,"Y");
756     histo0->Draw("bar");
757    
758     histo1->SetFillColor(kRed);
759     histo1->Draw("bar,same");
760    
761     histo0->SetStats(false);
762     histo1->SetStats(false);
763    
764     TLegend* leg = new TLegend(0.6,0.6,0.9,0.9);
765     leg->AddEntry(histo0,"All Tracks");
766     leg->AddEntry(histo1,"Non Matched Tracks");
767     leg->SetFillColor(0);
768     leg->SetBorderSize(1);
769     leg->Draw();
770    
771     // ###################
772     // # UPDATE AND SAVE #
773     // ###################
774     c17->Update();
775     c17->SaveAs("Data_Pix_pt.png");
776    
777     // ########################################
778     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
779     // ########################################
780     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/eta distribution of pixelvertices nomatch tracks");
781    
782     TCanvas* c18 = new TCanvas("c18", "c18");
783    
784     histo0->SetFillColor(kBlue);
785     histo0->Draw("bar,E");
786    
787     histo0->SetStats(true);
788    
789     // ###################
790     // # UPDATE AND SAVE #
791     // ###################
792     c18->Update();
793     c18->SaveAs("MC_TrkPar_Pix_eta.png");
794    
795     // ########################################
796     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
797     // ########################################
798     histo0 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/eta distribution of pixelvertices nomatch tracks");
799    
800     TCanvas* c19 = new TCanvas("c19", "c19");
801    
802     histo0->SetFillColor(kBlue);
803     histo0->Draw("bar,E");
804    
805     histo0->SetStats(true);
806    
807     // ###################
808     // # UPDATE AND SAVE #
809     // ###################
810     c19->Update();
811     c19->SaveAs("MC_Reco_Pix_eta.png");
812    
813     // ########################################
814     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
815     // ########################################
816     histo0 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/eta distribution of pixelvertices nomatch tracks");
817    
818     TCanvas* c20 = new TCanvas("c20", "c20");
819    
820     histo0->SetFillColor(kBlue);
821     histo0->Draw("bar,E");
822    
823     histo0->SetStats(true);
824    
825     // ###################
826     // # UPDATE AND SAVE #
827     // ###################
828     c20->Update();
829     c20->SaveAs("Data_Pix_eta.png");
830    
831     // ########################################
832     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
833     // ########################################
834     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of trackervertices tracks");
835     histo1 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of trackervertices nomatch tracks");
836    
837     TCanvas* c21 = new TCanvas("c21", "c21");
838    
839     histo0->SetFillColor(kBlue);
840     histo0->SetTitleOffset(1.4,"Y");
841     histo0->Draw("bar");
842    
843     histo1->SetFillColor(kRed);
844     histo1->Draw("bar,same");
845    
846     histo0->SetStats(false);
847     histo1->SetStats(false);
848    
849     TLegend* leg = new TLegend(0.6,0.6,0.9,0.9);
850     leg->AddEntry(histo0,"All Tracks");
851     leg->AddEntry(histo1,"Non Matched Tracks");
852     leg->SetFillColor(0);
853     leg->SetBorderSize(1);
854     leg->Draw();
855    
856     // ###################
857     // # UPDATE AND SAVE #
858     // ###################
859     c21->Update();
860     c21->SaveAs("MC_TrkPar_Trk_pt.png");
861    
862     // ########################################
863     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
864     // ########################################
865     histo0 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of trackervertices tracks");
866     histo1 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of trackervertices nomatch tracks");
867    
868     TCanvas* c22 = new TCanvas("c22", "c22");
869    
870     histo0->SetFillColor(kBlue);
871     histo0->SetTitleOffset(1.4,"Y");
872     histo0->Draw("bar");
873    
874     histo1->SetFillColor(kRed);
875     histo1->Draw("bar,same");
876    
877     histo0->SetStats(false);
878     histo1->SetStats(false);
879    
880     TLegend* leg = new TLegend(0.6,0.6,0.9,0.9);
881     leg->AddEntry(histo0,"All Tracks");
882     leg->AddEntry(histo1,"Non Matched Tracks");
883     leg->SetFillColor(0);
884     leg->SetBorderSize(1);
885     leg->Draw();
886    
887     // ###################
888     // # UPDATE AND SAVE #
889     // ###################
890     c22->Update();
891     c22->SaveAs("MC_Reco_Trk_pt.png");
892    
893     // ########################################
894     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
895     // ########################################
896     histo0 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of trackervertices tracks");
897     histo1 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/pt distribution of trackervertices nomatch tracks");
898    
899     TCanvas* c23 = new TCanvas("c23", "c23");
900    
901     histo0->SetFillColor(kBlue);
902     histo0->SetTitleOffset(1.4,"Y");
903     histo0->Draw("bar");
904    
905     histo1->SetFillColor(kRed);
906     histo1->Draw("bar,same");
907    
908     histo0->SetStats(false);
909     histo1->SetStats(false);
910    
911     TLegend* leg = new TLegend(0.6,0.6,0.9,0.9);
912     leg->AddEntry(histo0,"All Tracks");
913     leg->AddEntry(histo1,"Non Matched Tracks");
914     leg->SetFillColor(0);
915     leg->SetBorderSize(1);
916     leg->Draw();
917    
918     // ###################
919     // # UPDATE AND SAVE #
920     // ###################
921     c23->Update();
922     c23->SaveAs("Data_Trk_pt.png");
923    
924     // ########################################
925     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
926     // ########################################
927     histo0 = (TH1F*)file0->Get("MyProcess/PixelVertices/CommonPxTkPlots/eta distribution of trackervertices nomatch tracks");
928    
929     TCanvas* c24 = new TCanvas("c24", "c24");
930    
931     histo0->SetFillColor(kBlue);
932     histo0->Draw("bar,E");
933    
934     histo0->SetStats(true);
935    
936     // ###################
937     // # UPDATE AND SAVE #
938     // ###################
939     c24->Update();
940     c24->SaveAs("MC_TrkPar_Trk_eta.png");
941    
942     // ########################################
943     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
944     // ########################################
945     histo0 = (TH1F*)file1->Get("MyProcess/PixelVertices/CommonPxTkPlots/eta distribution of trackervertices nomatch tracks");
946    
947     TCanvas* c25 = new TCanvas("c25", "c25");
948    
949     histo0->SetFillColor(kBlue);
950     histo0->Draw("bar,E");
951    
952     histo0->SetStats(true);
953    
954     // ###################
955     // # UPDATE AND SAVE #
956     // ###################
957     c25->Update();
958     c25->SaveAs("MC_Reco_Trk_eta.png");
959    
960     // ########################################
961     // # CHANGE CHARACTERISTICS OF ALL HISTOs #
962     // ########################################
963     histo0 = (TH1F*)file2->Get("MyProcess/PixelVertices/CommonPxTkPlots/eta distribution of trackervertices nomatch tracks");
964    
965     TCanvas* c26 = new TCanvas("c26", "c26");
966    
967     histo0->SetFillColor(kBlue);
968     histo0->Draw("bar,E");
969    
970     histo0->SetStats(true);
971    
972     // ###################
973     // # UPDATE AND SAVE #
974     // ###################
975     c26->Update();
976     c26->SaveAs("Data_Trk_eta.png");
977     }