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 (um)");
148 hist->GetYaxis()->SetTitle(
"X (um)");
149 hist->SetTitle(
"Cytoplasm intensity on transverse section");
154 TH2F *
hist2 =
new TH2F(
"hist2",
"hist2",50,-20,20,50,-20,20);
155 ntupleYXN->Draw(
"Y:X>>hist2",
"vox",
"colz");
158 hist2->GetXaxis()->SetLabelSize(0.025);
159 hist2->GetYaxis()->SetLabelSize(0.025);
160 hist2->GetZaxis()->SetLabelSize(0.025);
161 hist2->GetXaxis()->SetTitleSize(0.035);
162 hist2->GetYaxis()->SetTitleSize(0.035);
163 hist2->GetXaxis()->SetTitleOffset(1.4);
164 hist2->GetYaxis()->SetTitleOffset(1.4);
165 hist2->GetXaxis()->SetTitle(
"Y (um)");
166 hist2->GetYaxis()->SetTitle(
"X (um)");
167 hist2->SetTitle(
"Nucleus intensity on transverse section");
171 system (
"rm -rf microbeam.root");
172 system (
"hadd microbeam.root microbeam_*.root");
174 TFile
f(
"microbeam.root");
182 ntuple0 = (TNtuple*)
f.Get(
"ntuple0");
183 ntuple1 = (TNtuple*)
f.Get(
"ntuple1");
184 ntuple2 = (TNtuple*)
f.Get(
"ntuple2");
185 ntuple3 = (TNtuple*)
f.Get(
"ntuple3");
186 ntuple4 = (TNtuple*)
f.Get(
"ntuple4");
188 TH1F *
h1bis =
new TH1F(
"h1bis",
"Dose distribution in Nucleus",100,0.001,1.);
189 TH1F *
h10 =
new TH1F(
"h10bis",
"Dose distribution in Cytoplasm",100,0.001,.2);
193 ntuple3->Project(
"h1bis",
"doseN");
194 scale = 1/h1bis->Integral();
197 h1bis->GetXaxis()->SetLabelSize(0.025);
198 h1bis->GetYaxis()->SetLabelSize(0.025);
199 h1bis->GetXaxis()->SetTitleSize(0.035);
200 h1bis->GetYaxis()->SetTitleSize(0.035);
201 h1bis->GetXaxis()->SetTitleOffset(1.4);
202 h1bis->GetYaxis()->SetTitleOffset(1.4);
203 h1bis->GetXaxis()->SetTitle(
"Absorbed dose (Gy)");
204 h1bis->GetYaxis()->SetTitle(
"Fraction of events");
205 h1bis->SetLineColor(3);
206 h1bis->SetFillColor(3);
213 ntuple3->Project(
"h10bis",
"doseC");
214 scale = 1/h10->Integral();
217 h10->GetXaxis()->SetLabelSize(0.025);
218 h10->GetYaxis()->SetLabelSize(0.025);
219 h10->GetXaxis()->SetTitleSize(0.035);
220 h10->GetYaxis()->SetTitleSize(0.035);
221 h10->GetXaxis()->SetTitleOffset(1.4);
222 h10->GetYaxis()->SetTitleOffset(1.4);
223 h10->GetXaxis()->SetTitle(
"Absorbed dose (Gy)");
224 h10->GetYaxis()->SetTitle(
"Fraction of events");
225 h10->SetLineColor(2);
226 h10->SetFillColor(2);
232 gStyle->SetOptStat(0000);
234 gStyle->SetPalette(1);
235 gROOT->SetStyle(
"Plain");
239 TH1F *
h2bis =
new TH1F(
"h2bis",
"Beam stopping power at cell entrance",200,0,300);
242 ntuple0->Project(
"h2bis",
"sp");
243 scale = 1/h2bis->Integral();
246 h2bis->GetXaxis()->SetLabelSize(0.025);
247 h2bis->GetYaxis()->SetLabelSize(0.025);
248 h2bis->GetXaxis()->SetTitleSize(0.035);
249 h2bis->GetYaxis()->SetTitleSize(0.035);
250 h2bis->GetXaxis()->SetTitleOffset(1.4);
251 h2bis->GetYaxis()->SetTitleOffset(1.4);
252 h2bis->GetXaxis()->SetTitle(
"dE/dx (keV/um)");
253 h2bis->GetYaxis()->SetTitle(
"Fraction of events");
254 h2bis->SetTitle(
"dE/dx at cell entrance");
255 h2bis->SetFillColor(4);
256 h2bis->SetLineColor(4);
258 gaus->SetLineColor(6);
269 Xc = -1295.59e3 - 955e3*sin(10*TMath::Pi()/180);
272 Zc = -1327e3 + 955e3*cos(10*TMath::Pi()/180);
275 Xc = Xc + 5.24*cos(10*TMath::Pi()/180);
276 Zc = Zc + 5.24*sin(10*TMath::Pi()/180);
278 TNtuple *
ntupleR =
new TNtuple(
"Rmax",
"ntuple",
"Z2:Y2:X2");
280 ntuple2->SetBranchAddress(
"x",&x);
281 ntuple2->SetBranchAddress(
"y",&y);
282 ntuple2->SetBranchAddress(
"z",&z);
286 ntuple2->GetEntry(i);
292 Z2 = zz*cos(10*TMath::Pi()/180)-xx*sin(10*TMath::Pi()/180);
293 X2 = zz*sin(10*TMath::Pi()/180)+xx*cos(10*TMath::Pi()/180);
295 ntupleR->Fill(Z2,Y2,X2);
299 ntupleR->Draw(
"X2:Z2",
"abs(X2)<50",
"surf3");
319 gStyle->SetOptStat(0000);
321 gStyle->SetPalette(1);
322 gROOT->SetStyle(
"Plain");
325 TH2F *
histbis =
new TH2F(
"histbis",
"histbis",50,-20,20,50,-20,20);
326 ntuple4->Draw(
"y*0.359060:x*0.359060>>histbis",
"doseV",
"contz");
328 histbis->Draw(
"contz");
329 histbis->GetXaxis()->SetLabelSize(0.025);
330 histbis->GetYaxis()->SetLabelSize(0.025);
331 histbis->GetZaxis()->SetLabelSize(0.025);
332 histbis->GetXaxis()->SetTitleSize(0.035);
333 histbis->GetYaxis()->SetTitleSize(0.035);
334 histbis->GetXaxis()->SetTitleOffset(1.4);
335 histbis->GetYaxis()->SetTitleOffset(1.4);
336 histbis->GetXaxis()->SetTitle(
"Y (um)");
337 histbis->GetYaxis()->SetTitle(
"X (um)");
338 histbis->SetTitle(
"Mean energy deposit -transverse- (z axis in eV)");
342 TH2F *
histter =
new TH2F(
"histter",
"histter",50,-20,20,50,-20,20);
343 ntuple4->Draw(
"x*0.359060:(z+1500/0.162810+21)*0.162810>>histter",
"doseV",
"contz");
345 histter->Draw(
"contz");
346 histter->GetXaxis()->SetLabelSize(0.025);
347 histter->GetYaxis()->SetLabelSize(0.025);
348 histter->GetZaxis()->SetLabelSize(0.025);
349 histter->GetXaxis()->SetTitleSize(0.035);
350 histter->GetYaxis()->SetTitleSize(0.035);
351 histter->GetXaxis()->SetTitleOffset(1.4);
352 histter->GetYaxis()->SetTitleOffset(1.4);
353 histter->GetXaxis()->SetTitle(
"Z (um)");
354 histter->GetYaxis()->SetTitle(
"X (um)");
355 histter->SetTitle(
"Mean energy deposit -longitudinal- (z axis in eV)");
361 gStyle->SetOptStat(0000);
363 gStyle->SetPalette(1);
364 gROOT->SetStyle(
"Plain");
366 TH1F *
h77 =
new TH1F(
"hx",
"h1",200,-10,10);
367 TH1F *
h88 =
new TH1F(
"hy",
"h1",200,-10,10);
370 ntuple1->Project(
"hx",
"x");
371 scale = 1/h77->Integral();
374 h77->GetXaxis()->SetLabelSize(0.025);
375 h77->GetYaxis()->SetLabelSize(0.025);
376 h77->GetXaxis()->SetTitleSize(0.035);
377 h77->GetYaxis()->SetTitleSize(0.035);
378 h77->GetXaxis()->SetTitleOffset(1.4);
379 h77->GetYaxis()->SetTitleOffset(1.4);
380 h77->GetXaxis()->SetTitle(
"Position (um)");
381 h77->GetYaxis()->SetTitle(
"Fraction of events");
382 h77->SetTitle(
"Beam X position on cell");
383 h77->SetFillColor(4);
384 h77->SetLineColor(4);
389 ntuple1->Project(
"hy",
"y");
390 scale = 1/h88->Integral();
393 h88->GetXaxis()->SetLabelSize(0.025);
394 h88->GetYaxis()->SetLabelSize(0.025);
395 h88->GetXaxis()->SetTitleSize(0.035);
396 h88->GetYaxis()->SetTitleSize(0.035);
397 h88->GetXaxis()->SetTitleOffset(1.4);
398 h88->GetYaxis()->SetTitleOffset(1.4);
399 h88->GetXaxis()->SetTitle(
"Position (um)");
400 h88->GetYaxis()->SetTitle(
"Fraction of events");
401 h88->SetTitle(
"Beam Y position on cell");
402 h88->SetFillColor(4);
403 h88->SetLineColor(4);
system("rm -rf microbeam.root")
TFile f("microbeam.root")