3 FILE * fg1=fopen(
"dolan.txt",
"r");
12 ncols_dolan = fscanf(fg1,
"%f %f", &x, &y);
13 if (ncols_dolan<0)
break;
21 FILE *
fg2=fopen(
"geant4_dose_Oncura_livermore.txt",
"r");
29 ncols_geant4 = fscanf(fg2,
"%f %f", &x, &y);
30 if (ncols_geant4<0)
break;
36 if (x1[i]==x2[nlines2])
38 ratio_liv[i]= y2[
nlines2]/y1[i];
49 FILE *
fg3=fopen(
"geant4_dose_Oncura_penelope.txt",
"r");
56 ncols_geant4_penelope = fscanf(fg3,
"%f %f",&x, &y);
57 if (ncols_geant4_penelope<0)
break;
64 if (x1[i]==x3[nlines3])
66 ratio_pen[i]= y3[
nlines3]/y1[i];
78 FILE *
fg4=fopen(
"geant4_dose_Oncura_opt0.txt",
"r");
85 ncols_geant4_opt0 = fscanf(fg4,
"%f %f",&x, &y);
86 if (ncols_geant4_opt0<0)
break;
92 if (x1[i]==x4[nlines4])
94 ratio_opt0[i]= y4[
nlines4]/y1[i];
106 FILE *
fg5=fopen(
"geant4_dose_Oncura_opt3.txt",
"r");
113 ncols_geant4_opt3 = fscanf(fg5,
"%f %f",&x, &y);
114 if (ncols_geant4_opt3<0)
break;
121 if (x1[i]==x5[nlines5])
123 ratio_opt3[i]= y5[
nlines5]/y1[i];
124 std::cout <<
"dolan: " << x1[i] <<
"," << y1[i]
126 <<
" ratio:" << ratio_opt3[i] << std::endl;
134 FILE *
fg6=fopen(
"geant4_dose_Oncura_opt4.txt",
"r");
141 ncols_geant4_opt4 = fscanf(fg6,
"%f %f",&x, &y);
142 if (ncols_geant4_opt4<0)
break;
149 if (x1[i]==x6[nlines6])
151 ratio_opt4[i]= y6[
nlines6]/y1[i];
162 TGraph *
gr1 =
new TGraph (nlines1, x1, y1);
163 TGraph *
gr2 =
new TGraph (nlines2, x2, y2);
164 TGraph *
gr3 =
new TGraph (nlines3, x3, y3);
165 TGraph *
gr4 =
new TGraph (nlines4, x4, y4);
166 TGraph *
gr5 =
new TGraph (nlines5, x5, y5);
167 TGraph *
gr6 =
new TGraph (nlines6, x6, y6);
168 std::cout<<
"Livermore" << std::endl;
170 for (Int_t j=0; j <
nlines1; j++)
172 std::cout << x1[j] <<
", " << ratio_liv[j] << std::endl;
174 std::cout<<
"penelope" << std::endl;
175 for (Int_t j=0; j <
nlines1; j++)
177 std::cout << x1[j] <<
", " << ratio_pen[j] << std::endl;
180 std::cout<<
"opt0" << std::endl;
181 for (Int_t j=0; j <
nlines1; j++)
183 std::cout << x1[j] <<
", " << ratio_opt0[j] << std::endl;
186 std::cout<<
"opt3" << std::endl;
187 for (Int_t j=0; j <
nlines1; j++)
189 std::cout << x1[j] <<
", " << ratio_opt3[j] << std::endl;
191 std::cout<<
"opt4" << std::endl;
192 for (Int_t j=0; j <
nlines1; j++)
194 std::cout << x1[j] <<
", " << ratio_opt4[j] << std::endl;
197 TCanvas *
c1 =
new TCanvas(
"c1",
"Graph Draw Options", 200, 10, 600, 400);
203 gr1->SetTitle(
"Dose rate distribution");
204 gr1->GetXaxis()->SetTitle(
"Distance from the centre (cm)");
205 gr1->GetYaxis()->SetTitle(
"Normalised dose rate distribution");
206 gr1->SetLineWidth(1);
207 gr1->SetMarkerColor(1);
208 gr1->SetMarkerStyle(20);
211 gr2->SetLineWidth(1);
212 gr2->SetMarkerColor(2);
213 gr2->SetMarkerStyle(21);
214 gr2->SetMarkerSize(0.5);
215 gr2->SetLineColor(2);
218 gr3->SetLineWidth(0.3);
219 gr3->SetMarkerColor(3);
220 gr3->SetMarkerStyle(21);
221 gr3->SetMarkerSize(0.2);
222 gr3->SetLineColor(3);
225 gr4->SetLineWidth(0.3);
226 gr4->SetMarkerColor(4);
227 gr4->SetMarkerStyle(21);
228 gr4->SetMarkerSize(0.2);
229 gr4->SetLineColor(4);
232 gr5->SetLineWidth(0.3);
233 gr5->SetMarkerColor(6);
234 gr5->SetMarkerStyle(21);
235 gr5->SetMarkerSize(0.2);
236 gr5->SetLineColor(6);
239 gr6->SetLineWidth(0.3);
240 gr6->SetMarkerColor(8);
241 gr6->SetMarkerStyle(21);
242 gr6->SetMarkerSize(0.2);
243 gr6->SetLineColor(8);
246 TLegend *
leg =
new TLegend(0.3, 0.5, 0.6, 0.8);
247 leg->SetFillColor(0);
248 leg->AddEntry(gr1,
"Reference data",
"lp");
249 leg->AddEntry(gr2,
"Geant4 - Oncura - Livermore",
"lp");
250 leg->AddEntry(gr3,
"Geant4 - Penelope",
"lp");
251 leg->AddEntry(gr4,
"Geant4 - Standard opt0",
"lp");
252 leg->AddEntry(gr5,
"Geant4 - Standard opt3",
"lp");
253 leg->AddEntry(gr6,
"Geant4 - Standard opt4",
"lp");
Float_t x5[n_points_geant4]
Float_t y5[n_points_geant4]
Float_t x3[n_points_geant4]
Float_t x1[n_points_dolan]
Float_t x6[n_points_geant4]
Float_t y2[n_points_geant4]
Float_t x4[n_points_geant4]
Float_t y4[n_points_geant4]
Float_t ratio_opt0[n_points_dolan]
Float_t ratio_pen[n_points_dolan]
Float_t ratio_opt3[n_points_dolan]
Float_t y1[n_points_dolan]
Int_t ncols_geant4_penelope
Float_t y6[n_points_geant4]
Float_t ratio_liv[n_points_dolan]
Float_t y3[n_points_geant4]
Float_t x2[n_points_geant4]
Float_t ratio_opt4[n_points_dolan]