15 #include "TCollection.h" 17 #include "TObjArray.h" 19 #include "TVirtualPad.h" 39 TString dummyName = surface->GetName();
40 dummyName +=
"_dummy";
41 TH2* hDummy = (TH2*)surface->Clone(dummyName);
42 hDummy->SetDirectory(0);
45 hDummy->GetXaxis()->SetRangeUser(th34lo, th34hi);
46 hDummy->GetXaxis()->SetTitle(
"#theta_{34} (deg.)");
47 hDummy->GetXaxis()->CenterTitle();
48 hDummy->GetXaxis()->SetTitleOffset(0.9);
49 hDummy->GetYaxis()->SetRangeUser(th24lo, th24hi);
50 hDummy->GetYaxis()->SetTitle(
"#theta_{24} (deg.)");
51 hDummy->GetYaxis()->CenterTitle();
52 hDummy->GetYaxis()->SetTitleOffset(0.9);
53 hDummy->GetXaxis()->SetTitleSize(0.07);
54 hDummy->GetYaxis()->SetTitleSize(0.07);
55 hDummy->GetXaxis()->SetLabelSize(0.06);
56 hDummy->GetYaxis()->SetLabelSize(0.06);
64 vector<TGraph*>
GetContour(TH2* surface,
double up,
int color,
int style,
int fillcolor,
bool fill=
false)
66 TVirtualPad* bak = gPad;
68 const bool wasbatch = gROOT->IsBatch();
73 gStyle->SetOptStat(0);
74 gPad->SetFillStyle(0);
79 double minLike = surface->GetBinContent( surface->GetMinimumBin() );
80 double maxLike = surface->GetBinContent( surface->GetMaximumBin() );
81 cout <<
"TH1 Name = " << surface->GetName() <<
" : minLike = " << minLike <<
" maxLike = " << maxLike <<
" up = " << up <<
endl;
82 const double level = up;
83 surface->SetContour(1, &level);
86 surface->Draw(
"cont list");
90 gROOT->SetBatch(wasbatch);
93 TObjArray* contArr = (TObjArray*)gROOT->GetListOfSpecials()->FindObject(
"contours");
94 TList* contList = (TList*)contArr->At(0);
97 while ( gr = (TGraph*)
next() )
99 TGraph* toSave = (TGraph*)gr->Clone();
100 TGraph* toSave2 = (TGraph*)gr->Clone();
101 toSave->SetLineWidth(2);
102 toSave->SetLineColor(color);
103 toSave->SetLineStyle(style);
104 toSave2->SetLineWidth(2);
105 toSave2->SetLineColor(color);
106 toSave2->SetLineStyle(style);
108 toSave->SetPoint(toSave->GetN(), 0, 0);
109 toSave->SetFillColor(fillcolor);
110 toSave->Draw(
"f same");
112 toSave->Draw(
"l same");
113 results.push_back( toSave );
114 results.push_back( toSave2 );
123 const bool wasbatch = gROOT->IsBatch();
127 gStyle->SetFillStyle(0);
128 gStyle->SetPadBottomMargin(0.15);
129 gStyle->SetPadLeftMargin(0.15);
130 gStyle->SetLabelOffset(0.01,
"y");
132 double up68 = TMath::ChisquareQuantile(0.68, 1);
133 double up90 = TMath::ChisquareQuantile(0.90, 1);
135 TFile fFCfile(
"$NOVA_ANA/steriles/Ana01/input_FC_ana01_t2434_paperplot.root",
"READ");
140 TCanvas *
c1 = (TCanvas*)fFCfile.Get(
"cFCChi2");
142 gPad->SetFillStyle(0);
143 hFCcorr = (TH2F*)c1->GetPrimitive(
"chi_me");
144 hFCcorr->SetDirectory(0);
151 gROOT->SetBatch(wasbatch);
152 TCanvas*
c =
new TCanvas(cname.c_str(), ctitle.c_str());
153 gPad->SetFillStyle(0);
155 TH2* hDummy2 = (TH2*)hFCcorr->Clone(
"hFCcorr");
159 Color_t kSigmaConfidenceColor = kAzure+2;
162 Int_t kFillColor68 = TColor::GetColorTransparent(kSigmaConfidenceColor, .20);
163 Int_t kFillColor90 = TColor::GetColorTransparent(kSigmaConfidenceColor, .35);
167 vector<TGraph*> vecFC68 =
GetContour(hDummy2, up68, kBlack, kDashed, kFillColor68,
true);
168 vector<TGraph*> vecFC90 =
GetContour(hDummy2, up90, kBlack, kSolid, kFillColor90,
true);
174 TLatex *
tex =
new TLatex();
176 tex->SetTextFont(42);
177 tex->SetTextSize(0.05);
178 tex->SetTextAlign(11);
179 tex->DrawLatex(0.2, 0.80,
"NOvA 6.05#times10^{20} POT-equiv.");
180 tex->DrawLatex(0.2, 0.8-1.*0.055,
"#Deltam^{2}_{32} = 2.44#times10^{-3} eV^{2}");
181 tex->DrawLatex(0.2, 0.8-2.*0.055,
"#theta_{13} = 8.5#circ, ^{}#theta_{23} = 45#circ");
182 tex->DrawLatex(0.2, 0.8-3.*0.055,
"#Deltam^{2}_{41} = 0.5 eV^{2}");
184 TLegend*
leg =
new TLegend(0.62, 0.53, 0.87, 0.73);
185 leg->SetBorderSize(0);
186 leg->SetFillColor(kWhite);
187 leg->SetFillStyle(0);
188 leg->SetFillStyle(0);
189 leg->SetTextFont(42);
191 leg->AddEntry(vecFC68[0],
"68% C.L.",
"L");
192 leg->AddEntry(vecFC90[0],
"90% C.L.",
"L");
196 leg->SetTextSize(0.05);
204 gPad->Print(
"ana01_paper_plot_fc_t2434.pdf");
vector< TGraph * > GetContour(TH2 *surface, double up, int color, int style, int fillcolor, bool fill=false)
void DrawAxes(TH2 *surface)
void fill(std::vector< T > &x, const S &y)