ATLAS Offline Software
Loading...
Searching...
No Matches
TrigGlobalEfficiencyCorrectionTool Class Reference

#include <TrigGlobalEfficiencyCorrectionTool.h>

Inheritance diagram for TrigGlobalEfficiencyCorrectionTool:

Classes

struct  Hierarchy
struct  TagDecorator
struct  CachedRanking
struct  ToolKey

Public Member Functions

virtual ASG_TOOL_CLASS(TrigGlobalEfficiencyCorrectionTool, ITrigGlobalEfficiencyCorrectionTool) TrigGlobalEfficiencyCorrectionTool(const std ~TrigGlobalEfficiencyCorrectionTool ()
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
virtual CP::CorrectionCode getEfficiencyScaleFactor (const std::vector< const xAOD::IParticle * > &particles, double &efficiencyScaleFactor) override
virtual CP::CorrectionCode getEfficiencyScaleFactor (unsigned runNumber, const std::vector< const xAOD::IParticle * > &particles, double &efficiencyScaleFactor) override
 These should in principle not be used (except by unit tests), as the CP tools require the EventInfo decoration "RandomRunNumber" to be present.
virtual CP::CorrectionCode getEfficiency (const std::vector< const xAOD::IParticle * > &particles, double &efficiencyData, double &efficiencyMc) override
virtual CP::CorrectionCode getEfficiency (unsigned runNumber, const std::vector< const xAOD::IParticle * > &particles, double &efficiencyData, double &efficiencyMc) override
virtual bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const override
 Declare the interface that this class provides.
virtual CP::SystematicSet affectingSystematics () const override
 the list of all systematics this tool can be affected by
virtual CP::SystematicSet recommendedSystematics () const override
 the list of all systematics this tool recommends to use
virtual StatusCode applySystematicVariation (const CP::SystematicSet &systConfig) override
 effects: configure this tool for the given list of systematic variations.
virtual CP::CorrectionCode checkTriggerMatching (bool &matched, const std::vector< const xAOD::IParticle * > &particles) override
virtual CP::CorrectionCode checkTriggerMatching (std::unordered_map< std::string, bool > &matched_per_trigger, const std::vector< const xAOD::IParticle * > &particles) override
virtual CP::CorrectionCode getRelevantTriggers (std::vector< std::string > &triggers) override
 This will fill the 'triggers' argument with the names of the triggers relevant for the current run number, among those specified in the tool configuration.
virtual CP::CorrectionCode countTriggerLegs (const std::string &trigger, std::size_t &numberOfLegs) override
 This utility function provides the number of legs for the specified trigger.
template<class CPTool>
bool enumerateTools (ImportData &data, ToolHandleArray< CPTool > &suppliedTools, std::map< ToolKey, std::size_t > &toolIndex, flat_set< std::size_t > &collectedTags)
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
template<typename... Args>
auto getEfficiencyScaleFactor (Args &... args) -> std::enable_if_t< validArgs< Args... >(1), CP::CorrectionCode >
 Alternatively, the list of particles can be supplied via one or several vectors of xAOD::Electron*‍/Muon*‍/Photon* The generic signature is getEfficiencyScaleFactor((const) vector<(const)Type1*>&, ..., (const) vector<(const)TypeN*>&, double& efficiencyScaleFactor) e.g.
template<typename... Args>
auto getEfficiency (Args &... args) -> std::enable_if_t< validArgs< Args... >(2), CP::CorrectionCode >
template<typename BoolOrMap, typename... Args>
auto checkTriggerMatching (BoolOrMap &matched, Args &... args) -> std::enable_if_t< validArgs< Args... >(0), CP::CorrectionCode >
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Static Public Member Functions

static CP::CorrectionCode suggestElectronMapKeys (const std::map< std::string, std::string > &triggerCombination, const std::string &version, std::map< std::string, std::string > &legsPerKey)
static CP::CorrectionCode suggestPhotonMapKeys (const std::map< std::string, std::string > &triggerCombination, const std::string &version, std::map< std::string, std::string > &legsPerKey)
static CP::CorrectionCode suggestEgammaMapKeys (const std::map< std::string, std::string > &triggerCombination, const std::string &version, std::map< std::string, std::string > &legsPerKey, xAOD::Type::ObjectType type)
template<typename Arg>
static constexpr bool validArgs (unsigned nTrailingDoubles)
template<typename Arg1, typename Arg2, typename... OtherArgs>
static constexpr bool validArgs (unsigned nTrailingDoubles)
static std::string toolnameForDefaultScaleFactor ()
 To be used with the ListOfLegsPerTool property:

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.
double * handleArg (double &arg, std::vector< const xAOD::IParticle * > &)
template<typename P>
double * handleArg (const std::vector< P > &arg, std::vector< const xAOD::IParticle * > &particles)

Private Types

enum  TLE_RESULT { TLE_OK , TLE_UNAVAILABLE , TLE_ERROR }
using LeptonList = std::vector<TrigGlobEffCorr::Lepton>
template<typename Key>
using flat_set = std::flat_set<Key>
typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

bool loadHierarchies ()
 Internal methods (I) – initialization of the tool.
template<class CPTool>
bool enumerateTools (TrigGlobEffCorr::ImportData &data, ToolHandleArray< CPTool > &suppliedTools, std::map< ToolKey, std::size_t > &toolIndex, flat_set< std::size_t > &collectedTags)
flat_set< ToolKey > parseListOfLegs (TrigGlobEffCorr::ImportData &data, const std::string &inputList, bool &success)
bool parseTagString (const std::string &tagstring, flat_set< std::size_t > &tags)
bool loadTriggerCombination (TrigGlobEffCorr::ImportData &data, bool useDefaultElectronTools, bool useDefaultPhotonTools)
bool loadTagDecorators (const flat_set< std::size_t > &collectedElectronTags, const flat_set< std::size_t > &collectedMuonTags, const flat_set< std::size_t > &collectedPhotonTags)
bool loadListOfLegsPerTag ()
bool processDeprecatedProperties ()
bool retrieveRunNumber (unsigned &runNumber)
 Internal methods (II) – core task.
bool retrieveEventNumber (unsigned long &eventNumber)
bool aboveThreshold (const TrigGlobEffCorr::Lepton &p, std::size_t leg) const
template<class... ListOfLegs>
unsigned long getCachedTriggerLegsRanking (const TrigGlobEffCorr::Lepton &lepton, ListOfLegs... legs)
std::size_t getLoosestLegAboveThreshold (const TrigGlobEffCorr::Lepton &lepton, const flat_set< std::size_t > &legs, bool &success)
std::size_t getLoosestLeg (const TrigGlobEffCorr::Lepton &lepton, std::size_t leg1, std::size_t leg2, bool &success)
std::pair< std::size_t, std::size_t > getTwoLoosestLegs (const TrigGlobEffCorr::Lepton &lepton, const flat_set< std::size_t > &legs, bool &success)
std::vector< std::size_t > getSortedLegs (const TrigGlobEffCorr::Lepton &lepton, const flat_set< std::size_t > &legs, bool &success)
template<class Container>
CachedRanking rankTriggerLegs (float pt, const Container &legs)
template<class Particle>
bool updateLeptonList (LeptonList &leptons, const std::vector< const Particle * > &particles)
void updateMuonTriggerNames (std::size_t leg, const std::string &name)
TLE_RESULT getTriggerLegEfficiencies (const xAOD::Electron *p, unsigned runNumber, std::size_t leg, std::size_t tag, TrigGlobEffCorr::Efficiencies &efficiencies)
TLE_RESULT getTriggerLegEfficiencies (const xAOD::Muon *p, unsigned runNumber, std::size_t leg, std::size_t tag, TrigGlobEffCorr::Efficiencies &efficiencies)
TLE_RESULT getTriggerLegEfficiencies (const xAOD::Photon *p, unsigned runNumber, std::size_t leg, std::size_t tag, TrigGlobEffCorr::Efficiencies &efficiencies)
template<class ParticleType>
TLE_RESULT getEgammaTriggerLegEfficiencies (const ParticleType *p, unsigned runNumber, std::size_t leg, std::size_t tag, TrigGlobEffCorr::Efficiencies &efficiencies)
decltype(m_electronSfToolIndex) & GetScaleFactorToolIndex (const xAOD::Electron *)
decltype(m_photonSfToolIndex) & GetScaleFactorToolIndex (const xAOD::Photon *)
decltype(m_electronEffToolIndex) & GetEfficiencyToolIndex (const xAOD::Electron *)
decltype(m_photonEffToolIndex) & GetEfficiencyToolIndex (const xAOD::Photon *)
IAsgElectronEfficiencyCorrectionTool & GetScaleFactorTool (const xAOD::Electron *, std::size_t index)
IAsgPhotonEfficiencyCorrectionTool & GetScaleFactorTool (const xAOD::Photon *, std::size_t index)
IAsgElectronEfficiencyCorrectionTool & GetEfficiencyTool (const xAOD::Electron *, std::size_t index)
IAsgPhotonEfficiencyCorrectionTool & GetEfficiencyTool (const xAOD::Photon *, std::size_t index)
std::size_t getCombinedHash (const flat_set< std::size_t > &legs)
std::size_t getCombinedHash (std::size_t leg1, std::size_t leg2)
bool checkAndRecord (CP::CorrectionCode &&cc)
 Internal methods (III) – misc. helpers.
flat_set< std::size_t > listNonOrderedCSValues (const std::string &s, bool &success)
 Parses the input string (comma-separated list) and returns a set of hashes Watch out: since a flat_set is returned, the order of the entries in the input list is not preserved, as hinted by the name of the function.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static constexpr const flat_set< std::size_t > & forwardLegs (const flat_set< std::size_t > &legs)
static constexpr std::array< std::size_t, 2 > forwardLegs (std::size_t leg1, std::size_t leg2)

Private Attributes

ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_suppliedElectronEfficiencyTools
 Properties:
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_suppliedElectronScaleFactorTools
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_suppliedPhotonEfficiencyTools
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_suppliedPhotonScaleFactorTools
ToolHandleArray< CP::IMuonTriggerScaleFactors > m_suppliedMuonTools
std::map< std::string, std::string > m_legsPerTool
std::map< std::string, std::string > m_triggerCb
std::map< std::string, std::string > m_triggerCbPerYear
std::string m_leptonTagDecorations
std::map< std::string, std::string > m_tagsPerTool
std::map< std::string, std::string > m_electronLegsPerTag
std::map< std::string, std::string > m_muonLegsPerTag
 deprecated
std::map< std::string, std::string > m_legsPerTag
 deprecated
std::map< std::string, std::string > m_overrideThresholds
unsigned long m_numberOfToys {}
bool m_useInternalSeed {}
ToolHandle< Trig::IMatchingTool > m_trigMatchTool
std::hash< std::string > m_hasher
std::map< std::size_t, float > m_thresholds
std::multimap< std::size_t, CachedRanking > m_cachedLegRankings
std::map< ToolKey, std::size_t > m_electronSfToolIndex
std::map< ToolKey, std::size_t > m_electronEffToolIndex
std::map< ToolKey, std::size_t > m_photonSfToolIndex
std::map< ToolKey, std::size_t > m_photonEffToolIndex
std::map< ToolKey, std::size_t > m_muonToolIndex
std::set< std::size_t > m_validLegTagPairs
bool m_checkElectronLegTag {}
bool m_checkMuonLegTag {}
bool m_checkPhotonLegTag {}
std::map< std::size_t, std::string > m_dictionary
std::set< ToolKey > m_unsupportedLegs
std::vector< Hierarchy > m_hierarchyMeta
std::vector< std::size_t > m_hierarchyData
bool m_initialized = false
CP::CorrectionCode m_cpCode = CP::CorrectionCode::Ok
unsigned long m_seed {}
bool m_validTrigMatchTool
std::vector< TagDecorator > m_leptonTagDecorators
SG::AuxElement::ConstAccessor< unsigned int > m_runNumberDecorator
std::unique_ptr< TrigGlobEffCorr::Calculator > m_calculator
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Friends

class TrigGlobEffCorr::ImportData
class TrigGlobEffCorr::CheckConfig
class TrigGlobEffCorr::Calculator

Detailed Description

Definition at line 35 of file TrigGlobalEfficiencyCorrectionTool.h.

Member Typedef Documentation

◆ flat_set

template<typename Key>
using TrigGlobalEfficiencyCorrectionTool::flat_set = std::flat_set<Key>
private

Definition at line 196 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ LeptonList

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TLE_RESULT

Constructor & Destructor Documentation

◆ ~TrigGlobalEfficiencyCorrectionTool()

TrigGlobalEfficiencyCorrectionTool::~TrigGlobalEfficiencyCorrectionTool ( )
virtual

Definition at line 106 of file TrigGlobalEfficiencyCorrectionTool.cxx.

106 {
107 m_cpCode.ignore();
108}

Member Function Documentation

◆ aboveThreshold()

bool TrigGlobalEfficiencyCorrectionTool::aboveThreshold ( const TrigGlobEffCorr::Lepton & p,
std::size_t leg ) const
private

Definition at line 1020 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1021 {
1022 bool decision = (lepton.pt() >= m_thresholds.at(leg));
1023 if (m_validLegTagPairs.size()) {
1024 if ((lepton.type() == xAOD::Type::Electron && m_checkElectronLegTag) ||
1025 (lepton.type() == xAOD::Type::Muon && m_checkMuonLegTag) ||
1026 (lepton.type() == xAOD::Type::Photon && m_checkPhotonLegTag)) {
1027 decision = decision && (m_validLegTagPairs.find(leg ^ lepton.tag()) !=
1028 m_validLegTagPairs.end());
1029 }
1030 }
1031 ATH_MSG_DEBUG("Lepton " << lepton.particle() << " (pt=" << lepton.pt()
1032 << ") is " << (decision ? "" : "not ")
1033 << "considered suitable for firing trigger leg "
1034 << m_dictionary.at(leg));
1035 return decision;
1036}
#define ATH_MSG_DEBUG(x,...)
std::map< std::size_t, std::string > m_dictionary
@ Photon
The object is a photon.
Definition ObjectType.h:47
@ Muon
The object is a muon.
Definition ObjectType.h:48
@ Electron
The object is an electron.
Definition ObjectType.h:46

◆ affectingSystematics()

CP::SystematicSet TrigGlobalEfficiencyCorrectionTool::affectingSystematics ( ) const
overridevirtual

the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

Definition at line 1232 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1233 {
1234 return CP::SystematicSet();
1235}

◆ applySystematicVariation()

StatusCode TrigGlobalEfficiencyCorrectionTool::applySystematicVariation ( const CP::SystematicSet & systConfig)
overridevirtual

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). 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.

