yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.0
YODA::BinnedEstimate< AxisT1, AxisT2 > Class Template Reference

Specialisation of the BinnedEstimate for a 2D BinnedEstimate. More...

#include <BinnedEstimate.h>

Inheritance diagram for YODA::BinnedEstimate< AxisT1, AxisT2 >:
YODA::EstimateStorage< AxisT1, AxisT2 > YODA::XAxisMixin< BinnedEstimate< AxisT1, AxisT2 >, AxisT1 > YODA::YAxisMixin< BinnedEstimate< AxisT1, AxisT2 >, AxisT2 > YODA::BinnedStorage< Estimate, AxisT... > YODA::AnalysisObject

Public Types

using EstimateT = BinnedEstimate< AxisT1, AxisT2 >
 
using BaseT = EstimateStorage< AxisT1, AxisT2 >
 
using BinType = typename BaseT::BinT
 
using Ptr = std::shared_ptr< EstimateT >
 
- Public Types inherited from YODA::EstimateStorage< AxisT1, AxisT2 >
using BinType = BinT
 
- Public Types inherited from YODA::BinnedStorage< Estimate, AxisT... >
using BinningType = BinningT
 
using BinType = BinT
 
using BinDimension = std::integral_constant< size_t, sizeof...(AxisT)>
 
- Public Types inherited from YODA::AnalysisObject
typedef std::map< std::string, std::string > Annotations
 Collection type for annotations, as a string-string map.
 

Public Member Functions

 BinnedEstimate (const EstimateT &)=default
 
 BinnedEstimate (EstimateT &&)=default
 
BinnedEstimateoperator= (const EstimateT &)=default
 
BinnedEstimateoperator= (EstimateT &&)=default
 
 BinnedEstimate (const BaseT &other)
 Copy constructor (needed for clone functions).
 
 BinnedEstimate (const EstimateT &other, const std::string &path)
 
 BinnedEstimate (BaseT &&other)
 Move constructor.
 
 BinnedEstimate (EstimateT &&other, const std::string &path)
 
 BinnedEstimate (std::vector< AxisT1 > &&xEdges, std::vector< AxisT2 > &&yEdges, const std::string &path="", const std::string &title="")
 
 BinnedEstimate (const std::vector< AxisT1 > &xEdges, const std::vector< AxisT2 > &yEdges, const std::string &path="", const std::string &title="")
 
template<typename EdgeT = double, typename = enable_if_all_CAxisT<EdgeT, AxisT1, AxisT2>>
 BinnedEstimate (size_t nbinsX, double lowerX, double upperX, size_t nbinsY, double lowerY, double upperY, const std::string &path="", const std::string &title="")
 Constructor with auto-setup of evenly spaced axes.
 
EstimateT clone () const noexcept
 Make a copy on the stack.
 
EstimateTnewclone () const noexcept
 Make a copy on the heap.
 
BinTypebin (const size_t index) noexcept
 Bin access using global index.
 
const BinTypebin (const size_t index) const noexcept
 Bin access using global index (const version)
 
BinTypebin (const size_t localX, const size_t localY) noexcept
 Bin access using local indices.
 
const BinTypebin (const size_t localX, const size_t localY) const noexcept
 Bin access using local indices (const version)
 
BinTypebinAt (const AxisT1 xCoord, const AxisT2 yCoord) noexcept
 Bin access using coordinates.
 
const BinTypebinAt (const AxisT1 xCoord, const AxisT2 yCoord) const noexcept
 Bin access using coordinates (const version)
 
size_t indexAt (const AxisT1 xCoord, const AxisT2 yCoord) const noexcept
 Find bin index for given coordinates.
 
void maskBinAt (const AxisT1 xCoord, const AxisT2 yCoord, const bool status=true) noexcept
 Mask/Unmask bin at given set of coordinates.
 
