Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Rebin2DHelpers.h File Reference
#include "TAxis.h"
#include "TH1.h"
#include "TMath.h"
#include <initializer_list>
#include <utility>
#include <vector>
Include dependency graph for Rebin2DHelpers.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  ROOT::Internal::RebinnedAxisInfo
 The definition of one axis of the rebinned histogram. More...
 

Namespaces

namespace  ROOT
 
namespace  ROOT::Internal
 

Functions

void ROOT::Internal::DefineRebinnedAxis (const TAxis &oldAxis, Int_t ngroup, Int_t nnew, const Double_t *userBins, Double_t xmin, Double_t xmax, TAxis &newAxis)
 Define the axis of the rebinned histogram: either from the user-provided bin edges, or by merging groups of ngroup bins of the old axis.
 
std::vector< Int_tROOT::Internal::MakeRebinMap (const TAxis &oldAxis, const TAxis &newAxis)
 Map each cell of the old axis (including underflow 0 and overflow n+1) to the cell of the new axis that contains its bin center.
 
void ROOT::Internal::MergeRebinnedCells (Int_t nOldX, Int_t nOldY, Int_t nNewX, const std::vector< Int_t > &mapX, const std::vector< Int_t > &mapY, std::initializer_list< std::pair< const Double_t *, Double_t * > > arrays)
 Accumulate every old cell (including under- and overflow) into the new cell given by the per-axis bin maps, for each (old array, new array) pair.
 
void ROOT::Internal::SetRebinnedBins2D (TH1 &hnew, const TAxis &newXaxis, const TAxis &newYaxis)
 Apply the axes of the rebinned histogram, using explicit bin edges if any of the two axes has non-uniform bins.
 
bool ROOT::Internal::SetupRebinnedAxis (const TAxis &oldAxis, Int_t ngroup, const Double_t *userBins, char axisName, TH1 &hist, const char *where, RebinnedAxisInfo &info)
 Validate the rebinning parameters for one axis and fill the definition of the rebinned axis and the map from old to new bins.
 
void ROOT::Internal::WarnAboutMisalignedEdges (const TAxis &oldAxis, const TAxis &newAxis, TH1 &hist, const char *where)
 Warn when a bin edge of the new axis that lies inside the old axis range does not line up with a bin edge of the old axis: the entries of the old bin that is split cannot be distributed correctly.
 
void ROOT::Internal::WarnAboutUnusedFlowContent (const TAxis &oldAxis, const RebinnedAxisInfo &info, const Double_t *userBins, char axisName, const Double_t *bins, Int_t stride, Int_t nOther, Int_t otherStride, TH1 &hist, const char *where)
 Warn when the range of the new axis extends beyond the old one while the corresponding flow bins hold content: that content stays in the flow bins and is not redistributed into the range of the new axis.