ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
TrigGlobalEfficiencyCorrectionTool Class Reference

#include <TrigGlobalEfficiencyCorrectionTool.h>

Inheritance diagram for TrigGlobalEfficiencyCorrectionTool:
Collaboration diagram for TrigGlobalEfficiencyCorrectionTool:

Classes

struct  CachedRanking
 
struct  Hierarchy
 
struct  TagDecorator
 
struct  ToolKey
 

Public Member Functions

 TrigGlobalEfficiencyCorrectionTool (const std::string &name)
 
virtual ~TrigGlobalEfficiencyCorrectionTool ()
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
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. More...
 
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. More...
 
virtual CP::SystematicSet affectingSystematics () const override
 the list of all systematics this tool can be affected by More...
 
virtual CP::SystematicSet recommendedSystematics () const override
 the list of all systematics this tool recommends to use More...
 
virtual StatusCode applySystematicVariation (const CP::SystematicSet &systConfig) override
 effects: configure this tool for the given list of systematic variations. More...
 
virtual CP::CorrectionCode checkTriggerMatching (bool &matched, 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. More...
 
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. More...
 
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. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) 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. More...
 
template<typename... Args>
auto getEfficiency (Args &... args) -> std::enable_if_t< validArgs< Args... >(2), CP::CorrectionCode >
 
template<typename... Args>
auto checkTriggerMatching (bool &matched, Args &... args) -> std::enable_if_t< validArgs< Args... >(0), CP::CorrectionCode >
 

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: More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 
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 = boost::container::flat_set< Key >
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool loadHierarchies ()
 Internal methods (I) – initialization of the tool. More...
 
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< ToolKeyparseListOfLegs (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. More...
 
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 *)
 
IAsgElectronEfficiencyCorrectionToolGetScaleFactorTool (const xAOD::Electron *, std::size_t index)
 
IAsgPhotonEfficiencyCorrectionToolGetScaleFactorTool (const xAOD::Photon *, std::size_t index)
 
IAsgElectronEfficiencyCorrectionToolGetEfficiencyTool (const xAOD::Electron *, std::size_t index)
 
