|
ATLAS Offline Software
|
#include <TrigGlobalEfficiencyCorrectionTool.h>
|
| 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 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...
|
|
|
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< 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. 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 *) |
|
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. 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...
|
|
|
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > | m_suppliedElectronEfficiencyTools |
| Properties: More...
|
|
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 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::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) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
◆ flat_set
◆ LeptonList
◆ StoreGateSvc_t
◆ TLE_RESULT
◆ TrigGlobalEfficiencyCorrectionTool()
TrigGlobalEfficiencyCorrectionTool::TrigGlobalEfficiencyCorrectionTool |
( |
const std::string & |
name | ) |
|
Definition at line 33 of file TrigGlobalEfficiencyCorrectionTool.cxx.
44 for(
int y : {15, 16, 17, 18, 22, 23, 24, 25})
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");
◆ ~TrigGlobalEfficiencyCorrectionTool()
TrigGlobalEfficiencyCorrectionTool::~TrigGlobalEfficiencyCorrectionTool |
( |
| ) |
|
|
virtual |
◆ aboveThreshold()
◆ affectingSystematics()
virtual CP::SystematicSet TrigGlobalEfficiencyCorrectionTool::affectingSystematics |
( |
| ) |
const |
|
overridevirtual |
◆ 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()
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 |
◆ checkTriggerMatching() [2/2]
◆ countTriggerLegs()
virtual CP::CorrectionCode TrigGlobalEfficiencyCorrectionTool::countTriggerLegs |
( |
const std::string & |
trigger, |
|
|
std::size_t & |
numberOfLegs |
|
) |
| |
|
overridevirtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ 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.
203 auto& handle = suppliedTools[
index];
204 const std::string&
name = handle.name();
205 const std::string& altname = handle->name();
217 ATH_MSG_ERROR(
"The 'ListOfLegsPerTool' property has an invalid entry for the tool'" <<
name <<
"'");
230 listOfLegs.emplace();
233 else listOfLegs.emplace();
241 collectedTags.insert(
tags.begin(),
tags.end());
243 else tags.emplace(0);
246 unsigned short nUncheckedLegs = 0;
247 for(
auto&
key : listOfLegs)
249 std::size_t
leg =
key.hash;
252 auto flavour =
data.associatedLeptonFlavour(
leg, success);
262 if(!toolIndex.emplace(ToolKey(
leg,
tag,
key.boundaries),
index).second)
267 else ATH_MSG_ERROR(
"Multiple tools not associated to any trigger leg / selection tag");
◆ 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]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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>
◆ getEfficiency() [2/3]
◆ getEfficiency() [3/3]
◆ getEfficiencyScaleFactor() [1/3]
template<typename... Args>
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.
95 std::vector<const xAOD::IParticle*>
particles;
◆ getEfficiencyScaleFactor() [2/3]
◆ getEfficiencyScaleFactor() [3/3]
◆ GetEfficiencyTool() [1/2]
◆ GetEfficiencyTool() [2/2]
◆ GetEfficiencyToolIndex() [1/2]
◆ GetEfficiencyToolIndex() [2/2]
◆ getEgammaTriggerLegEfficiencies()
template<class ParticleType >
◆ getKey()
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
-
ptr | The 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.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getLoosestLeg()
std::size_t TrigGlobalEfficiencyCorrectionTool::getLoosestLeg |
( |
const TrigGlobEffCorr::Lepton & |
lepton, |
|
|
std::size_t |
leg1, |
|
|
std::size_t |
leg2, |
|
|
bool & |
success |
|
) |
| |
|
private |
◆ getLoosestLegAboveThreshold()
◆ 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
-
ptr | The 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.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ 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]
◆ GetScaleFactorTool() [2/2]
◆ GetScaleFactorToolIndex() [1/2]
◆ GetScaleFactorToolIndex() [2/2]
◆ getSortedLegs()
◆ getTriggerLegEfficiencies() [1/3]
◆ getTriggerLegEfficiencies() [2/3]
◆ getTriggerLegEfficiencies() [3/3]
◆ getTwoLoosestLegs()
◆ handleArg() [1/2]
template<typename P >
double* ITrigGlobalEfficiencyCorrectionTool::handleArg |
( |
const std::vector< P > & |
arg, |
|
|
std::vector< const xAOD::IParticle * > & |
particles |
|
) |
| |
|
inlineprotectedinherited |
◆ handleArg() [2/2]
double* ITrigGlobalEfficiencyCorrectionTool::handleArg |
( |
double & |
arg, |
|
|
std::vector< const xAOD::IParticle * > & |
|
|
) |
| |
|
inlineprotectedinherited |
◆ 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.
74 return StatusCode::FAILURE;
98 return StatusCode::FAILURE;
101 ATH_MSG_DEBUG(
"Retrieving trigger matching tool (if provided)");
108 return StatusCode::FAILURE;
116 if(!checks.basicConfigChecks())
return StatusCode::FAILURE;
126 return StatusCode::FAILURE;
145 if(!
loadTagDecorators(collectedElectronTags, collectedMuonTags, collectedPhotonTags))
return StatusCode::FAILURE;
151 if(!checks.advancedConfigChecks())
return StatusCode::FAILURE;
155 return StatusCode::SUCCESS;
◆ inputHandles()
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()
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]
◆ msg() [2/2]
◆ 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.
◆ msgLvl()
◆ outputHandles()
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()
◆ parseTagString()
bool TrigGlobalEfficiencyCorrectionTool::parseTagString |
( |
const std::string & |
tagstring, |
|
|
flat_set< std::size_t > & |
tags |
|
) |
| |
|
private |
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ processDeprecatedProperties()
bool TrigGlobalEfficiencyCorrectionTool::processDeprecatedProperties |
( |
| ) |
|
|
private |
Definition at line 158 of file TrigGlobalEfficiencyCorrectionTool.cxx.
162 ATH_MSG_WARNING(
"The property 'ElectronLegsPerTag' is deprecated, please use 'ListOfLegsPerTag' instead");
166 if(!insert.second) insert.first->second +=
"," + kv.second;
171 ATH_MSG_WARNING(
"The property 'MuonLegsPerTag' is deprecated, please use 'ListOfLegsPerTag' instead");
175 if(!insert.second) insert.first->second +=
"," + kv.second;
◆ rankTriggerLegs()
template<class Container >
◆ recommendedSystematics()
virtual CP::SystematicSet TrigGlobalEfficiencyCorrectionTool::recommendedSystematics |
( |
| ) |
const |
|
overridevirtual |
◆ renounce()
◆ renounceArray()
◆ 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 |
◆ 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 |
◆ sysInitialize()
◆ sysStart()
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 |
◆ 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()
◆ validArgs() [1/2]
template<typename Arg >
constexpr bool ITrigGlobalEfficiencyCorrectionTool::validArgs |
( |
unsigned |
nTrailingDoubles | ) |
|
|
staticconstexprinherited |
Definition at line 67 of file ITrigGlobalEfficiencyCorrectionTool.h.
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;
◆ 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.
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);
◆ TrigGlobEffCorr::Calculator
◆ TrigGlobEffCorr::CheckConfig
◆ TrigGlobEffCorr::ImportData
◆ m_cachedLegRankings
std::multimap<std::size_t, CachedRanking> TrigGlobalEfficiencyCorrectionTool::m_cachedLegRankings |
|
private |
◆ m_calculator
◆ m_checkElectronLegTag
bool TrigGlobalEfficiencyCorrectionTool::m_checkElectronLegTag |
|
private |
◆ m_checkMuonLegTag
bool TrigGlobalEfficiencyCorrectionTool::m_checkMuonLegTag |
|
private |
◆ m_checkPhotonLegTag
bool TrigGlobalEfficiencyCorrectionTool::m_checkPhotonLegTag |
|
private |
◆ m_cpCode
◆ m_detStore
◆ m_dictionary
std::map<std::size_t, std::string> TrigGlobalEfficiencyCorrectionTool::m_dictionary |
|
private |
◆ m_electronEffToolIndex
std::map<ToolKey, std::size_t > TrigGlobalEfficiencyCorrectionTool::m_electronEffToolIndex |
|
private |
◆ m_electronLegsPerTag
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_electronLegsPerTag |
|
private |
◆ m_electronSfToolIndex
std::map<ToolKey, std::size_t > TrigGlobalEfficiencyCorrectionTool::m_electronSfToolIndex |
|
private |
◆ m_evtStore
◆ m_hasher
std::hash<std::string> TrigGlobalEfficiencyCorrectionTool::m_hasher |
|
private |
◆ m_hierarchyData
std::vector<std::size_t> TrigGlobalEfficiencyCorrectionTool::m_hierarchyData |
|
private |
◆ m_hierarchyMeta
std::vector<Hierarchy> TrigGlobalEfficiencyCorrectionTool::m_hierarchyMeta |
|
private |
◆ m_initialized
bool TrigGlobalEfficiencyCorrectionTool::m_initialized = false |
|
private |
◆ m_legsPerTag
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_legsPerTag |
|
private |
◆ m_legsPerTool
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_legsPerTool |
|
private |
◆ m_leptonTagDecorations
std::string TrigGlobalEfficiencyCorrectionTool::m_leptonTagDecorations |
|
private |
◆ m_leptonTagDecorators
std::vector<TagDecorator> TrigGlobalEfficiencyCorrectionTool::m_leptonTagDecorators |
|
private |
◆ m_muonLegsPerTag
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_muonLegsPerTag |
|
private |
◆ m_muonToolIndex
std::map<ToolKey, std::size_t > TrigGlobalEfficiencyCorrectionTool::m_muonToolIndex |
|
private |
◆ m_numberOfToys
unsigned long TrigGlobalEfficiencyCorrectionTool::m_numberOfToys |
|
private |
◆ m_overrideThresholds
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_overrideThresholds |
|
private |
◆ m_photonEffToolIndex
std::map<ToolKey, std::size_t > TrigGlobalEfficiencyCorrectionTool::m_photonEffToolIndex |
|
private |
◆ m_photonSfToolIndex
std::map<ToolKey, std::size_t > TrigGlobalEfficiencyCorrectionTool::m_photonSfToolIndex |
|
private |
◆ m_runNumberDecorator
◆ m_seed
unsigned long TrigGlobalEfficiencyCorrectionTool::m_seed |
|
private |
◆ m_suppliedElectronEfficiencyTools
◆ m_suppliedElectronScaleFactorTools
◆ m_suppliedMuonTools
◆ m_suppliedPhotonEfficiencyTools
◆ m_suppliedPhotonScaleFactorTools
◆ m_tagsPerTool
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_tagsPerTool |
|
private |
◆ m_thresholds
std::map<std::size_t,float > TrigGlobalEfficiencyCorrectionTool::m_thresholds |
|
private |
◆ m_triggerCb
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_triggerCb |
|
private |
◆ m_triggerCbPerYear
std::map<std::string, std::string> TrigGlobalEfficiencyCorrectionTool::m_triggerCbPerYear |
|
private |
◆ m_trigMatchTool
◆ m_unsupportedLegs
std::set<ToolKey> TrigGlobalEfficiencyCorrectionTool::m_unsupportedLegs |
|
private |
◆ m_useInternalSeed
bool TrigGlobalEfficiencyCorrectionTool::m_useInternalSeed |
|
private |
◆ m_validLegTagPairs
std::set<std::size_t> TrigGlobalEfficiencyCorrectionTool::m_validLegTagPairs |
|
private |
◆ m_validTrigMatchTool
bool TrigGlobalEfficiencyCorrectionTool::m_validTrigMatchTool |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
char data[hepevt_bytes_allocation_ATLAS]
Electron_v1 Electron
Definition of the current "egamma version".
void ignore() const noexcept
Ignore the correction code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Class providing the definition of the 4-vector interface.
boost::container::flat_set< Key > flat_set
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< std::string > tags
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string to_string(const DetectorType &type)
Photon_v1 Photon
Definition of the current "egamma version".
__attribute__((always_inline)) inline uint16_t TileCalibDrawerBase
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>