-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSaveChi2Plots.C
127 lines (93 loc) · 5.8 KB
/
SaveChi2Plots.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
string outputFolderPng = "~/cernbox/PPS/PlotsForThreePlusThreeStudies/EraPlots/Chi2Plots/"
string suffix = "_Chi2OverNDF_ROC0_EraF3"
setRectangularPlots()
setTDRStyle()
TCanvas c
c.SetWindowSize(1430,1023)
gStyle->SetLegendBorderSize(0)
h1Chi2WhenInterpotMatch = TH1D(*((TH1D*)_file0->Get("Arm0_st2_rp3/h1Chi2WhenInterpotMatch_arm0_st2_rp3")))
h1Chi2WhenInterpotMatchANDmultiRP = TH1D(*((TH1D*)_file0->Get("Arm0_st2_rp3/h1Chi2WhenInterpotMatchANDmultiRP_arm0_st2_rp3")))
h1Chi2WhenInterpotMatchANDNOTmultiRP = TH1D(*((TH1D*)_file0->Get("Arm0_st2_rp3/h1Chi2WhenInterpotMatchANDNOTmultiRP_arm0_st2_rp3")))
h1Chi2WhenNoInterpotMatchANDmultiRP = TH1D(*((TH1D*)_file0->Get("Arm0_st2_rp3/h1Chi2WhenNoInterpotMatchANDmultiRP_arm0_st2_rp3")))
h1Chi2WhenInterpotMatch.SetTitle("Interpot Match;#chi^{2}")
h1Chi2WhenInterpotMatchANDmultiRP.SetTitle("Interpot Match && multiRP found;#chi^{2}")
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetTitle("Interpot Match && multiRP not found;#chi^{2}")
h1Chi2WhenNoInterpotMatchANDmultiRP.SetTitle("No Interpot Match && multiRP")
h1Chi2WhenInterpotMatch.SetFillStyle(3001)
h1Chi2WhenInterpotMatchANDmultiRP.SetFillStyle(3001)
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetFillStyle(3001)
h1Chi2WhenNoInterpotMatchANDmultiRP.SetFillStyle(3001)
h1Chi2WhenInterpotMatch.SetFillColor(38)
h1Chi2WhenInterpotMatchANDmultiRP.SetFillColor(46)
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetFillColor(41)
h1Chi2WhenNoInterpotMatchANDmultiRP.SetFillColor(46)
h1Chi2WhenInterpotMatch.SetLineColor(kBlack)
h1Chi2WhenInterpotMatchANDmultiRP.SetLineColor(kBlack)
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetLineColor(kBlack)
h1Chi2WhenNoInterpotMatchANDmultiRP.SetLineColor(kBlack)
h1Chi2WhenInterpotMatch.Draw()
h1Chi2WhenInterpotMatchANDmultiRP.Draw("same")
h1Chi2WhenInterpotMatchANDNOTmultiRP.Draw("same")
legendWhenInterpotMatch = new TLegend(0.55,0.65,0.9,0.9)
legendWhenInterpotMatch->SetFillStyle(0)
legendWhenInterpotMatch->AddEntry(&h1Chi2WhenInterpotMatch,"Interpot Match")
legendWhenInterpotMatch->AddEntry(&h1Chi2WhenInterpotMatchANDmultiRP,"Interpot Match && multiRP found")
legendWhenInterpotMatch->AddEntry(&h1Chi2WhenInterpotMatchANDNOTmultiRP,"Interpot Match && multiRP not found")
legendWhenInterpotMatch->Draw()
c.Print((outputFolderPng+"45-220_Chi2WhenInterpotMatch"+suffix+".png").data())
h1Chi2WhenInterpotMatch.DrawNormalized()
h1Chi2WhenInterpotMatchANDmultiRP.DrawNormalized("same")
h1Chi2WhenInterpotMatchANDNOTmultiRP.DrawNormalized("same")
legendWhenInterpotMatch->Draw("same")
c.Print((outputFolderPng+"45-220_Chi2WhenInterpotMatch_Normalized"+suffix+".png").data())
legendComparisonPlot = new TLegend(0.55,0.65,0.9,0.9)
legendComparisonPlot->SetFillStyle(0)
legendComparisonPlot->AddEntry(&h1Chi2WhenInterpotMatch,"Interpot Match")
legendComparisonPlot->AddEntry(&h1Chi2WhenNoInterpotMatchANDmultiRP, "No Interpot Match && multiRP")
h1Chi2WhenInterpotMatch.DrawNormalized()
h1Chi2WhenNoInterpotMatchANDmultiRP.DrawNormalized("same")
legendComparisonPlot->Draw("same")
c.Print((outputFolderPng+"45-220_Chi2Comparison_Normalized"+suffix+".png").data())
h1Chi2WhenInterpotMatch = TH1D(*((TH1D*)_file0->Get("Arm1_st2_rp3/h1Chi2WhenInterpotMatch_arm1_st2_rp3")))
h1Chi2WhenInterpotMatchANDmultiRP = TH1D(*((TH1D*)_file0->Get("Arm1_st2_rp3/h1Chi2WhenInterpotMatchANDmultiRP_arm1_st2_rp3")))
h1Chi2WhenInterpotMatchANDNOTmultiRP = TH1D(*((TH1D*)_file0->Get("Arm1_st2_rp3/h1Chi2WhenInterpotMatchANDNOTmultiRP_arm1_st2_rp3")))
h1Chi2WhenNoInterpotMatchANDmultiRP = TH1D(*((TH1D*)_file0->Get("Arm1_st2_rp3/h1Chi2WhenNoInterpotMatchANDmultiRP_arm1_st2_rp3")))
h1Chi2WhenInterpotMatch.SetTitle("Interpot Match;#chi^{2}")
h1Chi2WhenInterpotMatchANDmultiRP.SetTitle("Interpot Match && multiRP found;#chi^{2}")
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetTitle("Interpot Match && multiRP not found;#chi^{2}")
h1Chi2WhenNoInterpotMatchANDmultiRP.SetTitle("No Interpot Match && multiRP")
h1Chi2WhenInterpotMatch.SetFillStyle(3001)
h1Chi2WhenInterpotMatchANDmultiRP.SetFillStyle(3001)
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetFillStyle(3001)
h1Chi2WhenNoInterpotMatchANDmultiRP.SetFillStyle(3001)
h1Chi2WhenInterpotMatch.SetFillColor(38)
h1Chi2WhenInterpotMatchANDmultiRP.SetFillColor(46)
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetFillColor(41)
h1Chi2WhenNoInterpotMatchANDmultiRP.SetFillColor(46)
h1Chi2WhenInterpotMatch.SetLineColor(kBlack)
h1Chi2WhenInterpotMatchANDmultiRP.SetLineColor(kBlack)
h1Chi2WhenInterpotMatchANDNOTmultiRP.SetLineColor(kBlack)
h1Chi2WhenNoInterpotMatchANDmultiRP.SetLineColor(kBlack)
h1Chi2WhenInterpotMatch.Draw()
h1Chi2WhenInterpotMatchANDmultiRP.Draw("same")
h1Chi2WhenInterpotMatchANDNOTmultiRP.Draw("same")
legendWhenInterpotMatch = new TLegend(0.55,0.65,0.9,0.9)
legendWhenInterpotMatch->SetFillStyle(0)
legendWhenInterpotMatch->AddEntry(&h1Chi2WhenInterpotMatch,"Interpot Match")
legendWhenInterpotMatch->AddEntry(&h1Chi2WhenInterpotMatchANDmultiRP,"Interpot Match && multiRP found")
legendWhenInterpotMatch->AddEntry(&h1Chi2WhenInterpotMatchANDNOTmultiRP,"Interpot Match && multiRP not found")
legendWhenInterpotMatch->Draw()
c.Print((outputFolderPng+"56-220_Chi2WhenInterpotMatch"+suffix+".png").data())
h1Chi2WhenInterpotMatch.DrawNormalized()
h1Chi2WhenInterpotMatchANDmultiRP.DrawNormalized("same")
h1Chi2WhenInterpotMatchANDNOTmultiRP.DrawNormalized("same")
legendWhenInterpotMatch->Draw()
c.Print((outputFolderPng+"56-220_Chi2WhenInterpotMatch_Normalized"+suffix+".png").data())
legendComparisonPlot = new TLegend(0.55,0.65,0.9,0.9)
legendComparisonPlot->SetFillStyle(0)
legendComparisonPlot->AddEntry(&h1Chi2WhenInterpotMatch,"Interpot Match")
legendComparisonPlot->AddEntry(&h1Chi2WhenNoInterpotMatchANDmultiRP, "No Interpot Match && multiRP")
h1Chi2WhenInterpotMatch.DrawNormalized()
h1Chi2WhenNoInterpotMatchANDmultiRP.DrawNormalized("same")
legendComparisonPlot->Draw("same")
c.Print((outputFolderPng+"56-220_Chi2Comparison_Normalized"+suffix+".png").data())