ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
plot2.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file plot2.C
1
{
2
gROOT->Reset();
3
4
// Draw histos filled by Geant4 simulation
5
//
6
TCanvas*
c1
=
new
TCanvas(
"c1"
,
" "
);
7
8
c1->SetLogy(0);
9
c1->cd();
10
c1->Update();
11
12
TFile
fa
(
"water_opt3.root"
);
13
TFile
fb
(
"water_100um.root"
);
14
15
TH1D*
ha1
= (TH1D*)
fa
.Get(
"10"
);
16
ha1->SetStats(kFALSE);
17
ha1->SetLineColor(kBlue);
18
ha1->Draw(
"HIST"
);
19
TH1D*
hb1
= (TH1D*)
fb
.Get(
"10"
);
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,
"opt3"
,
"l"
);
26
le->AddEntry(hb1,
"100um"
,
"l"
);
27
le->Draw();
28
}
geant4
tree
geant4-10.6-release
examples
extended
hadronic
Hadr07
plot2.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:07
using
1.8.2 with
ECCE GitHub integration