Definition at line 1242 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1243 {
1244 for (auto&& t : m_suppliedElectronEfficiencyTools)
1245 ANA_CHECK(t->applySystematicVariation(systematic));
1246 for (auto&& t : m_suppliedElectronScaleFactorTools)
1247 ANA_CHECK(t->applySystematicVariation(systematic));
1248 for (auto&& t : m_suppliedPhotonEfficiencyTools)
1249 ANA_CHECK(t->applySystematicVariation(systematic));
1250 for (auto&& t : m_suppliedPhotonScaleFactorTools)
1251 ANA_CHECK(t->applySystematicVariation(systematic));
1252 for (auto&& t : m_suppliedMuonTools)
1253 ANA_CHECK(t->applySystematicVariation(systematic));
1254
1255 return StatusCode::SUCCESS;
1256}
#define ANA_CHECK(EXP)
check whether the given expression was successful
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_suppliedPhotonScaleFactorTools
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_suppliedPhotonEfficiencyTools
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_suppliedElectronEfficiencyTools
Properties:
ToolHandleArray< CP::IMuonTriggerScaleFactors > m_suppliedMuonTools
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_suppliedElectronScaleFactorTools

◆ checkAndRecord()

bool TrigGlobalEfficiencyCorrectionTool::checkAndRecord ( CP::CorrectionCode && cc)
inlineprivate

Internal methods (III) – misc. helpers.

Definition at line 637 of file TrigGlobalEfficiencyCorrectionTool.cxx.

638 {
639 cc.setChecked();
640 if (cc > m_cpCode)
641 m_cpCode = cc;
642 return cc == CP::CorrectionCode::Ok;
643}
@ Ok
The correction was done successfully.

◆ checkTriggerMatching() [1/3]

template<typename BoolOrMap, typename... Args>
auto ITrigGlobalEfficiencyCorrectionTool::checkTriggerMatching ( BoolOrMap & matched,
Args &... args ) -> std::enable_if_t< validArgs< Args... >(0), CP::CorrectionCode >
inherited

Definition at line 111 of file ITrigGlobalEfficiencyCorrectionTool.h.

113{
114 std::vector<const xAOD::IParticle*> particles;
115 double* eff[] __attribute__((unused)) = { nullptr, handleArg(args, particles)... };
116 return checkTriggerMatching(matched, particles);
117}
__attribute__((always_inline)) inline uint16_t TileCalibDrawerBase
void unused(Args &&...)
virtual CP::CorrectionCode checkTriggerMatching(bool &matched, const std::vector< const xAOD::IParticle * > &particles)=0
double * handleArg(double &arg, std::vector< const xAOD::IParticle * > &)

◆ checkTriggerMatching() [2/3]

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::checkTriggerMatching ( bool & matched,
const std::vector< const xAOD::IParticle * > & particles )
overridevirtual

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 924 of file TrigGlobalEfficiencyCorrectionTool.cxx.

926 {
927 unsigned runNumber;
928 if (!retrieveRunNumber(runNumber)) {
930 "Unable to retrieve run number, aborting checkTriggerMatching()");
932 }
935 "A valid IMatchingTool instance should be provided via the property "
936 "'TriggerMatchingTool'");
938 }
939 LeptonList leptons;
940 updateLeptonList(leptons, particles);
941 return m_calculator->checkTriggerMatching(*this, matched, nullptr, leptons, runNumber)
944}
#define ATH_MSG_ERROR(x,...)
@ Error
Some error happened during the object correction.
std::unique_ptr< TrigGlobEffCorr::Calculator > m_calculator
std::vector< TrigGlobEffCorr::Lepton > LeptonList
bool retrieveRunNumber(unsigned &runNumber)
Internal methods (II) – core task.
bool updateLeptonList(LeptonList &leptons, const std::vector< const Particle * > &particles)

◆ checkTriggerMatching() [3/3]

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::checkTriggerMatching ( std::unordered_map< std::string, bool > & matched_per_trigger,
const std::vector< const xAOD::IParticle * > & particles )
overridevirtual

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 946 of file TrigGlobalEfficiencyCorrectionTool.cxx.

948 {
949 unsigned runNumber;
950 if (!retrieveRunNumber(runNumber)) {
952 "Unable to retrieve run number, aborting checkTriggerMatching()");
954 }
957 "A valid IMatchingTool instance should be provided via the property "
958 "'TriggerMatchingTool'");
960 }
961 LeptonList leptons;
962 updateLeptonList(leptons, particles);
963 bool flag;
964 return m_calculator->checkTriggerMatching(*this, flag, &matched_per_trigger, leptons, runNumber)
967}
bool flag
Definition master.py:29

◆ countTriggerLegs()

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::countTriggerLegs ( const std::string & trigger,
std::size_t & numberOfLegs )
overridevirtual

This utility function provides the number of legs for the specified trigger.

this abuses a little the role of the dictionary to act as a cache: for the key chosen as the trigger name hash XORed with the magic number, the mapped value is not the name of the trigger, but a meaningless string whose size equals the number of legs

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 982 of file TrigGlobalEfficiencyCorrectionTool.cxx.

983 {
984 numberOfLegs = 0;
989 constexpr std::size_t magic = 0xa3bad03e613527c9;
990 const std::size_t name = m_hasher(trigger), key = name ^ magic;
991 std::string& value = m_dictionary[key];
992 if (!value.length()) {
994 if (!data.importTriggers())
996 auto itr = data.getTriggerDefs().find(name);
997 if (itr == data.getTriggerDefs().end()) {
998 m_dictionary.erase(key);
999 ATH_MSG_ERROR("The trigger " << trigger << " is not recognized");
1001 }
1002 auto type = itr->second.type;
1004 if (type & TriggerType::TT_SINGLELEPTON_FLAG)
1005 value = "~";
1006 else if (type & TriggerType::TT_DILEPTON_FLAG)
1007 value = "~~";
1008 else if (type & TriggerType::TT_TRILEPTON_FLAG)
1009 value = "~~~";
1010 else {
1011 m_dictionary.erase(key);
1012 ATH_MSG_ERROR("Unrecognized trigger type, implementation must be fixed!");
1014 }
1015 }
1016 numberOfLegs = value.length();
1018}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ enumerateTools() [1/2]

template<class CPTool>
bool TrigGlobalEfficiencyCorrectionTool::enumerateTools ( ImportData & data,
ToolHandleArray< CPTool > & suppliedTools,
std::map< ToolKey, std::size_t > & toolIndex,
flat_set< std::size_t > & collectedTags )

Find the legs associated to this tool ("ListOfLegsPerTool" property)

Find the tags associated to this tool ("ListOfTagsPerTool" property)

Store

Definition at line 250 of file TrigGlobalEfficiencyCorrectionTool.cxx.

