Files
geant4/examples/advanced/brachytherapy/plot_primary.C
T
2016-06-10 11:51:14 +02:00

19 lines
378 B
C++

{
// Plot the energy spectrum of the primary particles
gROOT -> Reset();
TFile f("brachytherapy.root");
// Draw histos filled by Geant4 simulation
//
TCanvas* c1 = new TCanvas("c1", " ");
TDirectory* dir_histo = f.Get("brachy_histo");
// Primary particle spectrum
TH1D* hist1 = (TH1D*)dir_histo->Get("1");
hist1->Draw(" "); // this is empy at the moment.
}