Geant4_10
plot_primary.C
Go to the documentation of this file.
1 {
2 // Plot the energy spectrum of the primary particles
3 gROOT -> Reset();
4 
5 TFile f("brachytherapy.root");
6 
7 // Draw histos filled by Geant4 simulation
8 //
9 
10 TCanvas* c1 = new TCanvas("c1", " ");
11 
12 TDirectory* dir_histo = f.Get("brachy_histo");
13 
14 
15 // Primary particle spectrum
16 TH1D* hist1 = (TH1D*)dir_histo->Get("1");
17 hist1->Draw(" "); // this is empy at the moment.
18 }
TCanvas * c1
Definition: plotHisto.C:7
TFile f
Definition: plotHisto.C:6
TH1D * hist1
Definition: plotHisto.C:9
ntupleExperimental Reset()
TDirectory * dir_histo
Definition: plot_primary.C:12