File indexing completed on 2025-02-23 09:20:50
0001
0002 {
0003 gROOT->Reset();
0004
0005
0006 TFile f1("./Ta_1000keV_opt3.root");
0007 TH1D* h1 = (TH1D*) f1.Get("8");
0008 h1->SetTitle("Depth dose distribution of 1000 keV e- in Ta");
0009 h1->GetXaxis()->SetTitle("Edep (Mev.cm2/g) along x/r0 x/r0");
0010 h1->GetYaxis()->SetTitle("MeV*cm2/g");
0011 h1->SetStats(kFALSE);
0012 h1->SetLineColor(4);
0013 h1->Draw("HIST");
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 ifstream in;
0028 in.open("./data/Ta_1000keV.ascii");
0029
0030 TMarker *pt;
0031 Double_t x, y;
0032
0033 int nbdata = 0;
0034 in >> nbdata;
0035 for ( int i = 0 ; i < nbdata ; i++ ) {
0036 in >> x >> y ;
0037 if (!in.good()) break;
0038 pt = new TMarker(x,y,22);
0039 pt->SetMarkerColor(kRed);
0040 pt->Draw();
0041 }
0042 in.close();
0043
0044
0045 TLegend* legend = new TLegend(0.6,0.55,0.8,0.68);
0046 legend->AddEntry(h1,"ref10-opt3 ","l");
0047
0048 legend->AddEntry(pt,"Sandia data","P");
0049 legend->Draw();
0050 }