ATLAS Offline Software
|
#include <CalibrationDataContainer.h>
Classes | |
class | Bin |
Helper class for the specification of custom binning. More... | |
Public Types | |
enum | CalibrationParametrization { kPt = 0, kEta = 1, kAbsEta = 2, kTagWeight = 3 } |
Public Member Functions | |
CalibrationDataMappedHistogramContainer (const char *name="default") | |
virtual | ~CalibrationDataMappedHistogramContainer () |
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... | |
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... | |
void | setMappedVariables (const std::vector< std::string > &variables) |
Set (by hand) the variables that will be mapped onto a single histogram axis. More... | |
const std::vector< std::string > & | getMappedVariables () const |
List which variables get mapped onto a single histogram axis. 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... | |
unsigned int | addBin (const Bin &bin) |
Add mapping bin. More... | |
unsigned int | getNMappedBins () const |
return the number of mapped bins 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 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 | |
Int_t | findBin () |
don't persistify More... | |
Int_t | findMappedBin (const double *x) |
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 (CalibrationDataMappedHistogramContainer, 1) | |
double | getInterpolatedResult (TH1 *hist) const |
Retrieve interpolated result (utility function) More... | |
double | getInterpolatedUncertainty (TH1 *hist) const |
Retrieve interpolated result (utility function) More... | |
Private Attributes | |
std::vector< std::string > | m_mapped |
mapped variables. More... | |
unsigned int | m_beginMapped |
starting position of mapped variables More... | |
std::vector< Bin > | m_bins |
don't persistify More... | |
unsigned int | m_lastBin |
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, in cases where 'irregular' binning is used (e.g., if the binning in one variable depends on another variable), or where the dimensionality becomes too high for even 3D histograms (so that a mapping is needed to use THx).
Using this class instead of the 'regular' histogram container will imply a performance penalty, as bin numberings are not assumed to feature any regularity.
Definition at line 335 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::CalibrationDataMappedHistogramContainer::CalibrationDataMappedHistogramContainer | ( | const char * | name = "default" | ) |
|
virtual |
Definition at line 1024 of file CalibrationDataContainer.cxx.
Add mapping bin.
The return value is the bin number.
Definition at line 1284 of file CalibrationDataContainer.cxx.
|
private |
check the bounds of validity for this calibration object
Definition at line 1090 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
Reimplemented from Analysis::CalibrationDataHistogramContainer.
Definition at line 1030 of file CalibrationDataContainer.cxx.
|
private |
don't persistify
find the bin number corresponding to the input variables
Definition at line 1326 of file CalibrationDataContainer.cxx.
|
private |
Definition at line 1305 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 from Analysis::CalibrationDataHistogramContainer.
Definition at line 1358 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.
|
virtualinherited |
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.
|
privateinherited |
Retrieve interpolated result (utility function)
Definition at line 760 of file CalibrationDataContainer.cxx.
|
privateinherited |
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.
const std::vector< std::string > & CalibrationDataMappedHistogramContainer::getMappedVariables | ( | ) | const |
List which variables get mapped onto a single histogram axis.
Definition at line 1275 of file CalibrationDataContainer.cxx.
unsigned int CalibrationDataMappedHistogramContainer::getNMappedBins | ( | ) | const |
return the number of mapped bins
Definition at line 1295 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) |
Reimplemented from Analysis::CalibrationDataHistogramContainer.
Definition at line 1152 of file CalibrationDataContainer.cxx.
|
virtual |
retrieve the calibration statistical uncertainty.
x | user-supplied (kinematic or other) variables |
result | requested statistical uncertainty |
Reimplemented from Analysis::CalibrationDataHistogramContainer.
Definition at line 1185 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 from Analysis::CalibrationDataHistogramContainer.
Definition at line 1249 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) |
Reimplemented from Analysis::CalibrationDataHistogramContainer.
Definition at line 1209 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 |
|
inherited |
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.
|
inlinevirtual |
Indicate whether histogram interpolation is used or not.
Not applicable here.
Reimplemented from Analysis::CalibrationDataHistogramContainer.
Definition at line 346 of file CalibrationDataContainer.h.
|
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.
|
inherited |
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.
void CalibrationDataMappedHistogramContainer::setMappedVariables | ( | const std::vector< std::string > & | variables | ) |
Set (by hand) the variables that will be mapped onto a single histogram axis.
Definition at line 1266 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.
|
inherited |
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.
|
private |
starting position of mapped variables
Definition at line 399 of file CalibrationDataContainer.h.
|
protectedinherited |
Cache for bin boundary information.
Definition at line 291 of file CalibrationDataContainer.h.
|
private |
|
privateinherited |
If true, interpolate between bins rather than doing a straight bin-wise evaluation.
Definition at line 299 of file CalibrationDataContainer.h.
|
private |
Definition at line 404 of file CalibrationDataContainer.h.
|
protectedinherited |
Definition at line 210 of file CalibrationDataContainer.h.
|
protectedinherited |
Definition at line 213 of file CalibrationDataContainer.h.
|
private |
mapped variables.
These have to be specified when creating the object, for there is no way to transmit this information otherwise.
Definition at line 396 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.
|
privateinherited |
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.