85 fSumwv2 += weight * value * value;
93 :
TH2Poly(name, title, xlow, xup, ylow, yup)
99 :
TH2Poly(name, title, nX, xlow, xup, nY, ylow, yup)
119 return Fill(xcoord, ycoord, value, 1);
144 fTsumwx2 += weight * xcoord * xcoord;
146 fTsumwy2 += weight * ycoord * ycoord;
147 fTsumwxy += weight * xcoord * ycoord;
155 while ((obj = next())) {
157 if (bin->
IsInside(xcoord, ycoord)) {
159 bin->
Fill(value, weight);
172 std::vector<TProfile2Poly *> list;
175 for (
int i = 0; i < size; i++) {
178 return this->
Merge(list);
183 if (list.size() == 0) {
184 std::cout <<
"[FAIL] TProfile2Poly::Merge: No objects to be merged " << std::endl;
189 std::set<Int_t> numBinUnique;
190 for (
const auto &histo : list) {
191 numBinUnique.insert(histo->fBins->GetSize());
193 if (numBinUnique.size() != 1) {
194 std::cout <<
"[FAIL] TProfile2Poly::Merge: Bin numbers of TProfile2Polys to be merged differ!" << std::endl;
200 for (
const auto &histo : list) {
202 this->
fTsumw += histo->fTsumw;
203 this->
fTsumw2 += histo->fTsumw2;
204 this->
fTsumwx += histo->fTsumwx;
206 this->
fTsumwy += histo->fTsumwy;
209 this->
fTsumwz += histo->fTsumwz;
224 for (
const auto &
e : list) {
361 std::cout <<
"\t" << cont <<
"\t";
362 if ((i + 1) % 3 == 0) std::cout << std::endl;
365 std::cout <<
"Total: " << total << std::endl;
375 while ((obj = next())) {
void Fill(Double_t value, Double_t weight)
virtual TProfile2PolyBin * CreateBin(TObject *poly) override
Create appropriate histogram bin.
void SetContentToAverage()
void printOverflowRegions()
friend class TProfile2PolyBin
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
Double_t GetEntriesWV2() const
virtual Double_t GetBinError(Int_t bin) const override
Returns the value of error associated to bin number bin.
TAxis fYaxis
Y axis descriptor.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void SetChanged(Bool_t flag)
Double_t GetBinEntriesVW(Int_t bin) const
void Merge(const TProfile2PolyBin *toMerge)
Double_t GetEffectiveEntries() const
Bool_t IsInside(Double_t x, Double_t y) const
Return "true" if the point (x,y) is inside the bin.
Double_t GetError() const
Helper class to represent a bin in the TH2Poly histogram.
Double_t fTsumwx2
Total Sum of weight*X*X.
Long64_t Merge(const std::vector< TProfile2Poly *> &list)
TProfile2PolyBin fOverflowBins[kNOverflow]
Double_t GetOverflowContent(Int_t idx)
Double_t GetEntries() const
void SetContent(Double_t content)
Double_t fTsumwx
Total Sum of weight*X.
Double_t GetEntriesW2() const
virtual Int_t Fill(Double_t xcoord, Double_t ycoord, Double_t value) override
Increment the bin containing (x,y) by w.
Int_t GetOverflowRegionFromCoordinates(Double_t x, Double_t y)
Double_t GetContent() const
Collection abstract base class.
Double_t fEntries
Number of entries.
Int_t GetNumberOfBins() const
virtual void GetStats(Double_t *stats) const override
Fill the array stats from the contents of this profile.
Double_t GetBinEntriesW2(Int_t bin) const
Double_t GetEntriesVW() const
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
void SetErrorOption(EErrorType type)
static unsigned int total
Double_t fTsumw2
Total Sum of squares of weights.
virtual Double_t GetBinContent(Int_t bin) const override
Returns the content of the input bin For the overflow/underflow/sea bins: -1 | -2 | -3 ---+----+---- ...
Int_t OverflowIdxToArrayIdx(Int_t val)
Double_t fTsumw
Total Sum of weights.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual Double_t GetEntries() const
Return the current number of entries.
Mother of all ROOT objects.
virtual void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
Double_t GetBinEntries(Int_t bin) const
TAxis fXaxis
X axis descriptor.
Double_t GetBinEntriesWV2(Int_t bin) const
Double_t GetBinEffectiveEntries(Int_t bin) const
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
virtual Int_t GetSize() const
2D Histogram with Polygonal Bins
Int_t fNcells
number of bins(1D), cells (2D) +U/Overflows