{ Int_t i,j,k; ifstream fin, fin2, fin3, fin4; fin.open("MasterListCSB.txt"); Int_t n=0; while (!fin.eof()) { string blah; fin >> blah; n= n+1; } n= n/7; fin.close(); Double_t Run[n], FC4[n], FCCH[n], CS[n], Ratio[n], Pressure[n]; // 0Torr ratio is from run 16959, 527/645. Double_t Transmission = 527.0/645.0; string Energy; fin2.open("MasterListCSB.txt"); for (i= 0; i> Run[i]; fin2 >> Energy; fin2 >> CS[i]; fin2 >> FC4[i]; fin2 >> blah; fin2 >> FCCH[i]; fin2 >> Pressure[i]; if (FC4[i] != 0) Ratio[i] = Transmission*FCCH[i]/FC4[i]; else Ratio[i] = 0; cout < 1.5) {T2n = T2n+1;} } Double_t Torr2CS[T2n], Torr2Ratio[T2n]; T2n=0; for(i=0;i 1.5) {Torr2CS[T2n] = CS[i]; Torr2Ratio[T2n]= Ratio[i]; T2n = T2n+1;} } Double_t *X2T = Torr2CS; Double_t *Y2T = Torr2Ratio; TGraph *graph2 = new TGraph(T2n,X2T,Y2T); Int_t T4n=0; for(i=0;i 3.5) {T4n = T4n+1;} } Double_t Torr4CS[T4n], Torr4Ratio[T4n]; T4n=0; for(i=0;i 3.5) {Torr4CS[T4n] = CS[i]; Torr4Ratio[T4n]= Ratio[i]; T4n = T4n+1;} } Double_t *X4T = Torr4CS; Double_t *Y4T = Torr4Ratio; TGraph *graph4 = new TGraph(T4n,X4T,Y4T); Int_t T6n=0; for(i=0;i 5.5) {T6n = T6n+1;} } Double_t Torr6CS[T6n], Torr6Ratio[T6n]; T6n=0; for(i=0;i 5.5) {Torr6CS[T6n] = CS[i]; Torr6Ratio[T6n]= Ratio[i]; T6n = T6n+1;} } Double_t *X6T = Torr6CS; Double_t *Y6T = Torr6Ratio; TGraph *graph6 = new TGraph(T6n,X6T,Y6T); string names[100]; names.append("Charge State Fractions of ^{48}Ti at "); names.append(Energy); names.append(" KeV/u vs Presssure"); graph1->SetTitle(names.c_str()); graph1->GetXaxis()->SetTitle("Charge State"); graph1->GetXaxis()->CenterTitle(); graph1->GetYaxis()->SetTitle("FCCH/FC4"); graph1->GetYaxis()->SetTitleOffset(1.2); graph1->GetYaxis()->CenterTitle(); graph1->SetLineColor(2); graph1->SetMarkerColor(2); graph1->SetMarkerStyle(21); graph1->SetMarkerSize(0.6); graph1->GetXaxis()->SetRangeUser(8,17); graph1->Draw("ALP"); graph2->SetLineColor(4); // 2,4,3 graph2->SetMarkerColor(4); graph2->SetMarkerStyle(21); graph2->SetMarkerSize(0.6); graph2->Draw("LP"); graph4->SetLineColor(3); // 2,4,3 graph4->SetMarkerColor(3); graph4->SetMarkerStyle(21); graph4->SetMarkerSize(0.6); graph4->Draw("LP"); graph6->SetLineColor(1); // 2,4,3 graph6->SetMarkerColor(1); graph6->SetMarkerStyle(21); graph6->SetMarkerSize(0.6); graph6->Draw("LP"); leg = new TLegend(0.65,0.65,0.89,0.89); leg->SetHeader("Pressure in Torr"); leg->AddEntry(graph1,"1","l"); leg->AddEntry(graph2,"2","l"); leg->AddEntry(graph4,"4 ","l"); leg->AddEntry(graph6,"6","l"); leg->Draw(); }