22#include <mist/algo/binning.h>
27namespace owned = ::mist::hep::owned;
31inline std::vector<double>
graph_x(
const TGraph& g)
33 std::vector<double> xs;
35 for (
int i = 0; i < g.GetN(); ++i) xs.push_back(g.GetPointX(i));
39inline std::vector<double>
graph_y(
const TGraph& g)
41 std::vector<double> ys;
43 for (
int i = 0; i < g.GetN(); ++i) ys.push_back(g.GetPointY(i));
48zip(
const std::vector<double>& xs,
const std::vector<double>& ys)
51 const std::size_t n = std::min(xs.size(), ys.size());
52 for (std::size_t i = 0; i < n; ++i)
53 out->SetPoint(
static_cast<int>(i), xs[i], ys[i]);
68 bool drop_partial =
false)
71 block_size, drop_partial);
73 block_size, drop_partial);
82block_rms(
const TGraph& source, std::size_t block_size,
83 bool drop_partial =
false)
86 block_size, drop_partial);
88 block_size, drop_partial);
std::vector< double > graph_x(const TGraph &g)
Definition binning.h:31
owned::root_ptr< TGraph > zip(const std::vector< double > &xs, const std::vector< double > &ys)
Definition binning.h:48
std::vector< double > graph_y(const TGraph &g)
Definition binning.h:39
owned::root_ptr< TGraph > block_average(const TGraph &source, std::size_t block_size, bool drop_partial=false)
Definition binning.h:67
owned::root_ptr< TGraph > block_rms(const TGraph &source, std::size_t block_size, bool drop_partial=false)
Definition binning.h:82
std::unique_ptr< T, root_deleter > root_ptr
Definition owned.h:60
root_ptr< T > make(Args &&... args)
Definition owned.h:67