|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef REWEIGHTUTILS_PARTICLESCALEFACTORTOOL_H
6 #define REWEIGHTUTILS_PARTICLESCALEFACTORTOOL_H 1
40 if( auxid == SG::null_auxid ) {
41 throw std::runtime_error(
"unknown aux id for decoration: " +
varname);
43 const std::type_info* ti = reg.
getType( auxid );
44 if( *ti ==
typeid(
double ) ) {
47 }
else if( *ti ==
typeid(
float ) ) {
50 }
else if( *ti ==
typeid(
int ) ) {
53 }
else if( *ti ==
typeid(
unsigned int ) ) {
57 throw std::runtime_error(
"Unrecognised type for decoration: " +
varname);
73 std::map<CP::SystematicVariation,TH1*>
hists;
78 std::map<xAOD::Type::ObjectType,Hists>
m_hists;
85 #endif //> !REWEIGHTUTILS_PARTICLESCALEFACTORTOOL_H
CP::SystematicSet recommendedSystematics() const override
the list of all systematics this tool recommends to use
std::map< CP::SystematicVariation, TH1 * > hists
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
ParticleScaleFactorTool(const std::string &name)
StatusCode applySystematicVariation(const CP::SystematicSet &systConfig) override
effects: configure this tool for the given list of systematic variations.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
SG::auxid_t findAuxID(const std::string &name, const std::string &clsname="") const
Look up a name -> auxid_t mapping.
Class to wrap a set of SystematicVariations.
const std::pair< CP::SystematicVariation, TH1 * > getHist(const CP::SystematicVariation &set) const
static double part_decor(const xAOD::IParticle &p, const std::string &varname)
Class providing the definition of the 4-vector interface.
CP::SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
Handle mappings between names and auxid_t.
CP::SystematicVariation m_currentSyst
size_t auxid_t
Identifier for a particular aux data item.
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
static double part_pt(const xAOD::IParticle &p)
bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const override
The ISystematicsTool methods.
::StatusCode StatusCode
StatusCode definition for legacy code.
CP::SystematicSet m_affectingSysts
const_iterator end() const
description: const iterator to the end of the set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
virtual StatusCode initialize() override
Initialize is required by AsgTool base class.
std::vector< std::function< double(const xAOD::IParticle &)> > axisFuncs
std::map< xAOD::Type::ObjectType, Hists > m_hists
iterator find(const SystematicVariation &sys) const
description: find an element in the set
static double part_eta(const xAOD::IParticle &p)
Helper class to provide constant type-safe access to aux data.
~ParticleScaleFactorTool()
static double part_pt_gev(const xAOD::IParticle &p)
virtual double evaluate(const xAOD::IParticle *particle) const override
returns: the value that was calculated from the xAOD::IParticle