IAsgPhotonEfficiencyCorrectionToolGetEfficiencyTool (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. More...
 
flat_set< std::size_t > listNonOrderedCSValues (const std::string &s, bool &success)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

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< IAsgElectronEfficiencyCorrectionToolm_suppliedElectronEfficiencyTools
 Properties: More...
 
ToolHandleArray< IAsgElectronEfficiencyCorrectionToolm_suppliedElectronScaleFactorTools
 
ToolHandleArray< IAsgPhotonEfficiencyCorrectionToolm_suppliedPhotonEfficiencyTools
 
ToolHandleArray< IAsgPhotonEfficiencyCorrectionToolm_suppliedPhotonScaleFactorTools
 
ToolHandleArray< CP::IMuonTriggerScaleFactorsm_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 More...
 
std::map< std::string, std::string > m_legsPerTag
 deprecated More...
 
std::map< std::string, std::string > m_overrideThresholds
 
unsigned long m_numberOfToys
 
bool m_useInternalSeed
 
ToolHandle< Trig::IMatchingToolm_trigMatchTool
 
std::hash< std::string > m_hasher
 
std::map< std::size_t, float > m_thresholds
 
std::multimap< std::size_t, CachedRankingm_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< ToolKeym_unsupportedLegs
 
std::vector< Hierarchym_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< TagDecoratorm_leptonTagDecorators
 
SG::AuxElement::ConstAccessor< unsigned int > m_runNumberDecorator
 
std::unique_ptr< TrigGlobEffCorr::Calculatorm_calculator
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Friends

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

Detailed Description

Definition at line 38 of file TrigGlobalEfficiencyCorrectionTool.h.

Member Typedef Documentation

◆ flat_set

template<typename Key >
using TrigGlobalEfficiencyCorrectionTool::flat_set = boost::container::flat_set<Key>
private

Definition at line 158 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ LeptonList

Definition at line 110 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TLE_RESULT

Enumerator
TLE_OK 
TLE_UNAVAILABLE 
TLE_ERROR 

Definition at line 183 of file TrigGlobalEfficiencyCorrectionTool.h.

184  {
185  TLE_OK,
187  TLE_ERROR
188  };

Constructor & Destructor Documentation

◆ TrigGlobalEfficiencyCorrectionTool()

TrigGlobalEfficiencyCorrectionTool::TrigGlobalEfficiencyCorrectionTool ( const std::string &  name)

Definition at line 33 of file TrigGlobalEfficiencyCorrectionTool.cxx.

35  m_runNumberDecorator("RandomRunNumber"), m_calculator()
36 {
37  declareProperty("ElectronEfficiencyTools", m_suppliedElectronEfficiencyTools, "electron MC efficiency tools (one for each kind of electron trigger leg)");
38  declareProperty("ElectronScaleFactorTools", m_suppliedElectronScaleFactorTools, "electron scale factor tools (one for each kind of electron trigger leg)");
39  declareProperty("PhotonEfficiencyTools", m_suppliedPhotonEfficiencyTools, "photon MC efficiency tools (one for each kind of photon trigger leg)");
40  declareProperty("PhotonScaleFactorTools", m_suppliedPhotonScaleFactorTools, "photon scale factor tools (one for each kind of photon trigger leg)");
41  declareProperty("MuonTools", m_suppliedMuonTools, "muon efficiency/scale factor tool (one per year)");
42  declareProperty("ListOfLegsPerTool", m_legsPerTool, "comma-separated list of trigger legs supported by each electron or photon tool");
43  declareProperty("TriggerCombination", m_triggerCb, "map of trigger combination per period and/or range of runs");
44  for(int y : {15, 16, 17, 18, 22, 23, 24, 25})
45  {
46  std::string year = std::to_string(2000 + y);
47  declareProperty("TriggerCombination" + year, m_triggerCbPerYear[year] = "", "trigger combination \"trigger1 || trigger2 || ...\"");
48  }
49  declareProperty("LeptonTagDecorations", m_leptonTagDecorations = "",
50  "comma-separated list of decorations for the lepton selection tags, ordered by increasing tightness. "
51  "If a name ends with =, the tag is the decorated value, otherwise it is the decoration name");
52  declareProperty("ListOfTagsPerTool", m_tagsPerTool, "comma-separated list of lepton selection tags associated to each tool");
53  declareProperty("ElectronLegsPerTag", m_electronLegsPerTag, "DEPRECATED, use ListOfLegsPerTag instead");
54  declareProperty("MuonLegsPerTag", m_muonLegsPerTag, "DEPRECATED, use ListOfLegsPerTag instead");
55  declareProperty("ListOfLegsPerTag", m_legsPerTag, "map of allowed trigger legs for each tag");
56  declareProperty("NumberOfToys", m_numberOfToys = 0, "if different from 0, use toy experiments instead of explicit formulas");
57  declareProperty("OverrideThresholds", m_overrideThresholds, "new thresholds (in MeV) for the plateaux of the indicated trigger legs -- use at your own risk!");
58  declareProperty("UseInternalSeed", m_useInternalSeed = false, "do not use event number as random number generation seed");
59  declareProperty("TriggerMatchingTool", m_trigMatchTool, "handle to an IMatchingTool instance");
60 
61  m_cpCode.ignore();
62 }

◆ ~TrigGlobalEfficiencyCorrectionTool()

TrigGlobalEfficiencyCorrectionTool::~TrigGlobalEfficiencyCorrectionTool ( )
virtual

Definition at line 64 of file TrigGlobalEfficiencyCorrectionTool.cxx.

65 {
66  m_cpCode.ignore();
67 }

Member Function Documentation

◆ aboveThreshold()

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

◆ affectingSystematics()

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

the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

◆ applySystematicVariation()

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

◆ checkAndRecord()

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

Internal methods (III) – misc. helpers.

◆ checkTriggerMatching() [1/2]

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

Definition at line 110 of file ITrigGlobalEfficiencyCorrectionTool.h.

112 {
113  std::vector<const xAOD::IParticle*> particles;
114  double* eff[] __attribute__((unused)) = { nullptr, handleArg(args, particles)... };
116 }

◆ checkTriggerMatching() [2/2]

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

◆ countTriggerLegs()

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

Implements ITrigGlobalEfficiencyCorrectionTool.

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ 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 197 of file TrigGlobalEfficiencyCorrectionTool.cxx.

199 {
200  bool success = true;
201  for(unsigned index=0;index<suppliedTools.size();++index)
202  {
203  auto& handle = suppliedTools[index];
204  const std::string& name = handle.name();
205  const std::string& altname = handle->name(); // athena: not always the same
206  flat_set<ToolKey> listOfLegs;
208  if(suppliedTools.size()!=1 || m_legsPerTool.size()!=0)
209  {
210  auto itrLegs = m_legsPerTool.find(name);
211  if(itrLegs == m_legsPerTool.end()) itrLegs = m_legsPerTool.find(altname);
212  if(itrLegs != m_legsPerTool.end())
213  {
214  listOfLegs = parseListOfLegs(data, itrLegs->second, success);
215  if(!success)
216  {
217  ATH_MSG_ERROR("The 'ListOfLegsPerTool' property has an invalid entry for the tool'" << name << "'");
218  continue;
219  }
220  }
223  {
224  ATH_MSG_ERROR("Property 'ListOfLegsPerTool' empty for tool '" << name << "'");
225  success = false;
226  continue;
227  }
228  else
229  {
230  listOfLegs.emplace();
231  }
232  }
233  else listOfLegs.emplace();
236  auto itrTags = m_tagsPerTool.find(name);
237  if(itrTags == m_tagsPerTool.end()) itrTags = m_tagsPerTool.find(altname);
238  if(itrTags != m_tagsPerTool.end())
239  {
240  success = success && parseTagString(itrTags->second, tags);
241  collectedTags.insert(tags.begin(), tags.end());
242  }
243  else tags.emplace(0);
244 
246  unsigned short nUncheckedLegs = 0;
247  for(auto& key : listOfLegs)
248  {
249  std::size_t leg = key.hash;
250  if(leg)
251  {
252  auto flavour = data.associatedLeptonFlavour(leg, success);
255  {
256  ATH_MSG_ERROR("Unexpected association of trigger leg '" << m_dictionary[leg] << "' to tool '" << name << "'");
257  success = false;
258  }
259  }
260  for(std::size_t tag : tags)
261  {
262  if(!toolIndex.emplace(ToolKey(leg, tag, key.boundaries), index).second)
263  {
264  if(leg && tag) ATH_MSG_ERROR("Multiple tools associated to the selection tag '" << m_dictionary[tag] << "' for the trigger leg '" << m_dictionary[leg] << "'");
265  else if(leg) ATH_MSG_ERROR("Multiple tools associated to the trigger leg '" << m_dictionary[leg] << "'");
266  else if(tag) ATH_MSG_ERROR("Multiple tools associated to the selection tag '" << m_dictionary[tag] << "'");
267  else ATH_MSG_ERROR("Multiple tools not associated to any trigger leg / selection tag");
268  success = false;
269  }
270  }
271  ++nUncheckedLegs;
272  }
273  if(!nUncheckedLegs)
274  {
275  ATH_MSG_ERROR("Tool " << name << " hasn't been associated to any trigger leg");
276  success = false;
277  }
278  }
279  return success;
280 }

◆ 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() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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]

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