253 {
254 bool success = true;
255 for (unsigned index = 0; index < suppliedTools.size(); ++index) {
256 auto& handle = suppliedTools[index];
257 const std::string& name = handle.name();
258 const std::string& altname = handle->name(); // athena: not always the same
259 flat_set<ToolKey> listOfLegs;
261 if (suppliedTools.size() != 1 || m_legsPerTool.size() != 0) {
262 auto itrLegs = m_legsPerTool.find(name);
263 if (itrLegs == m_legsPerTool.end())
264 itrLegs = m_legsPerTool.find(altname);
265 if (itrLegs != m_legsPerTool.end()) {
266 listOfLegs = parseListOfLegs(data, itrLegs->second, success);
267 if (!success) {
269 "The 'ListOfLegsPerTool' property has an invalid entry for the "
270 "tool'"
271 << name << "'");
272 continue;
273 }
274 } else if (std::is_same<CPTool,
275 IAsgElectronEfficiencyCorrectionTool>::value ||
276 std::is_same<CPTool,
277 IAsgPhotonEfficiencyCorrectionTool>::value) {
278 ATH_MSG_ERROR("Property 'ListOfLegsPerTool' empty for tool '" << name
279 << "'");
280 success = false;
281 continue;
282 } else {
283 listOfLegs.emplace();
284 }
285 } else
286 listOfLegs.emplace();
289 auto itrTags = m_tagsPerTool.find(name);
290 if (itrTags == m_tagsPerTool.end())
291 itrTags = m_tagsPerTool.find(altname);
292 if (itrTags != m_tagsPerTool.end()) {
293 success = success && parseTagString(itrTags->second, tags);
294 collectedTags.insert(tags.begin(), tags.end());
295 } else
296 tags.emplace(0);
297
299 unsigned short nUncheckedLegs = 0;
300 for (auto& key : listOfLegs) {
301 std::size_t leg = key.hash;
302 if (leg) {
303 auto flavour = data.associatedLeptonFlavour(leg, success);
304 if (!(flavour == xAOD::Type::Electron &&
305 std::is_same<CPTool,
306 IAsgElectronEfficiencyCorrectionTool>::value) &&
307 !(flavour == xAOD::Type::Photon &&
308 std::is_same<CPTool,
309 IAsgPhotonEfficiencyCorrectionTool>::value)) {
310 ATH_MSG_ERROR("Unexpected association of trigger leg '"
311 << m_dictionary[leg] << "' to tool '" << name << "'");
312 success = false;
313 }
314 }
315 for (std::size_t tag : tags) {
316 if (!toolIndex.emplace(ToolKey(leg, tag, key.boundaries), index)
317 .second) {
318 if (leg && tag)
319 ATH_MSG_ERROR("Multiple tools associated to the selection tag '"
320 << m_dictionary[tag] << "' for the trigger leg '"
321 << m_dictionary[leg] << "'");
322 else if (leg)
323 ATH_MSG_ERROR("Multiple tools associated to the trigger leg '"
324 << m_dictionary[leg] << "'");
325 else if (tag)
326 ATH_MSG_ERROR("Multiple tools associated to the selection tag '"
327 << m_dictionary[tag] << "'");
328 else
330 "Multiple tools not associated to any trigger leg / selection "
331 "tag");
332 success = false;
333 }
334 }
335 ++nUncheckedLegs;
336 }
337 if (!nUncheckedLegs) {
338 ATH_MSG_ERROR("Tool " << name
339 << " hasn't been associated to any trigger leg");
340 success = false;
341 }
342 }
343 return success;
344}
flat_set< ToolKey > parseListOfLegs(TrigGlobEffCorr::ImportData &data, const std::string &inputList, bool &success)
bool parseTagString(const std::string &tagstring, flat_set< std::size_t > &tags)
std::map< std::string, std::string > m_tagsPerTool
std::map< std::string, std::string > m_legsPerTool
std::vector< std::string > tags
Definition hcg.cxx:107
virtual void handle(const Incident &inc)
Handle end of run incidents to save the metadata at that point.
str index
Definition DeMoScan.py:362

◆ enumerateTools() [2/2]

template<class CPTool>
bool TrigGlobalEfficiencyCorrectionTool::enumerateTools ( TrigGlobEffCorr::ImportData & data,
ToolHandleArray< CPTool > & suppliedTools,
std::map< ToolKey, std::size_t > & toolIndex,
flat_set< std::size_t > & collectedTags )
private

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ forwardLegs() [1/2]

auto TrigGlobalEfficiencyCorrectionTool::forwardLegs ( const flat_set< std::size_t > & legs)
inlinestaticconstexprprivate

Definition at line 1054 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1055 {
1056 return legs;
1057}

◆ forwardLegs() [2/2]

std::array< std::size_t, 2 > TrigGlobalEfficiencyCorrectionTool::forwardLegs ( std::size_t leg1,
std::size_t leg2 )
inlinestaticconstexprprivate

Definition at line 1060 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1061 {
1062 if (leg1 < leg2)
1063 return {leg1, leg2};
1064 else
1065 return {leg2, leg1};
1066}

◆ getCachedTriggerLegsRanking()

template<class... ListOfLegs>
unsigned long TrigGlobalEfficiencyCorrectionTool::getCachedTriggerLegsRanking ( const TrigGlobEffCorr::Lepton & lepton,
ListOfLegs... legs )
private

Definition at line 1069 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1070 {
1071 auto combinedHash = getCombinedHash(legs...);
1072 if (!combinedHash)
1073 return 0xFEDCBA9876543210; // only one (distinct) leg
1074 auto cachedRankings = m_cachedLegRankings.equal_range(combinedHash);
1075 auto rankingItr = cachedRankings.first;
1076 float pt = lepton.pt();
1077 while (rankingItr != cachedRankings.second &&
1078 (pt < rankingItr->second.minPt || pt >= rankingItr->second.maxPt))
1079 ++rankingItr;
1080 if (rankingItr == cachedRankings.second) {
1082 if (r)
1083 m_cachedLegRankings.emplace(combinedHash, r);
1084 return r.ranking;
1085 }
1086 return rankingItr->second.ranking;
1087}
float pt() const
Definition Lepton.h:28
std::multimap< std::size_t, CachedRanking > m_cachedLegRankings
std::size_t getCombinedHash(const flat_set< std::size_t > &legs)
CachedRanking rankTriggerLegs(float pt, const Container &legs)
static constexpr const flat_set< std::size_t > & forwardLegs(const flat_set< std::size_t > &legs)
int r
Definition globals.cxx:22

◆ getCombinedHash() [1/2]

std::size_t TrigGlobalEfficiencyCorrectionTool::getCombinedHash ( const flat_set< std::size_t > & legs)
private

Definition at line 1038 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1039 {
1040 if (legs.size() < 2)
1041 return 0;
1042 std::size_t combinedHash = 0;
1043 for (auto& leg : legs)
1044 combinedHash ^= leg;
1045 return combinedHash;
1046}

◆ getCombinedHash() [2/2]

std::size_t TrigGlobalEfficiencyCorrectionTool::getCombinedHash ( std::size_t leg1,
std::size_t leg2 )
private

returns 0 if leg1 == leg2, which is the correct behaviour

Definition at line 1048 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1049 {
1050 return leg1 ^
1051 leg2;
1052}

◆ getEfficiency() [1/3]

template<typename... Args>
auto ITrigGlobalEfficiencyCorrectionTool::getEfficiency ( Args &... args) -> std::enable_if_t< validArgs< Args... >(2), CP::CorrectionCode >
inherited

Definition at line 102 of file ITrigGlobalEfficiencyCorrectionTool.h.

104{
105 std::vector<const xAOD::IParticle*> particles;
106 double* eff[] = { nullptr, handleArg(args, particles)... };
107 return getEfficiency(particles, *eff[sizeof...(Args)-1], *eff[sizeof...(Args)]);
108}
virtual CP::CorrectionCode getEfficiency(const std::vector< const xAOD::IParticle * > &particles, double &efficiencyData, double &efficiencyMc)=0

◆ getEfficiency() [2/3]

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::getEfficiency ( const std::vector< const xAOD::IParticle * > & particles,
double & efficiencyData,
double & efficiencyMc )
overridevirtual

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 846 of file TrigGlobalEfficiencyCorrectionTool.cxx.

848 {
849 unsigned runNumber;
850 if (!retrieveRunNumber(runNumber))
852 return getEfficiency(runNumber, leptons, efficiencyData, efficiencyMc);
853}
virtual CP::CorrectionCode getEfficiency(const std::vector< const xAOD::IParticle * > &particles, double &efficiencyData, double &efficiencyMc) override

◆ getEfficiency() [3/3]

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::getEfficiency ( unsigned runNumber,
const std::vector< const xAOD::IParticle * > & particles,
double & efficiencyData,
double & efficiencyMc )
overridevirtual

ignores silently previous state + clears "checked" flag

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 880 of file TrigGlobalEfficiencyCorrectionTool.cxx.

882 {
885 efficiencyData = 0.;
886 efficiencyMc = 0.;
887
888 ATH_MSG_DEBUG("Computing global trigger efficiency for this event with "
889 << particles.size()
890 << " lepton(s) as input; run number = " << runNumber);
891
892#ifdef XAOD_STANDALONE
893 if (!m_initialized) {
894 ATH_MSG_WARNING("Tool hasn't been initialized, trying now");
895 if (initialize() != StatusCode::SUCCESS) {
896 ATH_MSG_ERROR("Giving up.");
897 m_cpCode.ignore();
899 }
900 }
901#endif
902
903 LeptonList leptons;
904 updateLeptonList(leptons, particles);
905
907 if (m_calculator->compute(*this, leptons, runNumber, efficiencies)) {
908 efficiencyData = efficiencies.data();
909 efficiencyMc = efficiencies.mc();
910 if (std::isnan(efficiencies.data()) || efficiencies.data() <= 0. ||
911 std::isnan(efficiencies.mc()) || efficiencies.mc() <= 0.) {
912 ATH_MSG_WARNING("Efficiencies do not seem valid");
913 m_cpCode.ignore();
915 }
916 } else {
919 }
920 }
921 return m_cpCode;
922}
#define ATH_MSG_WARNING(x,...)
TrigGlobEffCorr::Efficiencies Efficiencies
@ OutOfValidityRange
Input object is out of validity range.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
list efficiencies
translate the station name indices into the string staiton name

◆ getEfficiencyScaleFactor() [1/3]

template<typename... Args>
auto ITrigGlobalEfficiencyCorrectionTool::getEfficiencyScaleFactor ( Args &... args) -> std::enable_if_t< validArgs< Args... >(1), CP::CorrectionCode >
inherited

Alternatively, the list of particles can be supplied via one or several vectors of xAOD::Electron*‍/Muon*‍/Photon* The generic signature is getEfficiencyScaleFactor((const) vector<(const)Type1*>&, ..., (const) vector<(const)TypeN*>&, double& efficiencyScaleFactor) e.g.

