mist-hep 0.1.0
ROOT-backed analysis helpers built on mist
Loading...
Searching...
No Matches
mist::hep::graph Namespace Reference

Namespaces

namespace  detail
 

Enumerations

enum class  out_of_range { skip , nan , extrapolate }
 

Functions

std::pair< double, double > eval (const TGraphErrors &g, double x)
 
std::array< double, 2 > eval_with_errors (const TGraphErrors &g, double x_target)
 
owned::root_ptr< TGraphErrors > add (const TGraphErrors &g, double addend, double addend_error=0.0)
 
owned::root_ptr< TGraphErrors > offset (const TGraphErrors &g, std::array< double, 2 > add_value)
 
owned::root_ptr< TGraphErrors > power (const TGraphErrors &g, double exponent)
 
owned::root_ptr< TGraphErrors > scale_values (const TGraphErrors &g, double factor, double factor_error=0.0)
 
owned::root_ptr< TGraphErrors > log (const TGraphErrors &g)
 
owned::root_ptr< TGraphErrors > log10 (const TGraphErrors &g)
 
owned::root_ptr< TGraphErrors > ratio (const TGraphErrors &numerator, const TGraphErrors &denominator, bool propagate_error=true)
 
owned::root_ptr< TGraphErrors > product (const TGraphErrors &a, const TGraphErrors &b, bool propagate_error=true)
 
owned::root_ptr< TGraphErrors > difference (const TGraphErrors &a, const TGraphErrors &b, bool propagate_error=true)
 
owned::root_ptr< TGraphErrors > difference (const TGraphErrors &g, const TF1 &f)
 
owned::root_ptr< TGraphErrors > trim (const TGraphErrors &g, double min_x, double max_x)
 
owned::root_ptr< TGraphErrors > mean_of (const std::vector< TGraphErrors * > &graphs)
 
owned::root_ptr< TGraphErrors > average_rms (const TGraphErrors &g, int n_bins, double x_min, double x_max)
 
owned::root_ptr< TGraph > derivative (const TGraph &g, double factor=1.0)
 
owned::root_ptr< TGraph > block_average (const TGraph &source, std::size_t block_size, bool drop_partial=false)
 
owned::root_ptr< TGraph > block_rms (const TGraph &source, std::size_t block_size, bool drop_partial=false)
 
owned::root_ptr< TGraph > moving_average (const TGraph &source, std::size_t window_size)
 
owned::root_ptr< TGraph > relative_diff (const TGraph &subject, const TGraph &reference, out_of_range policy=out_of_range::skip)
 
owned::root_ptr< TGraph > shift_x_to_origin (const TGraph &source)
 
owned::root_ptr< TGraph > negate_y (const TGraph &source)
 
owned::root_ptr< TGraph > negate_x (const TGraph &source)
 
owned::root_ptr< TGraph > negate_xy (const TGraph &source)
 
owned::root_ptr< TGraph > scale (const TGraph &source, double scale_x, double scale_y)
 
owned::root_ptr< TGraphErrors > scale (const TGraphErrors &source, double scale_x, double scale_y)
 
owned::root_ptr< TGraph > swap_xy (const TGraph &source)
 
owned::root_ptr< TGraphErrors > swap_xy (const TGraphErrors &source)
 
owned::root_ptr< TGraphErrors > to_graph_errors (const TGraph &source)
 
owned::root_ptr< TGraphErrors > from_profile (const TProfile &source)
 

Enumeration Type Documentation

◆ out_of_range

enum class mist::hep::graph::out_of_range
strong
Enumerator
skip 

Drop the point (the graphutils-original behaviour).

nan 

Emit the point with a NaN y-value.

extrapolate 

Use TGraph::Eval's linear extrapolation regardless.

Function Documentation

◆ add()

owned::root_ptr< TGraphErrors > mist::hep::graph::add ( const TGraphErrors &  g,
double  addend,
double  addend_error = 0.0 
)
inline

◆ average_rms()

owned::root_ptr< TGraphErrors > mist::hep::graph::average_rms ( const TGraphErrors &  g,
int  n_bins,
double  x_min,
double  x_max 
)
inline

◆ block_average()

owned::root_ptr< TGraph > mist::hep::graph::block_average ( const TGraph &  source,
std::size_t  block_size,
bool  drop_partial = false 
)
inline

◆ block_rms()