◆ forwardLegs() [2/2]

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

◆ getCachedTriggerLegsRanking()

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

◆ getCombinedHash() [1/2]

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

◆ getCombinedHash() [2/2]

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

◆ getEfficiency() [1/3]

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

Definition at line 101 of file ITrigGlobalEfficiencyCorrectionTool.h.

103 {
104  std::vector<const xAOD::IParticle*> particles;
105  double* eff[] = { nullptr, handleArg(args, particles)... };
106  return getEfficiency(particles, *eff[sizeof...(Args)-1], *eff[sizeof...(Args)]);
107 }

◆ getEfficiency() [2/3]

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

◆ getEfficiency() [3/3]

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

◆ 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 92 of file ITrigGlobalEfficiencyCorrectionTool.h.

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

◆ getEfficiencyScaleFactor() [2/3]

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

◆ getEfficiencyScaleFactor() [3/3]

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

Implements ITrigGlobalEfficiencyCorrectionTool.

◆ GetEfficiencyTool() [1/2]

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

Definition at line 202 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ GetEfficiencyTool() [2/2]

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

Definition at line 204 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ GetEfficiencyToolIndex() [1/2]

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

Definition at line 196 of file TrigGlobalEfficiencyCorrectionTool.h.

196 { return m_electronEffToolIndex; }

◆ GetEfficiencyToolIndex() [2/2]

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

Definition at line 197 of file TrigGlobalEfficiencyCorrectionTool.h.

197 { return m_photonEffToolIndex; }

◆ getEgammaTriggerLegEfficiencies()

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

◆ 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::TEvent 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::TEvent, 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  }

◆ getLoosestLeg()

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

◆ getLoosestLegAboveThreshold()

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

◆ 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::TEvent 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::TEvent, 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()

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

◆ GetScaleFactorTool() [1/2]

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

Definition at line 198 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ GetScaleFactorTool() [2/2]

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

Definition at line 200 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ GetScaleFactorToolIndex() [1/2]

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

Definition at line 194 of file TrigGlobalEfficiencyCorrectionTool.h.

194 { return m_electronSfToolIndex; }

◆ GetScaleFactorToolIndex() [2/2]

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

Definition at line 195 of file TrigGlobalEfficiencyCorrectionTool.h.

195 { return m_photonSfToolIndex; }

◆ getSortedLegs()

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

◆ getTriggerLegEfficiencies() [1/3]

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

◆ getTriggerLegEfficiencies() [2/3]

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

◆ getTriggerLegEfficiencies() [3/3]

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

◆ 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

◆ handleArg() [1/2]

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

Definition at line 59 of file ITrigGlobalEfficiencyCorrectionTool.h.

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

◆ handleArg() [2/2]

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

Definition at line 58 of file ITrigGlobalEfficiencyCorrectionTool.h.

58 { return &arg; }

◆ initialize()

StatusCode TrigGlobalEfficiencyCorrectionTool::initialize ( )
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 69 of file TrigGlobalEfficiencyCorrectionTool.cxx.

