{
  gROOT->Reset();   // reset global variables    

   gROOT->SetStyle("Plain");
   gStyle->SetOptStat(0);
   gStyle->SetOptFit(111111);
//   gStyle->SetOptFit(0);
   gStyle->SetStatX(0.8);
   gStyle->SetStatY(0.4);
   gStyle->SetStatW(0.2);
   gStyle->SetStatH(0.1);
   gStyle->SetNdivisions(503,"X");
   gStyle->SetNdivisions(505,"Y");
   gStyle->SetLabelOffset(0.008,"X");
   gStyle->SetLabelSize(0.08,"X");
   gStyle->SetTitleSize(0.08,"X");
   gStyle->SetTitleOffset(1.0,"X");
   gStyle->SetLabelOffset(0.02,"Y");
   gStyle->SetLabelSize(0.08,"Y");
   gStyle->SetTitleSize(0.08,"Y");
   gStyle->SetTitleOffset(1.4,"Y");
   gStyle->SetPadTopMargin(0.15);
   gStyle->SetPadBottomMargin(0.2);
   gStyle->SetPadLeftMargin(0.22);
   gStyle->SetPadRightMargin(0.15);
   gStyle->SetLineWidth(1);
   gStyle->SetMarkerStyle(20);
   gStyle->SetMarkerSize(1.2);
   gStyle->SetMarkerColor(2);
  gStyle->SetCanvasColor(10);
  gStyle->SetFrameFillColor(10);

  const Int_t n = 5;   // number of points to be plotted
  Float_t x[n], y[n], z[n];

  ifstream data;       // declare a file to input from
  data.open("photoeffekt.data"); 
  for(Int_t i=0;i<n;i++){
    data>>x[i]>>y[i];
    z[i]= 3.0E17/x[i];
    x[i]= 1.6E-19*y[i];
    cout << "eU= " << x[i] << "  nu= " << z[i] << endl;
  }    
  
  TCanvas* c=new TCanvas("c","Omega",100,100,900,700);

  c->Divide(1,1);
  c->cd(1);
  TGraph* reference = new TGraph(n, z, x); 
  reference->UseCurrentStyle();
  reference->SetTitle("Photoeffekt");
  reference->GetYaxis()->SetTitle("eU [J]");
  reference->SetMinimum(-3E-19);
  reference->SetMaximum(3E-19);
  reference->GetXaxis()->SetTitle("\\nu [Hz]");
  reference->GetXaxis()->SetLimits(0,1E15);
  reference->SetMarkerColor(2);
  reference->Fit("pol1","","",-0.1,1E15);
  reference->Draw("AP");



  c->Update();

  c->SaveAs("photoeffekt.pdf");
}