- Public Member Functions inherited from YODA::EstimateStorage< AxisT1, AxisT2 >
 EstimateStorage (const std::string &path="", const std::string &title="")
 Nullary constructor for unique pointers etc.
 
 EstimateStorage (std::vector< AxisT > &&... binsEdges, const std::string &path="", const std::string &title="")
 Constructor giving explicit bin edges as rvalue reference.
 
 EstimateStorage (const std::vector< AxisT > &... binsEdges, const std::string &path="", const std::string &title="")
 Constructor giving explicit bin edges as lvalue reference.
 
 EstimateStorage (std::initializer_list< AxisT > &&... binsEdges, const std::string &path="", const std::string &title="")
 Constructor giving explicit bin edges as initializer list.
 
 EstimateStorage (const std::vector< size_t > &nBins, const std::vector< std::pair< EdgeT, EdgeT > > &limitsLowUp, const std::string &path="", const std::string &title="")
 Constructor giving range and number of bins.
 
 EstimateStorage (const BinningT &binning, const std::string &path="", const std::string &title="")
 Constructor given a binning type.
 
 EstimateStorage (BinningT &&binning, const std::string &path="", const std::string &title="")
 Constructor given an rvalue BinningT.
 
 EstimateStorage (const ScatterND< sizeof...(AxisT)+1 > &s, const std::string &path="", const std::string &title="")
 Constructor given a scatter.
 
 EstimateStorage (const EstimateStorage &other, const std::string &path="")
 Copy constructor.
 
 EstimateStorage (EstimateStorage &&other, const std::string &path="")
 Move constructor.
 
EstimateStorage clone () const noexcept
 Make a copy on the stack.
 
EstimateStoragenewclone () const noexcept
 Make a copy on the heap.
 
void scale (const double scalefactor) noexcept
 Rescale as if all fill weights had been different by factor scalefactor.
 
