5#ifndef REWEIGHTUTILS_PARTICLESCALEFACTORTOOL_H
6#define REWEIGHTUTILS_PARTICLESCALEFACTORTOOL_H 1
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;
Helper class to provide constant type-safe access to aux data.
Class to wrap a set of SystematicVariations.
virtual double evaluate(const xAOD::IParticle *particle) const override
returns: the value that was calculated from the xAOD::IParticle
CP::SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
std::map< xAOD::Type::ObjectType, Hists > m_hists
CP::SystematicSet m_affectingSysts
bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const override
The ISystematicsTool methods.
CP::SystematicVariation m_currentSyst
static double part_decor(const xAOD::IParticle &p, const std::string &varname)
ParticleScaleFactorTool(const std::string &name)
~ParticleScaleFactorTool()
CP::SystematicSet recommendedSystematics() const override
the list of all systematics this tool recommends to use
static double part_pt_gev(const xAOD::IParticle &p)
static double part_eta(const xAOD::IParticle &p)
static double part_pt(const xAOD::IParticle &p)
virtual StatusCode initialize() override
Initialize is required by AsgTool base class.
StatusCode applySystematicVariation(const CP::SystematicSet &systConfig) override
effects: configure this tool for the given list of systematic variations.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Helper class to provide constant type-safe access to aux data.
Class providing the definition of the 4-vector interface.
static const auxid_t null_auxid
To signal no aux data item.
size_t auxid_t
Identifier for a particular aux data item.
const std::pair< CP::SystematicVariation, TH1 * > getHist(const CP::SystematicVariation &set) const
std::map< CP::SystematicVariation, TH1 * > hists
std::vector< std::function< double(const xAOD::IParticle &)> > axisFuncs