64 fTsumwy = fTsumwy2 = fTsumwxy = 0;
73 :
TH1(name,title,nbinsx,xlow,xup)
78 if (nbinsy <= 0) {
Warning(
"TH2",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
89 :
TH1(name,title,nbinsx,xbins)
94 if (nbinsy <= 0) {
Warning(
"TH2",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
105 :
TH1(name,title,nbinsx,xlow,xup)
110 if (nbinsy <= 0) {
Warning(
"TH2",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
122 :
TH1(name,title,nbinsx,xbins)
127 if (nbinsy <= 0) {
Warning(
"TH2",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
139 :
TH1(name,title,nbinsx,xbins)
144 if (nbinsy <= 0) {
Warning(
"TH2",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
185 if (nbentries == 0)
return 0;
186 if (nbentries < 0 && action == 0)
return 0;
190 nbentries = -nbentries;
205 for (
Int_t i=1;i<nbentries;i++) {
207 if (x < xmin) xmin =
x;
208 if (x > xmax) xmax =
x;
210 if (y < ymin) ymin =
y;
211 if (y > ymax) ymax =
y;
228 for (
Int_t i=0;i<nbentries;i++) {
229 Fill(buffer[3*i+2],buffer[3*i+3],buffer[3*i+1]);
254 nbentries = -nbentries;
292 Error(
"Fill",
"Invalid signature - do nothing");
316 Int_t binx, biny, bin;
320 if (binx <0 || biny <0)
return -1;
360 Int_t binx, biny, bin;
364 if (binx <0 || biny <0)
return -1;
404 Int_t binx, biny, bin;
408 if (binx <0 || biny <0)
return -1;
446 Int_t binx, biny, bin;
450 if (binx <0 || biny <0)
return -1;
489 Int_t binx, biny, bin;
493 if (binx <0 || biny <0)
return -1;
533 Int_t binx, biny, bin, i;
540 for (i=0;i<ntimes;i+=stride) {
553 for (i=ifirst;i<ntimes;i+=stride) {
557 if (binx <0 || biny <0)
continue;
597 Int_t bin, binx, biny, ibin, loop;
601 if (!fobj) {
Error(
"FillRandom",
"Unknown function: %s",fname);
return; }
602 TF2 *
f1 =
dynamic_cast<TF2*
>(fobj);
603 if (!f1) {
Error(
"FillRandom",
"Function: %s is not a TF2",fname);
return; }
613 for (biny=1;biny<=nbinsy;biny++) {
614 for (binx=1;binx<=nbinsx;binx++) {
617 integral[ibin] = integral[ibin-1] + fint;
622 if (integral[nbins] == 0 ) {
624 Error(
"FillRandom",
"Integral = zero");
return;
626 for (bin=1;bin<=
nbins;bin++) integral[bin] /= integral[nbins];
629 for (loop=0;loop<ntimes;loop++) {
633 binx = 1 + ibin - nbinsx*biny;
657 if (!h) {
Error(
"FillRandom",
"Null histogram");
return; }
659 Error(
"FillRandom",
"Histograms with different dimensions");
return;
667 for (loop=0;loop<ntimes;loop++) {
680 if (axis < 1 || axis > 2) {
681 Warning(
"FindFirstBinAbove",
"Invalid axis number : %d, axis x assumed\n",axis);
688 for (binx=1;binx<=nbinsx;binx++) {
689 for (biny=1;biny<=nbinsy;biny++) {
694 for (biny=1;biny<=nbinsy;biny++) {
695 for (binx=1;binx<=nbinsx;binx++) {
710 if (axis < 1 || axis > 2) {
711 Warning(
"FindLastBinAbove",
"Invalid axis number : %d, axis x assumed\n",axis);
718 for (binx=nbinsx;binx>=1;binx--) {
719 for (biny=1;biny<=nbinsy;biny++) {
724 for (biny=nbinsy;biny>=1;biny--) {
725 for (binx=1;binx<=nbinsx;binx++) {
743 if (firstbin < 0) firstbin = 0;
744 if (lastbin < 0 || lastbin > nbins + 1) lastbin = nbins + 1;
745 if (lastbin < firstbin) {firstbin = 0; lastbin = nbins + 1;}
755 Int_t nstep = ngroup;
760 f1 = (
TF1*)
gROOT->GetFunction(
"gaus");
761 if (f1 == 0) f1 =
new TF1(
"gaus",
"gaus",innerAxis.
GetXmin(),innerAxis.
GetXmax());
765 if (npar <= 0)
return;
777 char *
name =
new char[2000];
778 char *title =
new char[2000];
780 for (ipar=0;ipar<npar;ipar++) {
781 snprintf(name,2000,
"%s_%d",
GetName(),ipar);
782 snprintf(title,2000,
"Fitted value of par[%d]=%s",ipar,f1->
GetParName(ipar));
787 hlist[ipar] =
new TH1D(name,title, nbins,bins->
fArray);
791 (*arr)[ipar] = hlist[ipar];
793 snprintf(name,2000,
"%s_chi2",
GetName());
799 hchi2 =
new TH1D(name,
"chisquare", nbins, bins->
fArray);
803 (*arr)[npar] = hchi2;
810 for (bin=firstbin;bin+ngroup-1<=lastbin;bin += nstep) {
816 if (hp == 0)
continue;
818 if (nentries == 0 || nentries < cut) {
delete hp;
continue;}
822 if (npfits > npar && npfits >= cut) {
823 Int_t binOn = bin + ngroup/2;
824 for (ipar=0;ipar<npar;ipar++) {
891 DoFitSlices(
true, f1, firstybin, lastybin, cut, option, arr);
950 DoFitSlices(
false, f1, firstxbin, lastxbin, cut, option, arr);
958 if (biny < 0) biny = 0;
959 if (biny > ofy) biny = ofy;
990 Error(
"GetBinWithContent2",
"function is only valid for 2-D histograms");
993 if (firstxbin < 0) firstxbin = 1;
995 if (firstybin < 0) firstybin = 1;
998 for (
Int_t j = firstybin; j <= lastybin; j++) {
999 for (
Int_t i = firstxbin; i <= lastxbin; i++) {
1001 if (diff <= 0) {binx = i; biny=j;
return diff;}
1002 if (diff < curmax && diff <= maxdiff) {curmax = diff, binx=i; biny=j;}
1014 if (axis1 < 1 || axis2 < 1 || axis1 > 2 || axis2 > 2) {
1015 Error(
"GetCorrelationFactor",
"Wrong parameters");
1018 if (axis1 == axis2)
return 1;
1020 if (stddev1 == 0)
return 0;
1022 if (stddev2 == 0)
return 0;
1032 if (axis1 < 1 || axis2 < 1 || axis1 > 2 || axis2 > 2) {
1033 Error(
"GetCovariance",
"Wrong parameters");
1046 if (sumw == 0)
return 0;
1047 if (axis1 == 1 && axis2 == 1) {
1048 return TMath::Abs(sumwx2/sumw - sumwx/sumw*sumwx/sumw);
1050 if (axis1 == 2 && axis2 == 2) {
1051 return TMath::Abs(sumwy2/sumw - sumwy/sumw*sumwy/sumw);
1053 return sumwxy/sumw - sumwx/sumw*sumwy/sumw;
1075 if (integral == 0 ) { x = 0; y = 0;
return;}
1081 Int_t biny = ibin/nbinsx;
1082 Int_t binx = ibin - nbinsx*biny;
1127 if (firstBinX == 1) firstBinX = 0;
1131 if (firstBinY == 1) firstBinY = 0;
1135 for (
Int_t biny = firstBinY; biny <= lastBinY; ++biny) {
1137 for (
Int_t binx = firstBinX; binx <= lastBinX; ++binx) {
1189 return DoIntegral(firstxbin,lastxbin,firstybin,lastybin,-1,0,err,option);
1203 return DoIntegral(firstxbin,lastxbin,firstybin,lastybin,-1,0,error,option,
kTRUE);
1212 Error(
"Interpolate",
"This function must be called with 2 arguments for a TH2");
1232 Error(
"Interpolate",
"Cannot interpolate outside histogram domain.");
1274 if(bin_x1<1) bin_x1=1;
1278 if(bin_y1<1) bin_y1=1;
1290 f = 1.0*q11/d*(
x2-
x)*(y2-y)+1.0*q21/d*(x-
x1)*(y2-y)+1.0*q12/d*(
x2-
x)*(y-y1)+1.0*q22/d*(x-
x1)*(y-y1);
1300 Error(
"Interpolate",
"This function must be called with 2 arguments for a TH2");
1335 if (h2 == 0)
return 0;
1347 Error(
"KolmogorovTest",
"Histograms must be 2-D\n");
1353 Error(
"KolmogorovTest",
"Number of channels in X is different, %d and %d\n",ncx1,ncx2);
1357 Error(
"KolmogorovTest",
"Number of channels in Y is different, %d and %d\n",ncy1,ncy2);
1367 if (diff1 > difprec || diff2 > difprec) {
1368 Error(
"KolmogorovTest",
"histograms with different binning along X");
1373 if (diff1 > difprec || diff2 > difprec) {
1374 Error(
"KolmogorovTest",
"histograms with different binning along Y");
1379 Int_t ibeg = 1, jbeg = 1;
1380 Int_t iend = ncx1, jend = ncy1;
1381 if (opt.
Contains(
"U")) {ibeg = 0; jbeg = 0;}
1382 if (opt.
Contains(
"O")) {iend = ncx1+1; jend = ncy1+1;}
1389 for (i = ibeg; i <= iend; i++) {
1390 for (j = jbeg; j <= jend; j++) {
1403 Error(
"KolmogorovTest",
"Integral is zero for h1=%s\n",h1->
GetName());
1407 Error(
"KolmogorovTest",
"Integral is zero for h2=%s\n",h2->
GetName());
1415 esum1 = sum1 * sum1 / w1;
1420 esum2 = sum2 * sum2 / w2;
1424 if (afunc2 && afunc1) {
1425 Error(
"KolmogorovTest",
"Errors are zero for both histograms\n");
1434 for (i=ibeg;i<=iend;i++) {
1435 for (j=jbeg;j<=jend;j++) {
1445 for (j=jbeg;j<=jend;j++) {
1446 for (i=ibeg;i<=iend;i++) {
1457 else factnm =
TMath::Sqrt(esum1*sum2/(esum1+esum2));
1460 Double_t dfmax = 0.5*(dfmax1+dfmax2);
1467 if (opt.
Contains(
"N") && !(afunc1 || afunc2 ) ) {
1471 Double_t chi2 = d12*d12/(esum1+esum2);
1474 if (prb > 0 && prb2 > 0) prb = prb*prb2*(1-
TMath::Log(prb*prb2));
1480 printf(
" Kolmo Prob h1 = %s, sum1=%g\n",h1->
GetName(),sum1);
1481 printf(
" Kolmo Prob h2 = %s, sum2=%g\n",h2->
GetName(),sum2);
1482 printf(
" Kolmo Probabil = %f, Max Dist = %g\n",prb,dfmax);
1484 printf(
" Kolmo Probabil = %f for shape alone, =%f for normalisation alone\n",prb1,prb2);
1490 if(opt.
Contains(
"M"))
return dfmax;
1512 if (!list)
return 0;
1527 TIter next(&inlist);
1532 allHaveLimits = allHaveLimits && hasLimits;
1539 if (firstHistWithLimits ) {
1551 firstHistWithLimits =
kFALSE;
1554 if (!initialLimitsFound) {
1557 initialLimitsFound =
kTRUE;
1571 Error(
"Merge",
"Cannot merge histograms - limits are inconsistent:\n " 1572 "first: (%d, %f, %f), second: (%d, %f, %f)",
1587 Error(
"Merge",
"Cannot merge histograms - limits are inconsistent:\n " 1588 "first: (%d, %f, %f), second: (%d, %f, %f)",
1595 allSameLimits = sameLimitsY && sameLimitsX;
1598 }
while ( ( h = dynamic_cast<TH2*> ( next() ) ) !=
NULL );
1599 if (!h && (*next) ) {
1600 Error(
"Merge",
"Attempt to merge object of class: %s to a %s",
1601 (*next)->ClassName(),this->
ClassName());
1611 if (!allSameLimits) {
1616 hclone = (
TH2*)IsA()->New();
1626 if (!allSameLimits && initialLimitsFound) {
1645 if (!allHaveLimits) {
1647 while ( (h = dynamic_cast<TH2*> (next())) ) {
1651 for (
Int_t i = 0; i < nbentries; i++)
1657 if (!initialLimitsFound) {
1669 for (
Int_t i=0;i<
kNstat;i++) {totstats[i] = stats[i] = 0;}
1672 Int_t binx, biny, ix, iy,
nx,
ny, bin, ibin;
1678 while ((h=(
TH2*)next())) {
1682 if (h->
fTsumw == 0 && histEntries == 0)
continue;
1689 totstats[i] += stats[i];
1690 nentries += histEntries;
1695 for (biny = 0; biny <= ny + 1; biny++) {
1700 for (binx = 0; binx <= nx + 1; binx++) {
1701 bin = binx +(nx+2)*biny;
1704 if (!allSameLimits) {
1705 if (cu != 0 && ( (!sameLimitsX && (binx == 0 || binx == nx+1)) || (!sameLimitsY && (biny == 0 || biny == ny+1)) )) {
1706 Error(
"Merge",
"Cannot merge histograms - the histograms have" 1707 " different limits and undeflows/overflows are present." 1708 " The initial histogram is now broken!");
1717 ibin = ix +(nbix+2)*iy;
1719 if (ibin < 0)
continue;
1748 return Rebin2D(ngroup, 1, newname);
1758 return Rebin2D(1, ngroup, newname);
1798 Error(
"Rebin2D",
"Histogram must be TH2. This histogram has %d dimensions.",
GetDimension());
1801 if ((nxgroup <= 0) || (nxgroup > nxbins)) {
1802 Error(
"Rebin2D",
"Illegal value of nxgroup=%d",nxgroup);
1805 if ((nygroup <= 0) || (nygroup > nybins)) {
1806 Error(
"Rebin2D",
"Illegal value of nygroup=%d",nygroup);
1810 Int_t newxbins = nxbins / nxgroup;
1811 Int_t newybins = nybins / nygroup;
1812 Int_t newnx = newxbins + 2;
1813 Int_t newny = newybins + 2;
1827 if (newname && strlen(newname)) {
1832 bool resetStat =
false;
1835 if(newxbins * nxgroup != nxbins) {
1839 if(newybins * nygroup != nybins) {
1871 if (nxgroup != 1 || nygroup != 1) {
1878 hnew->
SetBins(newxbins, xbins, newybins, ybins);
1882 hnew->
SetBins(newxbins, xmin, xmax, newybins, ymin, ymax);
1887 if (oldErrors) hnew->
fSumw2[0] = 0;
1890 for(
Int_t binx = 1, oldbinx = 1; binx < newnx; ++binx, oldbinx += nxgroup){
1891 Double_t binContent = 0.0, binErrorSq = 0.0;
1892 for (
Int_t i = 0; i < nxgroup && (oldbinx + i) < nx; ++i) {
1893 Int_t bin = oldbinx + i;
1894 binContent += oldBins[bin];
1895 if(oldErrors) binErrorSq += oldErrors[bin];
1897 Int_t newbin = binx;
1899 if (oldErrors) hnew->
fSumw2[newbin] = binErrorSq;
1903 for(
Int_t biny = 1, oldbiny = 1; biny < newny; ++biny, oldbiny += nygroup){
1904 Double_t binContent = 0.0, binErrorSq = 0.0;
1905 for (
Int_t j = 0; j < nygroup && (oldbiny + j) < ny; ++j) {
1906 Int_t bin = (oldbiny + j) * nx;
1907 binContent += oldBins[bin];
1908 if(oldErrors) binErrorSq += oldErrors[bin];
1910 Int_t newbin = biny * newnx;
1912 if (oldErrors) hnew->
fSumw2[newbin] = binErrorSq;
1916 for (
Int_t binx = 1, oldbinx = 1; binx < newnx; ++binx, oldbinx += nxgroup) {
1917 for (
Int_t biny = 1, oldbiny = 1; biny < newny; ++biny, oldbiny += nygroup) {
1918 Double_t binContent = 0.0, binErrorSq = 0.0;
1919 for (
Int_t i = 0; i < nxgroup && (oldbinx + i) < nx; ++i) {
1920 for (
Int_t j = 0; j < nygroup && (oldbiny + j) < ny; ++j) {
1921 Int_t bin = oldbinx + i + (oldbiny + j) * nx;
1922 binContent += oldBins[bin];
1923 if (oldErrors) binErrorSq += oldErrors[bin];
1926 Int_t newbin = binx + biny * newnx;
1928 if (oldErrors) hnew->
fSumw2[newbin] = binErrorSq;
1961 if (oldErrors)
delete [] oldErrors;
1976 cut = opt(i1,i2-i1+1);
1979 bool originalRange = opt.
Contains(
"o");
1984 const char *expectedName = ( onX ?
"_pfx" :
"_pfy" );
1986 Int_t firstOutBin, lastOutBin;
1988 lastOutBin = outAxis.
GetLast();
1989 if (firstOutBin == 0 && lastOutBin == 0) {
1990 firstOutBin = 1; lastOutBin = outAxis.
GetNbins();
1999 if (firstbin == 0 && lastbin == 0)
2005 if (firstbin < 0) firstbin = 1;
2006 if (lastbin < 0) lastbin = inN;
2007 if (lastbin > inN+1) lastbin = inN;
2010 char *pname = (
char*)name;
2011 if (name && strcmp(name, expectedName) == 0) {
2013 pname =
new char[nch];
2014 snprintf(pname,nch,
"%s%s",
GetName(),name);
2022 Error(
"DoProfile",
"Histogram with name %s must be a TProfile and is a %s",name,h1obj->
ClassName());
2031 if (xbins->
fN == 0) {
2032 if ( originalRange )
2041 h1->
SetBins(lastOutBin-firstOutBin+1,&xbins->
fArray[firstOutBin-1]);
2047 ((
TH2 *)
this)->GetPainter();
2053 if (bins->
fN == 0) {
2054 if ( originalRange )
2068 if (pname != name)
delete [] pname;
2080 if (useWeights) h1->
Sumw2();
2093 for (
Int_t outbin = 0; outbin <= outAxis.
GetNbins() + 1; ++outbin) {
2099 if (binOut <0)
continue;
2101 for (
Int_t inbin = firstbin ; inbin <= lastbin ; ++inbin) {
2103 if (onX) { binx = outbin; biny=inbin; }
2104 else { binx = inbin; biny=outbin; }
2116 if ( useWeights ) tmp = binSumw2.
fArray[binOut];
2139 if (!
gPad || !
gPad->FindObject(h1)) {
2144 if (padsav) padsav->
cd();
2190 return DoProfile(
true, name, firstybin, lastybin, option);
2235 return DoProfile(
false, name, firstxbin, lastxbin, option);
2245 const char *expectedName = 0;
2247 Int_t firstOutBin, lastOutBin;
2248 const TAxis* outAxis;
2249 const TAxis* inAxis;
2256 cut = opt(i1,i2-i1+1);
2259 bool originalRange = opt.
Contains(
"o");
2263 expectedName =
"_px";
2270 expectedName =
"_py";
2277 lastOutBin = outAxis->
GetLast();
2278 if (firstOutBin == 0 && lastOutBin == 0) {
2279 firstOutBin = 1; lastOutBin = outAxis->
GetNbins();
2288 if (firstbin == 0 && lastbin == 0)
2294 if (firstbin < 0) firstbin = 0;
2295 if (lastbin < 0) lastbin = inNbin + 1;
2296 if (lastbin > inNbin+1) lastbin = inNbin + 1;
2299 char *pname = (
char*)name;
2300 if (name && strcmp(name,expectedName) == 0) {
2302 pname =
new char[nch];
2303 snprintf(pname,nch,
"%s%s",
GetName(),name);
2312 Error(
"DoProjection",
"Histogram with name %s must be a TH1D and is a %s",name,h1obj->
ClassName());
2321 if (xbins->
fN == 0) {
2322 if ( originalRange )
2331 h1->
SetBins(lastOutBin-firstOutBin+1,&xbins->
fArray[firstOutBin-1]);
2337 ((
TH2 *)
this)->GetPainter();
2343 if (bins->
fN == 0) {
2344 if ( originalRange )
2347 h1 =
new TH1D(pname,
GetTitle(),lastOutBin-firstOutBin+1,
2354 h1 =
new TH1D(pname,
GetTitle(),lastOutBin-firstOutBin+1,&bins->
fArray[firstOutBin-1]);
2358 if (pname != name)
delete [] pname;
2386 for (
Int_t outbin = 0; outbin <= outAxis->
GetNbins() + 1; ++outbin) {
2391 for (
Int_t inbin = firstbin ; inbin <= lastbin ; ++inbin) {
2393 if (onX) { binx = outbin; biny=inbin; }
2394 else { binx = inbin; biny=outbin; }
2401 if (computeErrors) {
2415 bool reuseStats =
false;
2416 if ( (
fgStatOverflows ==
false && firstbin == 1 && lastbin == inNbin ) ||
2417 (
fgStatOverflows ==
true && firstbin == 0 && lastbin == inNbin + 1 ) )
2421 double eps = 1.E-12;
2426 if (ncuts) reuseStats =
false;
2428 bool reuseEntries = reuseStats;
2430 reuseEntries &= (firstbin==0 && lastbin == inNbin+1);
2435 stats[2] = stats[4];
2436 stats[3] = stats[5];
2466 if (!
gPad || !
gPad->FindObject(h1)) {
2471 if (padsav) padsav->
cd();
2513 return DoProjection(
true, name, firstybin, lastybin, option);
2553 return DoProjection(
false, name, firstxbin, lastxbin, option);
2600 const TAxis *outAxis = 0;
2601 const TAxis *inAxis = 0;
2612 if (qname.
IsNull() || qname ==
"_qx" || qname ==
"_qy") {
2613 const char * qtype = (onX) ?
"qx" :
"qy";
2621 h1 =
dynamic_cast<TH1D*
>(h1obj);
2623 Error(
"DoQuantiles",
"Histogram with name %s must be a TH1D and is a %s",qname.
Data(),h1obj->
ClassName());
2640 h1->
SetBins(lastOutBin-firstOutBin+1,&xbins->
fArray[firstOutBin-1]);
2647 for (
int ibin = inAxis->
GetFirst() ; ibin <= inAxis->
GetLast() ; ++ibin) {
2652 if (slice->
GetSum() == 0)
continue;
2663 if (slice)
delete slice;
2691 if (bin < 0)
return;
2735 return (
TH1*)
gROOT->ProcessLineFast(
Form(
"TSpectrum2::StaticBackground((TH1*)0x%lx,%d,\"%s\")",
2736 (
ULong_t)
this, niter, option));
2751 return (
Int_t)
gROOT->ProcessLineFast(
Form(
"TSpectrum2::StaticSearch((TH1*)0x%lx,%g,\"%s\",%g)",
2752 (
ULong_t)
this, sigma, option, threshold));
2779 Double_t k5a[5][5] = { { 0, 0, 1, 0, 0 },
2783 { 0, 0, 1, 0, 0 } };
2784 Double_t k5b[5][5] = { { 0, 1, 2, 1, 0 },
2788 { 0, 1, 2, 1, 0 } };
2789 Double_t k3a[3][3] = { { 0, 1, 0 },
2794 Warning(
"Smooth",
"Currently only ntimes=1 is supported");
2801 if (opt.
Contains(
"k5b")) kernel = &k5b[0][0];
2803 kernel = &k3a[0][0];
2818 Int_t bufSize = (nx+2)*(ny+2);
2825 for (i=ifirst; i<=ilast; i++){
2826 for (j=jfirst; j<=jlast; j++){
2834 Int_t x_push = (ksize_x-1)/2;
2835 Int_t y_push = (ksize_y-1)/2;
2838 for (i=ifirst; i<=ilast; i++){
2839 for (j=jfirst; j<=jlast; j++) {
2848 if ( (xb >= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny) ) {
2854 content += k*buf[bin];
2855 if (ebuf) error += k*k*ebuf[bin]*ebuf[bin];
2861 if ( norm != 0.0 ) {
2864 error /= (norm*
norm);
2880 void TH2::Streamer(
TBuffer &R__b)
2890 TH1::Streamer(R__b);
2934 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ylow,yup)
2948 :
TH2(name,title,nbinsx,xbins,nbinsy,ylow,yup)
2960 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ybins)
2972 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
2984 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3015 if (newval > -128 && newval < 128) {
fArray[bin] =
Char_t(newval);
return;}
3016 if (newval < -127)
fArray[bin] = -127;
3017 if (newval > 127)
fArray[bin] = 127;
3055 void TH2C::Streamer(
TBuffer &R__b)
3067 TH1::Streamer(R__b);
3068 TArrayC::Streamer(R__b);
3075 TH2::Streamer(R__b);
3076 TArrayC::Streamer(R__b);
3092 if (
this != &h1) ((
TH2C&)h1).
Copy(*
this);
3188 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ylow,yup)
3202 :
TH2(name,title,nbinsx,xbins,nbinsy,ylow,yup)
3214 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ybins)
3226 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3238 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3269 if (newval > -32768 && newval < 32768) {
fArray[bin] =
Short_t(newval);
return;}
3270 if (newval < -32767)
fArray[bin] = -32767;
3271 if (newval > 32767)
fArray[bin] = 32767;
3309 void TH2S::Streamer(
TBuffer &R__b)
3321 TH1::Streamer(R__b);
3322 TArrayS::Streamer(R__b);
3329 TH2::Streamer(R__b);
3330 TArrayS::Streamer(R__b);
3346 if (
this != &h1) ((
TH2S&)h1).
Copy(*
this);
3442 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ylow,yup)
3456 :
TH2(name,title,nbinsx,xbins,nbinsy,ylow,yup)
3468 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ybins)
3480 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3492 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3523 if (newval > -2147483647 && newval < 2147483647) {
fArray[bin] =
Int_t(newval);
return;}
3524 if (newval < -2147483647)
fArray[bin] = -2147483647;
3525 if (newval > 2147483647)
fArray[bin] = 2147483647;
3565 if (
this != &h1) ((
TH2I&)h1).
Copy(*
this);
3661 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ylow,yup)
3675 :
TH2(name,title,nbinsx,xbins,nbinsy,ylow,yup)
3687 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ybins)
3699 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3711 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3722 :
TH2(
"TMatrixFBase",
"",m.GetNcols(),m.GetColLwb(),1+m.GetColUpb(),m.GetNrows(),m.GetRowLwb(),1+m.GetRowUpb())
3729 for (
Int_t i=ilow;i<=iup;i++) {
3730 for (
Int_t j=jlow;j<=jup;j++) {
3780 void TH2F::Streamer(
TBuffer &R__b)
3792 TH1::Streamer(R__b);
3793 TArrayF::Streamer(R__b);
3800 TH2::Streamer(R__b);
3801 TArrayF::Streamer(R__b);
3817 if (
this != &h1) ((
TH2F&)h1).
Copy(*
this);
3925 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ylow,yup)
3939 :
TH2(name,title,nbinsx,xbins,nbinsy,ylow,yup)
3951 :
TH2(name,title,nbinsx,xlow,xup,nbinsy,ybins)
3963 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3975 :
TH2(name,title,nbinsx,xbins,nbinsy,ybins)
3986 :
TH2(
"TMatrixDBase",
"",m.GetNcols(),m.GetColLwb(),1+m.GetColUpb(),m.GetNrows(),m.GetRowLwb(),1+m.GetRowUpb())
3993 for (
Int_t i=ilow;i<=iup;i++) {
3994 for (
Int_t j=jlow;j<=jup;j++) {
4045 void TH2D::Streamer(
TBuffer &R__b)
4057 TH1::Streamer(R__b);
4058 TArrayD::Streamer(R__b);
4065 TH2::Streamer(R__b);
4066 TArrayD::Streamer(R__b);
4082 if (
this != &h1) ((
TH2D&)h1).
Copy(*
this);
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
virtual const char * GetName() const
Returns name of object.
TH1D * QuantilesX(Double_t prob=0.5, const char *name="_qx") const
Compute the X distribution of quantiles in the other variable Y name is the name of the returned hist...
virtual Float_t GetTickLength() const
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
virtual Double_t GetEffectiveEntries() const
number of effective entries of the histogram, neff = (Sum of weights )^2 / (Sum of weight^2 ) In case...
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
virtual void SetParameters(const Double_t *params)
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Double_t Floor(Double_t x)
void Set(Int_t n)
Set size of this array to n chars.
friend TH2D operator+(TH2D &h1, TH2D &h2)
Operator +.
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual void GetRandom2(Double_t &x, Double_t &y)
Return 2 random numbers along axis x and y distributed according the cellcontents of a 2-dim histogra...
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
void Copy(TArrayI &array) const
friend TH2F operator/(TH2F &h1, TH2F &h2)
Operator /.
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
static Bool_t fgDefaultSumw2
flag to use under/overflows in statistics
TVirtualHistPainter * GetPainter(Option_t *option="")
return pointer to painter if painter does not exist, it is created
Collectable string class.
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
friend TH2C operator/(TH2C &h1, TH2C &h2)
Operator /.
virtual Float_t GetLabelOffset() const
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Double_t KolmogorovProb(Double_t z)
Calculates the Kolmogorov distribution function, which gives the probability that Kolmogorov's test ...
friend TH2C operator+(TH2C &h1, TH2C &h2)
Operator +.
friend TH2D operator-(TH2D &h1, TH2D &h2)
Operator -.
TString & ReplaceAll(const TString &s1, const TString &s2)
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along Y.
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
const Double_t * GetArray() const
Bool_t TestBit(UInt_t f) const
virtual TH2 * RebinY(Int_t ngroup=2, const char *newname="")
Rebin only the Y axis see Rebin2D.
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
friend TH2I operator-(TH2I &h1, TH2I &h2)
Operator -.
virtual Color_t GetAxisColor() const
static Bool_t fgStatOverflows
flag to add histograms to the directory
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
virtual Int_t BufferFill(Double_t x, Double_t y, Double_t w)
accumulate arguments in buffer.
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0)
Compute Quantiles for this histogram Quantile x_q of a probability distribution Function F is defined...
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
void ToUpper()
Change string to upper case.
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
Buffer base class used for serializing objects.
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along X.
virtual Int_t MakeCuts(char *cutsopt)=0
static THLimitsFinder * GetLimitsFinder()
Return pointer to the current finder.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual ~TH2D()
Destructor.
virtual TH1D * DoQuantiles(bool onX, const char *name, Double_t prob) const
Implementation of quantiles for x or y.
virtual Double_t GetCorrelationFactor(Int_t axis1=1, Int_t axis2=2) const
Return correlation factor between axis1 and axis2.
2-D histogram with a byte per channel (see TH1 documentation)
Array of floats (32 bits per element).
virtual void SetTitleFont(Style_t font=62)
Set the title font.
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
void ToLower()
Change string to lower-case.
virtual ~TH2()
Destructor.
friend TH2C operator*(Float_t c1, TH2C &h1)
Operator *.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
friend TH2I operator/(TH2I &h1, TH2I &h2)
Operator /.
void Copy(TArrayC &array) const
virtual Float_t GetLabelSize() const
virtual Bool_t IsInside(Int_t x, Int_t y)=0
virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax)
compute the best axis limits for the X axis.
virtual void Copy(TObject &hnew) const
Copy.
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
virtual Bool_t Multiply(TF1 *h1, Double_t c1=1)
Performs the operation: this = this*c1*f1 if errors are defined (see TH1::Sumw2), errors are also rec...
virtual void SetShowProjectionY(Int_t nbins=1)
When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the pr...
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width...
virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsrel=1.e-6)
Return Integral of a 2d function in range [ax,bx],[ay,by] with desired relative accuracy (default val...
friend TH2I operator*(Float_t c1, TH2I &h1)
Operator *.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
friend TH2D operator/(TH2D &h1, TH2D &h2)
Operator /.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
friend TH2I operator+(TH2I &h1, TH2I &h2)
Operator +.
Array of integers (32 bits per element).
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
set the maximum number of entries to be kept in the buffer
virtual Bool_t CanExtendAllAxes() const
returns true if all axes are extendable
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
friend TH2S operator/(TH2S &h1, TH2S &h2)
Operator /.
virtual Style_t GetMarkerStyle() const
virtual Style_t GetTitleFont() const
virtual Int_t GetDimension() const
friend TH2C operator-(TH2C &h1, TH2C &h2)
Operator -.
static const double x2[5]
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Reset(Option_t *option="")
Reset contents of a Profile histogram.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
TH2F & operator=(const TH2F &h1)
Operator =.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum2::Search the function finds peaks in this histogram where the width is > sigma...
THashList * GetLabels() const
virtual void Copy(TObject &hnew) const
Copy.
virtual TArrayD * GetBinSumw2()
virtual void SetShowProjectionX(Int_t nbins=1)
When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the pr...
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual void SetMarkerColor(Color_t mcolor=1)
TH2S & operator=(const TH2S &h1)
Operator =.
friend TH2F operator-(TH2F &h1, TH2F &h2)
Operator -.
Ssiz_t First(char c) const
Find first occurrence of a character c.
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculates from bin cont...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
void Set(Int_t n)
Set size of this array to n ints.
virtual void Reset(Option_t *option="")
Reset.
virtual void SetBinError(Int_t bin, Double_t error)
see convention for numbering bins in TH1::GetBin
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false)
Compute integral (cumulative sum of bins) The result stored in fIntegral is used by the GetRandom fun...
virtual Color_t GetLabelColor() const
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2), errors are also recalculated.
virtual Int_t GetNdivisions() const
virtual void Copy(TObject &hnew) const
Copy.
void Set(Int_t n)
Set size of this array to n shorts.
virtual void ImportAttributes(const TAxis *axis)
Copy axis attributes to this.
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this 2-d histogram using kernel algorithms similar to the ones used in the ras...
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) const
Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold ...
virtual const char * GetParName(Int_t ipar) const
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
virtual Double_t GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny, Int_t firstxbin=1, Int_t lastxbin=-1, Int_t firstybin=1, Int_t lastybin=-1, Double_t maxdiff=0) const
compute first cell (binx,biny) in the range [firstxbin,lastxbin][firstybin,lastybin] for which diff =...
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
virtual void SetLineColor(Color_t lcolor)
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis from bin first to last.
virtual void Copy(TObject &hnew) const
Copy.
void Copy(TArrayF &array) const
virtual ~TH2C()
Destructor.
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Int_t GetLast() const
Return last bin on the axis i.e.
const char * GetTitle() const
Returns title of object.
Service class for 2-Dim histogram classes.
Class to manage histogram axis.
virtual void GetStats(Double_t *stats) const
Fill the array stats from the contents of this histogram The array stats must be correctly dimensionn...
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Array of shorts (16 bits per element).
TH2C & operator=(const TH2C &h1)
Operator =.
virtual void FitSlicesX(TF1 *f1=0, Int_t firstybin=0, Int_t lastybin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=0)
Project slices along X in case of a 2-D histogram, then fit each slice with function f1 and make a hi...
virtual void SetFillColor(Color_t fcolor)
virtual Int_t GetNumberFitPoints() const
2-D histogram with a float per channel (see TH1 documentation)}
virtual TObject * Remove(TObject *obj)
Remove object from the list.
unsigned int r1[N_CITIES]
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
Collection abstract base class.
static Int_t fgBufferSize
virtual void Copy(TObject &hnew) const
Copy.
virtual Float_t GetTitleOffset() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
Int_t Fill(const Double_t *v)
virtual void SetMarkerStyle(Style_t mstyle=1)
virtual Color_t GetTitleColor() const
Double_t * fIntegral
Histogram dimension (1, 2 or 3 dim)
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [firstxbin,lastxbin],[firstybin,lastybin] for a 2-D histogra...
A 2-Dim function with parameters.
R__EXTERN TRandom * gRandom
1-D histogram with a double per channel (see TH1 documentation)}
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
virtual Double_t RetrieveBinContent(Int_t bin) const
raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculate a gaussian function with mean and sigma.
virtual Color_t GetLineColor() const
TH1D * QuantilesY(Double_t prob=0.5, const char *name="_qy") const
Compute the Y distribution of quantiles in the other variable X name is the name of the returned hist...
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
friend TH2D operator*(Float_t c1, TH2D &h1)
Operator *.
virtual void SetName(const char *name)
Change the name of this histogram.
TString & Remove(Ssiz_t pos)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t GetSumw2N() const
Double_t GetChisquare() const
friend TH2F operator+(TH2F &h1, TH2F &h2)
Operator +.
friend TH2S operator*(Float_t c1, TH2S &h1)
Operator *.
virtual Bool_t IsEmpty() const
virtual TH2 * RebinX(Int_t ngroup=2, const char *newname="")
Rebin only the X axis see Rebin2D.
static const double x1[5]
TProfile * ProfileY(const char *name="_pfy", Int_t firstxbin=1, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a profile histogram along Y.
TProfile * ProfileX(const char *name="_pfx", Int_t firstybin=1, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a profile histogram along X.
TH2I & operator=(const TH2I &h1)
Operator =.
virtual void DoFitSlices(bool onX, TF1 *f1, Int_t firstbin, Int_t lastbin, Int_t cut, Option_t *option, TObjArray *arr)
virtual void SetShowProjection(const char *option, Int_t nbins)=0
virtual void FitSlicesY(TF1 *f1=0, Int_t firstxbin=0, Int_t lastxbin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=0)
Project slices along Y in case of a 2-D histogram, then fit each slice with function f1 and make a hi...
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
virtual Color_t GetFillColor() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Double_t GetEntries() const
return the current number of entries
2-D histogram with a short per channel (see TH1 documentation)
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
virtual Float_t GetTitleSize() const
virtual Int_t FindLastBinAbove(Double_t threshold=0, Int_t axis=1) const
Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold i...
Array of doubles (64 bits per element).
friend TH2F operator*(Float_t c1, TH2F &h1)
Operator *.
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2), errors are also recalculated.
void SetBins(const Int_t *nbins, const Double_t *range)
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
Mother of all ROOT objects.
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
virtual ~TH2F()
Destructor.
virtual Int_t GetNpar() const
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t Interpolate(Double_t x)
illegal for a TH2
TVirtualHistPainter * fPainter
Integral of bins used by GetRandom.
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
virtual ~TH2I()
Destructor.
virtual Double_t GetParameter(Int_t ipar) const
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t &err, Option_t *opt, Bool_t doerr=kFALSE) const
internal function compute integral and optionally the error between the limits specified by the bin n...
virtual void Copy(TObject &hnew) const
Copy.
Short_t Max(Short_t a, Short_t b)
virtual void SetBinsLength(Int_t=-1)
virtual Long64_t Merge(TCollection *list)
Add all histograms in the collection to this histogram.
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Int_t fDimension
Pointer to directory holding this histogram.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
virtual Double_t * GetParameters() const
void Set(Int_t n)
Set size of this array to n floats.
virtual void SetEntries(Double_t n)
friend TH2S operator+(TH2S &h1, TH2S &h2)
Operator +.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content.
virtual Color_t GetMarkerColor() const
virtual Int_t GetNbinsX() const
Double_t Sqrt(Double_t x)
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
2-D histogram with an int per channel (see TH1 documentation)}
virtual void Sumw2(Bool_t flag=kTRUE)
Create/delete structure to store sum of squares of weights per bin — This is needed to compute the ...
virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
virtual Int_t GetBin(Int_t binx, Int_t biny, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
Int_t Fill(Double_t)
Invalid Fill method.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
virtual ~TH2S()
Destructor.
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
friend TH2S operator-(TH2S &h1, TH2S &h2)
Operator -.
double norm(double *x, double *p)
virtual void UpdateBinContent(Int_t bin, Double_t content)
raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
void Set(Int_t n)
Set size of this array to n doubles.
void Copy(TArrayD &array) const
virtual TProfile * DoProfile(bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
Long64_t BinarySearch(Long64_t n, const T *array, T value)
const TArrayD * GetXbins() const
virtual void FillN(Int_t, const Double_t *, const Double_t *, Int_t)
Fill this histogram with an array x and weights w.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual Style_t GetLabelFont() const
virtual TH2 * Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *newname="")
Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together.
void Copy(TArrayS &array) const
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const
Statistical test of compatibility in shape between THIS histogram and h2, using Kolmogorov test...
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual const char * GetTitle() const
Returns title of object.
virtual Int_t GetNbinsY() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual TH1D * DoProjection(bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
Internal (protected) method for performing projection on the X or Y axis called by ProjectionX or Pro...
TH2D & operator=(const TH2D &h1)
Operator =.
virtual Double_t GetCovariance(Int_t axis1=1, Int_t axis2=2) const
Return covariance between axis1 and axis2.
2-D histogram with a double per channel (see TH1 documentation)}
const char * Data() const
Array of chars or bytes (8 bits per element).