Geant4_10
plotHisto.C
Go to the documentation of this file.
1 {
2  gROOT->Reset();
3 
4  // Draw histos filled by Geant4 simulation
5  //
6  TFile f = TFile("AnaEx01.root");
7  TCanvas* c1 = new TCanvas("c1", " ");
8 
9  TDirectory* dir = f.Get("histo");
10 
11  TH1D* hist1 = (TH1D*)dir->Get("1");
12  hist1->Draw("HIST");
13 
14  TH1D* hist2 = (TH1D*)dir->Get("2");
15  hist2->Draw("HIST");
16 
17  TH1D* hist3 = (TH1D*)dir->Get("3");
18  hist3->Draw("HIST");
19 
20  TH1D* hist4 = (TH1D*)dir->Get("4");
21  hist4->Draw("HIST");
22 }
TCanvas * c1
Definition: plotHisto.C:7
TH1D * hist4
Definition: plotHisto.C:18
TFile f
Definition: plotHisto.C:6
TH1D * hist3
Definition: plotHisto.C:15
TH1D * hist1
Definition: plotHisto.C:9
TH1D * hist2
Definition: plotHisto.C:12
TDirectory * dir
Definition: macro.C:5