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

Specialisation of the BinnedDbn for a 2D profile. More...

#include <Profile.h>

Inheritance diagram for YODA::BinnedDbn< 3, AxisT1, AxisT2 >:
YODA::DbnStorage< 3, AxisT1, AxisT2 > YODA::XAxisMixin< BinnedDbn< 3, AxisT1, AxisT2 >, AxisT1 > YODA::XStatsMixin< BinnedDbn< 3, AxisT1, AxisT2 > > YODA::YAxisMixin< BinnedDbn< 3, AxisT1, AxisT2 >, AxisT2 > YODA::YStatsMixin< BinnedDbn< 3, AxisT1, AxisT2 > > YODA::FillableStorage< DbnN, Dbn< DbnN >, AxisT... > YODA::AnalysisObject YODA::Fillable YODA::BinnedStorage< BinContentT, AxisT >

Public Types

using ProfileT = BinnedDbn< 3, AxisT1, AxisT2 >
 
using BaseT = DbnStorage< 3, AxisT1, AxisT2 >
 
using FillType = typename BaseT::FillType
 
using BinType = typename BaseT::BinT
 
using Ptr = std::shared_ptr< ProfileT >
 
- Public Types inherited from YODA::DbnStorage< 3, AxisT1, AxisT2 >
using BaseT = FillableStorage< DbnN, Dbn< DbnN >, AxisT... >
 
using BinningT = typename BaseT::BinningT
 
using BinT = typename BaseT::BinT
 
using BinType = typename BaseT::BinT
 
using FillType = typename BaseT::FillType
 
- Public Types inherited from YODA::FillableStorage< DbnN, Dbn< DbnN >, AxisT... >
using FillType = FillCoordsT
 Type of the fill coordinates.
 
using FillDimension = std::integral_constant< size_t, FillDim >
 Fill dimension.
 
using FillAdapterT = std::function< void(BinT &, FillCoordsT &&, double, double)>
 Adapter type (type of lambda used to access stored object).
 
- Public Types inherited from YODA::BinnedStorage< BinContentT, 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

 BinnedDbn ()=default
 
 BinnedDbn (const ProfileT &)=default
 
 BinnedDbn (ProfileT &&)=default
 
BinnedDbnoperator= (const ProfileT &)=default
 
BinnedDbnoperator= (ProfileT &&)=default
 
 BinnedDbn (const BaseT &other)
 Copy constructor (needed for clone functions).
 
 BinnedDbn (const ProfileT &other, const std::string &path)
 
 BinnedDbn (BaseT &&other)
 Move constructor.
 
 BinnedDbn (ProfileT &&other, const std::string &path)
 