getEfficiencyScaleFactor(electrons, muons, sf); getEfficiencyScaleFactor(photons, sf); getEfficiencyScaleFactor(muons, electrons, photons, sf); don't forget the last argument(s)! (scale factor for getEfficiencyScaleFactor(), data and MC efficiencies for getEfficiency())

Definition at line 93 of file ITrigGlobalEfficiencyCorrectionTool.h.

95{
96 std::vector<const xAOD::IParticle*> particles;
97 double* sf[] = { nullptr, handleArg(args, particles)... };
98 return getEfficiencyScaleFactor(particles, *sf[sizeof...(Args)]);
99}
virtual CP::CorrectionCode getEfficiencyScaleFactor(const std::vector< const xAOD::IParticle * > &particles, double &efficiencyScaleFactor)=0

◆ getEfficiencyScaleFactor() [2/3]

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::getEfficiencyScaleFactor ( const std::vector< const xAOD::IParticle * > & particles,
double & efficiencyScaleFactor )
overridevirtual

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 837 of file TrigGlobalEfficiencyCorrectionTool.cxx.

839 {
840 unsigned runNumber;
841 if (!retrieveRunNumber(runNumber))
843 return getEfficiencyScaleFactor(runNumber, leptons, efficiencyScaleFactor);
844}
virtual CP::CorrectionCode getEfficiencyScaleFactor(const std::vector< const xAOD::IParticle * > &particles, double &efficiencyScaleFactor) override

◆ getEfficiencyScaleFactor() [3/3]

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::getEfficiencyScaleFactor ( unsigned runNumber,
const std::vector< const xAOD::IParticle * > & particles,
double & efficiencyScaleFactor )
overridevirtual

These should in principle not be used (except by unit tests), as the CP tools require the EventInfo decoration "RandomRunNumber" to be present.

ignores silently previous state + clears "checked" flag

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 855 of file TrigGlobalEfficiencyCorrectionTool.cxx.

857 {
860 efficiencyScaleFactor = 1.;
861
863 auto cc = getEfficiency(runNumber, particles, efficiencies.data(),
864 efficiencies.mc());
865 if (cc == CP::CorrectionCode::Ok) {
866 if (efficiencies.data() > 0. && efficiencies.mc() > 0.) {
867 efficiencyScaleFactor = efficiencies.data() / efficiencies.mc();
869 } else {
870 efficiencyScaleFactor = 1.;
872 "Efficiencies do not seem valid, forcing the scale factor to 1.");
874 }
875 }
876 efficiencyScaleFactor = 1.;
877 return cc;
878}

◆ GetEfficiencyTool() [1/2]

IAsgElectronEfficiencyCorrectionTool & TrigGlobalEfficiencyCorrectionTool::GetEfficiencyTool ( const xAOD::Electron * ,
std::size_t index )
inlineprivate

Definition at line 279 of file TrigGlobalEfficiencyCorrectionTool.h.

280 {
282 }

◆ GetEfficiencyTool() [2/2]

IAsgPhotonEfficiencyCorrectionTool & TrigGlobalEfficiencyCorrectionTool::GetEfficiencyTool ( const xAOD::Photon * ,
std::size_t index )
inlineprivate

Definition at line 283 of file TrigGlobalEfficiencyCorrectionTool.h.

284 {
286 }

◆ GetEfficiencyToolIndex() [1/2]

decltype(m_electronEffToolIndex) & TrigGlobalEfficiencyCorrectionTool::GetEfficiencyToolIndex ( const xAOD::Electron * )
inlineprivate

Definition at line 264 of file TrigGlobalEfficiencyCorrectionTool.h.

265 {
267 }
std::map< ToolKey, std::size_t > m_electronEffToolIndex

◆ GetEfficiencyToolIndex() [2/2]

decltype(m_photonEffToolIndex) & TrigGlobalEfficiencyCorrectionTool::GetEfficiencyToolIndex ( const xAOD::Photon * )
inlineprivate

Definition at line 268 of file TrigGlobalEfficiencyCorrectionTool.h.

268 {
270 }
std::map< ToolKey, std::size_t > m_photonEffToolIndex

◆ getEgammaTriggerLegEfficiencies()

template<class ParticleType>
auto TrigGlobalEfficiencyCorrectionTool::getEgammaTriggerLegEfficiencies ( const ParticleType * p,
unsigned runNumber,
std::size_t leg,
std::size_t tag,
TrigGlobEffCorr::Efficiencies & efficiencies ) -> TLE_RESULT
private

Common implementation for electrons and photons

Definition at line 677 of file TrigGlobalEfficiencyCorrectionTool.cxx.

679 {
681 auto ptype = []() {
682 return std::is_same<ParticleType, xAOD::Electron>::value ? "electron"
683 : std::is_same<ParticleType, xAOD::Photon>::value ? "photon"
684 : "<unknown type>";
685 };
686 auto pp = static_cast<const xAOD::IParticle*>(p);
687 ATH_MSG_DEBUG("Retrieving efficiencies for "
688 << ptype() << ' ' << p << " (pt=" << pp->pt()
689 << ", eta=" << pp->eta() << ", tag='" << m_dictionary[tag]
690 << "') for trigger leg " << m_dictionary[leg]);
691 auto itrSf = GetScaleFactorToolIndex(p).find(ToolKey(leg, tag, runNumber));
692 auto itrEff = GetEfficiencyToolIndex(p).find(ToolKey(leg, tag, runNumber));
693 if (itrSf == GetScaleFactorToolIndex(p).end() ||
694 itrEff == GetEfficiencyToolIndex(p).end()) {
695 if (m_unsupportedLegs.count(ToolKey(leg, 0u, runNumber))) {
696 efficiencies.data() = 0.5;
697 efficiencies.mc() = 0.5;
698 return TLE_UNAVAILABLE;
699 }
700 if (!tag)
701 ATH_MSG_ERROR("Unable to find "
702 << ptype() << " tools needed for trigger leg "
703 << m_dictionary[leg] << " (run number = " << runNumber
704 << ")");
705 else
706 ATH_MSG_ERROR("Unable to find "
707 << ptype() << " tools needed for trigger leg "
708 << m_dictionary[leg] << " and selection tag "
709 << m_dictionary[tag] << " (run number = " << runNumber
710 << ")");
711 return TLE_ERROR;
712 }
713 double sf;
714 bool success =
715 checkAndRecord(GetScaleFactorTool(p, itrSf->second)
716 .getEfficiencyScaleFactor(*p, sf)) &&
717 checkAndRecord(GetEfficiencyTool(p, itrEff->second)
719 efficiencies.data() = sf * efficiencies.mc();
720 ATH_MSG_DEBUG("found for that " << ptype()
721 << " eff(data) = " << efficiencies.data()
722 << " and eff(MC) = " << efficiencies.mc());
723 return success ? TLE_OK : TLE_ERROR;
724}
virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::Electron &inputObject, double &efficiencyScaleFactor) const =0
decltype(m_electronEffToolIndex) & GetEfficiencyToolIndex(const xAOD::Electron *)
bool checkAndRecord(CP::CorrectionCode &&cc)
Internal methods (III) – misc. helpers.
IAsgElectronEfficiencyCorrectionTool & GetEfficiencyTool(const xAOD::Electron *, std::size_t index)
decltype(m_electronSfToolIndex) & GetScaleFactorToolIndex(const xAOD::Electron *)
IAsgElectronEfficiencyCorrectionTool & GetScaleFactorTool(const xAOD::Electron *, std::size_t index)

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getLoosestLeg()

std::size_t TrigGlobalEfficiencyCorrectionTool::getLoosestLeg ( const TrigGlobEffCorr::Lepton & lepton,
std::size_t leg1,
std::size_t leg2,
bool & success )
private

Definition at line 1157 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1158 {
1159 auto ranking = getCachedTriggerLegsRanking(lepton, leg1, leg2);
1160 if (CachedRanking::invalid(ranking)) {
1161 success = false;
1162 return -1;
1163 }
1164 return forwardLegs(leg1, leg2)[ranking & 0xF];
1165}
unsigned long getCachedTriggerLegsRanking(const TrigGlobEffCorr::Lepton &lepton, ListOfLegs... legs)

◆ getLoosestLegAboveThreshold()

std::size_t TrigGlobalEfficiencyCorrectionTool::getLoosestLegAboveThreshold ( const TrigGlobEffCorr::Lepton & lepton,
const flat_set< std::size_t > & legs,
bool & success )
private

Definition at line 1182 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1183 {
1184 flat_set<std::size_t> validLegs;
1185 for (auto leg : legs)
1186 if (aboveThreshold(lepton, leg))
1187 validLegs.insert(leg);
1188 if (validLegs.size() == 0)
1189 return 0;
1190 if (validLegs.size() == 1)
1191 return *validLegs.begin();
1192 auto ranking = getCachedTriggerLegsRanking(lepton, legs);
1193 if (CachedRanking::invalid(ranking)) {
1194 success = false;
1195 return 0;
1196 }
1197 return nth (legs, ranking & 0xF);
1198}
bool aboveThreshold(const TrigGlobEffCorr::Lepton &p, std::size_t leg) const

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ getRelevantTriggers()

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::getRelevantTriggers ( std::vector< std::string > & triggers)
overridevirtual

This will fill the 'triggers' argument with the names of the triggers relevant for the current run number, among those specified in the tool configuration.

Implements ITrigGlobalEfficiencyCorrectionTool.

Definition at line 969 of file TrigGlobalEfficiencyCorrectionTool.cxx.

970 {
971 unsigned runNumber;
972 if (!retrieveRunNumber(runNumber)) {
974 "Unable to retrieve run number, aborting getRelevantTriggers()");
976 }
977 return m_calculator->getRelevantTriggersForUser(*this, triggers, runNumber)
980}

◆ GetScaleFactorTool() [1/2]

IAsgElectronEfficiencyCorrectionTool & TrigGlobalEfficiencyCorrectionTool::GetScaleFactorTool ( const xAOD::Electron * ,
std::size_t index )
inlineprivate

Definition at line 271 of file TrigGlobalEfficiencyCorrectionTool.h.

272 {
274 }

◆ GetScaleFactorTool() [2/2]

IAsgPhotonEfficiencyCorrectionTool & TrigGlobalEfficiencyCorrectionTool::GetScaleFactorTool ( const xAOD::Photon * ,
std::size_t index )
inlineprivate

Definition at line 275 of file TrigGlobalEfficiencyCorrectionTool.h.

276 {
278 }

◆ GetScaleFactorToolIndex() [1/2]

decltype(m_electronSfToolIndex) & TrigGlobalEfficiencyCorrectionTool::GetScaleFactorToolIndex ( const xAOD::Electron * )
inlineprivate

Definition at line 257 of file TrigGlobalEfficiencyCorrectionTool.h.

258 {
260 }
std::map< ToolKey, std::size_t > m_electronSfToolIndex

◆ GetScaleFactorToolIndex() [2/2]