void rebinBy (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 Merge every group of n bins, from start to end inclusive.
 
void rebin (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 Overloaded alias for rebinBy.
 
void rebin (const std::vector< typename BinningT::template getAxisT< axisN >::EdgeT > &newedges)
 Overloaded alias for rebinTo.
 
void rebinTo (const std::vector< typename BinningT::template getAxisT< axisN >::EdgeT > &newedges)
 Rebin to the given list of bin edges.
 
void reset () noexcept
 Reset the EstimateStorage.
 
EstimateStorageoperator= (const EstimateStorage &est) noexcept
 Copy assignment.
 
EstimateStorageoperator= (EstimateStorage &&est) noexcept
 Move assignment.
 
EstimateStorageadd (const EstimateStorage &est, const std::string &pat_uncorr="^stat|^uncor")
 Add two EstimateStorages.
 
EstimateStorageadd (EstimateStorage &&est, const std::string &pat_uncorr="^stat|^uncor")
 Add two (rvalue) EstimateStorages.
 
EstimateStorageoperator+= (const EstimateStorage &est)
 
EstimateStorageoperator+= (EstimateStorage &&est)
 
EstimateStoragesubtract (const EstimateStorage &est, const std::string &pat_uncorr="^stat|^uncor")
 Subtract one EstimateStorages from another one.
 
EstimateStoragesubtract (EstimateStorage &&est, const std::string &pat_uncorr="^stat|^uncor")
 Subtract one (rvalue) EstimateStorages from another one.
 
EstimateStorageoperator-= (const EstimateStorage &est)
 
EstimateStorageoperator-= (EstimateStorage &&est)
 
size_t dim () const noexcept
 Total dimension of the object (number of axes + estimate)
 
std::vector< E > edges (const bool includeOverflows=false) const noexcept
 Templated version to get edges of axis N by value. +-inf edges are included.
 
std::enable_if_t< std::is_floating_point< E >::value, std::vector< E > > widths (const bool includeOverflows=false) const noexcept
 Templated version to get bin widths of axis N by value.
 
std::enable_if_t< std::is_floating_point< E >::value, E > min () const noexcept
 Get the lowest non-overflow edge of the axis.
 
std::enable_if_t< std::is_floating_point< E >::value, E > max () const noexcept
 Get the highest non-overflow edge of the axis.
 
std::vector< double > vals (const bool includeOverflows=false, const bool includeMaskedBins=false) const
 Get list of central values.
 
std::vector< std::string > sources () const
 Get list of error sources.
 
double areaUnderCurve (const bool includeBinVol=true, const bool includeOverflows=false, const bool includeMaskedBins=false) const
 Calculate the volume underneath the EstimateStorage.
 
double auc (const bool includeBinVol=true, const bool includeOverflows=false, const bool includeMaskedBins=false) const
 Convenient alias for areaUnderCurve()
 
std::vector< std::vector< double > > covarianceMatrix (const bool ignoreOffDiagonalTerms=false, const bool includeOverflows=false, const bool includeMaskedBins=false) const
 Construct a covariance matrix from the error breakdown.
 
auto mkScatter (const std::string &path="", const bool includeOverflows=false, const bool includeMaskedBins=false) const
 Produce a ScatterND from a EstimateStorage.
 
auto mkEstimates (const std::string &path="", const bool includeOverflows=false) const
 Split into vector of BinnedEstimates along axisN.
 
AnalysisObjectmkInert (const std::string &path="", const std::string &source="") const noexcept
 Method returns clone of the estimate with streamlined error source.
 
size_t lengthContent (bool fixed_length=false) const noexcept
 Length of serialized content vector for MPI reduce operations.
 
std::vector< double > serializeContent (bool fixed_length=false) const noexcept
 Content serialisation for MPI reduce operations.
 
void deserializeContent (const std::vector< double > &data)
 Content deserialisation for MPI reduce operations.
 
- Public Member Functions inherited from YODA::BinnedStorage< Estimate, AxisT... >
 BinnedStorage ()
 Nullary constructor for unique pointers etc.
 
 BinnedStorage (const BinningT &binning)
 Constructs BinnedStorage from Binning.
 
 BinnedStorage (BinningT &&binning)
 Constructs BinnedStorage from Binning. Rvalue.
 
 BinnedStorage (const std::vector< AxisT > &... edges)
 Constructs binning from an adapter and vectors of axes' edges.
 
 BinnedStorage (std::vector< AxisT > &&... edges)
 Constructs binning from an adapter and Rvalue vectors of axes' edges.
 
 BinnedStorage (std::initializer_list< AxisT > &&... edges)
 Constructs binning from an adapter and Rvalue initializer lists of axes' edges.
 
 BinnedStorage (const Axis< AxisT > &... axes)
 Constructs binning from an adapter and a sequence of axes.
 
 BinnedStorage (Axis< AxisT > &&... axes)
 Constructs binning from an adapter and a sequence of Rvalue axes.
 
 BinnedStorage (const BinnedStorage &other)
 Copy constructor.
 
 BinnedStorage (BinnedStorage &&other)
 Move constructor.
 
size_t dim () const noexcept
 Total dimension of the object ( = number of axes + content)
 
BinTbin (size_t idx) noexcept
 Returns reference to the bin at idx.
 
const BinTbin (size_t idx) const noexcept
 Returns Bin at idx.
 
BinTbin (const std::array< size_t, sizeof...(AxisT)> &idxLocal) noexcept
 Bin access using local bin indices.
 
const BinTbin (const std::array< size_t, sizeof...(AxisT)> &idxLocal) const noexcept
 Bin access using local bin indices.
 
BinTbinAt (typename BinningT::EdgeTypesTuple &&coords) noexcept
 Returns reference to the bin at coordinates.
 
const BinTbinAt (typename BinningT::EdgeTypesTuple &&coords) const noexcept
 Returns reference to the bin at coordinates (const version).
 
void set (typename BinningT::EdgeTypesTuple &&coords, Estimate &&content) noexcept
 Sets the bin corresponding to coords with an rvalue content.
 
void set (typename BinningT::EdgeTypesTuple &&coords, const Estimate &content) noexcept
 Sets the bin corresponding to coords with content.
 
void set (const size_t binIdx, Estimate &&content) noexcept
 Sets the bin corresponding to binIndex with an rvalue content.
 
void set (const size_t binIdx, const Estimate &content) noexcept
 Sets the bin corresponding to binIndex with content.
 
std::vector< size_t > calcIndicesToSkip (const bool includeOverflows, const bool includeMaskedBins) const noexcept
 Calculates indices of bins which are marked or located in the overflow.
 
BinsVecWrapper< BinsVecTbins (const bool includeOverflows=false, const bool includeMaskedBins=false) noexcept
 Returns bins vector wrapper, which skips masked elements when iterated over.
 
const BinsVecWrapper< const BinsVecTbins (const bool includeOverflows=false, const bool includeMaskedBins=false) const noexcept
 Const version.
 
const BinningTbinning () const noexcept
 Returns dimension underlying binning object reference.
 
size_t binDim () const noexcept
 Returns dimension of binning.
 
size_t numBins (const bool includeOverflows=false, const bool includeMaskedBins=false) const noexcept
 Number of bins in the BinnedStorage.
 
size_t numBinsAt (const size_t axisN, const bool includeOverflows=false) const noexcept
 Number of bins in the BinnedStorage.
 
void reset () noexcept
 Reset the BinnedStorage.
 
void clearBins () noexcept
 Deletes all bins and creates empty new ones.
 
void maskBins (const std::vector< size_t > &indicesToMask, const bool status=true) noexcept
 Mask a range of bins.
 
void maskBin (const size_t indexToMask, const bool status=true) noexcept
 Mask a bin at a given index.
 
void maskSlice (const size_t dim, const size_t idx, const bool status=true)
 Mask a slice of the binning at local bin index idx along axis dimesnion dim.
 
void maskBinAt (typename BinningT::EdgeTypesTuple &&coords, const bool status=true) noexcept
 Mask a bin at a given set of corrdinates.
 
bool isMasked (const size_t binIndex) const noexcept
 
std::vector< size_t > maskedBins () const noexcept
 
bool isVisible (const size_t binIndex) const noexcept
 
auto mergeBins (std::decay_t< decltype(AxisNs, std::declval< std::pair< size_t, size_t > >())>... mergeRanges) noexcept -> std::enable_if_t< MetaUtils::is_detected_v< MetaUtils::operatorTraits::addition_assignment_t, Estimate >, RetT >
 Merge bins from A to B at G axis.
 
auto mkBinnedSlices (Func &&how2add, const bool includeOverflows=false) const
 Split this BinnedStorage into a vector of BinnedStorages along axisN.
 
BinnedStorageoperator= (const BinnedStorage &other) noexcept
 Copy assignment.
 
BinnedStorageoperator= (BinnedStorage &&other) noexcept
 Move assignment.
 
bool operator== (const BinnedStorage &other) const noexcept
 Compares BinnedStorages for equality, e.g. dimensions of underlying binnings and all axes edges are equal.
 
bool operator!= (const BinnedStorage &other) const noexcept
 Compares BinnedStorages for inequality.
 
- Public Member Functions inherited from YODA::AnalysisObject
 AnalysisObject ()
 Default constructor.
 
 AnalysisObject (const std::string &type, const std::string &path, const std::string &title="")
 Constructor giving a type, a path and an optional title.
 
 AnalysisObject (const std::string &type, const std::string &path, const AnalysisObject &ao, const std::string &title="")
 Constructor giving a type, a path, another AO to copy annotation from, and an optional title.
 
virtual ~AnalysisObject ()
 Default destructor.
 
virtual AnalysisObjectoperator= (const AnalysisObject &ao) noexcept
 Default copy assignment operator.
 
std::vector< std::string > annotations () const
 
bool hasAnnotation (const std::string &name) const
 Check if an annotation is defined.
 
const std::string & annotation (const std::string &name) const
 Get an annotation by name (as a string)
 
const std::string & annotation (const std::string &name, const std::string &defaultreturn) const
 Get an annotation by name (as a string) with a default in case the annotation is not found.
 
template<typename T >
const T annotation (const std::string &name) const
 Get an annotation by name (copied to another type)
 
template<typename T >
const T annotation (const std::string &name, const T &defaultreturn) const
 Get an annotation by name (copied to another type) with a default in case the annotation is not found.
 
template<typename T >
void setAnnotation (const std::string &name, const T &value)
 Add or set an annotation by name (templated for remaining types)
 
void setAnnotations (const Annotations &anns)
 Set all annotations at once.
 
template<typename T >
void addAnnotation (const std::string &name, const T &value)
 Add or set an annotation by name.
 
void rmAnnotation (const std::string &name)
 Delete an annotation by name.
 
void clearAnnotations ()
 Delete an annotation by name.
 
const std::string title () const
 Get the AO title.
 
void setTitle (const std::string &title)
 Set the AO title.
 
const std::string path () const
 Get the AO path.
 
void setPath (const std::string &path)
 
const std::string name () const
 
virtual std::string type () const
 Get name of the analysis object type.
 
size_t lengthMeta (const bool skipPath=true, const bool skipTitle=true) const noexcept
 Length of serialized meta-data vector for MPI reduce operations.
 
std::vector< std::string > serializeMeta (const bool skipPath=true, const bool skipTitle=true) const noexcept
 Mate-data serialisation for MPI reduce operations.
 
virtual void deserializeMeta (const std::vector< std::string > &data, const bool resetPath=false, const bool resetTitle=false)
 Mate-data deserialisation for MPI reduce operations.
 
- Public Member Functions inherited from YODA::XAxisMixin< BinnedEstimate< AxisT1, AxisT2 >, AxisT1 >
size_t numBinsX (const bool includeOverflows=false) const
 Number of bins along the X axis.
 
enable_if_CAxisT< T > xMin () const
 Low edge of first histo's axis.
 
enable_if_CAxisT< T > xMax () const
 High edge of first histo's axis.
 
std::vector< AxisT1 > xEdges (const bool includeOverflows=false) const
 All bin edges on X axis. +-inf edges are included.
 
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > xWidths (const bool includeOverflows=false) const
 All widths on X axis.
 
void rebinXBy (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinXTo (const std::vector< double > &newedges)
 
void rebinX (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinX (const std::vector< double > &newedges)
 
- Public Member Functions inherited from YODA::YAxisMixin< BinnedEstimate< AxisT1, AxisT2 >, AxisT2 >
size_t numBinsY (const bool includeOverflows=false) const
 Number of bins along the Y axis.
 
enable_if_CAxisT< T > yMin () const
 Low edge of second histo's axis.
 
enable_if_CAxisT< T > yMax () const
 High edge of second histo's axis.
 
std::vector< AxisT2 > yEdges (const bool includeOverflows=false) const
 All bin edges on Y axis. +-inf edges are included.
 
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > yWidths (const bool includeOverflows=false) const
 All widths on Y axis.
 
void rebinYBy (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinYTo (const std::vector< double > &newedges)
 
void rebinY (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinY (const std::vector< double > &newedges)
 

Additional Inherited Members

- Protected Types inherited from YODA::EstimateStorage< AxisT1, AxisT2 >
using BaseT = BinnedStorage< Estimate, AxisT... >
 
using BinningT = typename BaseT::BinningT
 
using BinT = typename BaseT::BinT
 
- Protected Types inherited from YODA::BinnedStorage< Estimate, AxisT... >
using BinningT = Binning< std::decay_t< decltype(std::declval< Axis< AxisT > >())>... >
 Convenience alias to be used in constructor.
 
using BinT = Bin< sizeof...(AxisT), Estimate, BinningT >
 
using BinsVecT = std::vector< BinT >
 
using BaseT = BinnedStorage< Estimate, AxisT... >
 
- Protected Member Functions inherited from YODA::BinnedStorage< Estimate, AxisT... >
void fillBins () noexcept
 Fills bins with wrapped BinContent objects.
 
void fillBins (const BinsVecT &bins) noexcept
 
void fillBins (BinsVecT &&bins) noexcept
 

Detailed Description

template<typename AxisT1, typename AxisT2>
class YODA::BinnedEstimate< AxisT1, AxisT2 >

Specialisation of the BinnedEstimate for a 2D BinnedEstimate.

Definition at line 864 of file BinnedEstimate.h.

Member Typedef Documentation

◆ BaseT

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedEstimate< AxisT1, AxisT2 >::BaseT = EstimateStorage<AxisT1, AxisT2>

Definition at line 870 of file BinnedEstimate.h.

◆ BinType

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedEstimate< AxisT1, AxisT2 >::BinType = typename BaseT::BinT

Definition at line 871 of file BinnedEstimate.h.

◆ EstimateT

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedEstimate< AxisT1, AxisT2 >::EstimateT = BinnedEstimate<AxisT1, AxisT2>

Definition at line 869 of file BinnedEstimate.h.

◆ Ptr

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedEstimate< AxisT1, AxisT2 >::Ptr = std::shared_ptr<EstimateT>

Definition at line 872 of file BinnedEstimate.h.

Constructor & Destructor Documentation

◆ BinnedEstimate() [1/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( const EstimateT )
default

◆ BinnedEstimate() [2/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( EstimateT &&  )
default

◆ BinnedEstimate() [3/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( const BaseT other)
inline

Copy constructor (needed for clone functions).

Note
Compiler won't generate this constructor automatically.

Definition at line 886 of file BinnedEstimate.h.

886: BaseT(std::move(other)) {}
EstimateStorage< AxisT1, AxisT2 > BaseT

◆ BinnedEstimate() [4/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( const EstimateT other,
const std::string &  path 
)
inline

Definition at line 888 of file BinnedEstimate.h.

888: BaseT(other, path) {}
const std::string path() const
Get the AO path.

◆ BinnedEstimate() [5/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( BaseT &&  other)
inline

Move constructor.

Definition at line 891 of file BinnedEstimate.h.

891: BaseT(std::move(other)) {}

◆ BinnedEstimate() [6/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( EstimateT &&  other,
const std::string &  path 
)
inline

Definition at line 893 of file BinnedEstimate.h.

893: BaseT(std::move(other), path) {}

◆ BinnedEstimate() [7/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( std::vector< AxisT1 > &&  xEdges,
std::vector< AxisT2 > &&  yEdges,
const std::string &  path = "",
const std::string &  title = "" 
)
inline

Definition at line 895 of file BinnedEstimate.h.

897 : BaseT(std::move(xEdges), std::move(yEdges), path, title) {}
const std::string title() const
Get the AO title.
std::vector< AxisT1 > xEdges(const bool includeOverflows=false) const
All bin edges on X axis. +-inf edges are included.
Definition BinnedUtils.h:37
std::vector< AxisT2 > yEdges(const bool includeOverflows=false) const
All bin edges on Y axis. +-inf edges are included.

◆ BinnedEstimate() [8/9]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( const std::vector< AxisT1 > &  xEdges,
const std::vector< AxisT2 > &  yEdges,
const std::string &  path = "",
const std::string &  title = "" 
)
inline

Definition at line 899 of file BinnedEstimate.h.

901 : BaseT(xEdges, yEdges, path, title) {}

◆ BinnedEstimate() [9/9]

template<typename AxisT1 , typename AxisT2 >
template<typename EdgeT = double, typename = enable_if_all_CAxisT<EdgeT, AxisT1, AxisT2>>
YODA::BinnedEstimate< AxisT1, AxisT2 >::BinnedEstimate ( size_t  nbinsX,
double  lowerX,
double  upperX,
size_t  nbinsY,
double  lowerY,
double  upperY,
const std::string &  path = "",
const std::string &  title = "" 
)
inline

Constructor with auto-setup of evenly spaced axes.

The constructor argument uses double rather than EdgeT to allow for auto-conversion of int to double.

Note
This constructor is only supported when all axes are continuous.

Definition at line 910 of file BinnedEstimate.h.

913 : BaseT({nbinsX, nbinsY}, {{lowerX, upperX}, {lowerY, upperY}}, path, title) {}

Member Function Documentation

◆ bin() [1/4]

template<typename AxisT1 , typename AxisT2 >
const BinType & YODA::BinnedEstimate< AxisT1, AxisT2 >::bin ( const size_t  index) const
inlinenoexcept

Bin access using global index (const version)

Definition at line 931 of file BinnedEstimate.h.

931 {
932 return BaseT::bin(index);
933 }
BinT & bin(size_t idx) noexcept
Returns reference to the bin at idx.

References YODA::BinnedStorage< Estimate, AxisT... >::bin().

◆ bin() [2/4]

template<typename AxisT1 , typename AxisT2 >
BinType & YODA::BinnedEstimate< AxisT1, AxisT2 >::bin ( const size_t  index)
inlinenoexcept

Bin access using global index.

Definition at line 926 of file BinnedEstimate.h.

926 {
927 return BaseT::bin(index);
928 }

References YODA::BinnedStorage< Estimate, AxisT... >::bin().

◆ bin() [3/4]

template<typename AxisT1 , typename AxisT2 >
const BinType & YODA::BinnedEstimate< AxisT1, AxisT2 >::bin ( const size_t  localX,
const size_t  localY 
) const
inlinenoexcept

Bin access using local indices (const version)

Definition at line 941 of file BinnedEstimate.h.

941 {
942 return BaseT::bin( {localX, localY} );
943 }

References YODA::BinnedStorage< Estimate, AxisT... >::bin().

◆ bin() [4/4]

template<typename AxisT1 , typename AxisT2 >
BinType & YODA::BinnedEstimate< AxisT1, AxisT2 >::bin ( const size_t  localX,
const size_t  localY 
)
inlinenoexcept

Bin access using local indices.

Definition at line 936 of file BinnedEstimate.h.

936 {
937 return BaseT::bin( {localX, localY} );
938 }

References YODA::BinnedStorage< Estimate, AxisT... >::bin().

◆ binAt() [1/2]

template<typename AxisT1 , typename AxisT2 >
const BinType & YODA::BinnedEstimate< AxisT1, AxisT2 >::binAt ( const AxisT1  xCoord,
const AxisT2  yCoord 
) const
inlinenoexcept

Bin access using coordinates (const version)

Definition at line 951 of file BinnedEstimate.h.

951 {
952 return BaseT::binAt( {xCoord, yCoord} );
953 }
BinT & binAt(typename BinningT::EdgeTypesTuple &&coords) noexcept
Returns reference to the bin at coordinates.

References YODA::BinnedStorage< Estimate, AxisT... >::binAt().

◆ binAt() [2/2]

template<typename AxisT1 , typename AxisT2 >
BinType & YODA::BinnedEstimate< AxisT1, AxisT2 >::binAt ( const AxisT1  xCoord,
const AxisT2  yCoord 
)
inlinenoexcept

Bin access using coordinates.

Definition at line 946 of file BinnedEstimate.h.

946 {
947 return BaseT::binAt( {xCoord, yCoord} );
948 }

References YODA::BinnedStorage< Estimate, AxisT... >::binAt().

◆ clone()

template<typename AxisT1 , typename AxisT2 >
EstimateT YODA::BinnedEstimate< AxisT1, AxisT2 >::clone ( ) const
inlinenoexcept

Make a copy on the stack.

Definition at line 916 of file BinnedEstimate.h.

916 {
917 return EstimateT(*this);
918 }
BinnedEstimate< AxisT1, AxisT2 > EstimateT

◆ indexAt()

template<typename AxisT1 , typename AxisT2 >
size_t YODA::BinnedEstimate< AxisT1, AxisT2 >::indexAt ( const AxisT1  xCoord,
const AxisT2  yCoord 
) const
inlinenoexcept

Find bin index for given coordinates.

Definition at line 956 of file BinnedEstimate.h.

956 {
957 return BaseT::binAt( {xCoord, yCoord} ).index();
958 }

References YODA::BinnedStorage< Estimate, AxisT... >::binAt().

◆ maskBinAt()

template<typename AxisT1 , typename AxisT2 >
void YODA::BinnedEstimate< AxisT1, AxisT2 >::maskBinAt ( const AxisT1  xCoord,
const AxisT2  yCoord,
const bool  status = true 
)
inlinenoexcept

Mask/Unmask bin at given set of coordinates.

Definition at line 961 of file BinnedEstimate.h.

961 {
962 return BaseT::maskBin({xCoord, yCoord}, status);
963 }
void maskBin(const size_t indexToMask, const bool status=true) noexcept
Mask a bin at a given index.

References YODA::BinnedStorage< Estimate, AxisT... >::maskBin().

◆ newclone()

template<typename AxisT1 , typename AxisT2 >
EstimateT * YODA::BinnedEstimate< AxisT1, AxisT2 >::newclone ( ) const
inlinevirtualnoexcept

Make a copy on the heap.

Implements YODA::AnalysisObject.

Definition at line 921 of file BinnedEstimate.h.

921 {
922 return new EstimateT(*this);
923 }

◆ operator=() [1/2]

template<typename AxisT1 , typename AxisT2 >
BinnedEstimate & YODA::BinnedEstimate< AxisT1, AxisT2 >::operator= ( const EstimateT )
default

◆ operator=() [2/2]

template<typename AxisT1 , typename AxisT2 >
BinnedEstimate & YODA::BinnedEstimate< AxisT1, AxisT2 >::operator= ( EstimateT &&  )
default

The documentation for this class was generated from the following file: