58 const double volume = idx >= 0 ? volumes[idx] : 1.;
73 for (std::size_t i=0; i < bins.size(); ++i) {
78 for (std::size_t i=0; i < bins.size(); ++i) {
79 output[i] = bins[i] >= 0 ? 1./volumes[bins[i]] : 1.;
82 for (std::size_t i=0; i < bins.size(); ++i) {
83 output[i] = bins[i] >= 0 ? volumes[bins[i]] : 1.;
90std::unique_ptr<RooAbsArg>
virtual std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const
TObject * Clone(const char *newname=nullptr) const override
Make a clone of an object using the Streamer facility.
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
void computeBatch(cudaStream_t *, double *output, size_t size, RooFit::Detail::DataMap const &) const override
Compute bin index for all values of the observable(s) in evalData, and return their volumes or invers...
static void disableClass()
Globally disable bin-width corrections by this class.
double evaluate() const override
Compute current bin of observable, and return its volume or inverse volume, depending on configuratio...
RooTemplateProxy< const RooHistFunc > _histFunc
static bool isClassEnabled()
Returns true if bin-width corrections by this class are globally enabled, false otherwise.
static void enableClass()
Globally enable bin-width corrections by this class.
The RooDataHist is a container class to hold N-dimensional binned data.
RooSpan< const double > binVolumes(std::size_t first, std::size_t len) const
Retrieve all bin volumes. Bins are indexed according to getIndex().
void markAsCompiled(RooAbsArg &arg) const
bool binnedLikelihoodMode() const
void setBinWidthFuncFlag(bool flag)
std::vector< Int_t > getBins(RooFit::Detail::DataMap const &dataMap) const
Compute bin numbers corresponding to all coordinates in evalData.
Int_t getBin() const
Compute bin number corresponding to current coordinates.
RooDataHist & dataHist()
Return RooDataHist that is represented.
RooConstVar & RooConst(double val)