Go to the documentation of this file.00001 #include "FastSimulation/Utilities/interface/HistogramGenerator.h"
00002
00003
00004
00005 double HistogramGenerator::ersatzt(double x)
00006 {
00007 int ibin=theXaxis->FindBin(x);
00008
00009 double x1=myHisto->GetBinLowEdge(ibin);
00010 double x2=x1+myHisto->GetBinWidth(ibin);
00011 double y1=myHisto->GetBinContent(ibin);
00012 double y2;
00013 if(ibin<nbins)
00014 y2=myHisto->GetBinContent(ibin+1);
00015 else
00016 y2=y1;
00017
00018 return y2 + (y1-y2)*(x2-x)/(x2-x1);
00019 }