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

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

#include <BinnedEstimate.h>

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

Public Types

using EstimateT = BinnedEstimate< AxisT1, AxisT2, AxisT3 >
 
using BaseT = EstimateStorage< AxisT1, AxisT2, AxisT3 >
 
using BinType = typename BaseT::BinT
 
using Ptr = std::shared_ptr< EstimateT >
 
- Public Types inherited from YODA::EstimateStorage< AxisT1, AxisT2, AxisT3 >
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)
 
template<typename EdgeT = double, typename = enable_if_all_CAxisT<EdgeT, AxisT1, AxisT2, AxisT3>>
 BinnedEstimate (size_t nbinsX, double lowerX, double upperX, size_t nbinsY, double lowerY, double upperY, size_t nbinsZ, double lowerZ, double upperZ, 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, const size_t localZ) noexcept
 Bin access using local indices.
 
const BinTypebin (const size_t localX, const size_t localY, const size_t localZ) const noexcept
 Bin access using local indices.
 
BinTypebinAt (const AxisT1 xCoord, const AxisT2 yCoord, const AxisT3 zCoord) noexcept
 Bin access using coordinates.
 
const BinTypebinAt (const AxisT1 xCoord, const AxisT2 yCoord, const AxisT3 zCoord) const noexcept
 Bin access using coordinates (const version)
 
size_t indexAt (const AxisT1 xCoord, const AxisT2 yCoord, const AxisT3 zCoord) const noexcept
 Find bin index for given coordinates.
 
void maskBinAt (const AxisT1 xCoord, const AxisT2 yCoord, const AxisT3 zCoord, const bool status=true) noexcept
 Mask/Unmask bin at given set of coordinates.
 
- Public Member Functions inherited from YODA::EstimateStorage< AxisT1, AxisT2, AxisT3 >
 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 std::string &pat_uncorr="^stat|^uncor") const
 Construct a covariance matrix from the error breakdown.
 
auto mkScatter (const std::string &path="", const std::string &pat_match="", 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, AxisT3 >, 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, AxisT3 >, 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)
 
- Public Member Functions inherited from YODA::ZAxisMixin< BinnedEstimate< AxisT1, AxisT2, AxisT3 >, AxisT3 >
size_t numBinsZ (const bool includeOverflows=false) const
 Number of bins along the Z axis.
 
enable_if_CAxisT< T > zMin () const
 Low edge of second histo's axis.
 
enable_if_CAxisT< T > zMax () const
 High edge of second histo's axis.
 
std::vector< AxisT3 > zEdges (const bool includeOverflows=false) const
 All bin edges on Z axis. +-inf edges are included.
 
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > zWidths (const bool includeOverflows=false) const
 All widths on Z axis.
 
