{gROOT->Reset(); #include #include #include fstream in; in.open("25Mg_nacre1.dat",fstream::in); fstream in2; in2.open("25Mg_nacre0.1.dat",fstream::in); fstream in3; in3.open("25Mg_nacre0.01.dat",fstream::in); int n=30; double x[n],y[n],ex[n],ey[n],ratio[n]; double em[n],en[n],ratio2[n],ratio3[n],ratio4[n]; int counter=0; graph = new TGraph(); graph2 = new TGraph(); graph3 = new TGraph(); graph4 = new TGraph(); graph5 = new TGraph(); graph6 = new TGraph(); graph7 = new TGraph(); graph8 = new TGraph(); graph9 = new TGraph(); graph10 = new TGraph(); graph11 = new TGraph(); graph12 = new TGraph(); for (int i=0;i<29;i++) { counter++; in >> x[i] >> y[i]; in2 >> ex[i] >> ey[i]; in3 >> em[i] >> en[i]; ratio[i] = y[i]/ey[i]; ratio2[i] = y[i]/en[i]; graph->SetPoint(counter,x[i],ratio[i]); graph2->SetPoint(counter,x[i],ratio2[i]); } counter=0; SetGraphStyle(graph,1,1,1,22,0.6,1.2); SetGraphStyle(graph2,1,1,4,2,0.6,1.2); graph->GetXaxis()->SetTitle("Mg/Si Isotopes"); for (int i=0;i<29;i++) { counter++; in >> x[i] >> y[i]; in2 >> ex[i] >> ey[i]; in3 >> em[i] >> en[i]; ratio[i] = y[i]/ey[i]; ratio2[i] = y[i]/en[i]; graph3->SetPoint(counter,x[i],ratio[i]); graph4->SetPoint(counter,x[i],ratio2[i]); } counter=0; SetGraphStyle(graph3,1,1,1,22,0.9,1.2); SetGraphStyle(graph4,1,1,4,2,0.9,1.2); graph3->GetXaxis()->SetTitle("Ti Isotopes"); for (int i=0;i<29;i++) { counter++; in >> x[i] >> y[i]; in2 >> ex[i] >> ey[i]; in3 >> em[i] >> en[i]; ratio[i] = y[i]/ey[i]; ratio2[i] = y[i]/en[i]; graph5->SetPoint(counter,x[i],ratio[i]); graph6->SetPoint(counter,x[i],ratio2[i]); } counter=0; SetGraphStyle(graph5,1,1,1,22,0.9,1.3); SetGraphStyle(graph6,1,1,4,2,0.9,1.3); graph5->GetXaxis()->SetTitle("Sr Isotopes"); for (int i=0;i<19;i++) { counter++; in >> x[i] >> y[i]; in2 >> ex[i] >> ey[i]; in3 >> em[i] >> en[i]; ratio[i] = y[i]/ey[i]; ratio2[i] = y[i]/en[i]; graph7->SetPoint(counter,x[i],ratio[i]); graph8->SetPoint(counter,x[i],ratio2[i]); } counter=0; SetGraphStyle(graph7,1,1,1,22,0.9,1.3); SetGraphStyle(graph8,1,1,4,2,0.9,1.3); graph7->GetXaxis()->SetTitle("Zr Isotopes"); for (int i=0;i<29;i++) { counter++; in >> x[i] >> y[i]; in2 >> ex[i] >> ey[i]; in3 >> em[i] >> en[i]; if(i<19) { ratio[i] = 0/ey[i]; ratio2[i] = 0/en[i]; } else{ ratio[i] = y[i]/ey[i]; ratio2[i] = y[i]/en[i]; } graph9->SetPoint(counter,x[i],ratio[i]); graph10->SetPoint(counter,x[i],ratio2[i]); } counter=0; SetGraphStyle(graph9,1,1,1,22,0.9,1.3); SetGraphStyle(graph10,1,1,4,2,0.9,1.3); graph9->GetXaxis()->SetTitle("Mo Isotopes"); for (int i=0;i<29;i++) { counter++; in >> x[i] >> y[i]; in2 >> ex[i] >> ey[i]; in3 >> em[i] >> en[i]; ratio[i] = y[i]/ey[i]; ratio2[i] = y[i]/en[i]; graph11->SetPoint(counter,x[i],ratio[i]); graph12->SetPoint(counter,x[i],ratio2[i]); } counter=0; SetGraphStyle(graph11,1,1,1,22,0.9,1.2); SetGraphStyle(graph12,1,1,4,2,0.9,1.2); graph11->GetXaxis()->SetTitle("Ba Isotopes"); in.close(); in2.close(); in3.close(); fun1 = new TF1("fun1","1",0,140); fun1->SetLineWidth(2); fun1->SetLineStyle(3); TLegend* leg1 = new TLegend(0.60,0.82,0.89,0.98); leg1->SetFillColor(0); leg1->SetTextSize(0.023); leg1->SetTextAlign(32); leg1->AddEntry(graph,"^{25}Mg(#alpha,n)^{28}Si NACRE x0.1","P"); leg1->AddEntry(graph2,"^{25}Mg(#alpha,n)^{28}Si NACRE x0.01","P"); TLatex *t = new TLatex(); t->SetNDC(kTRUE); t->SetTextAlign(13); t->SetTextFont(63); t->SetTextSizePixels(18); t->DrawLatex(0.10,0.98,"T_{9} = 1.5 , #rho = 10^{6}, T= 1 a, End of Ne shell" ); f1 = new TFile("ppn_variation.root", "RECREATE"); c1 = new TCanvas("c1","PPN Calculations",250, 0, 850,650); c1->SetFillColor(0); c1->SetBorderSize(0); c1->SetBorderMode(0); c1->ToggleEditor(); c1->ToggleEventStatus(); c1->ToggleToolTips(); pad1 = new TPad("pad1","Uncorrected",0.01,0.01,0.99,0.99); pad2 = new TPad("pad2","Uncorrected",0.01,0.01,0.99,0.99); pad3 = new TPad("pad3","Uncorrected",0.01,0.01,0.99,0.99); pad4 = new TPad("pad4","Uncorrected",0.01,0.01,0.99,0.99); pad5 = new TPad("pad5","Uncorrected",0.01,0.01,0.99,0.99); pad6 = new TPad("pad6","Uncorrected",0.01,0.01,0.99,0.99); SetPadStyle(pad1); SetPadStyle(pad2); SetPadStyle(pad3); SetPadStyle(pad4); SetPadStyle(pad5); SetPadStyle(pad6); c1->Divide(3,2); c1->cd(1); pad1->Draw(); pad1->cd(); graph->GetXaxis()->SetRangeUser(25,30); graph2->GetXaxis()->SetRangeUser(25,30); graph->GetXaxis()->SetNdivisions(107, kTRUE); graph2->GetXaxis()->SetNdivisions(107, kTRUE); graph->Draw("AP"); graph2->Draw("SAMEP"); fun1->Draw("LSAME"); pad1->cd(); c1->cd(2); pad2->Draw(); pad2->cd(); graph3->GetXaxis()->SetRangeUser(46,50); graph4->GetXaxis()->SetRangeUser(46,50); graph3->GetXaxis()->SetNdivisions(105, kTRUE); graph4->GetXaxis()->SetNdivisions(105, kTRUE); graph3->Draw("AP"); graph4->Draw("SAMEP"); fun1->Draw("LSAME"); pad2->cd(); c1->cd(); c1->cd(3); pad3->Draw(); pad3->cd(); graph5->GetXaxis()->SetRangeUser(86,89); graph6->GetXaxis()->SetRangeUser(86,89); graph5->GetXaxis()->SetNdivisions(105, kTRUE); graph6->GetXaxis()->SetNdivisions(105, kTRUE); graph5->Draw("AP"); graph6->Draw("SAMEP"); fun1->Draw("LSAME"); pad3->cd(); c1->cd(4); pad4->Draw(); pad4->cd(); graph7->GetXaxis()->SetRangeUser(90,96); graph8->GetXaxis()->SetRangeUser(90,96); graph7->GetXaxis()->SetNdivisions(108, kTRUE); graph8->GetXaxis()->SetNdivisions(108, kTRUE); graph7->Draw("AP"); graph8->Draw("SAMEP"); fun1->Draw("LSAME"); pad4->cd(); c1->cd(); c1->cd(5); pad5->Draw(); pad5->cd(); graph9->GetXaxis()->SetRangeUser(94,100); graph10->GetXaxis()->SetRangeUser(94,100); graph9->GetXaxis()->SetNdivisions(108, kTRUE); graph10->GetXaxis()->SetNdivisions(108, kTRUE); graph9->Draw("AP"); graph10->Draw("SAMEP"); fun1->Draw("LSAME"); pad5->cd(); c1->cd(); c1->cd(6); pad6->Draw(); pad6->cd(); graph11->GetXaxis()->SetRangeUser(134,138); graph12->GetXaxis()->SetRangeUser(134,138); graph11->GetXaxis()->SetNdivisions(105, kTRUE); graph12->GetXaxis()->SetNdivisions(105, kTRUE); graph11->Draw("AP"); graph12->Draw("SAMEP"); fun1->Draw("LSAME"); pad6->cd(); c1->cd(); // return c1; }