Geant4
10.02.p03
plot2.C
Go to the documentation of this file.
1
{
2
gROOT->Reset();
3
4
// Draw histos filled by Geant4 simulation
5
//
6
TCanvas*
c1
=
new
TCanvas(
"c1"
,
" "
);
7
8
c1->SetLogy(1);
9
c1->cd();
10
c1->Update();
11
12
TFile
fa
= TFile(
"Li7.root"
);
13
TFile
fb
= TFile(
"Li6.root"
);
14
15
TH1D*
ha1
= (TH1D*)fa.Get(
"6"
);
16
ha1->SetStats(kFALSE);
17
ha1->SetLineColor(kBlue);
18
ha1->Draw(
"HIST"
);
19
TH1D*
hb1
= (TH1D*)fb.Get(
"6"
);
20
hb1->SetLineColor(kRed);
21
hb1->Draw(
"HIST SAME"
);
22
23
// Print the histograms legend
24
TLegend *
le
=
new
TLegend(0.6,0.6,0.8,0.8);
25
le->AddEntry(ha1,
"Li7"
,
"l"
);
26
le->AddEntry(hb1,
"Li6"
,
"l"
);
27
le->Draw();
28
}
ha1
TH1D * ha1
Definition:
plot2.C:15
hb1
TH1D * hb1
Definition:
plot2.C:19
fb
TFile fb
Definition:
plot2.C:13
fa
TFile fa
Definition:
plot2.C:12
c1
TCanvas * c1
Definition:
plot2.C:6
le
TLegend * le
Definition:
plot2.C:24
Geant4
Geant4.10.02.p03
examples
extended
hadronic
Hadr06
plot2.C
Generated by
1.8.13