Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+10 -10
View File
@@ -1,42 +1,42 @@
// ROOT macro file for plotting example B4 ntuple
//
//
// Can be run from ROOT session:
// root[0] .x plotNtuple.C
{
gROOT->Reset();
gROOT->SetStyle("Plain");
// Draw histos filled by Geant4 simulation
//
// Open file filled by Geant4 simulation
// Draw histos filled by Geant4 simulation
//
// Open file filled by Geant4 simulation
TFile f("B4.root");
// Create a canvas and divide it into 2x2 pads
TCanvas* c1 = new TCanvas("c1", "", 20, 20, 1000, 1000);
c1->Divide(2,2);
// Get ntuple
TNtuple* ntuple = (TNtuple*)f.Get("B4");
// Draw Eabs histogram in the pad 1
c1->cd(1);
ntuple->Draw("Eabs");
// Draw Labs histogram in the pad 2
c1->cd(2);
ntuple->Draw("Labs");
// Draw Egap histogram in the pad 3
// with logaritmic scale for y ?? how to do this?
c1->cd(3);
gPad->SetLogy(1);
ntuple->Draw("Egap");
// Draw Lgap histogram in the pad 4
// with logaritmic scale for y ?? how to do this?
c1->cd(4);
gPad->SetLogy(1);
ntuple->Draw("Egap");
}
}