File indexing completed on 2025-01-30 09:19:57
0001 {
0002
0003
0004 TFile* f = new TFile("radioprotection_NEW.root");
0005 TDirectory* dir = (TDirectory*)f->Get("radioprotection_ntuple");
0006
0007 TTree * ntuple1 = (TTree*)dir->Get("101");
0008 TTree * ntuple2 = (TTree*)dir->Get("102");
0009 TTree * ntuple3 = (TTree*)dir->Get("103");
0010
0011 int numberOfBinsX = 500;
0012 int numberOfBinsY = 500;
0013 int numberOfBinsZ = 500;
0014
0015 int Xmin = 0;
0016 int Xmax = 1000;
0017 int Ymin = 0;
0018 int Ymax = 1000;
0019 int Zmin = 0;
0020 int Zmax = 1000;
0021
0022
0023 TH1F* edep1DistributionPrimary = new TH1F("h0", "Primary Particle Energy Spectrum; Energy (Mev);Frequency",
0024 numberOfBinsX, Xmin, Xmax);
0025
0026
0027 TH1F* edep1Distribution = new TH1F("h1", "Energy deposition; Edep (kev);Frequency",
0028 numberOfBinsX, Xmin, Xmax);
0029
0030
0031 TH2F* edep2DDistribution = new TH2F("h2", "Energy deposited by Ions; Z; Edep (keV)",
0032 numberOfBinsX, Xmin, Xmax,
0033 numberOfBinsY, Ymin, Ymax);
0034
0035
0036 TH3F* edep3DDistribution = new TH3F("h3", "3Dedep; Edep (keV) ; A; Z",
0037 numberOfBinsX, Xmin, Xmin,
0038 numberOfBinsY, Ymin, Ymax,
0039 numberOfBinsZ, Zmin, Zmax);
0040
0041
0042
0043 ntuple1->Draw("Ek>>h0","","");
0044
0045
0046
0047
0048
0049 }