130 fSumw2 += weight * weight;
131 fSumwv2 += weight * value * value;
140 :
TH2Poly(name, title, xlow, xup, ylow, yup)
149 :
TH2Poly(name, title, nX, xlow, xup, nY, ylow, yup)
175 return Fill(xcoord, ycoord, value, 1);
205 fTsumwx2 += weight * xcoord * xcoord;
207 fTsumwy2 += weight * ycoord * ycoord;
208 fTsumwxy += weight * xcoord * ycoord;
216 while ((obj = next())) {
218 if (bin->
IsInside(xcoord, ycoord)) {
220 bin->
Fill(value, weight);
236 std::vector<TProfile2Poly *> list;
239 for (
int i = 0; i < size; i++) {
242 return this->
Merge(list);
250 if (list.size() == 0) {
251 std::cout <<
"[FAIL] TProfile2Poly::Merge: No objects to be merged " << std::endl;
256 std::set<Int_t> numBinUnique;
257 for (
const auto &histo : list) {
258 if (histo->fBins) numBinUnique.insert(histo->fBins->GetSize());
260 if (numBinUnique.size() != 1) {
261 std::cout <<
"[FAIL] TProfile2Poly::Merge: Bin numbers of TProfile2Polys to be merged differ!" << std::endl;
264 Int_t nbins = *numBinUnique.begin();
267 for (
const auto &histo : list) {
269 this->
fTsumw += histo->fTsumw;
270 this->
fTsumw2 += histo->fTsumw2;
271 this->
fTsumwx += histo->fTsumwx;
273 this->
fTsumwy += histo->fTsumwy;
276 this->
fTsumwz += histo->fTsumwz;
288 for (
Int_t i = 0; i < nbins; i++) {
291 for (
const auto &
e : list) {
309 for (
Int_t i = 0; i < nbins; i++) {
327 for (
Int_t i = 0; i < nbins; i++) {
458 std::cout <<
"\t" << cont <<
"\t";
459 if ((i + 1) % 3 == 0) std::cout << std::endl;
462 std::cout <<
"Total: " << total << std::endl;
475 while ((obj = next())) {
void Fill(Double_t value, Double_t weight)
Fill.
virtual TProfile2PolyBin * CreateBin(TObject *poly) override
Create bin.
void SetContentToAverage()
Set content to average.
friend class TProfile2PolyBin
void SetContentToError()
Set content to error.
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
void UpdateError()
Update error.
Double_t GetEntriesWV2() const
virtual Double_t GetBinError(Int_t bin) const override
Get bin error.
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
Get bin entries VW.
void Merge(const TProfile2PolyBin *toMerge)
Merge.
Double_t GetEffectiveEntries() const
Helper class to represent a bin in the TProfile2Poly histogram.
Bool_t IsInside(Double_t x, Double_t y) const
Return "true" if the point (x,y) is inside the bin.
void ClearStats()
Clear statistics.
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)
Merge.
TProfile2PolyBin fOverflowBins[kNOverflow]
Double_t GetOverflowContent(Int_t idx)
Double_t GetEntries() const
void UpdateAverage()
Update average.
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
Fill.
void PrintOverflowRegions()
Print overflow regions.
Int_t GetOverflowRegionFromCoordinates(Double_t x, Double_t y)
The overflow regions are calculated by considering x, y coordinates.
Double_t GetContent() const
Collection abstract base class.
2D Profile Histogram with Polygonal Bins.
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
Get bin entries W2.
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)
Set error option.
static unsigned int total
Double_t fTsumw2
Total Sum of squares of weights.
virtual Double_t GetBinContent(Int_t bin) const override
Get bin content.
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.
Double_t GetBinEntries(Int_t bin) const
Get bin entries.
TAxis fXaxis
X axis descriptor.
Double_t GetBinEntriesWV2(Int_t bin) const
Get bin entries WV2.
Double_t GetBinEffectiveEntries(Int_t bin) const
Get bin effective entries.
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
virtual Int_t GetSize() const
TProfile2PolyBin()
TProfile2PolyBin constructor.
2D Histogram with Polygonal Bins
Int_t fNcells
number of bins(1D), cells (2D) +U/Overflows