Files
geant4/examples/advanced/amsEcal/showers/plotHisto.C
T
2016-06-09 16:15:05 +02:00

26 lines
502 B
C++

{
gROOT->Reset();
// Draw histos filled by Geant4 simulation
//
TFile f = TFile("e6gev.run1.root");
TCanvas* c1 = new TCanvas("c1", " ");
TH1D* hist1 = (TH1D*)f.Get("1");
hist1->Draw("HIST");
TH1D* hist2 = (TH1D*)f.Get("2");
hist2->Draw("HIST");
TH1D* hist3 = (TH1D*)f.Get("3");
hist3->Draw("HIST");
TH1D* hist4 = (TH1D*)f.Get("4");
hist4->Draw("HIST");
TTree* nt = (TTree*)f.Get("101");
c1->cd();
c1->Update();
nt->StartViewer();
}