Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Framework/Core/include/Framework/StepTHn.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ class StepTHn : public TNamed

THnBase** mTarget; //! target histogram

TAxis** mAxisCache; //! cache axis pointers (about 50% of the time in Fill is spent in GetAxis otherwise)
Int_t* mNbinsCache; //! cache Nbins per axis
Double_t* mLastVars; //! caching of last used bins (in many loops some vars are the same for a while)
Int_t* mLastBins; //! caching of last used bins (in many loops some vars are the same for a while)
TAxis** mAxisCache; //! cache axis pointers (about 50% of the time in Fill is spent in GetAxis otherwise)
Int_t* mNbinsCache; //! cache Nbins per axis
Double_t* mLastVars; //! caching of last used bins (in many loops some vars are the same for a while)
Int_t* mLastBins; //! caching of last used bins (in many loops some vars are the same for a while)

// Fast bin lookup table: for each axis, maps a quantized position to an approximate bin.
static constexpr Int_t kLookupSize = 1024; // number of slots per axis
static constexpr Int_t kLookupSize = 1024; // number of slots per axis
struct AxisLookup {
Double_t invSlotWidth; // 1.0 / slot width for fast index computation
Double_t xmin; // axis minimum
Double_t xmax; // axis maximum
const Double_t* edges; // pointer to bin edges array (nBins+1 entries)
Int_t nBins; // number of bins
Double_t invSlotWidth; // 1.0 / slot width for fast index computation
Double_t xmin; // axis minimum
Double_t xmax; // axis maximum
const Double_t* edges; // pointer to bin edges array (nBins+1 entries)
Int_t nBins; // number of bins
Int_t table[kLookupSize]; // slot -> bin index (1-based, TAxis convention)
};
AxisLookup* mLookup; //! per-axis lookup tables
Expand Down