decltype(m_photonSfToolIndex) & TrigGlobalEfficiencyCorrectionTool::GetScaleFactorToolIndex ( const xAOD::Photon * )
inlineprivate

Definition at line 261 of file TrigGlobalEfficiencyCorrectionTool.h.

261 {
262 return m_photonSfToolIndex;
263 }

◆ getSortedLegs()

std::vector< std::size_t > TrigGlobalEfficiencyCorrectionTool::getSortedLegs ( const TrigGlobEffCorr::Lepton & lepton,
const flat_set< std::size_t > & legs,
bool & success )
private

Definition at line 1200 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1201 {
1202 const int nLegs = legs.size();
1203 unsigned long ranking = getCachedTriggerLegsRanking(lepton, legs);
1204 if (CachedRanking::invalid(ranking)) {
1205 success = false;
1206 ranking = 0xFEDCBA9876543210;
1207 }
1208 std::vector<std::size_t> sorted_legs(nLegs);
1209 for (int i = 0; i < nLegs; ++i) {
1210 sorted_legs[i] = nth (legs, ranking & 0xF);
1211 ranking >>= 4;
1212 }
1213 return sorted_legs;
1214}

◆ getTriggerLegEfficiencies() [1/3]

auto TrigGlobalEfficiencyCorrectionTool::getTriggerLegEfficiencies ( const xAOD::Electron * p,
unsigned runNumber,
std::size_t leg,
std::size_t tag,
TrigGlobEffCorr::Efficiencies & efficiencies )
private

Definition at line 726 of file TrigGlobalEfficiencyCorrectionTool.cxx.

728 {
729 return getEgammaTriggerLegEfficiencies(p, runNumber, leg, tag, efficiencies);
730}
TLE_RESULT getEgammaTriggerLegEfficiencies(const ParticleType *p, unsigned runNumber, std::size_t leg, std::size_t tag, TrigGlobEffCorr::Efficiencies &efficiencies)

◆ getTriggerLegEfficiencies() [2/3]

auto TrigGlobalEfficiencyCorrectionTool::getTriggerLegEfficiencies ( const xAOD::Muon * p,
unsigned runNumber,
std::size_t leg,
std::size_t tag,
TrigGlobEffCorr::Efficiencies & efficiencies )
private

Definition at line 738 of file TrigGlobalEfficiencyCorrectionTool.cxx.

740 {
741 ATH_MSG_DEBUG("Retrieving efficiencies for muon "
742 << p << " (pt=" << p->pt() << ", eta=" << p->eta() << ", tag='"
743 << m_dictionary[tag] << "') for trigger leg "
744 << m_dictionary[leg]);
745 if (m_unsupportedLegs.size() &&
746 m_unsupportedLegs.count(ToolKey(leg, 0u, runNumber))) {
747 efficiencies.data() = 0.5;
748 efficiencies.mc() = 0.5;
749 return TLE_UNAVAILABLE;
750 }
751 auto itr = m_muonToolIndex.find(ToolKey(0, tag, 0));
752 if (itr == m_muonToolIndex.end()) {
753 if (!tag)
754 ATH_MSG_ERROR("Unable to find muon tool");
755 else
756 ATH_MSG_ERROR("Unable to find muon tool needed for selection tag "
757 << m_dictionary[tag]);
759 return TLE_ERROR;
760 }
761 auto& tool = *m_suppliedMuonTools[itr->second];
762 auto& hltTrig = m_dictionary[leg ^ 0xB0DDD56fF8E3250D];
763 if (!hltTrig.size()) {
764 hltTrig = "HLT_" + m_dictionary[leg];
765 while (true) {
766 std::size_t i = hltTrig.find("_OR_m");
767 if (i == std::string::npos)
768 break;
769 hltTrig.insert(i + 4, "HLT_", 4);
770 }
771 }
772 bool success = checkAndRecord(tool.getTriggerEfficiency(*p, efficiencies.mc(),
773 hltTrig, kFALSE)) &&
774 checkAndRecord(tool.getTriggerEfficiency(
775 *p, efficiencies.data(), hltTrig, kTRUE));
776 ATH_MSG_DEBUG("found for that muon eff(data) = " << efficiencies.data()
777 << " and eff(MC) = "
778 << efficiencies.mc());
779 return success ? TLE_OK : TLE_ERROR;
780}

◆ getTriggerLegEfficiencies() [3/3]

auto TrigGlobalEfficiencyCorrectionTool::getTriggerLegEfficiencies ( const xAOD::Photon * p,
unsigned runNumber,
std::size_t leg,
std::size_t tag,
TrigGlobEffCorr::Efficiencies & efficiencies )
private

Definition at line 732 of file TrigGlobalEfficiencyCorrectionTool.cxx.

734 {
735 return getEgammaTriggerLegEfficiencies(p, runNumber, leg, tag, efficiencies);
736}

◆ getTwoLoosestLegs()

std::pair< std::size_t, std::size_t > TrigGlobalEfficiencyCorrectionTool::getTwoLoosestLegs ( const TrigGlobEffCorr::Lepton & lepton,
const flat_set< std::size_t > & legs,
bool & success )
private

Definition at line 1168 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1169 {
1170 auto ranking = getCachedTriggerLegsRanking(lepton, legs);
1171 if (CachedRanking::invalid(ranking)) {
1172 success = false;
1173 return {0, 0};
1174 }
1175 std::pair<std::size_t, std::size_t> looseLegs{0, 0};
1176 looseLegs.first = nth (legs, ranking & 0xF);
1177 if (legs.size() >= 2)
1178 looseLegs.second = nth (legs, (ranking >> 4) & 0xF);
1179 return looseLegs;
1180}

◆ handleArg() [1/2]

template<typename P>
double * ITrigGlobalEfficiencyCorrectionTool::handleArg ( const std::vector< P > & arg,
std::vector< const xAOD::IParticle * > & particles )
inlineprotectedinherited

Definition at line 60 of file ITrigGlobalEfficiencyCorrectionTool.h.

61 {
62 for(auto ptr : arg) particles.push_back(static_cast<const xAOD::IParticle*>(ptr));
63 return nullptr;
64 }

◆ handleArg() [2/2]

double * ITrigGlobalEfficiencyCorrectionTool::handleArg ( double & arg,
std::vector< const xAOD::IParticle * > &  )
inlineprotectedinherited

◆ initialize()

StatusCode TrigGlobalEfficiencyCorrectionTool::initialize ( void )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Copy the following variables from data as the latter is short-lived

Reimplemented from asg::AsgTool.

Definition at line 110 of file TrigGlobalEfficiencyCorrectionTool.cxx.

110 {
111 if (m_initialized) {
112 ATH_MSG_ERROR("Tool has already been initialized");
113 return StatusCode::FAILURE;
114 }
115 ATH_MSG_INFO("Initializing " << name() << "...");
116
117 m_dictionary.emplace(0, "");
118
120 return StatusCode::FAILURE;
121
122 ATH_MSG_DEBUG("Importing data from configuration files");
123 ImportData data(*this);
124 if (!data.importAll(m_overrideThresholds))
125 return StatusCode::FAILURE;
127 m_hierarchyMeta = data.getHierarchyMeta();
128 m_hierarchyData = data.getHierarchyData();
129 m_thresholds = data.getTriggerThresholds();
130
131 ATH_MSG_DEBUG("Retrieving tools");
132 if (m_suppliedElectronEfficiencyTools.retrieve() != StatusCode::SUCCESS ||
133 m_suppliedElectronScaleFactorTools.retrieve() != StatusCode::SUCCESS ||
134 m_suppliedMuonTools.retrieve() != StatusCode::SUCCESS ||
135 m_suppliedPhotonEfficiencyTools.retrieve() != StatusCode::SUCCESS ||
136 m_suppliedPhotonScaleFactorTools.retrieve() != StatusCode::SUCCESS) {
137 ATH_MSG_ERROR("Unable to retrieve CP tools");
138 return StatusCode::FAILURE;
139 }
140
141 ATH_MSG_DEBUG("Retrieving trigger matching tool (if provided)");
142 m_validTrigMatchTool = false;
143 if (m_trigMatchTool.name() != "") {
144 if (m_trigMatchTool.retrieve() != StatusCode::SUCCESS) {
145 ATH_MSG_ERROR("Unable to retrieve trigger matching tool");
146 return StatusCode::FAILURE;
147 }
148 ATH_MSG_DEBUG("Trigger matching support enabled");
150 }
151
152 ATH_MSG_DEBUG("Basic checks");
153 CheckConfig checks(*this);
154 if (!checks.basicConfigChecks())
155 return StatusCode::FAILURE;
156
157 ATH_MSG_DEBUG("Enumerating tools");
158 flat_set<std::size_t> collectedElectronTags, collectedMuonTags,
159 collectedPhotonTags;
161 m_electronEffToolIndex, collectedElectronTags) ||
163 m_electronSfToolIndex, collectedElectronTags) ||
165 collectedMuonTags) ||
167 m_photonEffToolIndex, collectedPhotonTags) ||
169 m_photonSfToolIndex, collectedPhotonTags)) {
170 return StatusCode::FAILURE;
171 }
172 // List legs (if any) for which a dummy scale factor should be returned.
174 if (itr != m_legsPerTool.end()) {
175 bool success = true;
176 for (ToolKey leg : parseListOfLegs(data, itr->second, success)) {
177 m_unsupportedLegs.insert(leg);
178 }
179 }
180
181 ATH_MSG_DEBUG("Loading user-defined trigger combination");
182 bool useDefaultElectronTools =
183 (m_suppliedElectronEfficiencyTools.size() == 1) &&
185 (m_legsPerTool.size() == 0);
186 bool useDefaultPhotonTools = (m_suppliedPhotonEfficiencyTools.size() == 1) &&
187 (m_suppliedPhotonScaleFactorTools.size() == 1) &&
188 (m_legsPerTool.size() == 0);
189 if (!loadTriggerCombination(data, useDefaultElectronTools,
190 useDefaultPhotonTools))
191 return StatusCode::FAILURE;
192
193 ATH_MSG_DEBUG("Loading lepton selection tags decorators");
194 if (!loadTagDecorators(collectedElectronTags, collectedMuonTags,
195 collectedPhotonTags))
196 return StatusCode::FAILURE;
197
198 ATH_MSG_DEBUG("Loading list of legs allowed for each tag");
200 return StatusCode::FAILURE;
201
202 ATH_MSG_DEBUG("Advanced checks");
203 if (!checks.advancedConfigChecks())
204 return StatusCode::FAILURE;
205
206 ATH_MSG_INFO("Initialization successful");
207 m_initialized = true;
208 return StatusCode::SUCCESS;
209}
#define ATH_MSG_INFO(x,...)
static std::string toolnameForDefaultScaleFactor()
To be used with the ListOfLegsPerTool property:
std::map< std::string, std::string > m_overrideThresholds
bool loadTagDecorators(const flat_set< std::size_t > &collectedElectronTags, const flat_set< std::size_t > &collectedMuonTags, const flat_set< std::size_t > &collectedPhotonTags)
bool enumerateTools(TrigGlobEffCorr::ImportData &data, ToolHandleArray< CPTool > &suppliedTools, std::map< ToolKey, std::size_t > &toolIndex, flat_set< std::size_t > &collectedTags)
bool loadTriggerCombination(TrigGlobEffCorr::ImportData &data, bool useDefaultElectronTools, bool useDefaultPhotonTools)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isAffectedBySystematic()

