Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
GENIE
src
contrib
t2k
write_out_h20_xsec.C
Go to the documentation of this file.
1
//
2
// read the output of make_sk_xsec_table.C used by SuperK for MC job normalization,
3
// and convert to ROOT format
4
//
5
6
{
7
double
Emin = 0.0;
8
double
Emax
= 15.0;
9
double
dE
= 0.050;
10
int
nE
= (Emax-Emin)/dE;
11
12
TFile
f
(
"./xsec_H20.root"
,
"recreate"
);
13
14
TH1D *
xsec_numuH20
=
new
TH1D(
"xsec_numuH20"
,
""
, nE, Emin, Emax);
15
TH1D *
xsec_numubarH20
=
new
TH1D(
"xsec_numubarH20"
,
""
, nE, Emin, Emax);
16
TH1D *
xsec_nueH20
=
new
TH1D(
"xsec_nueH20"
,
""
, nE, Emin, Emax);
17
TH1D *
xsec_nuebarH20
=
new
TH1D(
"xsec_nuebarH20"
,
""
, nE, Emin, Emax);
18
19
TTree
xsec_water
;
20
const
char
*
xsec_water_file
=
"./genie_sk_xsec_table.dat"
;
21
xsec_water.ReadFile(xsec_water_file,
"E/D:xsec_numu/D:xsec_numubar/D:xsec_nue/D:xsec_nuebar/D"
);
22
23
xsec_water.Draw(
"E>>xsec_numuH20"
,
"xsec_numu"
,
"goff"
);
24
xsec_water.Draw(
"E>>xsec_numubarH20"
,
"xsec_numubar"
,
"goff"
);
25
xsec_water.Draw(
"E>>xsec_nueH20"
,
"xsec_nue"
,
"goff"
);
26
xsec_water.Draw(
"E>>xsec_nuebarH20"
,
"xsec_nuebar"
,
"goff"
);
27
28
f
.Write();
29
f
.Close();
30
}
xsec_water_file
const char * xsec_water_file
Definition:
write_out_h20_xsec.C:20
xsec_nuebarH20
TH1D * xsec_nuebarH20
Definition:
write_out_h20_xsec.C:17
xsec_nueH20
TH1D * xsec_nueH20
Definition:
write_out_h20_xsec.C:16
xsec_numuH20
TH1D * xsec_numuH20
Definition:
write_out_h20_xsec.C:14
xsec_numubarH20
TH1D * xsec_numubarH20
Definition:
write_out_h20_xsec.C:15
dE
double dE
Definition:
write_out_h20_xsec.C:9
f
TFile f("./xsec_H20.root","recreate")
xsec_water
TTree xsec_water
Definition:
write_out_h20_xsec.C:19
Emax
double Emax
Definition:
write_out_h20_xsec.C:8
nE
int nE
Definition:
write_out_h20_xsec.C:10
Generated by
1.8.11