70 {
71  if(m_initialized)
72  {
73  ATH_MSG_ERROR("Tool has already been initialized");
74  return StatusCode::FAILURE;
75  }
76  ATH_MSG_INFO ("Initializing " << name() << "...");
77 
78  m_dictionary.emplace(0, "");
79 
80  if(!processDeprecatedProperties()) return StatusCode::FAILURE;
81 
82  ATH_MSG_DEBUG("Importing data from configuration files");
83  ImportData data(*this);
84  if(!data.importAll(m_overrideThresholds)) return StatusCode::FAILURE;
86  m_hierarchyMeta = data.getHierarchyMeta();
87  m_hierarchyData = data.getHierarchyData();
88  m_thresholds = data.getTriggerThresholds();
89 
90  ATH_MSG_DEBUG("Retrieving tools");
91  if(m_suppliedElectronEfficiencyTools.retrieve() != StatusCode::SUCCESS
92  || m_suppliedElectronScaleFactorTools.retrieve() != StatusCode::SUCCESS
93  || m_suppliedMuonTools.retrieve() != StatusCode::SUCCESS
94  || m_suppliedPhotonEfficiencyTools.retrieve() != StatusCode::SUCCESS
95  || m_suppliedPhotonScaleFactorTools.retrieve() != StatusCode::SUCCESS)
96  {
97  ATH_MSG_ERROR("Unable to retrieve CP tools");
98  return StatusCode::FAILURE;
99  }
100 
101  ATH_MSG_DEBUG("Retrieving trigger matching tool (if provided)");
102  m_validTrigMatchTool = false;
103  if(m_trigMatchTool.name() != "")
104  {
105  if(m_trigMatchTool.retrieve() != StatusCode::SUCCESS)
106  {
107  ATH_MSG_ERROR("Unable to retrieve trigger matching tool");
108  return StatusCode::FAILURE;
109  }
110  ATH_MSG_DEBUG("Trigger matching support enabled");
111  m_validTrigMatchTool = true;
112  }
113 
114  ATH_MSG_DEBUG("Basic checks");
115  CheckConfig checks(*this);
116  if(!checks.basicConfigChecks()) return StatusCode::FAILURE;
117 
118  ATH_MSG_DEBUG("Enumerating tools");
119  flat_set<std::size_t> collectedElectronTags, collectedMuonTags, collectedPhotonTags;
122  || !enumerateTools(data, m_suppliedMuonTools, m_muonToolIndex, collectedMuonTags)
125  {
126  return StatusCode::FAILURE;
127  }
128  // List legs (if any) for which a dummy scale factor should be returned.
129  auto itr = m_legsPerTool.find(toolnameForDefaultScaleFactor());
130  if (itr != m_legsPerTool.end())
131  {
132  bool success = true;
133  for (ToolKey leg: parseListOfLegs(data, itr->second, success))
134  {
135  m_unsupportedLegs.insert(leg);
136  }
137  }
138 
139  ATH_MSG_DEBUG("Loading user-defined trigger combination");
140  bool useDefaultElectronTools = (m_suppliedElectronEfficiencyTools.size()==1) && (m_suppliedElectronScaleFactorTools.size()==1) && (m_legsPerTool.size()==0);
141  bool useDefaultPhotonTools = (m_suppliedPhotonEfficiencyTools.size()==1) && (m_suppliedPhotonScaleFactorTools.size()==1) && (m_legsPerTool.size()==0);
142  if(!loadTriggerCombination(data, useDefaultElectronTools, useDefaultPhotonTools)) return StatusCode::FAILURE;
143 
144  ATH_MSG_DEBUG("Loading lepton selection tags decorators");
145  if(!loadTagDecorators(collectedElectronTags, collectedMuonTags, collectedPhotonTags)) return StatusCode::FAILURE;
146 
147  ATH_MSG_DEBUG("Loading list of legs allowed for each tag");
148  if(!loadListOfLegsPerTag()) return StatusCode::FAILURE;
149 
150  ATH_MSG_DEBUG("Advanced checks");
151  if(!checks.advancedConfigChecks()) return StatusCode::FAILURE;
152 
153  ATH_MSG_INFO("Initialization successful");
154  m_initialized = true;
155  return StatusCode::SUCCESS;
156 }

◆ 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()

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

◆ listNonOrderedCSValues()

flat_set<std::size_t> TrigGlobalEfficiencyCorrectionTool::listNonOrderedCSValues ( const std::string &  s,
bool &  success 
)
private

◆ loadHierarchies()

bool TrigGlobalEfficiencyCorrectionTool::loadHierarchies ( )
private

Internal methods (I) – initialization of the tool.

◆ loadListOfLegsPerTag()

bool TrigGlobalEfficiencyCorrectionTool::loadListOfLegsPerTag ( )
private

◆ 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

◆ loadTriggerCombination()

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

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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  }

◆ 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 282 of file TrigGlobalEfficiencyCorrectionTool.cxx.

◆ parseTagString()

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

Definition at line 181 of file TrigGlobalEfficiencyCorrectionTool.cxx.