bool TrigGlobalEfficiencyCorrectionTool::isAffectedBySystematic ( const CP::SystematicVariation & systematic) const
overridevirtual

Declare the interface that this class provides.

returns: whether this tool is affected by the given systematics

Implements CP::ISystematicsTool.

Definition at line 1226 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1227 {
1228 auto sys = affectingSystematics();
1229 return !systematic.empty() && sys.find(systematic) != sys.end();
1230}
bool empty() const
returns: whether this is an empty systematic, i.e.
virtual CP::SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by

◆ listNonOrderedCSValues()

auto TrigGlobalEfficiencyCorrectionTool::listNonOrderedCSValues ( const std::string & s,
bool & success )
private

Parses the input string (comma-separated list) and returns a set of hashes Watch out: since a flat_set is returned, the order of the entries in the input list is not preserved, as hinted by the name of the function.

Definition at line 648 of file TrigGlobalEfficiencyCorrectionTool.cxx.

649 {
650 std::stringstream ss(TrigGlobEffCorr::removeWhitespaces(s));
652 std::string token;
653 while (std::getline(ss, token, ',')) {
654 if (token.length()) {
655 std::size_t h = m_hasher(token);
656 if (hashes.insert(h).second) {
657 m_dictionary.emplace(h, std::move(token));
658 } else {
659 success = false;
661 "Found duplicate entry while parsing comma-separated list '"
662 << s << "'");
663 }
664 } else {
665 success = false;
667 "Found null-length entry while parsing comma-separated list '"
668 << s << "'");
669 }
670 }
671 if (!success)
672 hashes.clear();
673 return hashes;
674}
static Double_t ss
std::string removeWhitespaces(const std::string &s)
Definition ImportData.h:172

◆ loadHierarchies()

bool TrigGlobalEfficiencyCorrectionTool::loadHierarchies ( )
private

Internal methods (I) – initialization of the tool.

◆ loadListOfLegsPerTag()

bool TrigGlobalEfficiencyCorrectionTool::loadListOfLegsPerTag ( )
private

Create the hash list of legs allowed for each tag; check that a CP tool is available for each combination

Definition at line 572 of file TrigGlobalEfficiencyCorrectionTool.cxx.

572 {
573 bool success = true;
574
577 for (auto& kv : m_legsPerTag) {
578 std::size_t tag;
579 if (!kv.first.size() || kv.first == "*")
580 tag = 0;
581 else
582 tag = m_hasher(kv.first);
583 auto listOfLegs = listNonOrderedCSValues(kv.second, success);
584 if (!success) {
586 "The property 'ListOfLegsPerTag' has an invalid entry for the tag '"
587 << kv.first << "'");
588 break;
589 }
590 for (std::size_t leg : listOfLegs) {
591 auto type =
593 if (type == xAOD::Type::Electron &&
594 m_electronSfToolIndex.find(ToolKey(leg, tag)) ==
595 m_electronSfToolIndex.end()) {
596 ATH_MSG_ERROR("No electron tool has been provided for trigger leg '"
597 << m_dictionary[leg] << "' and selection tag " << kv.first
598 << " mentioned in the property 'ListOfLegsPerTag'");
599 success = false;
600 } else if (type == xAOD::Type::Muon &&
601 m_muonToolIndex.find(ToolKey(0, tag)) ==
602 m_muonToolIndex.end()) {
603 ATH_MSG_ERROR("No muon tool has been provided for selection tag "
604 << kv.first
605 << " mentioned in the property 'ListOfLegsPerTag'");
606 success = false;
607 } else if (type == xAOD::Type::Photon &&
608 m_photonSfToolIndex.find(ToolKey(leg, tag)) ==
609 m_photonSfToolIndex.end()) {
610 ATH_MSG_ERROR("No photon tool has been provided for trigger leg '"
611 << m_dictionary[leg] << "' and selection tag " << kv.first
612 << " mentioned in the property 'ListOfLegsPerTag'");
613 success = false;
614 }
615 if (m_validLegTagPairs.insert(leg ^ tag).second) {
616 if (type == xAOD::Type::Electron)
618 if (type == xAOD::Type::Muon)
619 m_checkMuonLegTag = true;
620 if (type == xAOD::Type::Photon)
621 m_checkPhotonLegTag = true;
622 } else {
623 ATH_MSG_ERROR("The combination of trigger leg '"
624 << m_dictionary[leg] << "' and selection tag " << kv.first
625 << " is mentioned more than once in the property "
626 "'ListOfLegsPerTag'");
627 success = false;
628 }
629 }
630 }
631 if (!success)
632 return false;
633
634 return success;
635}
xAOD::Type::ObjectType associatedLeptonFlavour(std::size_t leg, bool &success)
flat_set< std::size_t > listNonOrderedCSValues(const std::string &s, bool &success)
Parses the input string (comma-separated list) and returns a set of hashes Watch out: since a flat_se...
std::map< std::string, std::string > m_legsPerTag
deprecated

◆ loadTagDecorators()

bool TrigGlobalEfficiencyCorrectionTool::loadTagDecorators ( const flat_set< std::size_t > & collectedElectronTags,
const flat_set< std::size_t > & collectedMuonTags,
const flat_set< std::size_t > & collectedPhotonTags )
private

Initialize decorators Note: can't use listNonOrderedCSValues() as the order in which decorations are listed must be preserved

tag = decorator name (considered tagged if decorated value != 0)

tag = decorator name (without '?') + decorated value

find a tag of the form <name><integer suffix>

Check there's a suitable decorator for all tags associated to CP tools via ListOfTagsPerTool

ok, there's a direct match

Definition at line 461 of file TrigGlobalEfficiencyCorrectionTool.cxx.

464 {
465 bool success = true;
466
467 flat_set<std::size_t> collectedTags(collectedElectronTags);
468 collectedTags.insert(collectedMuonTags.begin(), collectedMuonTags.end());
469 collectedTags.insert(collectedPhotonTags.begin(), collectedPhotonTags.end());
470 flat_set<std::size_t> allTags = collectedTags;
471
475 std::stringstream ss(
477 std::string decoration;
478 flat_set<std::size_t> allDecorations;
479 while (std::getline(ss, decoration, ',')) {
480 if (!decoration.length() || decoration == "?") {
482 "Found an empty string in the 'LeptonTagDecorations' property");
483 success = false;
484 break;
485 }
486
487 bool found = false, suffixed = false;
488 std::size_t h;
489 if (decoration.back() != '?') {
491 h = m_hasher(decoration);
492 found = (allTags.find(h) != allTags.end());
493 } else {
495 decoration.pop_back();
496 suffixed = true;
497 for (std::size_t tag :
498 allTags)
499 {
500 auto& s = m_dictionary[tag];
501 if (s.find(decoration) != 0)
502 continue;
503 if (std::all_of(s.begin() + decoration.length(), s.end(),
504 [](char c) { return std::isdigit(c); })) {
505 found = true;
506 break;
507 }
508 }
509 h = m_hasher(decoration);
510 }
511 if (!allDecorations.insert(h).second) {
513 "The selection tag '"
514 << decoration
515 << "' is listed twice in the property 'LeptonTagDecorations'");
516 success = false;
517 continue;
518 }
519 if (!found) {
521 "the selection tag '"
522 << decoration
523 << "' is only referred to in the property 'LeptonTagDecorations'");
524 success = false;
525 continue;
526 }
527 m_leptonTagDecorators.emplace_back(decoration, h, suffixed);
528 m_dictionary.emplace(h, decoration);
529 }
531 if (!success)
532 return false;
533
536 for (std::size_t tag : collectedTags) {
537 if (!tag)
538 continue;
539 auto itr =
540 std::find_if(m_leptonTagDecorators.begin(), m_leptonTagDecorators.end(),
541 [tag](const TagDecorator& ltd) {
542 return (!ltd.suffixed) && (ltd.hash == tag);
543 });
544 if (itr != m_leptonTagDecorators.end())
545 continue;
546 bool found = false;
547 auto& s = m_dictionary[tag];
548 for (auto& ltd : m_leptonTagDecorators) {
549 auto& name = m_dictionary[ltd.hash];
550 if (s.find(name) != 0)
551 continue;
552 if (std::all_of(s.begin() + name.length(), s.end(),
553 [](char c) { return std::isdigit(c); })) {
554 found = true;
555 break;
556 }
557 }
558 if (!found) {
559 ATH_MSG_ERROR("the selection tag '"
560 << m_dictionary[tag]
561 << "' hasn't been found in in 'LeptonTagDecorations'");
562 success = false;
563 continue;
564 }
565 }
566 if (!success)
567 return false;
568
569 return success;
570}
void reverse(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of reverse for DataVector/List.

◆ loadTriggerCombination()

bool TrigGlobalEfficiencyCorrectionTool::loadTriggerCombination ( TrigGlobEffCorr::ImportData & data,
bool useDefaultElectronTools,
bool useDefaultPhotonTools )
private

tools have not been associated with legs so far so the key hash is only the tag

Definition at line 394 of file TrigGlobalEfficiencyCorrectionTool.cxx.

396 {
397 bool success = true, mustBeEmpty = m_triggerCb.size();
398 for (auto& kv : m_triggerCbPerYear) {
399 if (!kv.second.size())
400 continue;
401 if (mustBeEmpty) {
403 "You're not allowed to use simultaneously the 'TriggerCombination' "
404 "and 'TriggerCombination"
405 << kv.first << "' properties.");
406 return false;
407 }
408 m_triggerCb.insert(kv);
409 }
410
411 m_calculator = std::make_unique<Calculator>(*this, m_triggerCb.size());
412 std::set<std::size_t> allUniqueElectronLegs, allUniquePhotonLegs;
413 for (auto& kv : m_triggerCb) {
414 std::pair<unsigned, unsigned> boundaries;
415 if (!data.getPeriodBoundaries(kv.first, boundaries)) {
416 success = false;
417 continue;
418 }
419 std::size_t uniqueElectronLeg = !useDefaultElectronTools,
420 uniquePhotonLeg = !useDefaultPhotonTools;
421 if (!m_calculator->addPeriod(data, boundaries, kv.second, m_numberOfToys,
422 uniqueElectronLeg, uniquePhotonLeg)) {
423 success = false;
424 continue;
425 }
426 if (uniqueElectronLeg && useDefaultElectronTools)
427 allUniqueElectronLegs.insert(uniqueElectronLeg);
428 if (uniquePhotonLeg && useDefaultPhotonTools)
429 allUniquePhotonLegs.insert(uniquePhotonLeg);
430 }
431 if (!success)
432 return false;
433
434 auto remapTools = [](auto& toolIndex, auto& allUniqueLegs) {
435 typename std::remove_reference<decltype(toolIndex)>::type remappedToolIndex;
436 for (std::size_t leg : allUniqueLegs) {
437 if (!leg)
438 continue;
439 for (auto& kv : toolIndex) {
442 const ToolKey& key = kv.first;
443 remappedToolIndex.emplace(ToolKey(leg, key.hash, key.boundaries),
444 kv.second);
445 }
446 }
447 toolIndex.swap(remappedToolIndex);
448 };
449
450 if (useDefaultElectronTools && allUniqueElectronLegs.size()) {
451 remapTools(m_electronSfToolIndex, allUniqueElectronLegs);
452 remapTools(m_electronEffToolIndex, allUniqueElectronLegs);
453 }
454 if (useDefaultPhotonTools && allUniquePhotonLegs.size()) {
455 remapTools(m_photonSfToolIndex, allUniquePhotonLegs);
456 remapTools(m_photonEffToolIndex, allUniquePhotonLegs);
457 }
458 return success;
459}
std::map< std::string, std::string > m_triggerCb
std::map< std::string, std::string > m_triggerCbPerYear

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ parseListOfLegs()