template<typename EdgeT = double, typename = enable_if_all_CAxisT<EdgeT, AxisT1, AxisT2>>
 BinnedDbn (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.
 
ProfileT clone () const noexcept
 Make a copy on the stack.
 
ProfileTnewclone () const noexcept
 Make a copy on the heap.
 
virtual int fill (const AxisT1 valX, const AxisT2 valY, const double valZ, const double weight=1.0, const double fraction=1.0)
 Fill function with two explicit coordinates.
 
virtual int fill (FillType &&coords, const double weight=1.0, const double fraction=1.0)
 Fill function with FillType.
 
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::DbnStorage< 3, AxisT1, AxisT2 >
 DbnStorage ()
 Nullary constructor for unique pointers etc.
 
 DbnStorage (std::vector< AxisT > &&... binsEdges, const std::string &path="", const std::string &title="")
 Constructor giving explicit bin edges as rvalue reference.
 
 DbnStorage (const std::vector< AxisT > &... binsEdges, const std::string &path="", const std::string &title="")
 Constructor giving explicit bin edges as lvalue const reference.
 
 DbnStorage (std::initializer_list< AxisT > &&... binsEdges, const std::string &path="", const std::string &title="")
 Constructor giving explicit bin edges as initializer list.
 
 DbnStorage (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.
 
 DbnStorage (const Axis< AxisT > &... axes, const std::string &path="", const std::string &title="")
 Constructor given a sequence of axes.
 
 DbnStorage (Axis< AxisT > &&... axes, const std::string &path="", const std::string &title="")
 Constructor given a sequence of rvalue axes.
 
 DbnStorage (const BinningT &binning, const std::string &path="", const std::string &title="")
 Constructor given a BinningT (needed for type reductions)
 
 DbnStorage (BinningT &&binning, const std::string &path="", const std::string &title="")
 Constructor given an rvalue BinningT.
 
 DbnStorage (const ScatterND< sizeof...(AxisT)+1 > &s, const std::string &path="", const std::string &title="")
 Constructor given a scatter.
 
 DbnStorage (const DbnStorage &other, const std::string &path="")
 Copy constructor.
 
 DbnStorage (DbnStorage &&other, const std::string &path="")
 Move constructor.
 
DbnStorage clone () const noexcept
 Make a copy on the stack.
 
DbnStoragenewclone () const noexcept
 Make a copy on the heap.
 
virtual int fill (FillType &&coords, const double weight=1.0, const double fraction=1.0)
 Triggers fill adapter on the bin corresponding to coords.
 
void scaleW (const double scalefactor) noexcept
 Rescale as if all fill weights had been different by factor scalefactor.
 
void scale (const size_t i, const double scalefactor) noexcept
 Rescale as if all fill weights had been different by factor scalefactor along dimension i.
 
void normalize (const double normto=1.0, const bool includeOverflows=true)
 Normalize the (visible) histo "volume" to the normto value.
 
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.
 
DbnStorageoperator= (const DbnStorage &dbn) noexcept
 Copy assignment.
 
DbnStorageoperator= (DbnStorage &&dbn) noexcept
 Move assignment.
 
DbnStorageoperator+= (const DbnStorage &dbn)
 Add two DbnStorages.
 
DbnStorageoperator+= (DbnStorage &&dbn)
 
DbnStorageoperator-= (const DbnStorage &dbn)
 Subtract one DbnStorages from another one.
 
DbnStorageoperator-= (DbnStorage &&dbn)
 
void reset () noexcept
 Reset the histogram.
 
size_t fillDim () const noexcept
 Fill-dimension of this data object.
 
size_t dim () const noexcept
 Total dimension of the object (number of axes + filled value)
 
std::vector< E > edges (const bool includeOverflows=false) const noexcept
 Returns the edges of axis N by value.
 
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 reference.
 
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.
 
double integral (const bool includeOverflows=true) const noexcept
 Get the total volume of the histogram.
 
double integralError (const bool includeOverflows=true) const noexcept
 Get the total volume error of the histogram.
 
double integralTo (const size_t binIndex) const noexcept
 Get the total volume of the histogram.
 
double integralRange (const size_t binIndex1, size_t binIndex2) const
 Calculates the integrated volume of the histogram between global bins binindex1 and binIndex2.
 
double integralRangeError (const size_t binIndex1, size_t binIndex2) const
 Calculates the integrated volume error of the histogram between global bins binindex1 and binIndex2.
 
double numEntries (const bool includeOverflows=true) const noexcept
 Get the number of fills (fractional fills are possible).
 
double effNumEntries (const bool includeOverflows=true) const noexcept
 Get the effective number of fills.
 
double sumW (const bool includeOverflows=true) const noexcept
 Calculates sum of weights in histo.
 
double sumW2 (const bool includeOverflows=true) const noexcept
 Calculates sum of squared weights in histo.
 
double sumWA (const size_t dim, const bool includeOverflows=true) const
 Calculates first moment along axis dim in histo.
 
double sumWA2 (const size_t dim, const bool includeOverflows=true) const
 Calculates second moment along axis dim in histo.
 
double crossTerm (const size_t A1, const size_t A2, const bool includeOverflows=true) const
 Calculates cross-term along axes A1 and A2 in histo.
 
double mean (size_t axisN, const bool includeOverflows=true) const noexcept
 Calculates the mean value at axis.
 
double variance (size_t axisN, const bool includeOverflows=true) const noexcept
 Calculates the variance at axis.
 
double stdDev (size_t axisN, const bool includeOverflows=true) const noexcept
 Calculates the standard deviation at axis.
 
double stdErr (size_t axisN, const bool includeOverflows=true) const noexcept
 Calculates the standard error at axis.
 
double rms (size_t axisN, const bool includeOverflows=true) const noexcept
 Calculates the RMS at axis.
 
double dVol (const bool includeOverflows=true) const noexcept
 
double density (const bool includeOverflows=true) const noexcept
 Get the total density of the histogram.
 
double densityError (const bool includeOverflows=true) const noexcept
 Get the total density error of the histogram.
 
double densitySum (const bool includeOverflows=true) const noexcept
 Returns the sum of the bin densities.
 
double maxDensity (const bool includeOverflows=true) const noexcept
 Returns the largest density in any of the bins.
 
size_t lengthContent (bool=false) const noexcept
 Length of serialized content vector for MPI reduce operations.
 
std::vector< double > serializeContent (bool=false) const noexcept
 Content serialisation for MPI reduce operations.
 
void deserializeContent (const std::vector< double > &data)
 Content deserialisation for MPI reduce operations.
 
BinnedEstimate< AxisT... > mkEstimate (const std::string &path="", const std::string &source="", const bool divbyvol=true) const
 Produce a BinnedEstimate from a DbnStorage.
 
auto mkEstimates (const std::string &path="", const std::string source="", const bool divbyvol=true, const bool includeOverflows=false)
 Produce a BinnedEstimate for each bin along axis axisN and return as a vector.
 
auto mkScatter (const std::string &path="", const bool divbyvol=true, const bool usefocus=false, const bool includeOverflows=false, const bool includeMaskedBins=false) const
 Produce a ScatterND from a DbnStorage.
 
BinnedHisto< AxisT... > mkHisto (const std::string &path="") const
 Produce a BinnedHisto from BinnedProfile.
 
auto mkMarginalProfile (const std::string &path="") const
 Produce a BinnedProfile from a DbnStorage.
 
auto mkMarginalHisto (const std::string &path="") const
 Produce a BinnedHisto from a DbnStorage.
 
auto mkProfiles (const std::string &path="", const bool includeOverflows=false) const
 Split into vector of BinnedProfile along axis axisN.
 
auto mkHistos (const std::string &path="", const bool includeOverflows=false) const
 Split into vector of BinnedHisto along axis axisN.
 
AnalysisObjectmkInert (const std::string &path="", const std::string &source="") const noexcept
 Return an inert version of the analysis object (e.g. scatter, estimate)
 
- Public Member Functions inherited from YODA::FillableStorage< DbnN, Dbn< DbnN >, AxisT... >
 FillableStorage (FillAdapterT adapter=AdapterWrapperT()._adapter)
 Nullary constructor for unique pointers etc.
 
 FillableStorage (const BinningT &binning, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs FillableStorage from Binning.
 
 FillableStorage (BinningT &&binning, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs FillableStorage from Binning. Rvalue.
 
 FillableStorage (const std::vector< AxisT > &... edges, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and vectors of axes' edges.
 
 FillableStorage (std::vector< AxisT > &&... edges, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and Rvalue vectors of axes' edges.
 
 FillableStorage (const Axis< AxisT > &... axes, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and a sequence of axes.
 
 FillableStorage (Axis< AxisT > &&... axes, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and a sequence of Rvalue axes.
 
 FillableStorage (const FillableStorage &other)
 Copy constructor.
 
 FillableStorage (FillableStorage &&other)
 Move constructor.
 
int fill (FillCoordsT &&coords, std::index_sequence< Is... >, const double weight=1.0, const double fraction=1.0) noexcept
 Triggers fill adapter on the bin corresponding to coords.
 
int fill (FillCoordsT &&coords, const double weight=1.0, const double fraction=1.0) noexcept
 Triggers fill adapter on the bin corresponding to coords.
 
size_t fillDim () const
 Returns the dimension of the filling tuple.
 
size_t nanCount () const
 
double nanSumW () const
 
double nanSumW2 () const
 
void setNanLog (size_t count, double sumw, double sumw2)
 
void reset () noexcept
 Reset the Fillable.
 
FillableStorageoperator= (const FillableStorage &other) noexcept
 Copy assignment.
 
FillableStorageoperator= (FillableStorage &&other) noexcept
 Move assignment.
 
FillableStorageoperator+= (const FillableStorage &other)
 Add another BinnedStorage to this one.
 
FillableStorageoperator-= (const FillableStorage &other)
 Subtract another BinnedStorage from this one.
 
- Public Member Functions inherited from YODA::BinnedStorage< BinContentT, 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, BinContentT &&content) noexcept
 Sets the bin corresponding to coords with an rvalue content.
 
void set (typename BinningT::EdgeTypesTuple &&coords, const BinContentT &content) noexcept
 Sets the bin corresponding to coords with content.
 
void set (const size_t binIdx, BinContentT &&content) noexcept
 Sets the bin corresponding to binIndex with an rvalue content.
 
void set (const size_t binIdx, const BinContentT &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
 
template<size_t... AxisNs, class RetT = void>
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, BinContentT >, RetT >
 Merge bins from A to B at G axis.
 
template<size_t axisN, template< typename... > typename BinnedT, typename Func , typename = std::enable_if_t< (axisN < sizeof...(AxisT) && sizeof...(AxisT)>=2) >>
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::Fillable
virtual ~Fillable ()=default
 Virtual destructor for inheritance.
 
- Public Member Functions inherited from YODA::XAxisMixin< BinnedDbn< 3, 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::XStatsMixin< BinnedDbn< 3, AxisT1, AxisT2 > >
double xMean (const bool includeOverflows=true) const noexcept
 Calculate the mean on X axis.
 
double xVariance (const bool includeOverflows=true) const noexcept
 Calculate the variance on X axis.
 
double xStdDev (const bool includeOverflows=true) const noexcept
 Calculate the standard deviation on X axis.
 
double xStdErr (const bool includeOverflows=true) const noexcept
 Calculate the standard error on X axis.
 
double xRMS (const bool includeOverflows=true) const noexcept
 Calculate the RMS on X axis.
 
- Public Member Functions inherited from YODA::YAxisMixin< BinnedDbn< 3, 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)
 
- Public Member Functions inherited from YODA::YStatsMixin< BinnedDbn< 3, AxisT1, AxisT2 > >
double yMean (const bool includeOverflows=true) const noexcept
 Calculate the mean on Y axis.
 
double yVariance (const bool includeOverflows=true) const noexcept
 Calculate the variance on Y axis.
 
double yStdDev (const bool includeOverflows=true) const noexcept
 Calculate the standard deviation on Y axis.
 
double yStdErr (const bool includeOverflows=true) const noexcept
 Calculate the standard error on Y axis.
 
double yRMS (const bool includeOverflows=true) const noexcept
 Calculate the RMS on Y axis.
 

Additional Inherited Members

- Protected Types inherited from YODA::FillableStorage< DbnN, Dbn< DbnN >, AxisT... >
using BaseT = BinnedStorage< Dbn< DbnN >, AxisT... >
 Convenience alias to be used in constructor.
 
using BinningT = typename BaseT::BinningT
 
using BinT = Bin< sizeof...(AxisT), Dbn< DbnN >, BinningT >
 
using AdapterWrapperT = defaultAdapter< FillDim, BinT >
 
using FillableT = FillableStorage< FillDim, Dbn< DbnN >, AxisT... >
 
using FillCoordsT = decltype(std::tuple_cat(std::declval< typename BinningT::EdgeTypesTuple >(), dblPadding(std::make_index_sequence< FillDim-sizeof...(AxisT)>{})))
 
- Protected Types inherited from YODA::BinnedStorage< BinContentT, AxisT >
using BinningT = Binning< std::decay_t< decltype(std::declval< Axis< AxisT > >())>... >
 Convenience alias to be used in constructor.
 
using BinT = Bin< sizeof...(AxisT), BinContentT, BinningT >
 
using BinsVecT = std::vector< BinT >
 
using BaseT = BinnedStorage< BinContentT, AxisT... >
 
- Protected Member Functions inherited from YODA::BinnedStorage< BinContentT, 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::BinnedDbn< 3, AxisT1, AxisT2 >

Specialisation of the BinnedDbn for a 2D profile.

Definition at line 95 of file Profile.h.

Member Typedef Documentation

◆ BaseT

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BaseT = DbnStorage<3, AxisT1, AxisT2>

Definition at line 104 of file Profile.h.

◆ BinType

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

Definition at line 106 of file Profile.h.

◆ FillType

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedDbn< 3, AxisT1, AxisT2 >::FillType = typename BaseT::FillType

Definition at line 105 of file Profile.h.

◆ ProfileT

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedDbn< 3, AxisT1, AxisT2 >::ProfileT = BinnedDbn<3, AxisT1, AxisT2>

Definition at line 103 of file Profile.h.

◆ Ptr

template<typename AxisT1 , typename AxisT2 >
using YODA::BinnedDbn< 3, AxisT1, AxisT2 >::Ptr = std::shared_ptr<ProfileT>

Definition at line 107 of file Profile.h.

Constructor & Destructor Documentation

◆ BinnedDbn() [1/8]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BinnedDbn ( )
default

◆ BinnedDbn() [2/8]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BinnedDbn ( const ProfileT )
default

◆ BinnedDbn() [3/8]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BinnedDbn ( ProfileT &&  )
default

◆ BinnedDbn() [4/8]

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

Copy constructor (needed for clone functions).

Note
Compiler won't generate this constructor automatically.

Definition at line 122 of file Profile.h.

122: BaseT(other) {}
DbnStorage< 3, AxisT1, AxisT2 > BaseT
Definition Profile.h:104

◆ BinnedDbn() [5/8]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BinnedDbn ( const ProfileT other,
const std::string &  path 
)
inline

Definition at line 124 of file Profile.h.

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

◆ BinnedDbn() [6/8]

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

Move constructor.

Definition at line 127 of file Profile.h.

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

◆ BinnedDbn() [7/8]

template<typename AxisT1 , typename AxisT2 >
YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BinnedDbn ( ProfileT &&  other,
const std::string &  path 
)
inline

Definition at line 129 of file Profile.h.

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

◆ BinnedDbn() [8/8]

template<typename AxisT1 , typename AxisT2 >
template<typename EdgeT = double, typename = enable_if_all_CAxisT<EdgeT, AxisT1, AxisT2>>
YODA::BinnedDbn< 3, AxisT1, AxisT2 >::BinnedDbn ( 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 138 of file Profile.h.

141 : BaseT({nbinsX, nbinsY}, {{lowerX, upperX}, {lowerY, upperY}}, path, title) {}
const std::string title() const
Get the AO title.

Member Function Documentation

◆ bin() [1/4]

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

Bin access using global index (const version)

Definition at line 169 of file Profile.h.

169 {
170 return BaseT::bin(index);
171 }
BinT & bin(size_t idx) noexcept
Returns reference to the bin at idx.

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

◆ bin() [2/4]

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

Bin access using global index.

Definition at line 164 of file Profile.h.

164 {
165 return BaseT::bin(index);
166 }

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

◆ bin() [3/4]

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

Bin access using local indices (const version)

Definition at line 179 of file Profile.h.

179 {
180 return BaseT::bin( {localX, localY} );
181 }

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

◆ bin() [4/4]

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

Bin access using local indices.

Definition at line 174 of file Profile.h.

174 {
175 return BaseT::bin( {localX, localY} );
176 }

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

◆ binAt() [1/2]

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

Bin access using coordinates (const version)

Definition at line 189 of file Profile.h.

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

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

◆ binAt() [2/2]

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

Bin access using coordinates.

Definition at line 184 of file Profile.h.

184 {
185 return BaseT::binAt( {xCoord, yCoord} );
186 }

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

◆ clone()

template<typename AxisT1 , typename AxisT2 >
ProfileT YODA::BinnedDbn< 3, AxisT1, AxisT2 >::clone ( ) const
inlinenoexcept

Make a copy on the stack.

Definition at line 144 of file Profile.h.

144 {
145 return ProfileT(*this);
146 }
BinnedDbn< 3, AxisT1, AxisT2 > ProfileT
Definition Profile.h:103

◆ fill() [1/2]

template<typename AxisT1 , typename AxisT2 >
virtual int YODA::BinnedDbn< 3, AxisT1, AxisT2 >::fill ( const AxisT1  valX,
const AxisT2  valY,
const double  valZ,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Fill function with two explicit coordinates.

Definition at line 154 of file Profile.h.

154 {
155 return BaseT::fill({valX, valY, valZ}, weight, fraction);
156 }
virtual int fill(FillType &&coords, const double weight=1.0, const double fraction=1.0)
Triggers fill adapter on the bin corresponding to coords.
Definition BinnedDbn.h:229

References YODA::DbnStorage< DbnN, AxisT... >::fill().

◆ fill() [2/2]

template<typename AxisT1 , typename AxisT2 >
virtual int YODA::BinnedDbn< 3, AxisT1, AxisT2 >::fill ( FillType &&  coords,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Fill function with FillType.

Definition at line 159 of file Profile.h.

159 {
160 return BaseT::fill(std::move(coords), weight, fraction);
161 }

References YODA::DbnStorage< DbnN, AxisT... >::fill().

◆ indexAt()

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

Find bin index for given coordinates.

Definition at line 194 of file Profile.h.

194 {
195 return BaseT::binAt( {xCoord, yCoord} ).index();
196 }

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

◆ maskBinAt()

template<typename AxisT1 , typename AxisT2 >
void YODA::BinnedDbn< 3, 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 199 of file Profile.h.

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

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

◆ newclone()

template<typename AxisT1 , typename AxisT2 >
ProfileT * YODA::BinnedDbn< 3, AxisT1, AxisT2 >::newclone ( ) const
inlinevirtualnoexcept

Make a copy on the heap.

Implements YODA::AnalysisObject.

Definition at line 149 of file Profile.h.

149 {
150 return new ProfileT(*this);
151 }

◆ operator=() [1/2]

template<typename AxisT1 , typename AxisT2 >
BinnedDbn & YODA::BinnedDbn< 3, AxisT1, AxisT2 >::operator= ( const ProfileT )
default

◆ operator=() [2/2]

template<typename AxisT1 , typename AxisT2 >
BinnedDbn & YODA::BinnedDbn< 3, AxisT1, AxisT2 >::operator= ( ProfileT &&  )
default

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