1 | { |
---|
2 | |
---|
3 | int nSin2q23; |
---|
4 | double sin2Min; |
---|
5 | double sin2Max; |
---|
6 | |
---|
7 | int nDm31; |
---|
8 | double dm31Min; |
---|
9 | double dm31Max; |
---|
10 | |
---|
11 | std::ifstream fileDataCard; |
---|
12 | fileDataCard.open("./dm31th23.data"); |
---|
13 | std::string DUMMYSTR; //comment string of the variables |
---|
14 | |
---|
15 | std::string ROOTFILENAME; |
---|
16 | |
---|
17 | double DUMMYVAR; //not used variable |
---|
18 | |
---|
19 | fileDataCard >> DUMMYSTR >> DUMMYVAR; |
---|
20 | fileDataCard >> DUMMYSTR >> DUMMYVAR; |
---|
21 | fileDataCard >> DUMMYSTR >> DUMMYVAR; |
---|
22 | fileDataCard >> DUMMYSTR >> DUMMYVAR; |
---|
23 | fileDataCard >> DUMMYSTR >> DUMMYVAR; |
---|
24 | fileDataCard >> DUMMYSTR >> DUMMYVAR; |
---|
25 | fileDataCard >> DUMMYSTR >> ROOTFILENAME; |
---|
26 | ROOTFILENAME += ".root"; |
---|
27 | std::cout << DUMMYSTR <<ROOTFILENAME << std::endl; |
---|
28 | |
---|
29 | fileDataCard >> DUMMYSTR >> nDm31; |
---|
30 | std::cout << DUMMYSTR << nDm31 << std::endl; |
---|
31 | fileDataCard >> DUMMYSTR >> nSin2q23; |
---|
32 | std::cout << DUMMYSTR << nSin2q23 << std::endl; |
---|
33 | |
---|
34 | fileDataCard >> DUMMYSTR >> dm31Min; |
---|
35 | std::cout << DUMMYSTR << dm31Min << std::endl; |
---|
36 | fileDataCard >> DUMMYSTR >> dm31Max; |
---|
37 | std::cout << DUMMYSTR << dm31Max << std::endl; |
---|
38 | |
---|
39 | fileDataCard >> DUMMYSTR >> sin2Min; |
---|
40 | std::cout << DUMMYSTR << sin2Min << std::endl; |
---|
41 | fileDataCard >> DUMMYSTR >> sin2Max; |
---|
42 | std::cout << DUMMYSTR << sin2Max << std::endl; |
---|
43 | |
---|
44 | |
---|
45 | Double_t sin2BinWidth = (sin2Max - sin2Min)/double(nSin2q23-1.); |
---|
46 | Double_t sin2EdgeMax = sin2Max + sin2BinWidth/2.; |
---|
47 | Double_t sin2EdgeMin = sin2Min - sin2BinWidth/2.; |
---|
48 | |
---|
49 | Double_t dm31BinWidth = (dm31Max - dm31Min)/double(nDm31-1.); |
---|
50 | Double_t dm31EdgeMax = dm31Max + dm31BinWidth/2.; |
---|
51 | Double_t dm31EdgeMin = dm31Min - dm31BinWidth/2.; |
---|
52 | |
---|
53 | TLegend* leg = new TLegend(0.4,0.7,0.9,0.9); |
---|
54 | leg->SetTextFont(gStyle->GetTextFont()); |
---|
55 | leg->SetTextSize(0.07); |
---|
56 | leg->SetFillColor(10); |
---|
57 | |
---|
58 | |
---|
59 | TCanvas* c1 = new TCanvas("c1","Contour",100,100,600,600); |
---|
60 | c1->SetGridx(); |
---|
61 | c1->SetGridy(); |
---|
62 | |
---|
63 | TH2D* hdum = new TH2D("hdum","", |
---|
64 | nSin2q23,sin2Min,sin2Max, |
---|
65 | nDm31,dm31Min,dm31Max |
---|
66 | ); |
---|
67 | hdum->SetYTitle("#Delta m^{2}_{31} (eV^{2})"); |
---|
68 | hdum->SetXTitle("sin^{2}(#theta_{23})"); |
---|
69 | TGaxis::SetMaxDigits(3); |
---|
70 | hdum->Draw(); |
---|
71 | |
---|
72 | TPad *overlay = new TPad("overlay","", |
---|
73 | gStyle->GetPadLeftMargin(), |
---|
74 | gStyle->GetPadBottomMargin(), |
---|
75 | 1-gStyle->GetPadRightMargin(), |
---|
76 | 1-gStyle->GetPadTopMargin()); |
---|
77 | overlay->SetFillStyle(4000); |
---|
78 | overlay->Draw(); |
---|
79 | overlay->Range(sin2Min,dm31Min,sin2Max,dm31Max); |
---|
80 | |
---|
81 | |
---|
82 | TFile f1(ROOTFILENAME.data()); |
---|
83 | TTree* tree1 = (TTree*)f1.Get("SplGlb"); |
---|
84 | TH2D* histo1 = new TH2D("histo1","Dm_{31} vs sin^{2} th23", |
---|
85 | nSin2q23,sin2EdgeMin,sin2EdgeMax, |
---|
86 | nDm31,dm31EdgeMin,dm31EdgeMax |
---|
87 | ); |
---|
88 | |
---|
89 | tree1->Project(histo1->GetName(),"dm31:pow(sin(theta23),2)","chi2"); |
---|
90 | |
---|
91 | histo1->SetContour(1); |
---|
92 | histo1->SetContourLevel(0,9.2); //Chi2 for 2 dof and 99% |
---|
93 | histo1->SetLineColor(2); //red |
---|
94 | overlay->cd(); |
---|
95 | histo1->Draw("CONT3 SAME"); |
---|
96 | leg->AddEntry(histo1,"1#sigma 5yrs (+)","l"); |
---|
97 | |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | int n0 = 1; |
---|
102 | //2sigma |
---|
103 | //sin^2(theta23) = 0.44 * (1+0.41-0.22) |
---|
104 | //dm^2_31 = 2.4 * (1 +0.21 -0.26) 10^-3 eV^2 |
---|
105 | //3sigma errors |
---|
106 | float sin2th0[n0] = {0.44}; |
---|
107 | float dm310[n0] = {2.4e-3}; |
---|
108 | float esin2th0_inf[n0] = {0.115}; |
---|
109 | float esin2th0_sup[n0] = {0.211}; |
---|
110 | float edm310_inf[n0] = {0.875e-3}; |
---|
111 | float edm310_sup[n0] = {0.792e-3}; |
---|
112 | |
---|
113 | |
---|
114 | |
---|
115 | // TGraphAsymmErrors* point = new TGraphAsymmErrors(n0,sin2th0,dm310, |
---|
116 | // esin2th0_inf,esin2th0_sup, |
---|
117 | // edm310_inf,edm310_sup); |
---|
118 | |
---|
119 | // point->SetMarkerColor(4); |
---|
120 | // point->SetMarkerStyle(21); |
---|
121 | // leg->AddEntry(point,"3#sigma Global Adjust.","p"); |
---|
122 | |
---|
123 | TMarker* point = new TMarker(sin2th0[0],dm310[0],21); |
---|
124 | point->Draw("SAME P"); |
---|
125 | |
---|
126 | |
---|
127 | |
---|
128 | // TPaveLabel* text = new TPaveLabel(-3.7,1.,-2.7,1.1,"true sin^{2}(#theta_{23})=0.4"); |
---|
129 | // text->SetBorderSize(0); |
---|
130 | // text->SetFillColor(10); |
---|
131 | // text->SetTextSize(1.0); |
---|
132 | // text->Draw("SAME"); |
---|
133 | |
---|
134 | // TLatex* txt1 = new TLatex(-3.7,0.2,"3#sigma"); |
---|
135 | // txt1->SetTextSize(0.1); |
---|
136 | // txt1->Draw(); |
---|
137 | |
---|
138 | |
---|
139 | |
---|
140 | leg->Draw("SAME"); |
---|
141 | overlay->Update(); |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | TCanvas c2; |
---|
147 | histo1->Draw("SURF"); |
---|
148 | |
---|
149 | |
---|
150 | |
---|
151 | } |
---|