auto TrigGlobalEfficiencyCorrectionTool::parseListOfLegs ( TrigGlobEffCorr::ImportData & data,
const std::string & inputList,
bool & success )
private

Definition at line 346 of file TrigGlobalEfficiencyCorrectionTool.cxx.

348 {
349 if (!inputList.length())
350 return {};
351 std::regex rx(
352 "\\s*([[:alnum:]_]+)\\s*(?:\\[\\s*([^,\\[\\]]+)\\s*\\]\\s*)?(?:,|$)");
354 std::smatch sm;
355 auto itr = inputList.cbegin();
356 do {
357 if (sm.ready())
358 itr += sm.length();
359 if (!std::regex_search(itr, inputList.cend(), sm, rx) ||
360 sm.prefix().length()) {
361 ATH_MSG_ERROR("Invalid format for the property \"ListOfLegsPerTool\"");
362 success = false;
363 break;
364 }
365 std::size_t leg = m_hasher(sm[1].str());
366 if (m_thresholds.find(leg) == m_thresholds.end()) {
367 ATH_MSG_ERROR("Unknown trigger leg '"
368 << sm[1].str() << "' found in 'ListOfLegsPerTool'");
369 success = false;
370 continue;
371 }
372 ToolKey key(leg, 0);
373 if (sm.length(2)) {
374 if (!data.getPeriodBoundaries(sm[2].str(), key.boundaries)) {
375 ATH_MSG_ERROR("Invalid period \""
376 << sm[2].str()
377 << "\"found in the property \"ListOfLegsPerTool\"");
378 success = false;
379 continue;
380 }
381 }
382 if (!keys.emplace(key).second) {
383 ATH_MSG_ERROR("Trigger leg '"
384 << sm[1].str()
385 << "' mentioned several times with overlapping time "
386 "periods in the property 'ListOfLegsPerTool'");
387 success = false;
388 continue;
389 }
390 } while (sm.suffix().length());
391 return keys;
392}

◆ parseTagString()

bool TrigGlobalEfficiencyCorrectionTool::parseTagString ( const std::string & tagstring,
flat_set< std::size_t > & tags )
private

Definition at line 235 of file TrigGlobalEfficiencyCorrectionTool.cxx.

236 {
237 bool success = true;
238 const std::size_t star = m_hasher("*");
239 for (std::size_t tag : listNonOrderedCSValues(tagstring, success)) {
240 allTags.insert((tag != star) ? tag : 0);
241 }
242 if (!success) {
243 ATH_MSG_ERROR("List of tags \"" << tagstring
244 << "\" is not provided in a valid format");
245 }
246 return success;
247}

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ processDeprecatedProperties()

bool TrigGlobalEfficiencyCorrectionTool::processDeprecatedProperties ( )
private

Definition at line 211 of file TrigGlobalEfficiencyCorrectionTool.cxx.

211 {
212 if (m_electronLegsPerTag.size()) {
214 "The property 'ElectronLegsPerTag' is deprecated, please use "
215 "'ListOfLegsPerTag' instead");
216 for (auto& kv : m_electronLegsPerTag) {
217 auto insert = m_legsPerTag.insert(kv);
218 if (!insert.second)
219 insert.first->second += "," + kv.second;
220 }
221 }
222 if (m_muonLegsPerTag.size()) {
224 "The property 'MuonLegsPerTag' is deprecated, please use "
225 "'ListOfLegsPerTag' instead");
226 for (auto& kv : m_muonLegsPerTag) {
227 auto insert = m_legsPerTag.insert(kv);
228 if (!insert.second)
229 insert.first->second += "," + kv.second;
230 }
231 }
232 return true;
233}
std::map< std::string, std::string > m_muonLegsPerTag
deprecated
std::map< std::string, std::string > m_electronLegsPerTag
ConcurrentBitset & insert(bit_t bit, bit_t new_nbits=0)
Set a bit to 1.

◆ rankTriggerLegs()

template<class Container>
auto TrigGlobalEfficiencyCorrectionTool::rankTriggerLegs ( float pt,
const Container & legs ) -> CachedRanking
private

need not only to sort, but also to verify consistency for all pairs of legs (in case of configuration issue) for that, use a O(n^2) algorithm and count for each leg the number of legs tighter than itself

future: might search recursively whether some order can be found via transitivity through an intermediate leg

Definition at line 1090 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1092 {
1093 const std::size_t nLegs = legs.size();
1095 r.ranking = std::numeric_limits<decltype(r.ranking)>::max();
1096 r.minPt = 0.f;
1097 r.maxPt = std::numeric_limits<float>::max();
1098 if (nLegs >= 2 * sizeof(r.ranking)) {
1100 "Implementation currently doesn't support ranking of more than "
1101 << 2 * sizeof(r.ranking) << " trigger legs");
1102 return r;
1103 }
1104 std::vector<uint8_t> counts(nLegs);
1105
1109 auto legI = legs.begin();
1110 for (unsigned i = 0; i < nLegs; ++i) {
1111 auto legJ = legI;
1112 for (unsigned j = i + 1; j < nLegs; ++j) {
1113 ++legJ;
1114 bool found = false;
1115 for (auto& meta : m_hierarchyMeta) {
1116 if (pt < meta.minPt || pt >= meta.maxPt)
1117 continue;
1118 auto data = m_hierarchyData.begin() + meta.offset;
1119 auto end = data + meta.nLegs;
1120 auto a = std::find(data, end, *legI);
1121 if (a == end)
1122 continue;
1123 auto b = std::find(data, end, *legJ);
1124 if (b == end)
1125 continue;
1126 r.minPt = std::max(r.minPt, meta.minPt);
1127 r.maxPt = std::min(r.maxPt, meta.maxPt);
1128 ++(counts[(a > b) ? i : j]);
1129 found = true;
1130 break;
1131 }
1132 if (!found) {
1135 ATH_MSG_ERROR("Unable to rank trigger legs "
1136 << m_dictionary[*legI] << " and " << m_dictionary[*legJ]);
1137 return r;
1138 }
1139 }
1140 ++legI;
1141 }
1142 decltype(r.ranking) ranking = 0;
1143 for (unsigned i = 0; i < nLegs; ++i) {
1144 unsigned char index =
1145 std::find(counts.begin(), counts.end(), i) - counts.begin();
1146 if (index >= nLegs) {
1147 ATH_MSG_ERROR("Inconsistency found while trying to rank "
1148 << nLegs << " trigger legs");
1149 return r;
1150 }
1151 ranking = (ranking << 4 | index);
1152 }
1153 r.ranking = ranking;
1154 return r;
1155}
static Double_t a
#define max(a, b)
Definition cfImp.cxx:41
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ recommendedSystematics()

CP::SystematicSet TrigGlobalEfficiencyCorrectionTool::recommendedSystematics ( ) const
overridevirtual

the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 1237 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1238 {
1239 return {};
1240}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ retrieveEventNumber()

bool TrigGlobalEfficiencyCorrectionTool::retrieveEventNumber ( unsigned long & eventNumber)
private

Definition at line 801 of file TrigGlobalEfficiencyCorrectionTool.cxx.

802 {
803 auto eventInfo = evtStore()->retrieve<const xAOD::EventInfo>("EventInfo");
804 if (!eventInfo) {
805 ATH_MSG_WARNING("Can't retrieve event number from evtStore()");
806 eventNumber = 0;
807 return false;
808 }
809 eventNumber = eventInfo->eventNumber();
810 return true;
811}
EventInfo_v1 EventInfo
Definition of the latest event info version.

◆ retrieveRunNumber()

bool TrigGlobalEfficiencyCorrectionTool::retrieveRunNumber ( unsigned & runNumber)
private

Internal methods (II) – core task.

Definition at line 782 of file TrigGlobalEfficiencyCorrectionTool.cxx.

783 {
784 runNumber = 0;
785 auto eventInfo = evtStore()->retrieve<const xAOD::EventInfo>("EventInfo");
786 if (!eventInfo) {
787 ATH_MSG_ERROR("Can't retrieve 'EventInfo' from evtStore()");
788 return false;
789 }
790 if (eventInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) {
791 if (!m_runNumberDecorator.isAvailable(*eventInfo)) {
792 ATH_MSG_ERROR("Can't retrieve 'RandomRunNumber' from EventInfo");
793 return false;
794 }
795 runNumber = m_runNumberDecorator(*eventInfo);
796 } else
797 runNumber = eventInfo->runNumber();
798 return true;
799}
SG::AuxElement::ConstAccessor< unsigned int > m_runNumberDecorator
@ IS_SIMULATION
true: simulation, false: data

◆ suggestEgammaMapKeys()

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::suggestEgammaMapKeys ( const std::map< std::string, std::string > & triggerCombination,
const std::string & version,
std::map< std::string, std::string > & legsPerKey,
xAOD::Type::ObjectType type )
static

Definition at line 1216 of file TrigGlobalEfficiencyCorrectionTool.cxx.

1219 {
1221 bool success =
1222 data.suggestEgammaMapKeys(triggerCombination, version, legsPerKey, type);
1224}

◆ suggestElectronMapKeys()

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::suggestElectronMapKeys ( const std::map< std::string, std::string > & triggerCombination,
const std::string & version,
std::map< std::string, std::string > & legsPerKey )
inlinestatic