182 {
183  bool success = true;
184  const std::size_t star = m_hasher("*");
185  for(std::size_t tag : listNonOrderedCSValues(tagstring,success))
186  {
187  allTags.insert((tag!=star)? tag : 0);
188  }
189  if(!success)
190  {
191  ATH_MSG_ERROR("List of tags \"" << tagstring << "\" is not provided in a valid format");
192  }
193  return success;
194 }

◆ print()

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

◆ processDeprecatedProperties()

bool TrigGlobalEfficiencyCorrectionTool::processDeprecatedProperties ( )
private

Definition at line 158 of file TrigGlobalEfficiencyCorrectionTool.cxx.

159 {
160  if(m_electronLegsPerTag.size())
161  {
162  ATH_MSG_WARNING("The property 'ElectronLegsPerTag' is deprecated, please use 'ListOfLegsPerTag' instead");
163  for(auto& kv : m_electronLegsPerTag)
164  {
165  auto insert = m_legsPerTag.insert(kv);
166  if(!insert.second) insert.first->second += "," + kv.second;
167  }
168  }
169  if(m_muonLegsPerTag.size())
170  {
171  ATH_MSG_WARNING("The property 'MuonLegsPerTag' is deprecated, please use 'ListOfLegsPerTag' instead");
172  for(auto& kv : m_muonLegsPerTag)
173  {
174  auto insert = m_legsPerTag.insert(kv);
175  if(!insert.second) insert.first->second += "," + kv.second;
176  }
177  }
178  return true;
179 }

◆ rankTriggerLegs()

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

◆ recommendedSystematics()

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

the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ retrieveEventNumber()

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

◆ retrieveRunNumber()

bool TrigGlobalEfficiencyCorrectionTool::retrieveRunNumber ( unsigned &  runNumber)
private

Internal methods (II) – core task.

◆ suggestEgammaMapKeys()

static 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

◆ suggestElectronMapKeys()

static 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 62 of file TrigGlobalEfficiencyCorrectionTool.h.

64  {
65  return suggestEgammaMapKeys(triggerCombination, version, legsPerKey, xAOD::Type::Electron);
66  }

◆ suggestPhotonMapKeys()

static 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 67 of file TrigGlobalEfficiencyCorrectionTool.h.

69  {
70  return suggestEgammaMapKeys(triggerCombination, version, legsPerKey, xAOD::Type::Photon);
71  }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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()

static std::string ITrigGlobalEfficiencyCorrectionTool::toolnameForDefaultScaleFactor ( )
inlinestaticinherited

To be used with the ListOfLegsPerTool property:

Definition at line 56 of file ITrigGlobalEfficiencyCorrectionTool.h.

56 { return "RETURN_DEFAULT_SCALE_FACTOR"; }

◆ updateLeptonList()

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

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ validArgs() [1/2]

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

Definition at line 67 of file ITrigGlobalEfficiencyCorrectionTool.h.

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

◆ validArgs() [2/2]

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

Definition at line 80 of file ITrigGlobalEfficiencyCorrectionTool.h.

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

Friends And Related Function Documentation

◆ TrigGlobEffCorr::Calculator

friend class TrigGlobEffCorr::Calculator
friend

Definition at line 217 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ TrigGlobEffCorr::CheckConfig

friend class TrigGlobEffCorr::CheckConfig
friend

Definition at line 216 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ TrigGlobEffCorr::ImportData

friend class TrigGlobEffCorr::ImportData
friend

Definition at line 215 of file TrigGlobalEfficiencyCorrectionTool.h.

Member Data Documentation

◆ m_cachedLegRankings

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

Definition at line 133 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_calculator

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

Definition at line 156 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_checkElectronLegTag

bool TrigGlobalEfficiencyCorrectionTool::m_checkElectronLegTag
private

Definition at line 140 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_checkMuonLegTag

bool TrigGlobalEfficiencyCorrectionTool::m_checkMuonLegTag
private

Definition at line 141 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_checkPhotonLegTag

bool TrigGlobalEfficiencyCorrectionTool::m_checkPhotonLegTag
private

Definition at line 142 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_cpCode

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

Definition at line 150 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 143 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_electronEffToolIndex

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

Definition at line 135 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_electronLegsPerTag

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

Definition at line 123 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_electronSfToolIndex

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

Definition at line 134 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 131 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_hierarchyData

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

Definition at line 147 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_hierarchyMeta

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

Definition at line 146 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_initialized

bool TrigGlobalEfficiencyCorrectionTool::m_initialized = false
private

Definition at line 149 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_legsPerTag

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

deprecated

Definition at line 125 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_legsPerTool

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

Definition at line 118 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_leptonTagDecorations

std::string TrigGlobalEfficiencyCorrectionTool::m_leptonTagDecorations
private

Definition at line 121 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_leptonTagDecorators

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

Definition at line 154 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_muonLegsPerTag

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

deprecated

Definition at line 124 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_muonToolIndex

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

