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

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

#include <Profile.h>

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

Public Types

using ProfileT = BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >
 
using BaseT = DbnStorage< 4, AxisT1, AxisT2, AxisT3 >
 
using FillType = typename BaseT::FillType
 
using BinType = typename BaseT::BinT
 
using Ptr = std::shared_ptr< ProfileT >
 
- Public Types inherited from YODA::DbnStorage< 4, AxisT1, AxisT2, AxisT3 >
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, AxisT3>>
 BinnedDbn (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.
 
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 AxisT3 valZ, const double valZplus, const double weight=1.0, const double fraction=1.0)
 Fill function with three 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, 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 (const version)
 
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::DbnStorage< 4, AxisT1, AxisT2, AxisT3 >
 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< 4, 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::XStatsMixin< BinnedDbn< 4, AxisT1, AxisT2, AxisT3 > >
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< 4, AxisT1, AxisT2, AxisT3 >, AxisT3 >
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< AxisT3 > 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< 4, AxisT1, AxisT2, AxisT3 > >
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, typename AxisT3>
class YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >

Specialisation of the BinnedDbn for a 2D profile.

Definition at line 209 of file Profile.h.

Member Typedef Documentation

◆ BaseT

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

Definition at line 218 of file Profile.h.

◆ BinType

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

Definition at line 220 of file Profile.h.

◆ FillType

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

Definition at line 219 of file Profile.h.

◆ ProfileT

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

Definition at line 217 of file Profile.h.

◆ Ptr

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

Definition at line 221 of file Profile.h.

Constructor & Destructor Documentation

◆ BinnedDbn() [1/8]

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

◆ BinnedDbn() [2/8]

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

◆ BinnedDbn() [3/8]

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

◆ BinnedDbn() [4/8]

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

Copy constructor (needed for clone functions).

Note
Compiler won't generate this constructor automatically.

Definition at line 236 of file Profile.h.

236: BaseT(other) {}
DbnStorage< 4, AxisT1, AxisT2, AxisT3 > BaseT
Definition Profile.h:218

◆ BinnedDbn() [5/8]

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

Definition at line 238 of file Profile.h.

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

◆ BinnedDbn() [6/8]

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

Move constructor.

Definition at line 241 of file Profile.h.

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

◆ BinnedDbn() [7/8]

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

Definition at line 243 of file Profile.h.

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

◆ BinnedDbn() [8/8]

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

256 : BaseT({nbinsX, nbinsY, nbinsZ},
257 {{lowerX, upperX}, {lowerY, upperY},
258 {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::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::bin ( const size_t  index) const
inlinenoexcept

Bin access using global index (const version)

Definition at line 287 of file Profile.h.

287 {
288 return BaseT::bin(index);
289 }
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 , typename AxisT3 >
BinType & YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::bin ( const size_t  index)
inlinenoexcept

Bin access using global index.

Definition at line 282 of file Profile.h.

282 {
283 return BaseT::bin(index);
284 }

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

◆ bin() [3/4]

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

Bin access using local indices (const version)

Definition at line 297 of file Profile.h.

297 {
298 return BaseT::bin( {localX, localY, localZ} );
299 }

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

◆ bin() [4/4]

template<typename AxisT1 , typename AxisT2 , typename AxisT3 >
BinType & YODA::BinnedDbn< 4, 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 292 of file Profile.h.

292 {
293 return BaseT::bin( {localX, localY, localZ} );
294 }

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

◆ binAt() [1/2]

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

Bin access using coordinates (const version)

Definition at line 307 of file Profile.h.

307 {
308 return BaseT::binAt( {xCoord, yCoord, zCoord} );
309 }
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 , typename AxisT3 >
BinType & YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::binAt ( const AxisT1  xCoord,
const AxisT2  yCoord,
const AxisT3  zCoord 
)
inlinenoexcept

Bin access using coordinates.

Definition at line 302 of file Profile.h.

302 {
303 return BaseT::binAt( {xCoord, yCoord, zCoord} );
304 }

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

◆ clone()

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

Make a copy on the stack.

Definition at line 261 of file Profile.h.

261 {
262 return ProfileT(*this);
263 }
BinnedDbn< 4, AxisT1, AxisT2, AxisT3 > ProfileT
Definition Profile.h:217

◆ fill() [1/2]

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

Fill function with three explicit coordinates.

Definition at line 271 of file Profile.h.

272 {
273 return BaseT::fill({valX, valY, valZ, valZplus}, weight, fraction);
274 }
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 , typename AxisT3 >
virtual int YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::fill ( FillType &&  coords,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Fill function with FillType.

Definition at line 277 of file Profile.h.

277 {
278 return BaseT::fill(std::move(coords), weight, fraction);
279 }

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

◆ indexAt()

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

Find bin index for given coordinates.

Definition at line 312 of file Profile.h.

312 {
313 return BaseT::binAt( {xCoord, yCoord, zCoord} ).index();
314 }

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

◆ maskBinAt()

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

317 {
318 return BaseT::maskBin({xCoord, yCoord, zCoord}, status);
319 }
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 , typename AxisT3 >
ProfileT * YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::newclone ( ) const
inlinevirtualnoexcept

Make a copy on the heap.

Implements YODA::AnalysisObject.

Definition at line 266 of file Profile.h.

266 {
267 return new ProfileT(*this);
268 }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

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