Main Page
Namespaces
Classes
Package Documentation
FastSimulation
Utilities
src
HistogramGenerator.cc
Go to the documentation of this file.
1
#include "
FastSimulation/Utilities/interface/HistogramGenerator.h
"
2
3
//#include "TAxis.h"
4
5
double
HistogramGenerator::ersatzt
(
double
x
)
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
}
HistogramGenerator::myHisto
TH1 * myHisto
Pointer to the histogram.
Definition:
HistogramGenerator.h:54
HistogramGenerator::nbins
int nbins
n bins
Definition:
HistogramGenerator.h:60
HistogramGenerator.h
HistogramGenerator::theXaxis
TAxis * theXaxis
the axis
Definition:
HistogramGenerator.h:57
globals_cff.x1
x1
Definition:
globals_cff.py:29
globals_cff.x2
x2
Definition:
globals_cff.py:30
genVertex_cff.x
x
Definition:
genVertex_cff.py:12
HistogramGenerator::ersatzt
double ersatzt(double x)
Gamma Function.
Definition:
HistogramGenerator.cc:5
Generated for CMSSW Reference Manual by
1.8.11