![]() |
ATLAS Offline Software
|
Class to wrap a set of SystematicVariations. More...
#include <SystematicSet.h>
Public Types | |
| enum | MATCHTYPE { FULL, FULLORCONTINUOUS } |
| description: match systematic or continuous version More... | |
| typedef std::set< SystematicVariation >::iterator | iterator |
| typedef std::set< SystematicVariation >::const_iterator | const_iterator |
Public Member Functions | |
| SystematicSet () | |
| construct an empty set More... | |
| SystematicSet (const std::string &systematics) | |
| construct set by splitting single systematics string More... | |
| SystematicSet (const std::vector< std::string > &systematics) | |
| construct by vector of systematic names More... | |
| SystematicSet (const std::vector< SystematicVariation > &systematics) | |
| construct by vector of SystematicVariation More... | |
| SystematicSet (const std::initializer_list< SystematicVariation > &systematics) | |
| construct with an std::initializer_list More... | |
| const_iterator | begin () const |
| description: const iterator to the beginning of the set More... | |
| const_iterator | end () const |
| description: const iterator to the end of the set More... | |
| iterator | find (const SystematicVariation &sys) const |
| description: find an element in the set More... | |
| bool | empty () const |
| returns: whether the set is empty More... | |
| size_t | size () const |
| returns: size of the set More... | |
| void | insert (const SystematicVariation &systematic) |
| description: insert a systematic into the set More... | |
| void | insert (const SystematicSet &systematics) |
| description: insert a systematic set into this set More... | |
| void | swap (SystematicSet &otherSet) |
| description: swap elements of a set More... | |
| void | clear () |
| description: clear the set More... | |
| bool | matchSystematic (const SystematicVariation &systematic, MATCHTYPE type=FULL) const |
| SystematicSet | filterByBaseName (const std::string &basename) const |
| description: get the subset of systematics matching basename Should this return a StatusCode instead? More... | |
| std::set< std::string > | getBaseNames () const |
| description: get the set of base systematic names from this set More... | |
| SystematicVariation | getSystematicByBaseName (const std::string &basename) const |
| description: get the first systematic matching basename More... | |
| float | getParameterByBaseName (const std::string &basename) const |
| returns: the parameter value for the given basename More... | |
| std::pair< unsigned, float > | getToyVariationByBaseName (const std::string &basename) const |
| the toy variation for the given basename More... | |
| std::string | name () const |
| returns: the systematics joined into a single string. More... | |
| std::size_t | hash () const |
| returns: hash value for the joined string. More... | |
Static Public Member Functions | |
| static StatusCode | filterForAffectingSystematics (const SystematicSet &systConfig, const SystematicSet &affectingSystematics, SystematicSet &filteredSystematics) |
| description: filter the systematics for the affected systematics returns: success guarantee: strong failures: out of memory II failures: requesting multiple variations on the same systematic (e.g. More... | |
Private Member Functions | |
| std::string | joinNames () const |
| description: join systematic names into single string More... | |
| std::size_t | computeHash () const |
| description: compute and store the hash value More... | |
Private Attributes | |
| std::set< SystematicVariation > | m_sysVariations |
| description: the set of systematics encapsulated in this class More... | |
| CxxUtils::CachedValue< std::string > | m_joinedName |
| description: cache the joined string, useful for hash More... | |
| CxxUtils::CachedValue< std::size_t > | m_hash |
| description: cached hash value for quick retrieval in unordered containers More... | |
Class to wrap a set of SystematicVariations.
Definition at line 30 of file SystematicSet.h.
| typedef std::set<SystematicVariation>::const_iterator CP::SystematicSet::const_iterator |
Definition at line 52 of file SystematicSet.h.
| typedef std::set<SystematicVariation>::iterator CP::SystematicSet::iterator |
Definition at line 51 of file SystematicSet.h.
description: match systematic or continuous version
| Enumerator | |
|---|---|
| FULL | |
| FULLORCONTINUOUS | |
Definition at line 90 of file SystematicSet.h.
| CP::SystematicSet::SystematicSet | ( | ) |
| CP::SystematicSet::SystematicSet | ( | const std::string & | systematics | ) |
construct set by splitting single systematics string
Definition at line 41 of file SystematicSet.cxx.
| CP::SystematicSet::SystematicSet | ( | const std::vector< std::string > & | systematics | ) |
| CP::SystematicSet::SystematicSet | ( | const std::vector< SystematicVariation > & | systematics | ) |
| CP::SystematicSet::SystematicSet | ( | const std::initializer_list< SystematicVariation > & | systematics | ) |
|
inline |
description: const iterator to the beginning of the set
Definition at line 55 of file SystematicSet.h.
| void CP::SystematicSet::clear | ( | ) |
description: clear the set
Definition at line 118 of file SystematicSet.cxx.
|
private |
description: compute and store the hash value
Definition at line 312 of file SystematicSet.cxx.
|
inline |
|
inline |
| SystematicSet CP::SystematicSet::filterByBaseName | ( | const std::string & | basename | ) | const |
description: get the subset of systematics matching basename Should this return a StatusCode instead?
Definition at line 145 of file SystematicSet.cxx.
|
static |
description: filter the systematics for the affected systematics returns: success guarantee: strong failures: out of memory II 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)
Definition at line 211 of file SystematicSet.cxx.
|
inline |
| std::set< std::string > CP::SystematicSet::getBaseNames | ( | ) | const |
description: get the set of base systematic names from this set
Definition at line 158 of file SystematicSet.cxx.
| float CP::SystematicSet::getParameterByBaseName | ( | const std::string & | basename | ) | const |
returns: the parameter value for the given basename
Definition at line 191 of file SystematicSet.cxx.
| SystematicVariation CP::SystematicSet::getSystematicByBaseName | ( | const std::string & | basename | ) | const |
description: get the first systematic matching basename
Definition at line 170 of file SystematicSet.cxx.
| std::pair< unsigned, float > CP::SystematicSet::getToyVariationByBaseName | ( | const std::string & | basename | ) | const |
the toy variation for the given basename
in case there is no toy variation for the given base name, this returns (0,0)
Definition at line 199 of file SystematicSet.cxx.
| std::size_t CP::SystematicSet::hash | ( | ) | const |
returns: hash value for the joined string.
Caches the hash if not already done
Definition at line 288 of file SystematicSet.cxx.
| void CP::SystematicSet::insert | ( | const SystematicSet & | systematics | ) |
description: insert a systematic set into this set
Definition at line 98 of file SystematicSet.cxx.
| void CP::SystematicSet::insert | ( | const SystematicVariation & | systematic | ) |
|
private |
description: join systematic names into single string
Definition at line 298 of file SystematicSet.cxx.
| bool CP::SystematicSet::matchSystematic | ( | const SystematicVariation & | systematic, |
| MATCHTYPE | type = FULL |
||
| ) | const |
Definition at line 127 of file SystematicSet.cxx.
| std::string CP::SystematicSet::name | ( | ) | const |
returns: the systematics joined into a single string.
Caches the name if not already done
Definition at line 277 of file SystematicSet.cxx.
|
inline |
| void CP::SystematicSet::swap | ( | SystematicSet & | otherSet | ) |
|
private |
description: cached hash value for quick retrieval in unordered containers
Definition at line 169 of file SystematicSet.h.
|
private |
description: cache the joined string, useful for hash
Definition at line 165 of file SystematicSet.h.
|
private |
description: the set of systematics encapsulated in this class
Definition at line 162 of file SystematicSet.h.
1.8.18