File indexing completed on 2025-02-23 09:22:13
0001
0002 {
0003 gROOT->Reset();
0004
0005
0006 TFile f("./Au3.local.root");
0007 TH1D* h1d = (TH1D*) f.Get("4");
0008 h1d->SetTitle("Fluence distribution of 13 MeV e- in Au (93.7 mg/cm2)");
0009 h1d->GetXaxis()->SetTitle("r (mm)");
0010 h1d->GetYaxis()->SetTitle("Fluence");
0011 h1d->SetStats(kFALSE);
0012 h1d->Draw("HIST");
0013
0014
0015
0016
0017
0018 ifstream in;
0019 in.open("../data/Au3.13MeV.ascii");
0020
0021 TMarker *pt;
0022 Double_t x, y;
0023
0024 int nbdata = 0;
0025 in >> nbdata;
0026 for ( int i = 0 ; i < nbdata ; i++ ) {
0027 in >> x >> y ;
0028 if (!in.good()) break;
0029 pt = new TMarker(x,y,22);
0030 pt->SetMarkerColor(kRed);
0031 pt->Draw();
0032 }
0033 in.close();
0034
0035
0036 TLegend* legend = new TLegend(0.6,0.55,0.8,0.68);
0037 legend->AddEntry(h1d,"msc95","l");
0038 legend->AddEntry(pt,"Faddegon data","P");
0039 legend->Draw();
0040 }