21 gStyle->SetOptStat(0000);
23 gStyle->SetPalette(1);
24 gROOT->SetStyle(
"Plain");
28 c1 =
new TCanvas (
"c1",
"",20,20,1200,900);
36 FILE * fp = fopen(
"phantom.dat",
"r");
43 TH1F *
h1 =
new TH1F(
"h1",
"Nucleus marker intensity",100,1,300);
44 TH1F *
h11 =
new TH1F(
"h11 ",
"",100,1,300);
46 TH1F *
h2 =
new TH1F(
"h2",
"Cytoplasm marker intensity",100,1,300);
47 TH1F *
h20 =
new TH1F(
"h20 ",
"",100,1,300);
49 TNtuple *
ntupleYXN =
new TNtuple(
"NUCLEUS",
"ntuple",
"Y:X:vox");
50 TNtuple *
ntupleZX =
new TNtuple(
"CYTOPLASM",
"ntuple",
"Z:X:vox");
51 TNtuple *
ntupleYX =
new TNtuple(
"CYTOPLASM",
"ntuple",
"Y:X:vox");
58 if (
nlines == 0 )
ncols = fscanf(fp,
"%f %f %f",&tmp,&tmp,&tmp);
59 if (
nlines == 1 )
ncols = fscanf(fp,
"%f %f %f",&voxelSizeX,&voxelSizeY,&voxelSizeZ);
60 if (
nlines == 2 )
ncols = fscanf(fp,
"%f %f %f",&tmp,&tmp,&tmp);
61 if (
nlines >= 3 )
ncols = fscanf(fp,
"%f %f %f %f %f %f", &X, &Y, &Z, &
mat, &den, &vox);
70 if (den==1) h1->Fill( vox );
71 if (den==2) h11->Fill( vox );
72 ntupleYXN->Fill(Y,X,vox);
76 if (den==1) h2->Fill( vox );
77 if (den==2) h20->Fill( vox );
78 ntupleZX->Fill(Z,X,vox);
79 ntupleYX->Fill(Y,X,vox);
90 h1->GetXaxis()->SetLabelSize(0.025);
91 h1->GetYaxis()->SetLabelSize(0.025);
92 h1->GetXaxis()->SetTitleSize(0.035);
93 h1->GetYaxis()->SetTitleSize(0.035);
94 h1->GetXaxis()->SetTitleOffset(1.4);
95 h1->GetYaxis()->SetTitleOffset(1.4);
96 h1->GetXaxis()->SetTitle(
"Voxel intensity (0-255)");
97 h1->GetYaxis()->SetTitle(
"Number of events");
101 h11->SetLineColor(8);
102 h11->SetFillColor(8);
109 h2->GetXaxis()->SetLabelSize(0.025);
110 h2->GetYaxis()->SetLabelSize(0.025);
111 h2->GetXaxis()->SetTitleSize(0.035);
112 h2->GetYaxis()->SetTitleSize(0.035);
113 h2->GetXaxis()->SetTitleOffset(1.4);
114 h2->GetYaxis()->SetTitleOffset(1.4);
115 h2->GetXaxis()->SetTitle(
"Voxel intensity (0-255)");
116 h2->GetYaxis()->SetTitle(
"Number of events");
120 h20->SetLineColor(5);
121 h20->SetFillColor(5);
128 gStyle->SetOptStat(0000);
130 gStyle->SetPalette(1);
131 gROOT->SetStyle(
"Plain");
136 TH2F *
hist =
new TH2F(
"hist",
"hist",50,-20,20,50,-20,20);
137 ntupleYX->Draw(
"Y:X>>hist",
"vox",
"colz");
140 hist->GetXaxis()->SetLabelSize(0.025);
141 hist->GetYaxis()->SetLabelSize(0.025);
142 hist->GetZaxis()->SetLabelSize(0.025);
143 hist->GetXaxis()->SetTitleSize(0.035);
144 hist->GetYaxis()->SetTitleSize(0.035);
145 hist->GetXaxis()->SetTitleOffset(1.4);
146 hist->GetYaxis()->SetTitleOffset(1.4);
147 hist->GetXaxis()->SetTitle(
"Y (µm)");
148 hist->GetYaxis()->SetTitle(
"X (µm)");
149 hist->SetTitle(
"Cytoplasm intensity on transverse section");
154 TH2F *hist =
new TH2F(
"hist",
"hist",50,-20,20,50,-20,20);
155 ntupleYXN->Draw(
"Y:X>>hist",
"vox",
"colz");
158 hist->GetXaxis()->SetLabelSize(0.025);
159 hist->GetYaxis()->SetLabelSize(0.025);
160 hist->GetZaxis()->SetLabelSize(0.025);
161 hist->GetXaxis()->SetTitleSize(0.035);
162 hist->GetYaxis()->SetTitleSize(0.035);
163 hist->GetXaxis()->SetTitleOffset(1.4);
164 hist->GetYaxis()->SetTitleOffset(1.4);
165 hist->GetXaxis()->SetTitle(
"Y (µm)");
166 hist->GetYaxis()->SetTitle(
"X (µm)");
167 hist->SetTitle(
"Nucleus intensity on transverse section");
171 TFile
f(
"microbeam.root");
179 ntuple0 = (TNtuple*)
f->Get(
"ntuple0");
180 ntuple1 = (TNtuple*)
f->Get(
"ntuple1");
181 ntuple2 = (TNtuple*)
f->Get(
"ntuple2");
182 ntuple3 = (TNtuple*)
f->Get(
"ntuple3");
183 ntuple4 = (TNtuple*)
f->Get(
"ntuple4");
185 TH1F *h1 =
new TH1F(
"h1",
"Dose distribution in Nucleus",100,0.001,1.);
186 TH1F *
h10 =
new TH1F(
"h10",
"Dose distribution in Cytoplasm",100,0.001,.2);
190 ntuple3->Project(
"h1",
"doseN");
191 scale = 1/h1->Integral();
194 h1->GetXaxis()->SetLabelSize(0.025);
195 h1->GetYaxis()->SetLabelSize(0.025);
196 h1->GetXaxis()->SetTitleSize(0.035);
197 h1->GetYaxis()->SetTitleSize(0.035);
198 h1->GetXaxis()->SetTitleOffset(1.4);
199 h1->GetYaxis()->SetTitleOffset(1.4);
200 h1->GetXaxis()->SetTitle(
"Absorbed dose (Gy)");
201 h1->GetYaxis()->SetTitle(
"Fraction of events");
210 ntuple3->Project(
"h10",
"doseC");
211 scale = 1/h10->Integral();
214 h10->GetXaxis()->SetLabelSize(0.025);
215 h10->GetYaxis()->SetLabelSize(0.025);
216 h10->GetXaxis()->SetTitleSize(0.035);
217 h10->GetYaxis()->SetTitleSize(0.035);
218 h10->GetXaxis()->SetTitleOffset(1.4);
219 h10->GetYaxis()->SetTitleOffset(1.4);
220 h10->GetXaxis()->SetTitle(
"Absorbed dose (Gy)");
221 h10->GetYaxis()->SetTitle(
"Fraction of events");
222 h10->SetLineColor(2);
223 h10->SetFillColor(2);
229 gStyle->SetOptStat(0000);
231 gStyle->SetPalette(1);
232 gROOT->SetStyle(
"Plain");
236 TH1F *h2 =
new TH1F(
"h2",
"Beam stopping power at cell entrance",200,0,300);
239 ntuple0->Project(
"h2",
"sp");
240 scale = 1/h2->Integral();
243 h2->GetXaxis()->SetLabelSize(0.025);
244 h2->GetYaxis()->SetLabelSize(0.025);
245 h2->GetXaxis()->SetTitleSize(0.035);
246 h2->GetYaxis()->SetTitleSize(0.035);
247 h2->GetXaxis()->SetTitleOffset(1.4);
248 h2->GetYaxis()->SetTitleOffset(1.4);
249 h2->GetXaxis()->SetTitle(
"dE/dx (keV/µm)");
250 h2->GetYaxis()->SetTitle(
"Fraction of events");
251 h2->SetTitle(
"dE/dx at cell entrance");
255 gaus->SetLineColor(6);
266 Xc = -1295.59e3 - 955e3*sin(10*TMath::Pi()/180);
269 Zc = -1327e3 + 955e3*cos(10*TMath::Pi()/180);
272 Xc = Xc + 5.24*cos(10*TMath::Pi()/180);
273 Zc = Zc + 5.24*sin(10*TMath::Pi()/180);
275 TNtuple *
ntupleR =
new TNtuple(
"Rmax",
"ntuple",
"Z2:Y2:X2");
277 ntuple2->SetBranchAddress(
"x",&x);
278 ntuple2->SetBranchAddress(
"y",&y);
279 ntuple2->SetBranchAddress(
"z",&z);
283 ntuple2->GetEntry(i);
289 Z2 = zz*cos(10*TMath::Pi()/180)-xx*sin(10*TMath::Pi()/180);
290 X2 = zz*sin(10*TMath::Pi()/180)+xx*cos(10*TMath::Pi()/180);
292 ntupleR->Fill(Z2,Y2,X2);
296 ntupleR->Draw(
"X2:Z2",
"abs(X2)<50",
"surf3");
316 gStyle->SetOptStat(0000);
318 gStyle->SetPalette(1);
319 gROOT->SetStyle(
"Plain");
322 TH2F *hist =
new TH2F(
"hist",
"hist",50,-20,20,50,-20,20);
323 ntuple4->Draw(
"y*0.359060:x*0.359060>>hist",
"doseV",
"contz");
326 hist->GetXaxis()->SetLabelSize(0.025);
327 hist->GetYaxis()->SetLabelSize(0.025);
328 hist->GetZaxis()->SetLabelSize(0.025);
329 hist->GetXaxis()->SetTitleSize(0.035);
330 hist->GetYaxis()->SetTitleSize(0.035);
331 hist->GetXaxis()->SetTitleOffset(1.4);
332 hist->GetYaxis()->SetTitleOffset(1.4);
333 hist->GetXaxis()->SetTitle(
"Y (µm)");
334 hist->GetYaxis()->SetTitle(
"X (µm)");
335 hist->SetTitle(
"Mean energy deposit -transverse- (z axis in eV)");
339 TH2F *hist =
new TH2F(
"hist",
"hist",50,-20,20,50,-20,20);
340 ntuple4->Draw(
"x*0.359060:z*0.162810>>hist",
"doseV",
"contz");
343 hist->GetXaxis()->SetLabelSize(0.025);
344 hist->GetYaxis()->SetLabelSize(0.025);
345 hist->GetZaxis()->SetLabelSize(0.025);
346 hist->GetXaxis()->SetTitleSize(0.035);
347 hist->GetYaxis()->SetTitleSize(0.035);
348 hist->GetXaxis()->SetTitleOffset(1.4);
349 hist->GetYaxis()->SetTitleOffset(1.4);
350 hist->GetXaxis()->SetTitle(
"Z (µm)");
351 hist->GetYaxis()->SetTitle(
"X (µm)");
352 hist->SetTitle(
"Mean energy deposit -longitudinal- (z axis in eV)");
358 gStyle->SetOptStat(0000);
360 gStyle->SetPalette(1);
361 gROOT->SetStyle(
"Plain");
363 TH1F *
h77 =
new TH1F(
"hx",
"h1",200,-10,10);
364 TH1F *
h88 =
new TH1F(
"hy",
"h1",200,-10,10);
367 ntuple1->Project(
"hx",
"x");
368 scale = 1/h77->Integral();
371 h77->GetXaxis()->SetLabelSize(0.025);
372 h77->GetYaxis()->SetLabelSize(0.025);
373 h77->GetXaxis()->SetTitleSize(0.035);
374 h77->GetYaxis()->SetTitleSize(0.035);
375 h77->GetXaxis()->SetTitleOffset(1.4);
376 h77->GetYaxis()->SetTitleOffset(1.4);
377 h77->GetXaxis()->SetTitle(
"Position (µm)");
378 h77->GetYaxis()->SetTitle(
"Fraction of events");
379 h77->SetTitle(
"Beam X position on cell");
380 h77->SetFillColor(4);
381 h77->SetLineColor(4);
382 gaus->SetLineColor(6);
386 ntuple1->Project(
"hy",
"y");
387 scale = 1/h88->Integral();
390 h88->GetXaxis()->SetLabelSize(0.025);
391 h88->GetYaxis()->SetLabelSize(0.025);
392 h88->GetXaxis()->SetTitleSize(0.035);
393 h88->GetYaxis()->SetTitleSize(0.035);
394 h88->GetXaxis()->SetTitleOffset(1.4);
395 h88->GetYaxis()->SetTitleOffset(1.4);
396 h88->GetXaxis()->SetTitle(
"Position (µm)");
397 h88->GetYaxis()->SetTitle(
"Fraction of events");
398 h88->SetTitle(
"Beam Y position on cell");
399 h88->SetFillColor(4);
400 h88->SetLineColor(4);
401 gaus->SetLineColor(6);