File indexing completed on 2025-02-23 09:20:59
0001
0002 {
0003 gROOT->Reset();
0004
0005
0006 TFile f1("./19um-local.root");
0007 TH1D* h1 = (TH1D*) f1.Get("h12");
0008 h1->SetTitle("Angular distribution of 15.7 MeV e- after 19um Au foil");
0009
0010 h1->GetXaxis()->SetTitle("theta (deg)");
0011 h1->GetYaxis()->SetTitle("dN/dOmega");
0012 h1->SetStats(kFALSE);
0013 h1->SetLineColor(kOrange);
0014 h1->Draw("HIST");
0015
0016 TFile f2("./19um-opt3.root");
0017 TH1D* h2 = (TH1D*) f2.Get("h12");
0018 h2->SetStats(kFALSE);
0019 h2->SetLineColor(kBlue);
0020 h2->Draw("SAME HIST");
0021
0022 TFile f3("./19um-opt4.root");
0023 TH1D* h3 = (TH1D*) f3.Get("h12");
0024 h3->SetStats(kFALSE);
0025 h3->SetLineColor(kGreen);
0026 h3->Draw("SAME HIST");
0027
0028
0029
0030
0031
0032
0033
0034 ifstream in;
0035 in.open("./19um-wwols.ascii");
0036
0037
0038 TMarker *pt;
0039 Double_t x, y;
0040
0041 int nbdata = 0;
0042 in >> nbdata;
0043 for ( int i = 0 ; i < nbdata ; i++ ) {
0044 in >> x >> y ;
0045 if (!in.good()) break;
0046 pt = new TMarker(x,y,23);
0047 pt->SetMarkerColor(kMagenta);
0048 pt->Draw();
0049 }
0050 in.close();
0051
0052
0053 TLegend* legend = new TLegend(0.6,0.5,0.8,0.68);
0054 legend->AddEntry(h1,"local ","l");
0055 legend->AddEntry(h2,"opt3 ","l");
0056 legend->AddEntry(h3,"opt4","l");
0057 legend->AddEntry(pt,"Hanson data","P");
0058 legend->Draw();
0059 }