Definition at line 138 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_numberOfToys

unsigned long TrigGlobalEfficiencyCorrectionTool::m_numberOfToys
private

Definition at line 127 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_overrideThresholds

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

Definition at line 126 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_photonEffToolIndex

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

Definition at line 137 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_photonSfToolIndex

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

Definition at line 136 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_runNumberDecorator

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

Definition at line 155 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_seed

unsigned long TrigGlobalEfficiencyCorrectionTool::m_seed
private

Definition at line 151 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedElectronEfficiencyTools

ToolHandleArray<IAsgElectronEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedElectronEfficiencyTools
private

Properties:

Definition at line 113 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedElectronScaleFactorTools

ToolHandleArray<IAsgElectronEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedElectronScaleFactorTools
private

Definition at line 114 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedMuonTools

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

Definition at line 117 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedPhotonEfficiencyTools

ToolHandleArray<IAsgPhotonEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedPhotonEfficiencyTools
private

Definition at line 115 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_suppliedPhotonScaleFactorTools

ToolHandleArray<IAsgPhotonEfficiencyCorrectionTool> TrigGlobalEfficiencyCorrectionTool::m_suppliedPhotonScaleFactorTools
private

Definition at line 116 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_tagsPerTool

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

Definition at line 122 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_thresholds

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

Definition at line 132 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_triggerCb

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

Definition at line 119 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_triggerCbPerYear

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

Definition at line 120 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_trigMatchTool

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

Definition at line 129 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_unsupportedLegs

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

Definition at line 144 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_useInternalSeed

bool TrigGlobalEfficiencyCorrectionTool::m_useInternalSeed
private

Definition at line 128 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_validLegTagPairs

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

Definition at line 139 of file TrigGlobalEfficiencyCorrectionTool.h.

◆ m_validTrigMatchTool

bool TrigGlobalEfficiencyCorrectionTool::m_validTrigMatchTool
private