void rebinZBy (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinZTo (const std::vector< double > &newedges)
 
void rebinZ (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinZ (const std::vector< double > &newedges)
 

Additional Inherited Members

- Protected Types inherited from YODA::EstimateStorage< AxisT1, AxisT2, AxisT3 >
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, typename AxisT3>
class YODA::BinnedEstimate< AxisT1, AxisT2, AxisT3 >

Specialisation of the BinnedEstimate for a 3D BinnedEstimate.

Definition at line 974 of file BinnedEstimate.h.

Member Typedef Documentation

◆ BaseT

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

Definition at line 981 of file BinnedEstimate.h.

◆ BinType

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

Definition at line 982 of file BinnedEstimate.h.

◆ EstimateT

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

Definition at line 980 of file BinnedEstimate.h.

◆ Ptr

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

Definition at line 983 of file BinnedEstimate.h.

Constructor & Destructor Documentation

◆ BinnedEstimate() [1/7]

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

◆ BinnedEstimate() [2/7]

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

◆ BinnedEstimate() [3/7]

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

Copy constructor (needed for clone functions).

Note
Compiler won't generate this constructor automatically.

Definition at line 997 of file BinnedEstimate.h.

997: BaseT(other) {}
EstimateStorage< AxisT1, AxisT2, AxisT3 > BaseT

◆ BinnedEstimate() [4/7]

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

Definition at line 999 of file BinnedEstimate.h.

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

◆ BinnedEstimate() [5/7]

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

Move constructor.

Definition at line 1002 of file BinnedEstimate.h.

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

◆ BinnedEstimate() [6/7]

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

Definition at line 1004 of file BinnedEstimate.h.

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

◆ BinnedEstimate() [7/7]

template<typename AxisT1 , typename AxisT2 , typename AxisT3 >
template<typename EdgeT = double, typename = enable_if_all_CAxisT<EdgeT, AxisT1, AxisT2, AxisT3>>
YODA::BinnedEstimate< AxisT1, AxisT2, AxisT3 >::BinnedEstimate ( size_t  nbinsX,
double  lowerX,
double  upperX,
size_t  nbinsY,
double  lowerY,
double  upperY,
size_t  nbinsZ,
double  lowerZ,
double  upperZ,
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 1013 of file BinnedEstimate.h.

1017 : BaseT({nbinsX, nbinsY, nbinsZ}, {{lowerX, upperX}, {lowerY, upperY},
1018 {lowerZ, upperZ}}, path, title) {}
const std::string title() const
Get the AO title.

Member Function Documentation

◆ bin() [1/4]

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

Bin access using global index (const version)

Definition at line 1036 of file BinnedEstimate.h.

1036 {
1037 return BaseT::bin(index);
1038 }
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 , typename AxisT3 >
BinType & YODA::BinnedEstimate< AxisT1, AxisT2, AxisT3 >::bin ( const size_t  index)
inlinenoexcept

Bin access using global index.

Definition at line 1031 of file BinnedEstimate.h.

1031 {
1032 return BaseT::bin(index);
1033 }

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

◆ bin() [3/4]

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

Bin access using local indices.

Definition at line 1046 of file BinnedEstimate.h.

1046 {
1047 return BaseT::bin( {localX, localY, localZ} );
1048 }

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

◆ bin() [4/4]

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

Bin access using local indices.

Definition at line 1041 of file BinnedEstimate.h.

1041 {
1042 return BaseT::bin( {localX, localY, localZ} );
1043 }

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

◆ binAt() [1/2]

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

Bin access using coordinates (const version)

Definition at line 1056 of file BinnedEstimate.h.

1056 {
1057 return BaseT::binAt( {xCoord, yCoord, zCoord} );
1058 }
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 , typename AxisT3 >
BinType & YODA::BinnedEstimate< AxisT1, AxisT2, AxisT3 >::binAt ( const AxisT1  xCoord,
const AxisT2  yCoord,
const AxisT3  zCoord 
)
inlinenoexcept

Bin access using coordinates.

Definition at line 1051 of file BinnedEstimate.h.

1051 {
1052 return BaseT::binAt( {xCoord, yCoord, zCoord} );
1053 }

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

◆ clone()

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

Make a copy on the stack.

Definition at line 1021 of file BinnedEstimate.h.

1021 {
1022 return EstimateT(*this);
1023 }
BinnedEstimate< AxisT1, AxisT2, AxisT3 > EstimateT

◆ indexAt()

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

Find bin index for given coordinates.

Definition at line 1061 of file BinnedEstimate.h.

1061 {
1062 return BaseT::binAt( {xCoord, yCoord, zCoord} ).index();
1063 }

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

◆ maskBinAt()

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

Mask/Unmask bin at given set of coordinates.

Definition at line 1066 of file BinnedEstimate.h.

1066 {
1067 return BaseT::maskBin({xCoord, yCoord, zCoord}, status);
1068 }
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 , typename AxisT3 >
EstimateT * YODA::BinnedEstimate< AxisT1, AxisT2, AxisT3 >::newclone ( ) const
inlinevirtualnoexcept

Make a copy on the heap.

Implements YODA::AnalysisObject.

Definition at line 1026 of file BinnedEstimate.h.

1026 {
1027 return new EstimateT(*this);
1028 }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

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