|
ATLAS Offline Software
|
Go to the documentation of this file.
25 : m_selectionName (val_selectionName)
35 throw std::logic_error (
"trying to read systematics accessor without systematic");
38 throw std::logic_error (
"unknown systematic: " +
sys->name());
39 return std::get<1>(iter->second)->getBits (element,
sys);
49 throw std::logic_error (
"trying to read systematics accessor without systematic");
52 throw std::logic_error (
"unknown systematic: " +
sys->name());
53 return std::get<1>(iter->second)->getBool (element,
sys);
69 if (!std::get<1>(
item.second)->isBool())
78 const std::string& objectName)
const
81 if (
auto split = baseName.find (
',');
82 split != std::string::npos)
83 baseName.resize (
split);
84 return svc.getDecorSystematics (objectName, baseName);
91 const std::vector<CP::SystematicSet>& sysList,
92 const std::string& objectName)
94 using namespace msgSelectionHelpers;
98 if (
auto split = baseName.find (
',');
99 split != std::string::npos)
102 baseName.resize (
split);
106 =
svc.getDecorSystematics (objectName, baseName);
107 for (
auto&
sys : sysList)
111 std::string decorName;
112 ANA_CHECK (
svc.makeSystematicsName (decorName, baseName, inputSys));
113 ANA_MSG_DEBUG (
"SysReadDecorHandle: " << decorName <<
" (" <<
sys.name() <<
")");
114 std::unique_ptr<ISelectionReadAccessor>
accessor;
118 return StatusCode::SUCCESS;
std::unordered_map< CP::SystematicSet, std::tuple< std::string, std::unique_ptr< ISelectionReadAccessor > > > m_dataCache
the map of accessor we use
the interface for the central systematics service
virtual bool isBool() const override
whether this accessor returns a simple boolean
Base class for elements of a container that can have aux data.
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Class to wrap a set of SystematicVariations.
Select isolated Photons, Electrons and Muons.
virtual bool getBool(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
get the selection decoration
virtual SelectionType getBits(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
get the selection decoration
std::string m_selectionName
the selectionName for this accessor
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
fill the systematic variations
AthROOTErrorHandlerSvc * svc
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc, const std::string &objectName) const override
get the systematics when reading from the decoration
virtual std::string label() const override
get the label of the accessor
StatusCode makeSelectionReadAccessor(const std::string &expr, std::unique_ptr< ISelectionReadAccessor > &accessor, bool defaultToChar)
make the ISelectionReadAccessor for the given name
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
SelectionAccessorReadSys(const std::string &val_selectionName)
static StatusCode filterForAffectingSystematics(const SystematicSet &systConfig, const SystematicSet &affectingSystematics, SystematicSet &filteredSystematics)
description: filter the systematics for the affected systematics returns: success guarantee: strong f...