Definition at line 78 of file TrigGlobalEfficiencyCorrectionTool.h.

81 {
82 return suggestEgammaMapKeys(triggerCombination, version, legsPerKey,
84 }
static CP::CorrectionCode suggestEgammaMapKeys(const std::map< std::string, std::string > &triggerCombination, const std::string &version, std::map< std::string, std::string > &legsPerKey, xAOD::Type::ObjectType type)

◆ suggestPhotonMapKeys()

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::suggestPhotonMapKeys ( const std::map< std::string, std::string > & triggerCombination,
const std::string & version,
std::map< std::string, std::string > & legsPerKey )
inlinestatic

Definition at line 85 of file TrigGlobalEfficiencyCorrectionTool.h.

88 {
89 return suggestEgammaMapKeys(triggerCombination, version, legsPerKey,
91 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ toolnameForDefaultScaleFactor()

std::string ITrigGlobalEfficiencyCorrectionTool::toolnameForDefaultScaleFactor ( )
inlinestaticinherited

To be used with the ListOfLegsPerTool property:

Definition at line 57 of file ITrigGlobalEfficiencyCorrectionTool.h.

57{ return "RETURN_DEFAULT_SCALE_FACTOR"; }

◆ updateLeptonList()

template<class Particle>
bool TrigGlobalEfficiencyCorrectionTool::updateLeptonList ( LeptonList & leptons,
const std::vector< const Particle * > & particles )
private

tag = <name>+

Definition at line 814 of file TrigGlobalEfficiencyCorrectionTool.cxx.

815 {
816 for (auto lep : particles) {
817 std::size_t tag = 0;
818 for (auto& ltd : m_leptonTagDecorators) {
819 if (ltd.decorator.isAvailable(*lep)) {
820 char v = ltd.decorator(*lep);
821 if (v) {
822 if (ltd.suffixed)
823 {
824 std::string s = m_dictionary.at(ltd.hash) + std::to_string(v);
825 tag = m_hasher(s);
826 m_dictionary.emplace(tag, s);
827 } else
828 tag = ltd.hash;
829 }
830 }
831 }
832 leptons.emplace_back(lep, tag);
833 }
834 return true;
835}

◆ updateMuonTriggerNames()

void TrigGlobalEfficiencyCorrectionTool::updateMuonTriggerNames ( std::size_t leg,
const std::string & name )
private

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ validArgs() [1/2]

template<typename Arg1, typename Arg2, typename... OtherArgs>
bool ITrigGlobalEfficiencyCorrectionTool::validArgs ( unsigned nTrailingDoubles)
staticconstexprinherited

Definition at line 81 of file ITrigGlobalEfficiencyCorrectionTool.h.

82{
83 bool xs [] = { std::is_same<OtherArgs, double>::value..., true };
84 for(bool x : xs) if(!x) return validArgs<Arg1>(0) && validArgs<Arg2, OtherArgs...>(nTrailingDoubles);
85 unsigned nTD = sizeof...(OtherArgs);
86 if(nTD == nTrailingDoubles) return validArgs<Arg1>(0) && validArgs<Arg2>(0);
87 if(nTD == nTrailingDoubles-1) return validArgs<Arg1>(0) && std::is_same<Arg2, double>::value;
88 if(nTD == nTrailingDoubles-2) return std::is_same<Arg1, double>::value && std::is_same<Arg2, double>::value;
89 return false;
90}
#define x
static constexpr bool validArgs(unsigned nTrailingDoubles)

◆ validArgs() [2/2]

template<typename Arg>
bool ITrigGlobalEfficiencyCorrectionTool::validArgs ( unsigned nTrailingDoubles)
staticconstexprinherited

Definition at line 68 of file ITrigGlobalEfficiencyCorrectionTool.h.

69{
70 if(std::is_same<double, Arg>::value) return (nTrailingDoubles==1);
71 using P = std::remove_cv_t<Arg>;
72 return std::is_same<P, std::vector<xAOD::Electron*>>::value
73 || std::is_same<P, std::vector<const xAOD::Electron*>>::value
74 || std::is_same<P, std::vector<xAOD::Muon*>>::value
75 || std::is_same<P, std::vector<const xAOD::Muon*>>::value
76 || std::is_same<P, std::vector<xAOD::Photon*>>::value
77 || std::is_same<P, std::vector<const xAOD::Photon*>>::value;
78}
static Double_t P(Double_t *tt, Double_t *par)

◆ TrigGlobEffCorr::Calculator

friend class TrigGlobEffCorr::Calculator
friend

Definition at line 301 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ TrigGlobEffCorr::CheckConfig

friend class TrigGlobEffCorr::CheckConfig
friend

Definition at line 300 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ TrigGlobEffCorr::ImportData

friend class TrigGlobEffCorr::ImportData
friend

Definition at line 299 of file TrigGlobalEfficiencyCorrectionTool.h.

Member Data Documentation

◆ m_cachedLegRankings

std::multimap<std::size_t, CachedRanking> TrigGlobalEfficiencyCorrectionTool::m_cachedLegRankings
private

Definition at line 170 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_calculator

std::unique_ptr<TrigGlobEffCorr::Calculator> TrigGlobalEfficiencyCorrectionTool::m_calculator
private

Definition at line 193 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_checkElectronLegTag

bool TrigGlobalEfficiencyCorrectionTool::m_checkElectronLegTag {}
private

Definition at line 177 of file TrigGlobalEfficiencyCorrectionTool.h.

177{};

◆ m_checkMuonLegTag

bool TrigGlobalEfficiencyCorrectionTool::m_checkMuonLegTag {}
private

Definition at line 178 of file TrigGlobalEfficiencyCorrectionTool.h.

178{};

◆ m_checkPhotonLegTag

bool TrigGlobalEfficiencyCorrectionTool::m_checkPhotonLegTag {}
private

Definition at line 179 of file TrigGlobalEfficiencyCorrectionTool.h.

179{};

◆ m_cpCode

CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::m_cpCode = CP::CorrectionCode::Ok
private

Definition at line 187 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dictionary

std::map<std::size_t, std::string> TrigGlobalEfficiencyCorrectionTool::m_dictionary
private

Definition at line 180 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_electronEffToolIndex

std::map<ToolKey, std::size_t> TrigGlobalEfficiencyCorrectionTool::m_electronEffToolIndex
private

Definition at line 172 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_electronLegsPerTag

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_electronLegsPerTag
private

Definition at line 160 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_electronSfToolIndex

std::map<ToolKey, std::size_t> TrigGlobalEfficiencyCorrectionTool::m_electronSfToolIndex
private

Definition at line 171 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hasher

std::hash<std::string> TrigGlobalEfficiencyCorrectionTool::m_hasher
private

Definition at line 168 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_hierarchyData

std::vector<std::size_t> TrigGlobalEfficiencyCorrectionTool::m_hierarchyData
private

Definition at line 184 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_hierarchyMeta

std::vector<Hierarchy> TrigGlobalEfficiencyCorrectionTool::m_hierarchyMeta
private

Definition at line 183 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_initialized

bool TrigGlobalEfficiencyCorrectionTool::m_initialized = false
private

Definition at line 186 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_legsPerTag

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_legsPerTag
private

deprecated

Definition at line 162 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_legsPerTool

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_legsPerTool
private

Definition at line 155 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_leptonTagDecorations

std::string TrigGlobalEfficiencyCorrectionTool::m_leptonTagDecorations
private

Definition at line 158 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_leptonTagDecorators

std::vector<TagDecorator> TrigGlobalEfficiencyCorrectionTool::m_leptonTagDecorators
private

Definition at line 191 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_muonLegsPerTag

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_muonLegsPerTag
private

deprecated

Definition at line 161 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_muonToolIndex

std::map<ToolKey, std::size_t> TrigGlobalEfficiencyCorrectionTool::m_muonToolIndex
private

Definition at line 175 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_numberOfToys

unsigned long TrigGlobalEfficiencyCorrectionTool::m_numberOfToys {}
private

Definition at line 164 of file TrigGlobalEfficiencyCorrectionTool.h.

164{};

◆ m_overrideThresholds

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_overrideThresholds
private

Definition at line 163 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_photonEffToolIndex

std::map<ToolKey, std::size_t> TrigGlobalEfficiencyCorrectionTool::m_photonEffToolIndex
private

Definition at line 174 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_photonSfToolIndex

std::map<ToolKey, std::size_t> TrigGlobalEfficiencyCorrectionTool::m_photonSfToolIndex
private

Definition at line 173 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_runNumberDecorator

SG::AuxElement::ConstAccessor<unsigned int> TrigGlobalEfficiencyCorrectionTool::m_runNumberDecorator
private

Definition at line 192 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_seed

unsigned long TrigGlobalEfficiencyCorrectionTool::m_seed {}
private

Definition at line 188 of file TrigGlobalEfficiencyCorrectionTool.h.

188{};

◆ m_suppliedElectronEfficiencyTools

ToolHandleArray<IAsgElectronEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedElectronEfficiencyTools
private

Properties:

Definition at line 147 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedElectronScaleFactorTools

ToolHandleArray<IAsgElectronEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedElectronScaleFactorTools
private

Definition at line 149 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedMuonTools

ToolHandleArray<CP::IMuonTriggerScaleFactors> TrigGlobalEfficiencyCorrectionTool::m_suppliedMuonTools
private

Definition at line 154 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedPhotonEfficiencyTools

ToolHandleArray<IAsgPhotonEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedPhotonEfficiencyTools
private

Definition at line 151 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedPhotonScaleFactorTools

ToolHandleArray<IAsgPhotonEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedPhotonScaleFactorTools
private

Definition at line 153 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_tagsPerTool

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_tagsPerTool
private

Definition at line 159 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_thresholds

std::map<std::size_t, float> TrigGlobalEfficiencyCorrectionTool::m_thresholds
private

Definition at line 169 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_triggerCb

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_triggerCb
private

Definition at line 156 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_triggerCbPerYear

std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_triggerCbPerYear
private

Definition at line 157 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_trigMatchTool

ToolHandle<Trig::IMatchingTool> TrigGlobalEfficiencyCorrectionTool::m_trigMatchTool
private

Definition at line 166 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_unsupportedLegs

std::set<ToolKey> TrigGlobalEfficiencyCorrectionTool::m_unsupportedLegs
private

Definition at line 181 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_useInternalSeed

bool TrigGlobalEfficiencyCorrectionTool::m_useInternalSeed {}
private

Definition at line 165 of file TrigGlobalEfficiencyCorrectionTool.h.

165{};

◆ m_validLegTagPairs

std::set<std::size_t> TrigGlobalEfficiencyCorrectionTool::m_validLegTagPairs
private

Definition at line 176 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_validTrigMatchTool

bool TrigGlobalEfficiencyCorrectionTool::m_validTrigMatchTool
private

Definition at line 189 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: