#include <SystematicsTool.h>
Base class for CP tools providing systematic variations
This module provides a base class for systematics aware CP tools. The interface provided in this module is intended for the general user. The module is considered to be in the pre-alpha stage.
CP tools are not required to use this base class to implement the systematics interface. They can just implement their own version of the interface. Though they should probably take a quick glance of what this class does, particularly they shouldn't forget to register all their systematics with the global list.
The main difference between implementing the interface yourself and using this base class is that with this class you register all the systematics with the base class. The tool then only needs to override sysApplySystematicVariation (instead of applySystematicVariation), which gets passed only the systematics filtered for the affecting systematics (which get also stored in the base class).
CP::SystematicsTool::SystematicsTool | ( | ) |
effects: standard constructor guarantee: strong failures: out of memory I
SystematicCode CP::SystematicsTool::addAffectingSystematic | ( | const SystematicVariation & | systematic, | |
bool | recommended | |||
) | [protected] |
effects: add a systematic to the list of registered systematics. It will optionally also add this sytematic to the recommended set. side effects: this will add the systematic to the global list of systematics, if not already there guarantee: strong failures: out of memory II
SystematicCode CP::SystematicsTool::addRecommendedSystematic | ( | const SystematicVariation & | systematic | ) | [protected] |
effects: add a systematic to the list of recommended systematics failures: unsupported systematic
SystematicSet CP::SystematicsTool::affectingSystematics | ( | ) | const [virtual] |
returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II
Implements CP::ISystematicsTool.
Reimplemented in CP::JetJvtEfficiency, and met::METSystematicsTool.
const SystematicSet & CP::SystematicsTool::appliedSystematics | ( | ) | const |
returns: the list of systematics that have been applied to this tool. this is not including systematics that were applied, but do not affect this tool guarantee: no-fail
std::string CP::SystematicsTool::appliedSystematicsString | ( | ) | const |
returns: a string representation of appliedSystematics() guarantee: strong failures: out of memory II rationale: this is meant to be used when printing out the applied systematics for debugging purposes (or when embedding them in a string).
SystematicCode CP::SystematicsTool::applySystematicVariation | ( | const SystematicSet & | systConfig | ) | [virtual] |
effects: configure this tool for the given list of systematic variations. any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). guarantee: basic failures: out of memory II failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors
Implements CP::ISystematicsTool.
Reimplemented in CP::JetJvtEfficiency, and met::METSystematicsTool.
bool CP::SystematicsTool::isAffectedBySystematic | ( | const SystematicVariation & | systematic | ) | const [virtual] |
returns: whether this tool is affected by the given systematic guarantee: no-fail
Implements CP::ISystematicsTool.
Reimplemented in CP::JetJvtEfficiency, and met::METSystematicsTool.
SystematicSet CP::SystematicsTool::recommendedSystematics | ( | ) | const [virtual] |
returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II
Implements CP::ISystematicsTool.
Reimplemented in CP::JetJvtEfficiency, and met::METSystematicsTool.
virtual SystematicCode CP::SystematicsTool::sysApplySystematicVariation | ( | const SystematicSet & | systConfig | ) | [protected, pure virtual] |
effects: configure this tool for the given list of systematic variations. systConfig is guaranteed to contain only supported systematics. guarantee: basic failures: out of memory II failures: unsupported combination of supported systematics failures: other tool specific errors
Implemented in CP::MuonSmearingToolExample, CP::JetJvtEfficiency, and met::METSystematicsTool.
void CP::SystematicsTool::testInvariant | ( | ) | const |
effects: test the invariance of this object guarantee: no-fail