38 double sig[2] = {2,3};
65 for (
UInt_t i = 0; i < nbins; ++i) {
71 h2pol->SetBinContent(i,
kdBins->GetBinDensity(i - 1));
73 std::cout <<
"Bin with minimum density: " <<
kdBins->GetBinMinDensity() << std::endl;
74 std::cout <<
"Bin with maximum density: " <<
kdBins->GetBinMaxDensity() << std::endl;
82 h2pol->Draw(
"COLZ L");
89 std::vector<Double_t> z = std::vector<Double_t>(
DATASZ, 0.);
94 g->SetMarkerStyle(20);
109 kdBins->SortBinsByDensity();
120 std::cout <<
"Bin with minimum density: " <<
kdBins->GetBinMinDensity() << std::endl;
121 std::cout <<
"Bin with maximum density: " <<
kdBins->GetBinMaxDensity() << std::endl;
128 g2->SetMarkerStyle(20);
135 TCanvas*
c4 =
new TCanvas(
"glc4",
"TH2Poly from a kdTree (Ordered)",50,50,800,800);
152 kdX->SortOneDimBinEdges();
153 kdY->SortOneDimBinEdges();
155 TH1*
hX=
new TH1F(
"hX",
"X projection",
kdX->GetNBins(),
kdX->GetOneDimBinEdges());
156 for(
int i=0; i<
kdX->GetNBins(); ++i){
157 hX->SetBinContent(i+1,
kdX->GetBinDensity(i));
160 TH1*
hY=
new TH1F(
"hY",
"Y Projection",
kdY->GetNBins(),
kdY->GetOneDimBinEdges());
161 for(
int i=0; i<
kdY->GetNBins(); ++i){
162 hY->SetBinContent(i+1,
kdY->GetBinDensity(i));
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Graphics object made of three arrays X, Y and Z with the same number of points each.
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
Draw this histogram with options.
2-D histogram with a double per channel (see TH1 documentation)
2D Histogram with Polygonal Bins
<- TKDTreeBinning - A class providing multidimensional binning ->
Random number generator class based on M.