owned::root_ptr< TGraph > mist::hep::graph::block_rms ( const TGraph &  source,
std::size_t  block_size,
bool  drop_partial = false 
)
inline

◆ derivative()

owned::root_ptr< TGraph > mist::hep::graph::derivative ( const TGraph &  g,
double  factor = 1.0 
)
inline

◆ difference() [1/2]

owned::root_ptr< TGraphErrors > mist::hep::graph::difference ( const TGraphErrors &  a,
const TGraphErrors &  b,
bool  propagate_error = true 
)
inline

◆ difference() [2/2]

owned::root_ptr< TGraphErrors > mist::hep::graph::difference ( const TGraphErrors &  g,
const TF1 &  f 
)
inline

◆ eval()

std::pair< double, double > mist::hep::graph::eval ( const TGraphErrors &  g,
double  x 
)
inline

◆ eval_with_errors()

std::array< double, 2 > mist::hep::graph::eval_with_errors ( const TGraphErrors &  g,
double  x_target 
)
inline

◆ from_profile()

owned::root_ptr< TGraphErrors > mist::hep::graph::from_profile ( const TProfile &  source)
inline

◆ log()

owned::root_ptr< TGraphErrors > mist::hep::graph::log ( const TGraphErrors &  g)
inline

◆ log10()

owned::root_ptr< TGraphErrors > mist::hep::graph::log10 ( const TGraphErrors &  g)
inline

◆ mean_of()

owned::root_ptr< TGraphErrors > mist::hep::graph::mean_of ( const std::vector< TGraphErrors * > &  graphs)
inline

◆ moving_average()

owned::root_ptr< TGraph > mist::hep::graph::moving_average ( const TGraph &  source,
std::size_t  window_size 
)
inline

◆ negate_x()

owned::root_ptr< TGraph > mist::hep::graph::negate_x ( const TGraph &  source)
inline

◆ negate_xy()

owned::root_ptr< TGraph > mist::hep::graph::negate_xy ( const TGraph &  source)
inline

◆ negate_y()

owned::root_ptr< TGraph > mist::hep::graph::negate_y ( const TGraph &  source)
inline

◆ offset()

owned::root_ptr< TGraphErrors > mist::hep::graph::offset ( const TGraphErrors &  g,
std::array< double, 2 >  add_value 
)
inline

◆ power()

owned::root_ptr< TGraphErrors > mist::hep::graph::power ( const TGraphErrors &  g,
double  exponent 
)
inline

◆ product()

owned::root_ptr< TGraphErrors > mist::hep::graph::product ( const TGraphErrors &  a,
const TGraphErrors &  b,
bool  propagate_error = true 
)
inline

◆ ratio()

owned::root_ptr< TGraphErrors > mist::hep::graph::ratio ( const TGraphErrors &  numerator,
const TGraphErrors &  denominator,
bool  propagate_error = true 
)
inline

◆ relative_diff()

owned::root_ptr< TGraph > mist::hep::graph::relative_diff ( const TGraph &  subject,
const TGraph &  reference,
out_of_range  policy = out_of_range::skip 
)
inline

◆ scale() [1/2]

owned::root_ptr< TGraph > mist::hep::graph::scale ( const TGraph &  source,
double  scale_x,
double  scale_y 
)
inline

◆ scale() [2/2]

owned::root_ptr< TGraphErrors > mist::hep::graph::scale ( const TGraphErrors &  source,
double  scale_x,
double  scale_y 
)
inline

◆ scale_values()

owned::root_ptr< TGraphErrors > mist::hep::graph::scale_values ( const TGraphErrors &  g,
double  factor,
double  factor_error = 0.0 
)
inline

◆ shift_x_to_origin()

owned::root_ptr< TGraph > mist::hep::graph::shift_x_to_origin ( const TGraph &  source)
inline

◆ swap_xy() [1/2]

owned::root_ptr< TGraph > mist::hep::graph::swap_xy ( const TGraph &  source)
inline

◆ swap_xy() [2/2]

owned::root_ptr< TGraphErrors > mist::hep::graph::swap_xy ( const TGraphErrors &  source)
inline

◆ to_graph_errors()

owned::root_ptr< TGraphErrors > mist::hep::graph::to_graph_errors ( const TGraph &  source)
inline

◆ trim()

owned::root_ptr< TGraphErrors > mist::hep::graph::trim ( const TGraphErrors &  g,
double  min_x,
double  max_x 
)
inline