|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #ifndef APWeightEntry_h
19 #define APWeightEntry_h
29 APWeightEntry(
unsigned int val_denominator,
unsigned int val_numerator,
double scale,
bool isTrig =
false);
33 void SetCoordinates(
const std::vector<int>& coords,
const std::vector<int>& n_dim_origin);
45 unsigned int GetID()
const;
47 const std::vector< int > &
GetCoords()
const;
54 void SetID(
unsigned int id);
std::vector< int > m_coords
Holds the coordinates of the current entry in the original histogram.
unsigned int GetID() const
Returns the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND).
void SetCoordinates(const std::vector< int > &coords, const std::vector< int > &n_dim_origin)
bool m_is_trig
Flag, set to true if weight entry is trigger based.
unsigned int GetValDenominator() const
Get value of original denominator.
double GetStatUncertLow() const
Get lower bound of asymmetric statistical uncertainty.
double GetSysUncert2() const
Get absolute systematic uncertainty squared value of efficiency/weight.
double m_variance
Holds Variance of efficiency/weight (classical binomial/poisson model).
unsigned int m_val_denominator
Holds the value of original denominator.
void _ComputeCum()
Calculates the cumulative function of the pdf if necessary.
double GetRandom()
Get random number from PDF.
unsigned int GetValNumerator() const
Get value of original numerator.
TH1F * GetPDF()
Returns the calculated PDF.
const std::vector< int > & GetCoords() const
Returns the coordinates of the current entry in the original histogram.
double m_stat_uncert_high
Holds upper bound of asymmetric statistical uncertainty.
virtual ~APWeightEntry()
Default destructor.
double m_sys_uncert
Holds absolute systematic uncertainty value of efficiency/weight.
APWeightEntry & operator=(const APWeightEntry &)
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
void ReadEfficiency(double efficiency, double err_low, double err_high)
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e....
double GetVariance() const
Get Variance of efficiency/weight (classical binomial/poisson model).
bool m_is_nan
Flag, set to true if denominator is zero.
const std::vector< int > & GetOriginalDimensions() const
Returns the dimensions and amounts of bins for each dimension of the original histogram.
double m_stat_uncert_low
Holds lower bound of asymmetric statistical uncertainty.
void SetID(unsigned int id)
Set the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND).
void SetSystUncert(double rel_uncert)
Set the relative (!) systematic uncertainty for the efficiency/weight.
double m_expectancy_val
Holds the Expectancy value of efficiency/weight.
bool IsNaN() const
Returns true if instance is NaN.
TH1F * m_hist
Holds the TH1F instance from the arrays if computed.
unsigned int m_val_numerator
Holds the value of original numerator.
std::vector< int > m_n_dim_origin
Holds the amount of dimensions and bins per axis in the original histogram.
APWeightEntry()
Default constructor.
bool IsTrig() const
Returns true if instance is trigger based.
void _CreateHist()
Creates a TH1F instance from the arrays if necessary.
double m_sys_uncert2
Holds absolute systematic uncertainty squared value of efficiency/weight.
double GetExpectancy() const
Get Expectancy value of efficiency/weight.
double m_integral
Holds the integral of the probability distribution.
double GetStatUncertHigh() const
Get upper bound of asymmetric statistical uncertainty.
double * m_cumul
Histograms to hold the probability distribution and the cumulative distribution.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
double GetSysUncert() const
Get absolute systematic uncertainty value of efficiency/weight.
APWeightEntry(const APWeightEntry &)
unsigned int m_ID
Holds internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND).