25namespace owned = ::mist::hep::owned;
32project_y(
const TGraph& source,
int n_bins,
double min,
double max,
33 const char* name =
"histo_project_y")
36 for (
int i = 0; i < source.GetN(); ++i) h->Fill(source.GetPointY(i));
46 for (
int i = 0; i < source.GetN(); ++i)
47 target.Fill(source.GetPointX(i), source.GetPointY(i));
57 for (
int i = 0; i < source.GetN(); ++i)
58 target.Fill(source.GetPointX(i), source.GetPointY(i));
63 auto& fn =
const_cast<TF1&
>(f);
64 for (
int i = 1; i <= target.GetNbinsX(); ++i) {
65 const double x = target.GetXaxis()->GetBinCenter(i);
66 target.Fill(x, fn.Eval(x));
76 double min,
double max)
78 for (
int i = 0; i < source.GetN(); ++i) {
79 const double x = source.GetPointX(i);
80 if (x < min)
continue;
82 target.Fill(source.GetPointY(i));
87 double min,
double max)
89 for (
int i = 1; i <= source.GetNbinsX(); ++i) {
90 const double x = source.GetBinCenter(i);
91 if (x < min)
continue;
93 target.Fill(source.GetBinContent(i));
void fill_persistence(TH2 &target, const TGraph &source)
Definition fill.h:55
owned::root_ptr< TH1F > project_y(const TGraph &source, int n_bins, double min, double max, const char *name="histo_project_y")
Definition fill.h:32
void fill_from_interval(TH1 &target, const TGraph &source, double min, double max)
Definition fill.h:75
void fill_profile(TProfile &target, const TGraph &source)
Definition fill.h:44
std::unique_ptr< T, root_deleter > root_ptr
Definition owned.h:60
root_ptr< T > make(Args &&... args)
Definition owned.h:67