15 gStyle->SetFillStyle(0);
16 gStyle->SetPadBottomMargin(0.15);
17 gStyle->SetPadLeftMargin(0.15);
18 gStyle->SetLabelOffset(0.01,
"y");
21 std::ifstream infile_fc(
"contour90.csv");
23 std::vector<double> x_fc_v, y_fc_v;
24 while (infile_fc >> x >> y) {
31 std::ifstream infile_nonfc(
"contour68.csv");
32 std::vector<double> x_nonfc_v, y_nonfc_v;
33 while (infile_nonfc >> x >> y) {
34 x_nonfc_v.push_back(x);
35 y_nonfc_v.push_back(y);
40 double* x_fc_sorted =
new double[x_fc_v.size()];
41 double* y_fc_sorted =
new double[x_fc_v.size()];
45 unsigned int index_min = 10000;
46 for (
unsigned int i = 0;
i < x_fc_v.size();
i++) {
47 if (x_fc_v.at(
i) <
x_min) {
54 x_fc_sorted[0] =
x_min;
55 y_fc_sorted[0] = y_min;
56 x_fc_v[index_min] = 0;
57 y_fc_v[index_min] = 0;
58 for (
unsigned int i = 1;
i < x_fc_v.size();
i++) {
59 double distance_min = 10000;
60 unsigned int index_dist_min = 10000;
61 for (
unsigned int j = 0;
j < x_fc_v.size();
j++) {
62 double x0 = x_fc_sorted[
i-1];
63 double y0 = y_fc_sorted[
i-1];
64 double x1 = x_fc_v[
j];
65 double y1 = y_fc_v[
j];
67 if (dist < distance_min) {
72 x_fc_sorted[
i] = x_fc_v[index_dist_min];
73 y_fc_sorted[
i] = y_fc_v[index_dist_min];
74 x_fc_v[index_dist_min] = 0;
75 y_fc_v[index_dist_min] = 0;
79 double* x_nonfc_sorted =
new double[x_nonfc_v.size()];
80 double* y_nonfc_sorted =
new double[x_nonfc_v.size()];
82 double x_min_nonfc = 10000;
84 unsigned int index_min_nonfc = 10000;
85 for (
unsigned int i = 0;
i < x_nonfc_v.size();
i++) {
86 if (x_nonfc_v.at(
i) < x_min_nonfc) {
87 x_min_nonfc = x_nonfc_v.at(
i);
88 y_min_nonfc = y_nonfc_v.at(
i);
93 x_nonfc_sorted[0] = x_min_nonfc;
94 y_nonfc_sorted[0] = y_min_nonfc;
95 x_nonfc_v[index_min_nonfc] = 0;
96 y_nonfc_v[index_min_nonfc] = 0;
97 for (
unsigned int i = 1;
i < x_nonfc_v.size();
i++) {
98 double distance_min = 10000;
99 unsigned int index_dist_min = 10000;
100 for (
unsigned int j = 0;
j < x_nonfc_v.size();
j++) {
101 double x0 = x_nonfc_sorted[
i-1];
102 double y0 = y_nonfc_sorted[
i-1];
103 double x1 = x_nonfc_v[
j];
104 double y1 = y_nonfc_v[
j];
106 if (dist < distance_min) {
111 x_nonfc_sorted[
i] = x_nonfc_v[index_dist_min];
112 y_nonfc_sorted[
i] = y_nonfc_v[index_dist_min];
113 x_nonfc_v[index_dist_min] = 0;
114 y_nonfc_v[index_dist_min] = 0;
117 double max_theta34 = 0;
118 for (
unsigned int i = 0;
i < x_fc_v.size();
i++) {
119 if (x_fc_sorted[
i] > max_theta34) {
120 max_theta34 = x_fc_sorted[
i];
125 double max_theta24 = 0;
126 for (
unsigned int i = 0;
i < x_fc_v.size();
i++) {
127 if (y_fc_sorted[
i] > max_theta24) {
128 max_theta24 = y_fc_sorted[
i];
134 TGraph* gr_fc =
new TGraph(x_fc_v.size(), x_fc_sorted, y_fc_sorted);
135 TGraph* gr_fc_Clone = (TGraph*)gr_fc->Clone();
136 gr_fc_Clone->SetPoint(gr_fc_Clone->GetN(), 0, 0);
138 TGraph* gr_nonfc =
new TGraph(x_nonfc_v.size(), x_nonfc_sorted, y_nonfc_sorted);
139 TGraph* gr_nonfc_Clone = (TGraph*)gr_nonfc->Clone();
140 gr_nonfc_Clone->SetPoint(gr_nonfc_Clone->GetN(), 0, 0);
142 TCanvas* c_fc =
new TCanvas();
143 gr_fc->GetXaxis()->SetLimits(0, 40);
144 gr_fc->GetYaxis()->SetRangeUser(0, 40);
145 gr_nonfc->GetXaxis()->SetLimits(0, 40);
146 gr_nonfc->GetYaxis()->SetRangeUser(0, 40);
147 gr_fc->SetLineColor(kAzure+2);
148 Int_t kFillColor90_FC = TColor::GetColorTransparent(kAzure+2, .20);
149 gr_fc_Clone->SetFillColor(kFillColor90_FC);
150 gr_fc->SetLineWidth(3);
151 gr_nonfc->SetLineColor(kAzure+2);
152 Int_t kFillColor90_NonFC = TColor::GetColorTransparent(kAzure+2, .60);
153 gr_nonfc_Clone->SetFillColor(kFillColor90_NonFC);
154 gr_nonfc->SetLineStyle(kDashed);
155 gr_nonfc->SetLineWidth(3);
157 gr_fc->GetYaxis()->CenterTitle();
158 gr_fc->GetXaxis()->CenterTitle();
159 gr_fc->GetXaxis()->SetTitleOffset(0.9);
160 gr_fc->GetYaxis()->SetTitleOffset(0.9);
161 gr_fc->GetXaxis()->SetTitleSize(0.07);
162 gr_fc->GetYaxis()->SetTitleSize(0.07);
163 gr_fc->GetXaxis()->SetLabelSize(0.06);
164 gr_fc->GetYaxis()->SetLabelSize(0.06);
167 gr_fc->GetXaxis()->SetTitle(
"#theta_{34} (deg.)");
168 gr_fc->GetYaxis()->SetTitle(
"#theta_{24} (deg.)");
170 TLegend*
leg =
new TLegend(0.57, 0.64, 0.77, 0.76);
171 leg->SetBorderSize(0);
172 leg->SetFillColor(kWhite);
173 leg->SetFillStyle(0);
174 leg->SetFillStyle(0);
175 leg->SetTextFont(42);
176 leg->SetTextSize(0.05);
177 leg->AddEntry(gr_fc,
"NOvA 90% C.L.",
"L");
178 leg->AddEntry(gr_nonfc,
"NOvA 68% C.L.",
"L");
182 gr_fc_Clone->Draw(
"f same");
183 gr_nonfc->Draw(
"l same");
184 gr_nonfc_Clone->Draw(
"f same");
187 TLatex *
tex =
new TLatex();
189 tex->SetTextFont(42);
190 tex->SetTextSize(0.05);
191 tex->SetTextAlign(11);
192 tex->DrawLatex(0.19, 0.83,
"NOvA 8.85#times10^{20} POT-equiv.");
193 tex->DrawLatex(0.19, 0.83-1.*0.057,
"#Deltam^{2}_{32} = 2.44#times10^{-3} eV^{2}");
194 tex->DrawLatex(0.19, 0.83-2.*0.057,
"#theta_{13} = 8.5#circ");
195 tex->DrawLatex(0.19, 0.83-3.*0.057,
"sin^{2}#theta_{23} = 0.475");
196 tex->DrawLatex(0.19, 0.83-4.*0.057,
"#Deltam^{2}_{41} = 0.5 eV^{2}");
197 c_fc->SaveAs(
"fc.eps");
Float_t y1[n_points_granero]
Float_t x1[n_points_granero]
double Distance(double x1, double y1, double x2, double y2)