44 TFile * finp =
new TFile(evtfile.c_str(),
"READ");
45 TTree * ghA = (TTree*)finp->Get(
"ghA");
49 TH1D * pip_sigma_tot =
new TH1D(
"pip_sigma_tot", Form(
"pi+ A(=%d) total",
A),
nke,
kemin,
kemax);
50 TH1D * pip_sigma_reac =
new TH1D(
"pip_sigma_reac", Form(
"pi+ A(=%d) reaction",
A),
nke,
kemin,
kemax);
51 TH1D * pip_sigma_cex =
new TH1D(
"pip_sigma_cex", Form(
"pi+ A(=%d) charge exchange",
A),
nke,
kemin,
kemax);
52 TH1D * pip_sigma_el =
new TH1D(
"pip_sigma_el", Form(
"pi+ A(=%d) elastic",
A),
nke,
kemin,
kemax);
53 TH1D * pip_sigma_inel =
new TH1D(
"pip_sigma_inel", Form(
"pi+ A(=%d) inelastic",
A),
nke,
kemin,
kemax);
54 TH1D * pip_sigma_abs =
new TH1D(
"pip_sigma_abs", Form(
"pi+ A(=%d) absorption",
A),
nke,
kemin,
kemax);
55 TH1D * pip_sigma_pipro =
new TH1D(
"pip_sigma_pipro", Form(
"pi+ A(=%d) pi production",
A),
nke,
kemin,
kemax);
57 ghA->Draw(
"1000*ke>>pip_nall",
"",
"");
58 ghA->Draw(
"1000*ke>>pip_sigma_tot", Form(
"A==%d && probe==%d && fsi>0",
A,211),
"goff");
59 ghA->Draw(
"1000*ke>>pip_sigma_reac", Form(
"A==%d && probe==%d && fsi>0 && fsi!=2",
A,211),
"goff");
60 ghA->Draw(
"1000*ke>>pip_sigma_cex", Form(
"A==%d && probe==%d && fsi==1",
A,211),
"goff");
61 ghA->Draw(
"1000*ke>>pip_sigma_el", Form(
"A==%d && probe==%d && fsi==2",
A,211),
"goff");
62 ghA->Draw(
"1000*ke>>pip_sigma_inel", Form(
"A==%d && probe==%d && fsi==3",
A,211),
"goff");
63 ghA->Draw(
"1000*ke>>pip_sigma_abs", Form(
"A==%d && probe==%d && fsi>=4 && fsi<=9",
A,211),
"goff");
64 ghA->Draw(
"1000*ke>>pip_sigma_pipro",Form(
"A==%d && probe==%d && fsi>9",
A,211),
"goff");
66 const double fm2tomb = 10.;
68 double R =
NR *
R0 * TMath::Power((
double)
A,0.3333);
69 double S = fm2tomb * TMath::Pi() * TMath::Power(R,2);
71 pip_sigma_tot ->
Divide (pip_nall); pip_sigma_tot -> Scale (S); pip_sigma_tot -> Sumw2 ();
72 pip_sigma_reac ->
Divide (pip_nall); pip_sigma_reac -> Scale (S); pip_sigma_reac -> Sumw2 ();
73 pip_sigma_cex ->
Divide (pip_nall); pip_sigma_cex -> Scale (S); pip_sigma_cex -> Sumw2 ();
74 pip_sigma_el ->
Divide (pip_nall); pip_sigma_el -> Scale (S); pip_sigma_el -> Sumw2 ();
75 pip_sigma_inel ->
Divide (pip_nall); pip_sigma_inel -> Scale (S); pip_sigma_inel -> Sumw2 ();
76 pip_sigma_abs ->
Divide (pip_nall); pip_sigma_abs -> Scale (S); pip_sigma_abs -> Sumw2 ();
77 pip_sigma_pipro ->
Divide (pip_nall); pip_sigma_pipro -> Scale (S); pip_sigma_pipro -> Sumw2 ();
87 pip_sigma_tot ->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_tot ->GetYaxis()->SetTitle(
"#sigma (mb)");
88 pip_sigma_reac ->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_reac ->GetYaxis()->SetTitle(
"#sigma (mb)");
89 pip_sigma_cex ->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_cex ->GetYaxis()->SetTitle(
"#sigma (mb)");
90 pip_sigma_el ->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_el ->GetYaxis()->SetTitle(
"#sigma (mb)");
91 pip_sigma_inel ->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_inel ->GetYaxis()->SetTitle(
"#sigma (mb)");
92 pip_sigma_abs ->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_abs ->GetYaxis()->SetTitle(
"#sigma (mb)");
93 pip_sigma_pipro->GetXaxis()->SetTitle(
"#pi^{+} KE (MeV)"); pip_sigma_pipro->GetYaxis()->SetTitle(
"#sigma (mb)");
95 gStyle->SetOptStat(0);
97 TCanvas * ctot =
new TCanvas(
"ctot",
"",10,10,500,500);
98 pip_sigma_tot ->
Draw(
"E4");
99 pip_sigma_reac ->
Draw(
"E4SAME");
101 TCanvas * cfates =
new TCanvas(
"cfates",
"",110,110,600,600);
104 pip_sigma_cex ->
Draw (
"E4");
106 pip_sigma_inel ->
Draw (
"E4");
108 pip_sigma_abs ->
Draw (
"E4");
110 pip_sigma_pipro ->
Draw (
"E4");
113 TFile
fout(
"hAana.root",
"RECREATE");
114 pip_sigma_tot ->
Write(
"pip_sigma_tot");
115 pip_sigma_reac ->
Write(
"pip_sigma_reac");
116 pip_sigma_cex ->
Write(
"pip_sigma_cex");
117 pip_sigma_el ->
Write(
"pip_sigma_el");
118 pip_sigma_inel ->
Write(
"pip_sigma_inel");
119 pip_sigma_abs ->
Write(
"pip_sigma_abs");
120 pip_sigma_pipro ->
Write(
"pip_sigma_pipro");
void Draw(const char *plot, const char *title)