9#ifndef ANALYSISCALIBRATIONDATACONTAINER_H
10#define ANALYSISCALIBRATIONDATACONTAINER_H
82 std::map<std::string, Analysis::UncertaintyResult>& all);
103 TObject* obj = 0,
bool extrapolate =
false) = 0;
168 double getLowerBound(
unsigned int vartype,
bool extrapolate =
false)
const;
174 double getUpperBound(
unsigned int vartype,
bool extrapolate =
false)
const;
177 std::vector<std::pair<double, double> >
getBounds();
252 TObject* obj = 0,
bool extrapolate =
false);
340 TObject* obj = 0,
bool extrapolate =
false);
370 Bin(
unsigned int dimension,
const double* low,
const double* up);
432 TObject* obj = 0,
bool =
false);
void setResult(TObject *obj)
insert the main object for this calibration
double getLowerBound(unsigned int vartype, bool extrapolate=false) const
retrieve the lower bound of validity for the requested variable type
std::vector< double > m_upperBoundsExtrapolated
(possibly looser) lower validity bounds for extrapolation
ClassDef(CalibrationDataContainer, 1)
virtual CalibrationStatus getUncertainty(const std::string &unc, const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0)=0
retrieve the calibration uncertainty due to the given source.
void setExcludedUncertainties(const std::string &text)
insert the set of uncertainties that are recommended for removal from the eigenvector decomposition.
virtual CalibrationStatus getStatUncertainty(const CalibrationDataVariables &x, double &result)=0
retrieve the calibration statistical uncertainty.
CalibrationDataContainer(const char *name="default")
void restrictToRange(bool restrict)
If true, this will restrict the variables used to be within the (specified) range of validity.
std::vector< double > m_lowerBoundsExtrapolated
bool isRangeRestricted() const
allow the user to inspect the above information
double getUpperBound(unsigned int vartype, bool extrapolate=false) const
retrieve the upper bound of validity for the requested variable type
int typeFromString(const std::string &key) const
Connection between variable names (on histogram axes etc.) and variable 'types' as used in actual eva...
CalibrationStatus getUncertainties(const CalibrationDataVariables &x, std::map< std::string, Analysis::UncertaintyResult > &all)
retrieve the list of "uncertainties" accessible to this object.
void setUncertainty(const std::string &unc, TObject *obj)
insert the relevant object for the requested source of 'uncertainty'
virtual void computeVariableTypes()=0
decode the 'uncertainty' objects' names to determine the relevant variable types
std::vector< std::pair< double, double > > getBounds()
allow the user to inspect the bounds of validity
CalibrationParametrization
The following enums are intended to contain the list of (kinematic or other) variables in terms of wh...
CalibrationStatus getSystUncertainty(const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0)
retrieve the calibration total systematic uncertainty
CalibrationStatus computeVariables(const CalibrationDataVariables &x, bool extrapolate=false)
compute the variables to be used for the given 'uncertainty'
void setHadronisation(const std::string &text)
insert the given text as the 'hadronisation reference' for this calibration
std::string getHadronisation() const
retrieve the 'hadronisation reference' entered for this calibration, if any
TObject * m_objSystematics
don't persistify
std::string getExcludedUncertainties() const
retrieve the (semicolon-separated) set of uncertainties that are recommended for removal from the eig...
std::vector< double > m_lowerBounds
static bool isNearlyEqual(double a, double b)
utility for comparison of doubles
void setComment(const std::string &text)
insert the given text as comment for this calibration
std::vector< double > m_upperBounds
double m_vars[MaxCalibrationVars]
don't persistify
bool m_restrict
persistency not needed for this variable
std::vector< unsigned int > getVariableTypes()
utility to retrieve variable types
std::vector< std::string > listUncertainties() const
retrieve the list of "uncertainties" accessible to this object.
virtual CalibrationStatus getResult(const CalibrationDataVariables &x, double &result, TObject *obj=0, bool extrapolate=false)=0
retrieve the calibration result.
TObject * m_objResult
(possibly looser) upper validity bounds for extrapolation
std::string getComment() const
retrieve the comments entered for this calibration, if any
virtual ~CalibrationDataContainer()
std::vector< unsigned int > m_variables
don't persistify
virtual CalibrationStatus getUncertainty(const std::string &unc, const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0)
retrieve the calibration uncertainty due to the given source.
CalibrationDataFunctionContainer(const char *name="default")
void setUpperBound(int vartype, double bound)
Set the lower bound of validity for the given variable.
TObject * m_objStatistics
virtual ~CalibrationDataFunctionContainer()
void setLowerBound(int vartype, double bound)
Set the lower bound of validity for the given variable.
virtual CalibrationStatus getStatUncertainty(const CalibrationDataVariables &x, double &result)
retrieve the calibration statistical uncertainty.
ClassDef(CalibrationDataFunctionContainer, 1)
virtual CalibrationStatus getResult(const CalibrationDataVariables &x, double &result, TObject *obj=0, bool=false)
retrieve the calibration result.
virtual void computeVariableTypes()
cached
virtual int getEigenvectorReduction(unsigned int choice) const
Retrieve the number of eigenvectors to be retained for the purpose of eigenvector variation reduction...
std::map< unsigned int, std::vector< double > > m_binBoundaries
Cache for bin boundary information.
double getInterpolatedUncertainty(TH1 *hist) const
Retrieve interpolated result (utility function)
virtual CalibrationStatus getUncertainty(const std::string &unc, const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0)
retrieve the calibration uncertainty due to the given source.
void setUncorrelated(const std::string &unc)
Indicate that the given uncertainty is to be treated uncorrelated from bin to bin (note that the defa...
ClassDef(CalibrationDataHistogramContainer, 2)
void setInterpolated(bool doInterpolate)
Indicate whether results are to be interpolated between bins or not (this feature is thought to be us...
virtual std::vector< double > getBinBoundaries(unsigned int vartype)
Retrieve the bin boundaries for the specified variable type (which should be a CalibrationParametriza...
virtual int getTagWeightAxis()
Test whether this calibration object is one for "continuous" calibration (this has some subtle conseq...
bool m_interpolate
If true, interpolate between bins rather than doing a straight bin-wise evaluation.
void checkBounds()
check the bounds of validity for this calibration object
double getInterpolatedResult(TH1 *hist) const
Retrieve interpolated result (utility function)
THashList m_uncorrelatedSyst
no need to persistify
virtual CalibrationStatus getStatUncertainty(const CalibrationDataVariables &x, double &result)
retrieve the calibration statistical uncertainty.
virtual ~CalibrationDataHistogramContainer()
virtual CalibrationStatus getResult(const CalibrationDataVariables &x, double &result, TObject *obj=0, bool extrapolate=false)
retrieve the calibration result.
virtual void computeVariableTypes()
utility for determining global bin number, subject to extrapolation constraints.
CalibrationDataHistogramContainer(const char *name="default")
bool isBinCorrelated(const std::string &unc) const
Indicate whether the given uncertainty is correlated from bin to bin or not (note that this function ...
virtual bool isInterpolated() const
Indicate whether histogram interpolation is used or not.
Helper class for the specification of custom binning.
double getUpperBound(unsigned int dim) const
Bin & operator=(const Bin &other)
double getLowerBound(unsigned int dim) const
unsigned int getDimension() const
bool contains(const double *x) const
virtual int getTagWeightAxis()
Test whether this calibration object is one for "continuous" calibration (this has some subtle conseq...
unsigned int getNMappedBins() const
return the number of mapped bins
virtual void computeVariableTypes()
decode the 'uncertainty' objects' names to determine the relevant variable types
ClassDef(CalibrationDataMappedHistogramContainer, 1)
unsigned int m_beginMapped
starting position of mapped variables
std::vector< std::string > m_mapped
mapped variables.
virtual bool isInterpolated() const
Indicate whether histogram interpolation is used or not.
virtual CalibrationStatus getResult(const CalibrationDataVariables &x, double &result, TObject *obj=0, bool extrapolate=false)
retrieve the calibration result.
void setMappedVariables(const std::vector< std::string > &variables)
Set (by hand) the variables that will be mapped onto a single histogram axis.
virtual CalibrationStatus getUncertainty(const std::string &unc, const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0)
retrieve the calibration uncertainty due to the given source.
virtual ~CalibrationDataMappedHistogramContainer()
Int_t findBin()
don't persistify
virtual CalibrationStatus getStatUncertainty(const CalibrationDataVariables &x, double &result)
retrieve the calibration statistical uncertainty.
CalibrationDataMappedHistogramContainer(const char *name="default")
const std::vector< std::string > & getMappedVariables() const
List which variables get mapped onto a single histogram axis.
Int_t findMappedBin(const double *x)
virtual std::vector< double > getBinBoundaries(unsigned int vartype)
Retrieve the bin boundaries for the specified variable type (which should be a CalibrationParametriza...
std::vector< Bin > m_bins
don't persistify
unsigned int addBin(const Bin &bin)
Add mapping bin.
void checkBounds()
check the bounds of validity for this calibration object
This class (struct, actually) is nothing but a light-weight container of (kinematic or other) variabl...
The namespace of all packages in PhysicsAnalysis/JetTagging.
const unsigned int MaxCalibrationVars
Maximum dimensionality of the calibration parametrisation.
std::pair< double, double > UncertaintyResult
The following typedef is for convenience: most uncertainties can be asymmetric.