Import Geant4 10.3.0 source tree
This commit is contained in:
+101
-101
@@ -26,12 +26,12 @@ Double_t scale;
|
||||
|
||||
|
||||
c1 = new TCanvas ("c1","",20,20,1200,900);
|
||||
c1.Divide(4,3);
|
||||
c1->Divide(4,3);
|
||||
|
||||
//*********************
|
||||
// INTENSITY HISTOGRAMS
|
||||
//*********************
|
||||
jump:
|
||||
|
||||
|
||||
FILE * fp = fopen("phantom.dat","r");
|
||||
Float_t xVox, yVox, zVox, tmp, den, dose;
|
||||
@@ -50,8 +50,8 @@ TNtuple *ntupleYXN = new TNtuple("NUCLEUS","ntuple","Y:X:vox");
|
||||
TNtuple *ntupleZX = new TNtuple("CYTOPLASM","ntuple","Z:X:vox");
|
||||
TNtuple *ntupleYX = new TNtuple("CYTOPLASM","ntuple","Y:X:vox");
|
||||
|
||||
nlines=0;
|
||||
ncols=0;
|
||||
Int_t nlines=0;
|
||||
Int_t ncols=0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ fclose(fp);
|
||||
|
||||
// HISTO NUCLEUS
|
||||
|
||||
c1.cd(1);
|
||||
c1->cd(1);
|
||||
h1->Draw();
|
||||
h1->GetXaxis()->SetLabelSize(0.025);
|
||||
h1->GetYaxis()->SetLabelSize(0.025);
|
||||
@@ -104,7 +104,7 @@ c1.cd(1);
|
||||
|
||||
// HISTO CYTOPLASM
|
||||
|
||||
c1.cd(5);
|
||||
c1->cd(5);
|
||||
h2->Draw();
|
||||
h2->GetXaxis()->SetLabelSize(0.025);
|
||||
h2->GetYaxis()->SetLabelSize(0.025);
|
||||
@@ -132,7 +132,7 @@ gROOT->SetStyle("Plain");
|
||||
|
||||
//CYTOPLASM
|
||||
|
||||
c1.cd(7); // axe YX
|
||||
c1->cd(7); // axe YX
|
||||
TH2F *hist = new TH2F("hist","hist",50,-20,20,50,-20,20);
|
||||
ntupleYX->Draw("Y:X>>hist","vox","colz");
|
||||
gPad->SetLogz();
|
||||
@@ -144,27 +144,27 @@ c1.cd(7); // axe YX
|
||||
hist->GetYaxis()->SetTitleSize(0.035);
|
||||
hist->GetXaxis()->SetTitleOffset(1.4);
|
||||
hist->GetYaxis()->SetTitleOffset(1.4);
|
||||
hist->GetXaxis()->SetTitle("Y (µm)");
|
||||
hist->GetYaxis()->SetTitle("X (µm)");
|
||||
hist->GetXaxis()->SetTitle("Y (um)");
|
||||
hist->GetYaxis()->SetTitle("X (um)");
|
||||
hist->SetTitle("Cytoplasm intensity on transverse section");
|
||||
|
||||
//NUCLEUS
|
||||
|
||||
c1.cd(3); // axe YX
|
||||
TH2F *hist = new TH2F("hist","hist",50,-20,20,50,-20,20);
|
||||
ntupleYXN->Draw("Y:X>>hist","vox","colz");
|
||||
c1->cd(3); // axe YX
|
||||
TH2F *hist2 = new TH2F("hist2","hist2",50,-20,20,50,-20,20);
|
||||
ntupleYXN->Draw("Y:X>>hist2","vox","colz");
|
||||
gPad->SetLogz();
|
||||
hist->Draw("colz");
|
||||
hist->GetXaxis()->SetLabelSize(0.025);
|
||||
hist->GetYaxis()->SetLabelSize(0.025);
|
||||
hist->GetZaxis()->SetLabelSize(0.025);
|
||||
hist->GetXaxis()->SetTitleSize(0.035);
|
||||
hist->GetYaxis()->SetTitleSize(0.035);
|
||||
hist->GetXaxis()->SetTitleOffset(1.4);
|
||||
hist->GetYaxis()->SetTitleOffset(1.4);
|
||||
hist->GetXaxis()->SetTitle("Y (µm)");
|
||||
hist->GetYaxis()->SetTitle("X (µm)");
|
||||
hist->SetTitle("Nucleus intensity on transverse section");
|
||||
hist2->Draw("colz");
|
||||
hist2->GetXaxis()->SetLabelSize(0.025);
|
||||
hist2->GetYaxis()->SetLabelSize(0.025);
|
||||
hist2->GetZaxis()->SetLabelSize(0.025);
|
||||
hist2->GetXaxis()->SetTitleSize(0.035);
|
||||
hist2->GetYaxis()->SetTitleSize(0.035);
|
||||
hist2->GetXaxis()->SetTitleOffset(1.4);
|
||||
hist2->GetYaxis()->SetTitleOffset(1.4);
|
||||
hist2->GetXaxis()->SetTitle("Y (um)");
|
||||
hist2->GetYaxis()->SetTitle("X (um)");
|
||||
hist2->SetTitle("Nucleus intensity on transverse section");
|
||||
|
||||
//
|
||||
|
||||
@@ -179,38 +179,38 @@ TNtuple* ntuple2;
|
||||
TNtuple* ntuple3;
|
||||
TNtuple* ntuple4;
|
||||
|
||||
ntuple0 = (TNtuple*)f->Get("ntuple0");
|
||||
ntuple1 = (TNtuple*)f->Get("ntuple1");
|
||||
ntuple2 = (TNtuple*)f->Get("ntuple2");
|
||||
ntuple3 = (TNtuple*)f->Get("ntuple3");
|
||||
ntuple4 = (TNtuple*)f->Get("ntuple4");
|
||||
ntuple0 = (TNtuple*)f.Get("ntuple0");
|
||||
ntuple1 = (TNtuple*)f.Get("ntuple1");
|
||||
ntuple2 = (TNtuple*)f.Get("ntuple2");
|
||||
ntuple3 = (TNtuple*)f.Get("ntuple3");
|
||||
ntuple4 = (TNtuple*)f.Get("ntuple4");
|
||||
|
||||
TH1F *h1 = new TH1F("h1","Dose distribution in Nucleus",100,0.001,1.);
|
||||
TH1F *h10 = new TH1F("h10","Dose distribution in Cytoplasm",100,0.001,.2);
|
||||
TH1F *h1bis = new TH1F("h1bis","Dose distribution in Nucleus",100,0.001,1.);
|
||||
TH1F *h10 = new TH1F("h10bis","Dose distribution in Cytoplasm",100,0.001,.2);
|
||||
|
||||
c1.cd(2);
|
||||
c1->cd(2);
|
||||
|
||||
ntuple3->Project("h1","doseN");
|
||||
scale = 1/h1->Integral();
|
||||
h1->Scale(scale);
|
||||
h1->Draw();
|
||||
h1->GetXaxis()->SetLabelSize(0.025);
|
||||
h1->GetYaxis()->SetLabelSize(0.025);
|
||||
h1->GetXaxis()->SetTitleSize(0.035);
|
||||
h1->GetYaxis()->SetTitleSize(0.035);
|
||||
h1->GetXaxis()->SetTitleOffset(1.4);
|
||||
h1->GetYaxis()->SetTitleOffset(1.4);
|
||||
h1->GetXaxis()->SetTitle("Absorbed dose (Gy)");
|
||||
h1->GetYaxis()->SetTitle("Fraction of events");
|
||||
h1->SetLineColor(3);
|
||||
h1->SetFillColor(3);
|
||||
ntuple3->Project("h1bis","doseN");
|
||||
scale = 1/h1bis->Integral();
|
||||
h1bis->Scale(scale);
|
||||
h1bis->Draw();
|
||||
h1bis->GetXaxis()->SetLabelSize(0.025);
|
||||
h1bis->GetYaxis()->SetLabelSize(0.025);
|
||||
h1bis->GetXaxis()->SetTitleSize(0.035);
|
||||
h1bis->GetYaxis()->SetTitleSize(0.035);
|
||||
h1bis->GetXaxis()->SetTitleOffset(1.4);
|
||||
h1bis->GetYaxis()->SetTitleOffset(1.4);
|
||||
h1bis->GetXaxis()->SetTitle("Absorbed dose (Gy)");
|
||||
h1bis->GetYaxis()->SetTitle("Fraction of events");
|
||||
h1bis->SetLineColor(3);
|
||||
h1bis->SetFillColor(3);
|
||||
|
||||
//*****************
|
||||
// DOSE IN CYTOPLASM
|
||||
//*****************
|
||||
|
||||
c1.cd(6);
|
||||
ntuple3->Project("h10","doseC");
|
||||
c1->cd(6);
|
||||
ntuple3->Project("h10bis","doseC");
|
||||
scale = 1/h10->Integral();
|
||||
h10->Scale(scale);
|
||||
h10->Draw();
|
||||
@@ -236,27 +236,27 @@ gROOT->SetStyle("Plain");
|
||||
|
||||
Float_t d;
|
||||
|
||||
TH1F *h2 = new TH1F("h2","Beam stopping power at cell entrance",200,0,300);
|
||||
TH1F *h2bis = new TH1F("h2bis","Beam stopping power at cell entrance",200,0,300);
|
||||
|
||||
c1.cd(9);
|
||||
ntuple0->Project("h2","sp");
|
||||
scale = 1/h2->Integral();
|
||||
h2->Scale(scale);
|
||||
h2->Draw();
|
||||
h2->GetXaxis()->SetLabelSize(0.025);
|
||||
h2->GetYaxis()->SetLabelSize(0.025);
|
||||
h2->GetXaxis()->SetTitleSize(0.035);
|
||||
h2->GetYaxis()->SetTitleSize(0.035);
|
||||
h2->GetXaxis()->SetTitleOffset(1.4);
|
||||
h2->GetYaxis()->SetTitleOffset(1.4);
|
||||
h2->GetXaxis()->SetTitle("dE/dx (keV/µm)");
|
||||
h2->GetYaxis()->SetTitle("Fraction of events");
|
||||
h2->SetTitle("dE/dx at cell entrance");
|
||||
h2->SetFillColor(4);
|
||||
h2->SetLineColor(4);
|
||||
h2->Fit("gaus");
|
||||
c1->cd(9);
|
||||
ntuple0->Project("h2bis","sp");
|
||||
scale = 1/h2bis->Integral();
|
||||
h2bis->Scale(scale);
|
||||
h2bis->Draw();
|
||||
h2bis->GetXaxis()->SetLabelSize(0.025);
|
||||
h2bis->GetYaxis()->SetLabelSize(0.025);
|
||||
h2bis->GetXaxis()->SetTitleSize(0.035);
|
||||
h2bis->GetYaxis()->SetTitleSize(0.035);
|
||||
h2bis->GetXaxis()->SetTitleOffset(1.4);
|
||||
h2bis->GetYaxis()->SetTitleOffset(1.4);
|
||||
h2bis->GetXaxis()->SetTitle("dE/dx (keV/um)");
|
||||
h2bis->GetYaxis()->SetTitle("Fraction of events");
|
||||
h2bis->SetTitle("dE/dx at cell entrance");
|
||||
h2bis->SetFillColor(4);
|
||||
h2bis->SetLineColor(4);
|
||||
h2bis->Fit("gaus");
|
||||
gaus->SetLineColor(6);
|
||||
h2->Fit("gaus");
|
||||
h2bis->Fit("gaus");
|
||||
|
||||
|
||||
//**************
|
||||
@@ -295,7 +295,7 @@ for (Int_t i=0;i<nentries;i++)
|
||||
ntupleR->Fill(Z2,Y2,X2);
|
||||
}
|
||||
|
||||
c1.cd(10);
|
||||
c1->cd(10);
|
||||
ntupleR->Draw("X2:Z2","abs(X2)<50","surf3");
|
||||
gPad->SetLogz();
|
||||
/*
|
||||
@@ -321,38 +321,38 @@ gStyle->SetOptFit();
|
||||
gStyle->SetPalette(1);
|
||||
gROOT->SetStyle("Plain");
|
||||
|
||||
c1.cd(11);
|
||||
TH2F *hist = new TH2F("hist","hist",50,-20,20,50,-20,20);
|
||||
ntuple4->Draw("y*0.359060:x*0.359060>>hist","doseV","contz");
|
||||
c1->cd(11);
|
||||
TH2F *histbis = new TH2F("histbis","histbis",50,-20,20,50,-20,20);
|
||||
ntuple4->Draw("y*0.359060:x*0.359060>>histbis","doseV","contz");
|
||||
gPad->SetLogz();
|
||||
hist->Draw("contz");
|
||||
hist->GetXaxis()->SetLabelSize(0.025);
|
||||
hist->GetYaxis()->SetLabelSize(0.025);
|
||||
hist->GetZaxis()->SetLabelSize(0.025);
|
||||
hist->GetXaxis()->SetTitleSize(0.035);
|
||||
hist->GetYaxis()->SetTitleSize(0.035);
|
||||
hist->GetXaxis()->SetTitleOffset(1.4);
|
||||
hist->GetYaxis()->SetTitleOffset(1.4);
|
||||
hist->GetXaxis()->SetTitle("Y (µm)");
|
||||
hist->GetYaxis()->SetTitle("X (µm)");
|
||||
hist->SetTitle("Mean energy deposit -transverse- (z axis in eV)");
|
||||
histbis->Draw("contz");
|
||||
histbis->GetXaxis()->SetLabelSize(0.025);
|
||||
histbis->GetYaxis()->SetLabelSize(0.025);
|
||||
histbis->GetZaxis()->SetLabelSize(0.025);
|
||||
histbis->GetXaxis()->SetTitleSize(0.035);
|
||||
histbis->GetYaxis()->SetTitleSize(0.035);
|
||||
histbis->GetXaxis()->SetTitleOffset(1.4);
|
||||
histbis->GetYaxis()->SetTitleOffset(1.4);
|
||||
histbis->GetXaxis()->SetTitle("Y (um)");
|
||||
histbis->GetYaxis()->SetTitle("X (um)");
|
||||
histbis->SetTitle("Mean energy deposit -transverse- (z axis in eV)");
|
||||
|
||||
|
||||
c1.cd(12);
|
||||
TH2F *hist = new TH2F("hist","hist",50,-20,20,50,-20,20);
|
||||
ntuple4->Draw("x*0.359060:(z+1500/0.162810+21)*0.162810>>hist","doseV","contz");
|
||||
c1->cd(12);
|
||||
TH2F *histter = new TH2F("histter","histter",50,-20,20,50,-20,20);
|
||||
ntuple4->Draw("x*0.359060:(z+1500/0.162810+21)*0.162810>>histter","doseV","contz");
|
||||
gPad->SetLogz();
|
||||
hist->Draw("contz");
|
||||
hist->GetXaxis()->SetLabelSize(0.025);
|
||||
hist->GetYaxis()->SetLabelSize(0.025);
|
||||
hist->GetZaxis()->SetLabelSize(0.025);
|
||||
hist->GetXaxis()->SetTitleSize(0.035);
|
||||
hist->GetYaxis()->SetTitleSize(0.035);
|
||||
hist->GetXaxis()->SetTitleOffset(1.4);
|
||||
hist->GetYaxis()->SetTitleOffset(1.4);
|
||||
hist->GetXaxis()->SetTitle("Z (µm)");
|
||||
hist->GetYaxis()->SetTitle("X (µm)");
|
||||
hist->SetTitle("Mean energy deposit -longitudinal- (z axis in eV)");
|
||||
histter->Draw("contz");
|
||||
histter->GetXaxis()->SetLabelSize(0.025);
|
||||
histter->GetYaxis()->SetLabelSize(0.025);
|
||||
histter->GetZaxis()->SetLabelSize(0.025);
|
||||
histter->GetXaxis()->SetTitleSize(0.035);
|
||||
histter->GetYaxis()->SetTitleSize(0.035);
|
||||
histter->GetXaxis()->SetTitleOffset(1.4);
|
||||
histter->GetYaxis()->SetTitleOffset(1.4);
|
||||
histter->GetXaxis()->SetTitle("Z (um)");
|
||||
histter->GetYaxis()->SetTitle("X (um)");
|
||||
histter->SetTitle("Mean energy deposit -longitudinal- (z axis in eV)");
|
||||
|
||||
//*******************************
|
||||
// BEAM POSITION AT CELL ENTRANCE
|
||||
@@ -366,7 +366,7 @@ gROOT->SetStyle("Plain");
|
||||
TH1F *h77 = new TH1F("hx","h1",200,-10,10);
|
||||
TH1F *h88 = new TH1F("hy","h1",200,-10,10);
|
||||
|
||||
c1.cd(4);
|
||||
c1->cd(4);
|
||||
ntuple1->Project("hx","x");
|
||||
scale = 1/h77->Integral();
|
||||
h77->Scale(scale);
|
||||
@@ -377,15 +377,15 @@ c1.cd(4);
|
||||
h77->GetYaxis()->SetTitleSize(0.035);
|
||||
h77->GetXaxis()->SetTitleOffset(1.4);
|
||||
h77->GetYaxis()->SetTitleOffset(1.4);
|
||||
h77->GetXaxis()->SetTitle("Position (µm)");
|
||||
h77->GetXaxis()->SetTitle("Position (um)");
|
||||
h77->GetYaxis()->SetTitle("Fraction of events");
|
||||
h77->SetTitle("Beam X position on cell");
|
||||
h77->SetFillColor(4);
|
||||
h77->SetLineColor(4);
|
||||
gaus->SetLineColor(6);
|
||||
//gaus->SetLineColor(6);
|
||||
h77->Fit("gaus");
|
||||
|
||||
c1.cd(8);
|
||||
c1->cd(8);
|
||||
ntuple1->Project("hy","y");
|
||||
scale = 1/h88->Integral();
|
||||
h88->Scale(scale);
|
||||
@@ -396,12 +396,12 @@ c1.cd(8);
|
||||
h88->GetYaxis()->SetTitleSize(0.035);
|
||||
h88->GetXaxis()->SetTitleOffset(1.4);
|
||||
h88->GetYaxis()->SetTitleOffset(1.4);
|
||||
h88->GetXaxis()->SetTitle("Position (µm)");
|
||||
h88->GetXaxis()->SetTitle("Position (um)");
|
||||
h88->GetYaxis()->SetTitle("Fraction of events");
|
||||
h88->SetTitle("Beam Y position on cell");
|
||||
h88->SetFillColor(4);
|
||||
h88->SetLineColor(4);
|
||||
gaus->SetLineColor(6);
|
||||
//gaus->SetLineColor(6);
|
||||
h88->Fit("gaus");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user