CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HistogramGenerator.cc
Go to the documentation of this file.
2 
3 //#include "TAxis.h"
4 
6 {
7  int ibin=theXaxis->FindBin(x);
8  // std::cout << x << " Bin " << ibin << std::endl;
9  double x1=myHisto->GetBinLowEdge(ibin);
10  double x2=x1+myHisto->GetBinWidth(ibin);
11  double y1=myHisto->GetBinContent(ibin);
12  double y2;
13  if(ibin<nbins)
14  y2=myHisto->GetBinContent(ibin+1);
15  else
16  y2=y1;
17  // std::cout << " X1 " << x1 <<" X2 " << x2 << " Y1 " <<y1 << " Y2 " << y2 << std::endl;
18  return y2 + (y1-y2)*(x2-x)/(x2-x1);
19 }
TH1 * myHisto
Pointer to the histogram.
TAxis * theXaxis
the axis
x
Definition: VDTMath.h:216
double ersatzt(double x)
Gamma Function.