7 void drawXsec(
const Char_t* infn=
"VLExsecNT.root") {
11 inf = TFile::Open(infn);
12 if (
inf==0 ||
inf->IsZombie()) {
13 Error(
"drawXsec",
"Could not open [%s]",infn);
17 nt =
dynamic_cast<TNtuple*
>(
inf->Get(
"nt"));
19 Error(
"drawXsec",
"Could not get nt from [%s]",infn);
24 c1 =
new TCanvas(
"c1",
"c1: xsec", 700, 500);
27 h =
new TH2F(
"h",
"Inverse Beta Decay Cross Section" 28 ";E_{#nu} (MeV);#sigma #times 10^{-41} cm^{2}",
31 h->GetXaxis()->SetNdivisions(505);
33 const Long64_t xents =
nt->Draw(
"xsec:Ev",
"",
"goff");
34 xsg =
new TGraph(xents,
nt->GetV2(),
nt->GetV1());
36 xsg->SetMarkerStyle(24);
37 xsg->SetMarkerSize(0.8);
39 const Long64_t xnents =
nt->Draw(
"xsnun:Ev",
"",
"goff");
40 nsg =
new TGraph(xnents,
nt->GetV2(),
nt->GetV1());
42 nsg->SetMarkerStyle(27);
43 nsg->SetMarkerColor(kRed+1);
45 const Long64_t pents =
nt->Draw(
"xspaper:Ev",
"",
"goff");
46 psg =
new TGraph(pents,
nt->GetV2(),
nt->GetV1());
48 psg->SetLineColor(kAzure-8);
55 TLegend* xl =
new TLegend(.188,.561,.560,.845);
58 xl->AddEntry(
psg,
"Strumia (#bar{#nu_{e}}p#rightarrowne^{+})",
"l");
59 xl->AddEntry(
xsg,
"VLE GENIE (#bar{#nu_{e}}p#rightarrowne^{+})",
"p");
60 xl->AddEntry(
nsg,
"VLE GENIE (#nu_{e}n#rightarrowpe^{-})",
"p");
66 c1l =
new TCanvas(
"c1l",
"c1l: xsec (logy)", 700, 500);
74 TLegend* xll =
new TLegend(.453,.360,.825,.644);
75 xll->SetBorderSize(0);
77 xll->AddEntry(
psg,
"Strumia (#bar{#nu_{e}}p#rightarrowne^{+})",
"l");
78 xll->AddEntry(
xsg,
"VLE GENIE (#bar{#nu_{e}}p#rightarrowne^{+})",
"p");
79 xll->AddEntry(
nsg,
"VLE GENIE (#nu_{e}n#rightarrowpe^{-})",
"p");
83 c2 =
new TCanvas(
"c2",
"c2: xsec ratio", 700, 500);;
89 rsg->SetMarkerStyle(21);
90 rsg->SetMarkerSize(1);
91 rsg->SetMarkerColor(kAzure-8);
92 const Double_t* py =
psg->GetY();
93 Double_t* ry =
rsg->GetY();
94 const Int_t np =
rsg->GetN();
95 for (Int_t
i=0;
i<np;
i++, ry++, py++) {
96 if (*py > 1
e-10) *ry /= *py;
99 rh =
new TH2F(
"rh",
"IBD X-sec Ratio: GENIE / Strumia Paper" 100 ";E_{#nu} (MeV);#sigma(GENIE) / #sigma(Strumia Paper)",
103 rh->GetXaxis()->SetNdivisions(505);
104 rh->GetYaxis()->SetTitleOffset(1.35);
109 TLatex* rl =
new TLatex(126,1.023,
"#bar{#nu_{e}}p#rightarrowne^{+}");
110 rl->SetTextColor(kAzure-8);
void drawXsec(const Char_t *infn="VLExsecNT.root")