void original() { TCanvas* c = new TCanvas(); Float_t Min[5]; Float_t Mean[5] = {0.0,0.0,0.0,0.0,0.0}; Float_t X[5] = {100,1000,2000,4000,8000}; Float_t y; Int_t t =0; //Read File 100_stats ifstream inp; inp.open("100_stats.txt"); TNtuple *stats100 = new TNtuple("stats100","data from ascii file","x:y"); while (1) { inp >> y; if (!inp.good()) break; stats100->Fill(100,y); } inp.close(); //Read File 1000_stats inp.open("1000_stats.txt"); TNtuple *stats1000 = new TNtuple("stats1000","data from ascii file","x:y"); while (1) { inp >> y; if (!inp.good()) break; stats1000->Fill(1000,y); } inp.close(); //Read File 2000_stats inp.open("2000_stats.txt"); TNtuple *stats2000 = new TNtuple("stats2000","data from ascii file","x:y"); while (1) { inp >> y; if (!inp.good()) break; stats2000->Fill(2000,y); } inp.close(); //Read File 4000_stats inp.open("4000_stats.txt"); TNtuple *stats4000 = new TNtuple("stats4000","data from ascii file","x:y"); while (1) { inp >> y; if (!inp.good()) break; stats4000->Fill(4000,y); } inp.close(); //Read File 8000_stats inp.open("8000_stats.txt"); TNtuple *stats8000 = new TNtuple("stats8000","data from ascii file","x:y"); while (1) { inp >> y; if (!inp.good()) break; stats8000->Fill(8000,y); } inp.close(); stats100->SetBranchAddress("y",&y); stats1000->SetBranchAddress("y",&y); stats2000->SetBranchAddress("y",&y); stats4000->SetBranchAddress("y",&y); stats8000->SetBranchAddress("y",&y); t = stats100->GetEntries(); for (Int_t i=0; iGetEntry(i); if (i == 0) Min[0] = y; else if (Min[0] > y) Min[0] = y; Mean[0] += y; //Stats_1000 stats1000->GetEntry(i); if (i == 0) Min[1] = y; else if (Min[1] > y) Min[1] = y; Mean[1] += y; //Stats_2000 stats2000->GetEntry(i); if (i == 0) Min[2] = y; else if (Min[2] > y) Min[2] = y; Mean[2] += y; //Stats_4000 stats4000->GetEntry(i); if (i == 0) Min[3] = y; else if (Min[3] > y) Min[3] = y; Mean[3] += y; //Stats_8000 stats8000->GetEntry(i); if (i == 0) Min[4] = y; else if (Min[4] > y) Min[4] = y; Mean[4] += y; } Mean[0] /= t; Mean[1] /= t; Mean[2] /= t; Mean[3] /= t; Mean[4] /= t; TGraph *G1 = new TGraph(5,X,Mean); G1->SetTitle(""); G1->GetYaxis()->SetRangeUser(4,27); G1->GetXaxis()->SetRangeUser(0,8200); G1->GetXaxis()->SetTitle("Amount of samples"); G1->GetXaxis()->CenterTitle(); G1->GetYaxis()->SetTitle("Penalty Value"); G1->GetYaxis()->CenterTitle(); G1->GetXaxis()->SetTitleOffset(1.2); G1->GetYaxis()->SetTitleOffset(0.8); G1->SetLineWidth(2); G1->SetLineColor(38); G1->Draw("APL"); gPad->SetGrid(1,1); TMarker *m; for (Int_t i=0; iGetEntry(i); m = new TMarker(100,y, 7); m->SetMarkerStyle(20); m->SetMarkerColor(30); if (y == Min[0]) m->SetMarkerColor(46); m->Draw(); stats1000->GetEntry(i); m = new TMarker(1000,y, 7); m->SetMarkerStyle(20); m->SetMarkerColor(30); if (y == Min[1]) m->SetMarkerColor(46); m->Draw(); stats2000->GetEntry(i); m = new TMarker(2000,y, 7); m->SetMarkerStyle(20); m->SetMarkerColor(30); if (y == Min[2]) m->SetMarkerColor(46); m->Draw(); stats4000->GetEntry(i); m = new TMarker(4000,y, 7); m->SetMarkerStyle(20); m->SetMarkerColor(30); if (y == Min[3]) m->SetMarkerColor(46); m->Draw(); stats8000->GetEntry(i); m = new TMarker(8000,y, 7); m->SetMarkerStyle(20); m->SetMarkerColor(30); if (y == Min[4]) m->SetMarkerColor(46); m->Draw(); } c->Update(); gPad->Print("Stats.tex"); gPad->Print("Stats.pdf"); }