35 double y1(
cdf(x1)-qq);
38 double y2(
cdf(x2)-qq);
55 x = -(x2*y1-x1*y2)/(y2-y1);
56 double y =
cdf(x) - qq;
58 if ( fabs(y)<1.
e-6 )
break;
93 typedef std::multimap<double, double, std::greater<double> > StartMap;
102 typedef std::multimap<double, double, std::greater<double> > ResultMap;
104 for ( StartMap::const_iterator
i=xStart.begin();
105 i!=xStart.end();
i++ ) {
107 xFound.insert(std::pair<double,double>(
pdf(x),x));
118 return xFound.begin()->second;
129 double y2(
pdf(xStart));
130 double yd(
dpdf1(xStart));
132 if ( (y1+y2)<10*DBL_MIN )
return xStart;
133 while ( nLoop++<20 && fabs(y2-y1)/(y2+y1)>1.
e-6 ) {
135 double yd2 =
dpdf2(x);
136 if ( fabs(yd2)<10*DBL_MIN )
return xStart;
143 if ( nLoop >= 20 )
return xStart;
191 const double&
sigma)
const 196 double d((x-mean)/sigma);
197 if ( fabs(d)<20. ) result =
exp(-d*d/2.);
198 result *= fNorm/
sigma;
204 const double&
sigma)
const 206 return TMath::Freq((x-mean)/sigma);
228 return 1./(
sqrt(s0));
255 float dx = (max -
min )/(
float)nBins;
273 if (cnt>2500)
return 100000.;
275 return (x2f - x1f)/2;
282 if (fabs(x)<2) dx = .5;
283 else dx = fabs(x)/10;
284 while(
cdf(x)>.1 && cnt<1000) {
295 if (fabs(x)<2) dx = .5;
296 else dx = fabs(x)/10;
297 while(
cdf(x)<.9 && cnt<1000) {
float quantile(const float) const
double errorCombinedMean() const
double cdf(const double &) const
value of integral(pdf)
double findMode(const double) const
double gaussInt(const double &, const double &, const double &) const
integrated value of gaussian distribution
const std::complex< double > I
double pdf(const double &) const
value of the pdf
double dpdf2(const double &) const
second derivative of pdf
float errorHighestWeight() const
double combinedMean() const
mean value of combined state
double dpdf1(const double &) const
first derivative of pdf
double gauss(const double &, const double &, const double &) const
value of gaussian distribution
T mod(const T &a, const T &b)