ATLAS Offline Software
|
#include <CalibrationDataContainer.h>
Public Types | |
enum | CalibrationParametrization { kPt = 0, kEta = 1, kAbsEta = 2, kTagWeight = 3 } |
Public Member Functions | |
CalibrationDataHistogramContainer (const char *name="default") | |
virtual | ~CalibrationDataHistogramContainer () |
virtual CalibrationStatus | getResult (const CalibrationDataVariables &x, double &result, TObject *obj=0, bool extrapolate=false) |
retrieve the calibration result. More... | |
virtual CalibrationStatus | getStatUncertainty (const CalibrationDataVariables &x, double &result) |
retrieve the calibration statistical uncertainty. More... | |
virtual CalibrationStatus | getUncertainty (const std::string &unc, const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0) |
retrieve the calibration uncertainty due to the given source. More... | |
bool | isBinCorrelated (const std::string &unc) const |
Indicate whether the given uncertainty is correlated from bin to bin or not (note that this function is to be used only for systematic uncertainties) More... | |
void | setUncorrelated (const std::string &unc) |
Indicate that the given uncertainty is to be treated uncorrelated from bin to bin (note that the default is for all systematic uncertainties to be treated as correlated) More... | |
void | setInterpolated (bool doInterpolate) |
Indicate whether results are to be interpolated between bins or not (this feature is thought to be useful mostly for MC efficiencies) More... | |
virtual bool | isInterpolated () const |
Indicate whether histogram interpolation is used or not. More... | |
virtual int | getTagWeightAxis () |
Test whether this calibration object is one for "continuous" calibration (this has some subtle consequences for the treatment of bin-to-bin correlations). More... | |
virtual std::vector< double > | getBinBoundaries (unsigned int vartype) |
Retrieve the bin boundaries for the specified variable type (which should be a CalibrationParametrization enum). More... | |
virtual int | getEigenvectorReduction (unsigned int choice) const |
Retrieve the number of eigenvectors to be retained for the purpose of eigenvector variation reduction strategies. More... | |
std::vector< std::string > | listUncertainties () const |
retrieve the list of "uncertainties" accessible to this object. More... | |
CalibrationStatus | getUncertainties (const CalibrationDataVariables &x, std::map< std::string, Analysis::UncertaintyResult > &all) |
retrieve the list of "uncertainties" accessible to this object. More... | |
std::string | getComment () const |
retrieve the comments entered for this calibration, if any More... | |
std::string | getHadronisation () const |
retrieve the 'hadronisation reference' entered for this calibration, if any More... | |
std::string | getExcludedUncertainties () const |
retrieve the (semicolon-separated) set of uncertainties that are recommended for removal from the eigenvector decomposition More... | |
CalibrationStatus | getSystUncertainty (const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0) |
retrieve the calibration total systematic uncertainty More... | |
void | setResult (TObject *obj) |
insert the main object for this calibration More... | |
void | setComment (const std::string &text) |
insert the given text as comment for this calibration More... | |
void | setHadronisation (const std::string &text) |
insert the given text as the 'hadronisation reference' for this calibration More... | |
void | setExcludedUncertainties (const std::string &text) |
insert the set of uncertainties that are recommended for removal from the eigenvector decomposition. More... | |
void | setUncertainty (const std::string &unc, TObject *obj) |
insert the relevant object for the requested source of 'uncertainty' More... | |
void | restrictToRange (bool restrict) |
If true, this will restrict the variables used to be within the (specified) range of validity. More... | |
bool | isRangeRestricted () const |
allow the user to inspect the above information More... | |
double | getLowerBound (unsigned int vartype, bool extrapolate=false) const |
retrieve the lower bound of validity for the requested variable type More... | |
double | getUpperBound (unsigned int vartype, bool extrapolate=false) const |
retrieve the upper bound of validity for the requested variable type More... | |
std::vector< std::pair< double, double > > | getBounds () |
allow the user to inspect the bounds of validity More... | |
std::vector< unsigned int > | getVariableTypes () |
utility to retrieve variable types More... | |
Static Public Member Functions | |
static bool | isNearlyEqual (double a, double b) |
utility for comparison of doubles More... | |
Protected Member Functions | |
int | typeFromString (const std::string &key) const |
Connection between variable names (on histogram axes etc.) and variable 'types' as used in actual evaluations. More... | |
CalibrationStatus | computeVariables (const CalibrationDataVariables &x, bool extrapolate=false) |
Compute the variables to be used. More... | |
Protected Attributes | |
std::map< unsigned int, std::vector< double > > | m_binBoundaries |
Cache for bin boundary information. More... | |
std::vector< double > | m_lowerBounds |
std::vector< double > | m_upperBounds |
std::vector< double > | m_lowerBoundsExtrapolated |
std::vector< double > | m_upperBoundsExtrapolated |
(possibly looser) lower validity bounds for extrapolation More... | |
TObject * | m_objResult |
(possibly looser) upper validity bounds for extrapolation More... | |
TObject * | m_objSystematics |
don't persistify More... | |
double | m_vars [MaxCalibrationVars] |
don't persistify More... | |
std::vector< unsigned int > | m_variables |
don't persistify More... | |
Private Member Functions | |
double | getInterpolatedResult (TH1 *hist) const |
Retrieve interpolated result (utility function) More... | |
double | getInterpolatedUncertainty (TH1 *hist) const |
Retrieve interpolated result (utility function) More... | |
void | checkBounds () |
check the bounds of validity for this calibration object More... | |
virtual void | computeVariableTypes () |
decode the 'uncertainty' objects' names to determine the relevant variable types More... | |
ClassDef (CalibrationDataHistogramContainer, 2) | |
Private Attributes | |
THashList | m_uncorrelatedSyst |
no need to persistify More... | |
bool | m_interpolate |
If true, interpolate between bins rather than doing a straight bin-wise evaluation. More... | |
bool | m_restrict |
persistency not needed for this variable More... | |
This is the class holding information for histogram-based calibration results.
Definition at line 247 of file CalibrationDataContainer.h.
The following enums are intended to contain the list of (kinematic or other) variables in terms of which results (and the corresponding uncertainties) are given. They are useful mainly for internal purposes, but the user may access them nevertheless.
Enumerator | |
---|---|
kPt | |
kEta | |
kAbsEta | |
kTagWeight |
Definition at line 63 of file CalibrationDataContainer.h.
Analysis::CalibrationDataHistogramContainer::CalibrationDataHistogramContainer | ( | const char * | name = "default" | ) |
|
virtual |
Definition at line 483 of file CalibrationDataContainer.cxx.
|
private |
check the bounds of validity for this calibration object
Definition at line 673 of file CalibrationDataContainer.cxx.
|
private |
|
protectedinherited |
Compute the variables to be used.
x | user-supplied (kinematic or other) variables |
extrapolate | set to "true" for the evaluation of extrapolation uncertainties |
Definition at line 307 of file CalibrationDataContainer.cxx.
|
privatevirtual |
decode the 'uncertainty' objects' names to determine the relevant variable types
Implements Analysis::CalibrationDataContainer.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 490 of file CalibrationDataContainer.cxx.
|
virtual |
Retrieve the bin boundaries for the specified variable type (which should be a CalibrationParametrization enum).
An empty vector will be returned if the specified variable is not actually used.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 952 of file CalibrationDataContainer.cxx.
|
inherited |
allow the user to inspect the bounds of validity
Definition at line 391 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the comments entered for this calibration, if any
Definition at line 190 of file CalibrationDataContainer.cxx.
|
virtual |
Retrieve the number of eigenvectors to be retained for the purpose of eigenvector variation reduction strategies.
choice | specification of the reduction option (integer corresponding to the CalibrationDataInterfaceROOT::EVReductionStrategy enum) |
Definition at line 986 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the (semicolon-separated) set of uncertainties that are recommended for removal from the eigenvector decomposition
Definition at line 217 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the 'hadronisation reference' entered for this calibration, if any
Definition at line 203 of file CalibrationDataContainer.cxx.
|
private |
Retrieve interpolated result (utility function)
Definition at line 760 of file CalibrationDataContainer.cxx.
|
private |
Retrieve interpolated result (utility function)
Definition at line 777 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the lower bound of validity for the requested variable type
vartype | variable type |
extrapolate | true only if an extrapolation uncertainty is requested |
Definition at line 366 of file CalibrationDataContainer.cxx.
|
virtual |
retrieve the calibration result.
x | user-supplied (kinematic or other) variables |
result | requested result |
obj | object holding the requested result (it will be computed if not provided) |
extrapolate | flag that extrapolation applies (should only be relevant when using eigenvector variations) |
Implements Analysis::CalibrationDataContainer.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 539 of file CalibrationDataContainer.cxx.
|
virtual |
retrieve the calibration statistical uncertainty.
x | user-supplied (kinematic or other) variables |
result | requested statistical uncertainty |
Implements Analysis::CalibrationDataContainer.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 582 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the calibration total systematic uncertainty
Definition at line 101 of file CalibrationDataContainer.cxx.
|
virtual |
Test whether this calibration object is one for "continuous" calibration (this has some subtle consequences for the treatment of bin-to-bin correlations).
The return value will be -1 in case this is not a "continuous" calibration object, and the axis number (0 for X, 1 for Y, 2 for Z) otherwise.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 935 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the list of "uncertainties" accessible to this object.
A few uncertainty names are predetermined: "result", "comment", "statistics", "systematics". Individual sources of systematic uncertainty can be added by the user.
Definition at line 137 of file CalibrationDataContainer.cxx.
|
virtual |
retrieve the calibration uncertainty due to the given source.
x | user-supplied (kinematic or other) variables |
unc | uncertainty specification |
result | requested uncertainty (for both positive and negative variation, if available) |
obj | object holding the requested uncertainty information (it will be computed if not provided) |
Implements Analysis::CalibrationDataContainer.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 622 of file CalibrationDataContainer.cxx.
|
inherited |
retrieve the upper bound of validity for the requested variable type
vartype | variable type |
extrapolate | true only if an extrapolation uncertainty is requested |
Definition at line 379 of file CalibrationDataContainer.cxx.
|
inherited |
bool CalibrationDataHistogramContainer::isBinCorrelated | ( | const std::string & | unc | ) | const |
Indicate whether the given uncertainty is correlated from bin to bin or not (note that this function is to be used only for systematic uncertainties)
Definition at line 719 of file CalibrationDataContainer.cxx.
|
virtual |
Indicate whether histogram interpolation is used or not.
Reimplemented in Analysis::CalibrationDataMappedHistogramContainer.
Definition at line 751 of file CalibrationDataContainer.cxx.
|
staticinherited |
utility for comparison of doubles
Definition at line 1744 of file CalibrationDataContainer.cxx.
|
inlineinherited |
allow the user to inspect the above information
Definition at line 162 of file CalibrationDataContainer.h.
|
inherited |
retrieve the list of "uncertainties" accessible to this object.
A few uncertainty names are predetermined: "result", "comment", "statistics", "systematics". Individual sources of systematic uncertainty can be added by the user.
Definition at line 120 of file CalibrationDataContainer.cxx.
|
inlineinherited |
If true, this will restrict the variables used to be within the (specified) range of validity.
Note that this is a policy decision and as such not intrinsic to the data; but it is cumbersome to carry this information around everywhere.
Definition at line 159 of file CalibrationDataContainer.h.
|
inherited |
insert the given text as comment for this calibration
Definition at line 255 of file CalibrationDataContainer.cxx.
|
inherited |
insert the set of uncertainties that are recommended for removal from the eigenvector decomposition.
text | semicolon-separated list of uncertainties |
Definition at line 280 of file CalibrationDataContainer.cxx.
|
inherited |
insert the given text as the 'hadronisation reference' for this calibration
Definition at line 268 of file CalibrationDataContainer.cxx.
void CalibrationDataHistogramContainer::setInterpolated | ( | bool | doInterpolate | ) |
Indicate whether results are to be interpolated between bins or not (this feature is thought to be useful mostly for MC efficiencies)
Definition at line 740 of file CalibrationDataContainer.cxx.
|
inherited |
insert the main object for this calibration
Definition at line 244 of file CalibrationDataContainer.cxx.
|
inherited |
insert the relevant object for the requested source of 'uncertainty'
Definition at line 231 of file CalibrationDataContainer.cxx.
void CalibrationDataHistogramContainer::setUncorrelated | ( | const std::string & | unc | ) |
Indicate that the given uncertainty is to be treated uncorrelated from bin to bin (note that the default is for all systematic uncertainties to be treated as correlated)
Definition at line 728 of file CalibrationDataContainer.cxx.
|
protectedinherited |
Connection between variable names (on histogram axes etc.) and variable 'types' as used in actual evaluations.
Normal result values are positive (or 0); a negative return value indicates that the string is not known)
Definition at line 292 of file CalibrationDataContainer.cxx.
|
protected |
Cache for bin boundary information.
Definition at line 291 of file CalibrationDataContainer.h.
|
private |
If true, interpolate between bins rather than doing a straight bin-wise evaluation.
Definition at line 299 of file CalibrationDataContainer.h.
|
protectedinherited |
Definition at line 210 of file CalibrationDataContainer.h.
|
protectedinherited |
Definition at line 213 of file CalibrationDataContainer.h.
|
protectedinherited |
(possibly looser) upper validity bounds for extrapolation
cached variables for code speed-up
Definition at line 217 of file CalibrationDataContainer.h.
|
protectedinherited |
don't persistify
Definition at line 218 of file CalibrationDataContainer.h.
|
privateinherited |
persistency not needed for this variable
specifies whether the performance evaluation is to be done strictly within the range of validity
Definition at line 230 of file CalibrationDataContainer.h.
|
private |
no need to persistify
list here the systematic uncertainties that are not correlated from bin to bin
Definition at line 296 of file CalibrationDataContainer.h.
|
protectedinherited |
Definition at line 211 of file CalibrationDataContainer.h.
|
protectedinherited |
(possibly looser) lower validity bounds for extrapolation
Definition at line 214 of file CalibrationDataContainer.h.
|
protectedinherited |
don't persistify
specification of variable type per object (result / uncertainty)
Definition at line 223 of file CalibrationDataContainer.h.
|
protectedinherited |
don't persistify
Definition at line 220 of file CalibrationDataContainer.h.