void fig5() { TLegend* legend = 0L; ofstream fout("out.txt"); ifstream fin("Neon_Density_at_15C.txt"); TCanvas *c1 = new TCanvas("c1","A Simple Graph Example",200,10,800,600); c1->SetFillColor(0); c1->SetGrid(); gStyle->SetOptDate(0); gStyle->SetGridStyle(1); gStyle->SetGridColor(kGray); gStyle->SetOptTitle(0); c1->SetLogx(); c1->SetLogy(); Double_t T[64], P[64], D[64]; Double_t tt, pp, dd, vv, ieie, enen, etet, cvcv, cpcp, ssss, jtjt, vivi,tctc; const Int_t m = 11, mm=19, mmm = 5; Double_t rr[m] = {2, 10, 20, 30, 40, 50, 60, 70, 80, 90, 110 }; Double_t ss[m] = {0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,10. }; Double_t magbx[mm] ={12.0082, 12.866, 13.7237, 13.7237, 14.5814, 15.4392, 16.2969, 17.1546, 18.8701,20.5855, 24.0165, 27.4474, 34.3092, 41.1711, 48.0329, 54.8948, 60.0412,68.6185, 77.1958}; Double_t magby[mm] ={0.0089438, 0.0115829, 0.0143049, 0.0143049, 0.0176354, 0.0208802, 0.0254738, 0.0299884, 0.0396646, 0.0511617, 0.0793206, 0.112954, 0.194608, 0.292565, 0.401662, 0.520297, 0.617216, 0.782162, 0.957224}; Double_t Rorkx[mmm] = {15.2283, 20.9016, 29.8594, 44.7891, 59.7188 }; Double_t Rorky[mmm] = {0.0223946, 0.0582258, 0.137353, 0.343383, 0.567329}; const Int_t n45=4, n60=6, n100=6, n150=6, m45=4, m60=11, m100=12, m150=14; Double_t r45a[n45] = {(0.2217+0.2176+0.2199)/3.,(0.2267+0.2274+0.2249)/3., (0.2312+0.2274+0.2296)/3.,(0.2378+0.2370+0.2347)/3.}; Double_t g45a[n45] = {58.16, 107.74, 145.51, 66.58}; Double_t Coef45a[n45]= {22.12, 22.12, 22.12, 91.54}; Double_t r60a[n60] = {(0.2101+0.2080+0.2107)/3., (0.2189+0.2225+0.2201)/3., (0.2307+0.2275+0.2303)/3., (0.2398+0.2423+0.2402)/3., (0.2491+0.2519+0.2500)/3., (0.2591+0.2616+0.2597)/3.}; Double_t g60a[n60] = {25.66, 63.62, 60.39, 82.01, 99.69, 101.89}; Double_t Coef60a[n60]= {9.01, 9.01, 22.12, 45.73, 91.54, 225.18}; Double_t r100a[n100] = {(0.2385+0.2423+0.2405)/3., (0.2487+0.2523+0.2503)/3., (0.2586+0.2616+0.2600)/3., (0.2723+0.2715+0.2696)/3., (0.2784+0.2811+0.2796)/3., (0.2830+0.2863+0.2843)/3.}; Double_t g100a[n100] = {47.96, 102.71, 88.47, 102.26, 99.92, 152.05}; Double_t Coef100a[n100]= {9.01, 9.01, 22.12, 45.73, 91.54, 91.54}; Double_t r150a[n150] = {(0.2794+0.2815+0.2796)/3., (0.2884+0.2914+0.2893)/3., (0.2987+0.3010+0.2991)/3., (0.3082+0.3108+0.3090)/3., (0.3184+0.3206+0.3184)/3., (0.3328+0.3305+0.3282)/3.}; Double_t g150a[n150] = {65.00, 120.49, 93.64, 86.48, 168.81, 194.15}; Double_t Coef150a[n150]= {9.01, 9.01, 22.12, 45.73, 45.73, 91.54}; const Int_t m150=7, m100=2; Double_t r150[m150] = {0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47}; Double_t g150[m150] = { 19.14, 27.86, 40.78, 62.14, 102.44, 162.00, 102.87}; Double_t Coef150[m150]= {9.01, 9.01, 9.01, 9.01, 9.01, 9.01, 22.12}; Double_t r100[m100] = {0.39, 0.40}; Double_t g100[m100] = {79.17, 146.39}; Double_t Coef100[m100]= {9.01, 9.01}; const Int_t k =12, l=11, lm=9; Double_t e0[l] = {2,3,5,7,10,15,20,30, 50, 70, 100}; Double_t a0[l] = {0.00025, 0.00050, 0.00150, 0.00280, 0.00460, 0.00750, 0.0097, 0.0120, 0.0138, 0.0149, 0.0154}; Double_t e001[k] = {1, 2,3,5,7,10,15,20,30, 50, 70, 100}; Double_t a001[k] = {0.0095, 0.0156, 0.0180, 0.0177, 0.0170, 0.0168, 0.0162, 0.0160, 0.0149, 0.0157, 0.0165, 0.0162}; Double_t e01[k] = {1, 2,3,5,7,10,15,20,30, 50, 70, 100}; Double_t a01[k] = {0.0106, 0.0260, 0.0285, 0.0283, 0.0280, 0.0283, 0.0254, 0.0245, 0.0238, 0.0202, 0.0194, 0.0161}; Double_t e1[k] = {1, 2,3,5,7,10,15,20,30, 50, 70, 100}; Double_t a1[k] = {0.00040, 0.0080, 0.0140, 0.0200, 0.0230, 0.0248, 0.0263, 0.0269, 0.0270, 0.0231, 0.0229, 0.0219}; Double_t e10[lm] = {5,7,10,15,20,30, 50, 70, 100}; Double_t a10[lm] = {0.00138, 0.00289, 0.00640, 0.00939, 0.0120, 0.0172, 0.0202, 0.0208, 0.0197}; Double_t el[8] = {2.05, 3.1, 5.1, 7.0, 10.0, 15.0, 20., 48.0}; Double_t al[8] = {0.0005, 0.0016, 0.0075, 0.0195, 0.046, 0.115, 0.19, 0.69}; Double_t mbx10[34] = {3.73434, 4.02159, 4.30885, 4.59611, 5.17062, 5.74513, 6.46327, 7.18142,7.89956, 8.6177, 9.33584, 10.054, 10.7721, 11.4903, 12.9265, 14.3628 , 15.7991, 17.2354, 18.6717 , 20.108, 21.5442, 22.9805, 24.4168, 25.8531, 27.2894, 28.7257 , 31.5982, 34.4708, 40.2159, 45.9611 57.4513, 68.9416, 80.4318, 91.9221 }; Double_t mby10[34] = {0.000224046, 0.000434102, 0.000698895, 0.00119658, 0.00231773, 0.00412759, 0.00674766, 0.0105455, 0.0149984, 0.0200271, 0.0256366, 0.0322101, 0.0392545, 0.0469173, 0.0638524, 0.0823408, 0.103151, 0.124616, 0.148022, 0.172312, 0.197734, 0.224145, 0.25115, 0.278584, 0.3076, 0.336197, 0.395953, 0.457286, 0.58254, 0.712527, 0.974376, 1.23608, 1.49218, 1.73636 }; Double_t cScale = 0.334903; Double_t a,b,c; Double_t dgem, efflength, epsilon, ConvertToAtomsPerCM3; epsilon = 0.3; efflength = 1.722; dgem = 0.005 * efflength; ConvertToAtomsPerCM3 = 2.98426 * 10**5; for (Int_t i=0;i<64;i++) { fin >> tt >> pp >> dd >> vv >> ieie >> enen >> etet >> cvcv >> cpcp >> ssss >> jtjt >> vivi >> tctc; T[i] = tt; P[i] = pp; D[i] = dd; cout<< i << " " << P[i] << endl; } for (Int_t i=0;iSetLineColor(4); gr->SetLineWidth(4); gr->SetMarkerColor(4); gr->SetMarkerStyle(21); gr->GetYaxis()->SetTitle("#alpha/N (10^{-17} cm^{2}) "); gr->GetXaxis()->SetTitle("E/N (Td) "); gr->SetMaximum(2.2); gr->SetMinimum(0.01); gr->Draw("AP"); gStyle->SetOptFit(000); gr1 = new TGraph(mm,magbx,magby); gr1->SetLineColor(1); gr1->SetLineWidth(1); gr1->SetMarkerColor(1); gr1->SetMarkerStyle(21); gr1->Draw("L"); gr2 = new TGraph(mmm,Rorkx,Rorky); gr2->SetLineColor(1); gr2->SetLineWidth(1); gr2->SetMarkerColor(1); gr2->SetMarkerStyle(22); // gr2->Draw("P"); gr3 = new TGraph(n45,r45a,g45a); gr3->SetLineColor(1); gr3->SetLineWidth(2); gr3->SetMarkerColor(1); gr3->SetMarkerStyle(21); gr3->Draw("P"); gr3->Fit("expo"); gr3->GetFunction("expo")->SetLineWidth(1); gr3->GetFunction("expo")->SetLineColor(1); gr3->GetFunction("expo")->SetLineStyle(1); a = gr3->GetFunction("expo")->GetParameter("Constant"); b = gr3->GetFunction("expo")->GetParameter("Slope"); c = 45.; fout<SetLineColor(1); gr4->SetLineWidth(2); gr4->SetMarkerColor(1); gr4->SetMarkerStyle(21); gr4->Draw("P"); gr4->Fit("expo"); gr4->GetFunction("expo")->SetLineWidth(1); gr4->GetFunction("expo")->SetLineColor(1); gr4->GetFunction("expo")->SetLineStyle(2); a = gr4->GetFunction("expo")->GetParameter("Constant"); b = gr4->GetFunction("expo")->GetParameter("Slope"); c = 60.; fout<SetLineColor(1); gr5->SetLineWidth(2); gr5->SetMarkerColor(1); gr5->SetMarkerStyle(21); gr5->Draw("P"); gr5->Fit("expo"); gr5->GetFunction("expo")->SetLineWidth(1); gr5->GetFunction("expo")->SetLineColor(1); gr5->GetFunction("expo")->SetLineStyle(3); a = gr5->GetFunction("expo")->GetParameter("Constant"); b = gr5->GetFunction("expo")->GetParameter("Slope"); c = 100.; fout<SetLineColor(1); gr6->SetLineWidth(2); gr6->SetMarkerColor(1); gr6->SetMarkerStyle(21); gr6->Draw("P"); gr6->Fit("expo"); gr6->GetFunction("expo")->SetLineWidth(1); gr6->GetFunction("expo")->SetLineColor(1); gr6->GetFunction("expo")->SetLineStyle(4); a = gr6->GetFunction("expo")->GetParameter("Constant"); b = gr6->GetFunction("expo")->GetParameter("Slope"); c = 150.; fout<SetLineColor(1); gr7->SetLineWidth(2); gr7->SetMarkerColor(1); gr7->SetMarkerStyle(25); gr7->Draw("P"); gr7->Fit("expo"); gr7->GetFunction("expo")->SetLineWidth(1); gr7->GetFunction("expo")->SetLineColor(1); gr7->GetFunction("expo")->SetLineStyle(5); a = gr7->GetFunction("expo")->GetParameter("Constant"); b = gr7->GetFunction("expo")->GetParameter("Slope"); c = 100.; fout<SetLineColor(1); gr8->SetLineWidth(2); gr8->SetMarkerColor(1); gr8->SetMarkerStyle(25); gr8->Draw("P"); gr8->Fit("expo"); gr8->GetFunction("expo")->SetLineWidth(1); gr8->GetFunction("expo")->SetLineColor(1); gr8->GetFunction("expo")->SetLineStyle(6); a = gr8->GetFunction("expo")->GetParameter("Constant"); b = gr8->GetFunction("expo")->GetParameter("Slope"); c = 150.; fout<SetLineColor(1); gr13->SetLineWidth(1); gr13->SetMarkerColor(1); gr13->SetMarkerStyle(24); gr13->SetLineStyle(4); gr13->Draw("LP"); gr14 = new TGraph(l,e001,a001); gr14->SetLineColor(1); gr14->SetLineWidth(1); gr14->SetMarkerColor(1); gr14->SetLineStyle(4); gr14->SetMarkerStyle(25); gr14->Draw("PL"); gr15 = new TGraph(l,e01,a01); gr15->SetLineColor(1); gr15->SetLineWidth(1); gr15->SetMarkerColor(1); gr15->SetMarkerStyle(26); gr15->SetLineStyle(4); gr15->Draw("PL"); gr16 = new TGraph(l,e1,a1); gr16->SetLineColor(1); gr16->SetLineWidth(1); gr16->SetMarkerColor(1); gr16->SetMarkerStyle(27); gr16->SetLineStyle(4); gr16->Draw("PL"); gr17 = new TGraph(lm,e10,a10); gr17->SetLineColor(1); gr17->SetLineWidth(1); gr17->SetMarkerColor(1); gr17->SetMarkerStyle(28); gr17->SetLineStyle(4); gr17->Draw("PL"); gr18 = new TGraph(8,el,al); gr18->SetLineColor(1); gr18->SetLineWidth(1); gr18->SetMarkerColor(1); gr18->SetMarkerStyle(30); // gr18->Draw("PL"); gr19 = new TGraph(34,mbx10,mby10); gr19->SetLineColor(1); gr19->SetLineWidth(1); gr19->SetMarkerColor(1); gr19->SetMarkerStyle(28); gr19->SetLineStyle(1); gr19->Draw("L"); TLatex *t = new TLatex(); t->SetNDC(); t->SetTextFont(32); t->SetTextAlign(12); t->SetTextSize(0.04); const Int_t k30=5, k45=4, k60=4, k100=4, k150=5; Double_t r30k[k30] = {(0.1823+0.1789+0.1809)/3.,(0.1874+0.1836+0.1857)/3., (0.1925+0.1886+0.1907)/3.,(0.2020+0.1986+0.2003)/3., (0.2119+0.2082+0.2101)/3.}; Double_t g30k[k30] = {64.50, 109.60, 71.13, 93.16, 129.39}; Double_t Coef30k[k30]= {9.01, 9.01, 22.12, 45.73, 91.54}; Double_t r45k[k45] = {(0.1873+0.1888+0.1907)/3.,(0.2020+0.1985+0.2003)/3., (0.2115+0.2084+0.2102)/3.,(0.2216+0.2181+0.2200)/3.}; Double_t g45k[k45] = { 96.97, 123.86, 163.47, 219.94}; Double_t Coef45k[k45]= {9.01, 22.12, 45.73, 91.54}; Double_t r60k[k60] = {(0.2023+0.1984+0.2005)/3., (0.2120+0.2084+0.2102)/3., (0.2214+0.2181+0.2200)/3., (0.2322+0.2279+0.2299)/3.}; Double_t g60k[k60] = {128.59, 141.84, 182.56, 239.4}; Double_t Coef60k[k60]= {9.01, 22.12, 45.73, 91.54}; Double_t r100k[k100] = {(0.2280+0.2327+0.2303)/3., (0.2414+0.2376+0.2400)/3., (0.2507+0.2473+0.2497)/3., (0.2576+0.2621+0.2598)/3.}; Double_t g100k[k100] = {64.30, 160.29, 195.07, 102.57}; Double_t Coef100k[k100]= {22.12, 22.12, 45.73, 225.18}; Double_t r150k[k150] = {(0.2575+0.2620+0.2602)/3., (0.2673+0.2718+0.2700)/3., (0.2771+0.2813+0.2796)/3., (0.2873+0.2913+0.2896)/3., (0.2982+0.3012+0.2994)/3.}; Double_t g150k[k150] = {69.40, 158.89, 150.42, 167.95, 79.00}; Double_t Coef150k[k150]= {9.01, 9.01, 22.12, 45.73, 225.18 }; for (Int_t i=0;iSetLineColor(1); gr31->SetLineWidth(2); gr31->SetMarkerColor(1); gr31->SetMarkerStyle(24); gr31->Draw("P"); gr31->Fit("expo"); gr31->GetFunction("expo")->SetLineWidth(1); gr31->GetFunction("expo")->SetLineColor(1); gr31->GetFunction("expo")->SetLineStyle(1); a = gr31->GetFunction("expo")->GetParameter("Constant"); b = gr31->GetFunction("expo")->GetParameter("Slope"); c = 30.; fout<SetLineColor(1); gr11->SetLineWidth(2); gr11->SetMarkerColor(1); gr11->SetMarkerStyle(24); gr11->Draw("P"); gr11->Fit("expo"); gr11->GetFunction("expo")->SetLineWidth(1); gr11->GetFunction("expo")->SetLineColor(1); gr11->GetFunction("expo")->SetLineStyle(2); a = gr11->GetFunction("expo")->GetParameter("Constant"); b = gr11->GetFunction("expo")->GetParameter("Slope"); c = 45.; fout<SetLineColor(1); gr41->SetLineWidth(2); gr41->SetMarkerColor(1); gr41->SetMarkerStyle(24); gr41->Draw("P"); gr41->Fit("expo"); gr41->GetFunction("expo")->SetLineWidth(1); gr41->GetFunction("expo")->SetLineColor(1); gr41->GetFunction("expo")->SetLineStyle(3); a = gr41->GetFunction("expo")->GetParameter("Constant"); b = gr41->GetFunction("expo")->GetParameter("Slope"); c = 60.; fout<SetLineColor(1); gr51->SetLineWidth(2); gr51->SetMarkerColor(1); gr51->SetMarkerStyle(24); gr51->Draw("P"); gr51->Fit("expo"); gr51->GetFunction("expo")->SetLineWidth(1); gr51->GetFunction("expo")->SetLineColor(1); gr51->GetFunction("expo")->SetLineStyle(4); a = gr51->GetFunction("expo")->GetParameter("Constant"); b = gr51->GetFunction("expo")->GetParameter("Slope"); c = 100.; fout<SetLineColor(1); gr61->SetLineWidth(2); gr61->SetMarkerColor(1); gr61->SetMarkerStyle(24); gr61->Draw("P"); gr61->Fit("expo"); gr61->GetFunction("expo")->SetLineWidth(1); gr61->GetFunction("expo")->SetLineColor(1); gr51->GetFunction("expo")->SetLineStyle(5); a = gr61->GetFunction("expo")->GetParameter("Constant"); b = gr61->GetFunction("expo")->GetParameter("Slope"); c = 150.; fout<SetTextColor(1); t->DrawLatex(0.15,0.87,"Neon+1.0% & 0.1% & 0.01% H_{2} T=293K"); t->DrawLatex(0.51,0.20,"MAGBOLTZ 0.0% H_{2}"); t->DrawLatex(0.59,0.30,"MAGBOLTZ 10% H_{2}"); t->DrawLatex(0.78,0.7,"H_{2} 0.0%"); t->DrawLatex(0.21,0.42,"H_{2} 0.01%"); t->DrawLatex(0.35,0.62,"H_{2} 0.1%"); t->DrawLatex(0.31,0.22,"H_{2} 1.0%"); t->DrawLatex(0.435,0.32,"H_{2} 10.0%"); t->DrawLatex(0.49,0.50,"150"); t->DrawLatex(0.54,0.55,"100"); t->DrawLatex(0.62,0.63,"60"); t->DrawLatex(0.67,0.68,"45"); t->DrawLatex(0.72,0.73,"30"); c1->SaveAs("fig5.eps"); c1->SaveAs("fig5.pdf"); }