void AngularPlot(){ int nbins = 100; double Deg = 180; double e0 = 0; double np = 0; double rseed1 = 0; double rseed2 = 0; double ang = 0; double tot = 0; // gStyle->SetOptStat(0) using namespace std; // open file that we want to look at ifstream in1; in1.open("ANGULAR.dat"); //Canvas TCanvas *c1 = new TCanvas("c1", "Angular", 1); //booking histogram TH1F *h0 = new TH1F("h0", " Total ", nbins, 0.9, Deg+0.9); //Read in from file and fill histogram //header in1 >> e0 >> np >> rseed1 >> rseed2; cout<> ang >> tot; cout<<"ang "<Fill(ang,tot); Int_t bin=h0->FindBin(ang); cout<<"BIN "<GetBinContent(bin)<<"\n "; ang=tot=0; e0=np=rseed1=rseed2=0; } in1.close(); //Drawing histos h0->SetXTitle("[Deg]"); h0->SetYTitle("[cm^{-2}]"); h0->Draw("hist"); }