#include <APReweight.h>
Public Member Functions | |
APReweight () | |
APReweight (TTree *denominator, std::string denominator_branch, TTree *numerator, std::string numerator_branch, unsigned int n_bins, double x_min, double x_max, bool isTrig=false) | |
APReweight (std::vector< double > denominator, std::vector< double > numerator, unsigned int n_bins, double x_min, double x_max, bool isTrig=false) | |
APReweight (TH1 *denominator_in, TH1 *numerator_in, bool isTrig=false) | |
virtual | ~APReweight () |
void | ReadEfficiency (TH1 *efficiency_in, TH1 *err_low_in, TH1 *err_high_in=0) |
APWeightEntry * | GetBinWeight (unsigned int bin) const |
APWeightEntry * | GetWeight (double value) const |
double | GetSampleScale () const |
unsigned int | NBins () const |
unsigned int | GetBin (double value) const |
TH1D * | GetDenominatorHist () const |
TH1D * | GetNumeratorHist () const |
void | SetSystUncert (double rel_uncert) |
void | SetQuietMode (bool isQuiet=true) |
Class to store 1D parameterized weight maps
Stores a 1D parameterization of APWeightEntries from numerator and denominator histograms or from an efficiency histogram and uncertainties.
APReweight::APReweight | ( | ) |
Default constructor.
APReweight::APReweight | ( | TTree * | denominator, | |
std::string | denominator_branch, | |||
TTree * | numerator, | |||
std::string | numerator_branch, | |||
unsigned int | n_bins, | |||
double | x_min, | |||
double | x_max, | |||
bool | isTrig = false | |||
) |
Constructor for whole branches (numerator/denominator) to read in.
APReweight::APReweight | ( | std::vector< double > | denominator, | |
std::vector< double > | numerator, | |||
unsigned int | n_bins, | |||
double | x_min, | |||
double | x_max, | |||
bool | isTrig = false | |||
) |
Constructor for vectors (numerator/denominator) to read in.
APReweight::APReweight | ( | TH1 * | denominator_in, | |
TH1 * | numerator_in, | |||
bool | isTrig = false | |||
) |
Constructor for histograms (numerator/denominator) to read in.
APReweight::~APReweight | ( | ) | [virtual] |
Default destructor.
unsigned int APReweight::GetBin | ( | double | value | ) | const |
Get bin number that corresponds to a given value.
APWeightEntry * APReweight::GetBinWeight | ( | unsigned int | bin | ) | const |
Get Weight entry for a given bin number.
TH1D * APReweight::GetDenominatorHist | ( | ) | const |
Get original denominator histogram.
TH1D * APReweight::GetNumeratorHist | ( | ) | const |
Get original numerator histogram.
double APReweight::GetSampleScale | ( | ) | const |
Get scale factor that was calculated from sample sizes upon instantiation.
APWeightEntry * APReweight::GetWeight | ( | double | value | ) | const |
Get Weight entry for a given value.
unsigned int APReweight::NBins | ( | ) | const |
Get amount of bins.
void APReweight::ReadEfficiency | ( | TH1 * | efficiency_in, | |
TH1 * | err_low_in, | |||
TH1 * | err_high_in = 0 | |||
) |
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e.g. Bootstrap)).
void APReweight::SetQuietMode | ( | bool | isQuiet = true |
) |
Sets the flag to turn off messages.
void APReweight::SetSystUncert | ( | double | rel_uncert | ) |
Set the global relative (!) systematic uncertainty of all efficiencies/weights.