AbsDensity.cpp
Go to the documentation of this file.
48 void AbsDensity::slice(std::vector<Double_t> &x, UInt_t numx, UInt_t numy, TH2F* hist, Bool_t inPhaseSpace) {
55 Logger::print(0, "%20.20s INFO: filling 2D slice in variables %d and %d, hist \"%s\" (%dx%d bins)\n",
78 Logger::print(2, "%20.20s ERROR: Projection of %dD density to 1D histogram is not supported\n", m_name,
89 Logger::print(0, "%20.20s ERROR: Projection of %dD density to 2D histogram is not supported\n", m_name,
110 Logger::print(0, "%20.20s INFO: Majorant will be estimated with %d tries\n", m_name, m_maxTries);
139 Logger::print(1, "%20.20s WARNING: failed to generate a point within phase space after %d tries\n", m_name, m_maxTries);
156 Logger::print(2, "%20.20s ERROR: Generation is not supported for more than 10 dimensions\n", m_name);
172 if (i % 100 == 0 && Logger::timer(2)) Logger::print(0, "%20.20s INFO: Ntuple event %d/%d (%f%%)\n",
184 Logger::print(2, "%20.20s ERROR: In transform - numbers of bins in two histograms do not match\n", m_name);
219 double dfrac = (x-xaxis->GetBinLowEdge(xbin))/xaxis->GetBinWidth(xbin)*hist1->GetBinContent(xbin)/sum1;
225 // double frac = (hist1->Integral(1, xbin-1) + hist1->GetBinContent(xbin)*(x-xaxis->GetBinLowEdge(xbin)/xaxis->GetBinWidth(xbin)))/integ1;
228 // double dfrac = hist1->GetBinContent(xbin)*(x-xaxis->GetBinLowEdge(xbin)/xaxis->GetBinWidth(xbin))/integ1;
239 // double x2 = xaxis->GetBinLowEdge(i) + xaxis->GetBinWidth(i)*(frac - sum/integ2)/hist2->GetBinContent(i);
247 Logger::print(0, "x=%f, int1=%f, int2=%f, xbin=%d, xbin2=%d, dx/w=%f, h1=%f, frac0=%f, dfrac=%f, frac=%f, sum=%f, x20=%f, dx2=%f, x2=%f\n",
248 x, sum1, sum2, xbin, i, (x-xaxis->GetBinLowEdge(xbin))/xaxis->GetBinWidth(xbin), hist1->GetBinContent(xbin), frac0, dfrac, frac, partsum2, x20, dx2, x2);
double transform(TH1F *hist1, TH1F *hist2, double x) Definition: AbsDensity.cpp:179 virtual Double_t upperLimit(UInt_t var)=0 Return upper allowed limit of the variable. virtual AbsPhaseSpace * phaseSpace()=0 Return phase space definition for this PDF. virtual Double_t lowerLimit(UInt_t var)=0 Return lower allowed limit of the variable. int timer(int secs) Return 1 if more than a certain number of seconds have passed since the last call of this function or... Definition: Logger.cpp:13 Double_t generate(std::vector< Double_t > &x) Generate a single point within the phase space according to the PDF using accept-reject method... Definition: AbsDensity.cpp:99 virtual Bool_t withinLimits(std::vector< Double_t > &x)=0 Check if the point is within phase space limits. virtual Double_t density(std::vector< Double_t > &x)=0 Calculate PDF value at the given point. Double_t m_majorant PDF majorant (maximum PDF value needed for accept-reject). Definition: AbsDensity.hh:121 void slice(std::vector< Double_t > &x, UInt_t num, TH1F *hist) Calculate 1D slice of the PDF. Definition: AbsDensity.cpp:25 Generated by 1.8.9.1 |