ATLAS Offline Software
|
#include <CalibrationDataContainer.h>
Public Types | |
enum | CalibrationParametrization { kPt = 0, kEta = 1, kAbsEta = 2, kTagWeight = 3 } |
Public Member Functions | |
CalibrationDataContainer (const char *name="default") | |
virtual | ~CalibrationDataContainer () |
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... | |
virtual CalibrationStatus | getResult (const CalibrationDataVariables &x, double &result, TObject *obj=0, bool extrapolate=false)=0 |
retrieve the calibration result. More... | |
virtual CalibrationStatus | getStatUncertainty (const CalibrationDataVariables &x, double &result)=0 |
retrieve the calibration statistical uncertainty. More... | |
CalibrationStatus | getSystUncertainty (const CalibrationDataVariables &x, UncertaintyResult &result, TObject *obj=0) |
retrieve the calibration total systematic uncertainty More... | |
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. 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... | |
virtual void | computeVariableTypes ()=0 |
decode the 'uncertainty' objects' names to determine the relevant variable types More... | |
Protected Attributes | |
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 | |
ClassDef (CalibrationDataContainer, 1) | |
Private Attributes | |
bool | m_restrict |
persistency not needed for this variable More... | |
This is the interface for the objects to be stored in the calibration ROOT file. The base class inherits from a TMap, the idea bing that the map's keys are TObjString objects while the values are the objects of interest. The keys are meant to provide access in a flexible manner.
Definition at line 51 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::CalibrationDataContainer::CalibrationDataContainer | ( | const char * | name = "default" | ) |
|
virtual |
Definition at line 95 of file CalibrationDataContainer.cxx.
|
private |
|
protected |
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.
|
protectedpure virtual |
decode the 'uncertainty' objects' names to determine the relevant variable types
Implemented in Analysis::CalibrationDataFunctionContainer, Analysis::CalibrationDataMappedHistogramContainer, and Analysis::CalibrationDataHistogramContainer.
std::vector< std::pair< double, double > > CalibrationDataContainer::getBounds | ( | ) |
allow the user to inspect the bounds of validity
Definition at line 391 of file CalibrationDataContainer.cxx.
std::string CalibrationDataContainer::getComment | ( | ) | const |
retrieve the comments entered for this calibration, if any
Definition at line 190 of file CalibrationDataContainer.cxx.
std::string CalibrationDataContainer::getExcludedUncertainties | ( | ) | const |
retrieve the (semicolon-separated) set of uncertainties that are recommended for removal from the eigenvector decomposition
Definition at line 217 of file CalibrationDataContainer.cxx.
std::string CalibrationDataContainer::getHadronisation | ( | ) | const |
retrieve the 'hadronisation reference' entered for this calibration, if any
Definition at line 203 of file CalibrationDataContainer.cxx.
double CalibrationDataContainer::getLowerBound | ( | unsigned int | vartype, |
bool | extrapolate = false |
||
) | const |
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.
|
pure 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) |
Implemented in Analysis::CalibrationDataFunctionContainer, Analysis::CalibrationDataMappedHistogramContainer, and Analysis::CalibrationDataHistogramContainer.
|
pure virtual |
retrieve the calibration statistical uncertainty.
x | user-supplied (kinematic or other) variables |
result | requested statistical uncertainty |
Implemented in Analysis::CalibrationDataFunctionContainer, Analysis::CalibrationDataMappedHistogramContainer, and Analysis::CalibrationDataHistogramContainer.
CalibrationStatus CalibrationDataContainer::getSystUncertainty | ( | const CalibrationDataVariables & | x, |
UncertaintyResult & | result, | ||
TObject * | obj = 0 |
||
) |
retrieve the calibration total systematic uncertainty
Definition at line 101 of file CalibrationDataContainer.cxx.
CalibrationStatus CalibrationDataContainer::getUncertainties | ( | const CalibrationDataVariables & | x, |
std::map< std::string, Analysis::UncertaintyResult > & | all | ||
) |
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.
|
pure 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) |
Implemented in Analysis::CalibrationDataFunctionContainer, Analysis::CalibrationDataMappedHistogramContainer, and Analysis::CalibrationDataHistogramContainer.
double CalibrationDataContainer::getUpperBound | ( | unsigned int | vartype, |
bool | extrapolate = false |
||
) | const |
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.
std::vector< unsigned int > CalibrationDataContainer::getVariableTypes | ( | ) |
|
static |
utility for comparison of doubles
Definition at line 1744 of file CalibrationDataContainer.cxx.
|
inline |
allow the user to inspect the above information
Definition at line 162 of file CalibrationDataContainer.h.
std::vector< std::string > CalibrationDataContainer::listUncertainties | ( | ) | const |
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.
|
inline |
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.
void CalibrationDataContainer::setComment | ( | const std::string & | text | ) |
insert the given text as comment for this calibration
Definition at line 255 of file CalibrationDataContainer.cxx.
void CalibrationDataContainer::setExcludedUncertainties | ( | const std::string & | text | ) |
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.
void CalibrationDataContainer::setHadronisation | ( | const std::string & | text | ) |
insert the given text as the 'hadronisation reference' for this calibration
Definition at line 268 of file CalibrationDataContainer.cxx.
void CalibrationDataContainer::setResult | ( | TObject * | obj | ) |
insert the main object for this calibration
Definition at line 244 of file CalibrationDataContainer.cxx.
void CalibrationDataContainer::setUncertainty | ( | const std::string & | unc, |
TObject * | obj | ||
) |
insert the relevant object for the requested source of 'uncertainty'
Definition at line 231 of file CalibrationDataContainer.cxx.
|
protected |
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 |
Definition at line 210 of file CalibrationDataContainer.h.
|
protected |
Definition at line 213 of file CalibrationDataContainer.h.
|
protected |
(possibly looser) upper validity bounds for extrapolation
cached variables for code speed-up
Definition at line 217 of file CalibrationDataContainer.h.
|
protected |
don't persistify
Definition at line 218 of file CalibrationDataContainer.h.
|
private |
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.
|
protected |
Definition at line 211 of file CalibrationDataContainer.h.
|
protected |
(possibly looser) lower validity bounds for extrapolation
Definition at line 214 of file CalibrationDataContainer.h.
|
protected |
don't persistify
specification of variable type per object (result / uncertainty)
Definition at line 223 of file CalibrationDataContainer.h.
|
protected |
don't persistify
Definition at line 220 of file CalibrationDataContainer.h.