3 FILE * fg1=fopen(
"dolan.txt",
"r");
12 ncols_dolan = fscanf(fg1,
"%f %f", &x, &y);
13 if (ncols_dolan<0)
break;
24 FILE *
fg2=fopen(
"geant4_6711_dose.txt",
"r");
32 ncols_geant4 = fscanf(fg2,
"%f %f", &x, &y);
33 if (ncols_geant4<0)
break;
41 TGraph *
gr1 =
new TGraph (nlines1, x1, y1);
42 TGraph *
gr2 =
new TGraph (nlines2, x2, y2);
44 TCanvas *
c1 =
new TCanvas(
"c1",
"Graph Draw Options", 200, 10, 600, 400);
50 gr1->SetTitle(
"Dose rate distribution");
51 gr1->GetXaxis()->SetTitle(
"Distance from the centre (cm)");
52 gr1->GetYaxis()->SetTitle(
"Normalised dose rate distribution");
54 gr1->SetMarkerColor(1);
55 gr1->SetMarkerStyle(20);
59 gr2->SetMarkerColor(2);
60 gr2->SetMarkerStyle(21);
61 gr2->SetMarkerSize(0.5);
65 TLegend *
leg =
new TLegend(0.3, 0.5, 0.6, 0.8);
67 leg->AddEntry(gr1,
"Reference data",
"lp");
68 leg->AddEntry(gr2,
"Geant4 - 20B Events",
"lp");