Definition at line 152 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:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
TrigGlobalEfficiencyCorrectionTool::listNonOrderedCSValues
flat_set< std::size_t > listNonOrderedCSValues(const std::string &s, bool &success)
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
TrigGlobalEfficiencyCorrectionTool::enumerateTools
bool enumerateTools(TrigGlobEffCorr::ImportData &data, ToolHandleArray< CPTool > &suppliedTools, std::map< ToolKey, std::size_t > &toolIndex, flat_set< std::size_t > &collectedTags)
CP::CorrectionCode::ignore
void ignore() const noexcept
Ignore the correction code.
Definition: CorrectionCode.h:57
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TrigGlobalEfficiencyCorrectionTool::m_legsPerTool
std::map< std::string, std::string > m_legsPerTool
Definition: TrigGlobalEfficiencyCorrectionTool.h:118
TrigGlobalEfficiencyCorrectionTool::m_suppliedPhotonEfficiencyTools
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_suppliedPhotonEfficiencyTools
Definition: TrigGlobalEfficiencyCorrectionTool.h:115
TrigGlobalEfficiencyCorrectionTool::m_muonLegsPerTag
std::map< std::string, std::string > m_muonLegsPerTag
deprecated
Definition: TrigGlobalEfficiencyCorrectionTool.h:124
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TrigGlobalEfficiencyCorrectionTool::m_hierarchyData
std::vector< std::size_t > m_hierarchyData
Definition: TrigGlobalEfficiencyCorrectionTool.h:147
DMTest::P
P_v1 P
Definition: P.h:23
TrigGlobalEfficiencyCorrectionTool::m_runNumberDecorator
SG::AuxElement::ConstAccessor< unsigned int > m_runNumberDecorator
Definition: TrigGlobalEfficiencyCorrectionTool.h:155
TrigGlobalEfficiencyCorrectionTool::suggestEgammaMapKeys
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)
ITrigGlobalEfficiencyCorrectionTool::handleArg
double * handleArg(double &arg, std::vector< const xAOD::IParticle * > &)
Definition: ITrigGlobalEfficiencyCorrectionTool.h:58
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TrigGlobalEfficiencyCorrectionTool::m_useInternalSeed
bool m_useInternalSeed
Definition: TrigGlobalEfficiencyCorrectionTool.h:128
TrigGlobalEfficiencyCorrectionTool::m_suppliedElectronScaleFactorTools
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_suppliedElectronScaleFactorTools
Definition: TrigGlobalEfficiencyCorrectionTool.h:114
athena.value
value
Definition: athena.py:124
TrigGlobalEfficiencyCorrectionTool::m_calculator
std::unique_ptr< TrigGlobEffCorr::Calculator > m_calculator
Definition: TrigGlobalEfficiencyCorrectionTool.h:156
TrigGlobalEfficiencyCorrectionTool::m_legsPerTag
std::map< std::string, std::string > m_legsPerTag
deprecated
Definition: TrigGlobalEfficiencyCorrectionTool.h:125
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
Args
Definition: test_lwtnn_fastgraph.cxx:12
python.AtlRunQueryAMI.year
year
Definition: AtlRunQueryAMI.py:226
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
x
#define x
TrigGlobalEfficiencyCorrectionTool::m_leptonTagDecorations
std::string m_leptonTagDecorations
Definition: TrigGlobalEfficiencyCorrectionTool.h:121
flat_set
boost::container::flat_set< Key > flat_set
Definition: CheckConfig.cxx:11
TrigGlobalEfficiencyCorrectionTool::parseTagString
bool parseTagString(const std::string &tagstring, flat_set< std::size_t > &tags)
Definition: TrigGlobalEfficiencyCorrectionTool.cxx:181
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TrigGlobalEfficiencyCorrectionTool::m_seed
unsigned long m_seed
Definition: TrigGlobalEfficiencyCorrectionTool.h:151
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TrigGlobalEfficiencyCorrectionTool::m_triggerCb
std::map< std::string, std::string > m_triggerCb
Definition: TrigGlobalEfficiencyCorrectionTool.h:119
ITrigGlobalEfficiencyCorrectionTool::validArgs
static constexpr bool validArgs(unsigned nTrailingDoubles)
Definition: ITrigGlobalEfficiencyCorrectionTool.h:67
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TrigGlobalEfficiencyCorrectionTool::TLE_ERROR
@ TLE_ERROR
Definition: TrigGlobalEfficiencyCorrectionTool.h:187
TrigGlobalEfficiencyCorrectionTool::m_electronLegsPerTag
std::map< std::string, std::string > m_electronLegsPerTag
Definition: TrigGlobalEfficiencyCorrectionTool.h:123
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
TrigGlobalEfficiencyCorrectionTool::loadTriggerCombination
bool loadTriggerCombination(TrigGlobEffCorr::ImportData &data, bool useDefaultElectronTools, bool useDefaultPhotonTools)
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrigGlobalEfficiencyCorrectionTool::m_unsupportedLegs
std::set< ToolKey > m_unsupportedLegs
Definition: TrigGlobalEfficiencyCorrectionTool.h:144
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TrigGlobalEfficiencyCorrectionTool::m_muonToolIndex
std::map< ToolKey, std::size_t > m_muonToolIndex
Definition: TrigGlobalEfficiencyCorrectionTool.h:138
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigGlobalEfficiencyCorrectionTool::m_overrideThresholds
std::map< std::string, std::string > m_overrideThresholds
Definition: TrigGlobalEfficiencyCorrectionTool.h:126
TrigGlobEffCorr::ImportData
Definition: ImportData.h:88
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigGlobalEfficiencyCorrectionTool::m_photonEffToolIndex
std::map< ToolKey, std::size_t > m_photonEffToolIndex
Definition: TrigGlobalEfficiencyCorrectionTool.h:137
TrigGlobEffCorr::CheckConfig
Definition: CheckConfig.h:20
TrigGlobalEfficiencyCorrectionTool::m_cpCode
CP::CorrectionCode m_cpCode
Definition: TrigGlobalEfficiencyCorrectionTool.h:150
compute_lumi.leg
leg
Definition: compute_lumi.py:95
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
TrigGlobalEfficiencyCorrectionTool::parseListOfLegs
flat_set< ToolKey > parseListOfLegs(TrigGlobEffCorr::ImportData &data, const std::string &inputList, bool &success)
Definition: TrigGlobalEfficiencyCorrectionTool.cxx:282
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TrigGlobalEfficiencyCorrectionTool::m_triggerCbPerYear
std::map< std::string, std::string > m_triggerCbPerYear
Definition: TrigGlobalEfficiencyCorrectionTool.h:120
TrigGlobalEfficiencyCorrectionTool::m_validTrigMatchTool
bool m_validTrigMatchTool
Definition: TrigGlobalEfficiencyCorrectionTool.h:152
TrigGlobalEfficiencyCorrectionTool::TLE_OK
@ TLE_OK
Definition: TrigGlobalEfficiencyCorrectionTool.h:185
TrigGlobalEfficiencyCorrectionTool::m_suppliedPhotonScaleFactorTools
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_suppliedPhotonScaleFactorTools
Definition: TrigGlobalEfficiencyCorrectionTool.h:116
TrigGlobalEfficiencyCorrectionTool::m_hierarchyMeta
std::vector< Hierarchy > m_hierarchyMeta
Definition: TrigGlobalEfficiencyCorrectionTool.h:146
TrigGlobalEfficiencyCorrectionTool::processDeprecatedProperties
bool processDeprecatedProperties()
Definition: TrigGlobalEfficiencyCorrectionTool.cxx:158
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
TrigGlobalEfficiencyCorrectionTool::TLE_UNAVAILABLE
@ TLE_UNAVAILABLE
Definition: TrigGlobalEfficiencyCorrectionTool.h:186
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
create_dcsc_inputs_sqlite.arg
list arg
Definition: create_dcsc_inputs_sqlite.py:48
TrigGlobalEfficiencyCorrectionTool::m_tagsPerTool
std::map< std::string, std::string > m_tagsPerTool
Definition: TrigGlobalEfficiencyCorrectionTool.h:122
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TrigGlobalEfficiencyCorrectionTool::m_checkElectronLegTag
bool m_checkElectronLegTag
Definition: TrigGlobalEfficiencyCorrectionTool.h:140
python.ElectronD3PDObject.matched
matched
Definition: ElectronD3PDObject.py:138
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
get_generator_info.version
version
Definition: get_generator_info.py:33
unused
void unused(Args &&...)
Definition: VP1ExpertSettings.cxx:39
ITrigGlobalEfficiencyCorrectionTool::getEfficiencyScaleFactor
virtual CP::CorrectionCode getEfficiencyScaleFactor(const std::vector< const xAOD::IParticle * > &particles, double &efficiencyScaleFactor)=0
DeMoScan.index
string index
Definition: DeMoScan.py:364
__attribute__
__attribute__((always_inline)) inline uint16_t TileCalibDrawerBase
Definition: TileCalibDrawerBase.h:190
TrigGlobalEfficiencyCorrectionTool::m_photonSfToolIndex
std::map< ToolKey, std::size_t > m_photonSfToolIndex
Definition: TrigGlobalEfficiencyCorrectionTool.h:136
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
ITrigGlobalEfficiencyCorrectionTool::checkTriggerMatching
virtual CP::CorrectionCode checkTriggerMatching(bool &matched, const std::vector< const xAOD::IParticle * > &particles)=0
h
TrigGlobalEfficiencyCorrectionTool::m_suppliedMuonTools
ToolHandleArray< CP::IMuonTriggerScaleFactors > m_suppliedMuonTools
Definition: TrigGlobalEfficiencyCorrectionTool.h:117
TrigGlobalEfficiencyCorrectionTool::loadTagDecorators
bool loadTagDecorators(const flat_set< std::size_t > &collectedElectronTags, const flat_set< std::size_t > &collectedMuonTags, const flat_set< std::size_t > &collectedPhotonTags)
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
TrigGlobalEfficiencyCorrectionTool::m_trigMatchTool
ToolHandle< Trig::IMatchingTool > m_trigMatchTool
Definition: TrigGlobalEfficiencyCorrectionTool.h:129
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ITrigGlobalEfficiencyCorrectionTool::getEfficiency
virtual CP::CorrectionCode getEfficiency(const std::vector< const xAOD::IParticle * > &particles, double &efficiencyData, double &efficiencyMc)=0
TrigGlobalEfficiencyCorrectionTool::m_numberOfToys
unsigned long m_numberOfToys
Definition: TrigGlobalEfficiencyCorrectionTool.h:127
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TrigGlobalEfficiencyCorrectionTool::m_thresholds
std::map< std::size_t, float > m_thresholds
Definition: TrigGlobalEfficiencyCorrectionTool.h:132
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
ITrigGlobalEfficiencyCorrectionTool::toolnameForDefaultScaleFactor
static std::string toolnameForDefaultScaleFactor()
To be used with the ListOfLegsPerTool property:
Definition: ITrigGlobalEfficiencyCorrectionTool.h:56
TrigGlobalEfficiencyCorrectionTool::m_electronEffToolIndex
std::map< ToolKey, std::size_t > m_electronEffToolIndex
Definition: TrigGlobalEfficiencyCorrectionTool.h:135
TrigGlobalEfficiencyCorrectionTool::m_checkMuonLegTag
bool m_checkMuonLegTag
Definition: TrigGlobalEfficiencyCorrectionTool.h:141
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
TrigGlobalEfficiencyCorrectionTool::m_suppliedElectronEfficiencyTools
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_suppliedElectronEfficiencyTools
Properties:
Definition: TrigGlobalEfficiencyCorrectionTool.h:113
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
TrigGlobalEfficiencyCorrectionTool::loadListOfLegsPerTag
bool loadListOfLegsPerTag()
TrigGlobalEfficiencyCorrectionTool::m_electronSfToolIndex
std::map< ToolKey, std::size_t > m_electronSfToolIndex
Definition: TrigGlobalEfficiencyCorrectionTool.h:134
SG::DataProxy
Definition: DataProxy.h:45
TrigGlobalEfficiencyCorrectionTool::m_initialized
bool m_initialized
Definition: TrigGlobalEfficiencyCorrectionTool.h:149
TrigGlobalEfficiencyCorrectionTool::m_dictionary
std::map< std::size_t, std::string > m_dictionary
Definition: TrigGlobalEfficiencyCorrectionTool.h:143
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
TrigGlobalEfficiencyCorrectionTool::m_hasher
std::hash< std::string > m_hasher
Definition: TrigGlobalEfficiencyCorrectionTool.h:131
fitman.k
k
Definition: fitman.py:528
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37