![]() |
ATLAS Offline Software
|
Tool to perform trigger matching in the derivation framework. More...
#include <TriggerMatchingTool.h>
Public Types | |
| using | particleVec_t = std::vector<const xAOD::IParticle *> |
| Helper typedefs. | |
Public Member Functions | |
| TriggerMatchingTool (const std::string &type, const std::string &name, const IInterface *pSvcLocator) | |
| Constructor. | |
| virtual StatusCode | initialize () override |
| Initialize the tool. | |
| virtual StatusCode | addBranches (const EventContext &ctx) const override |
| Calculate the matchings. | |
Private Member Functions | |
| StatusCode | createOutputContainer (xAOD::TrigCompositeContainer *&container, const std::string &chain) const |
| Create an output container for the named chain. | |
| const particleVec_t & | getCandidateMatchesFor (const xAOD::IParticle *part, std::map< xAOD::Type::ObjectType, particleVec_t > &offlineParticles, std::map< const xAOD::IParticle *, particleVec_t > &cache) const |
| Get all offline particles that could match a given online one. | |
| bool | matchParticles (const xAOD::IParticle *lhs, const xAOD::IParticle *rhs) const |
| Check if the dR between two particles is below threshold. | |
Private Attributes | |
| std::vector< std::string > m_chainNames | ATLAS_THREAD_SAFE |
| The list of chain names to match. | |
| ToolHandle< Trig::IIParticleRetrievalTool > | m_trigParticleTool {"Trig::IParticleRetrievalTool/OnlineParticleTool"} |
| The tool to retrieve the online candidates. | |
| std::map< xAOD::Type::ObjectType, SG::ReadHandleKey< xAOD::IParticleContainer > > | m_offlineInputs |
| The input containers to use. These are keyed by xAOD object type. | |
| float | m_drThreshold |
| The DR threshold to use. | |
| bool | m_rerun |
| Whether to match in rerun mode or not. | |
| std::string | m_outputPrefix |
| The prefix to place at the beginning of the output containers. | |
| bool | m_checkEmptyChainGroups |
| If set, discard any triggers with empty chain groups (break the job otherwise). | |
| bool | m_inputDependentConfig |
| If using an input-file-dependent config then we warn when triggers are removed. | |
| ToolHandle< Trig::TrigDecisionTool > | m_tdt {"Trig::TrigDecisionTool/TrigDecisionTool"} |
| The trig decision tool. | |
| ToolHandle< Trig::IMatchScoringTool > | m_scoreTool |
| The pair scoring tool. | |
Tool to perform trigger matching in the derivation framework.
Trigger matching in the derivation framework has to take the reverse approach to matching in analysis code. There, the matching tool is provided with a list of analysis particles to match to a given trigger. The navigation then proceeds to search out all features that match the types of those particles. In the derivation framework however, we need to get the full list of all particles that a user could ask for in their analysis code. To do this, we ask the navigation for all the relevant xAOD objects and then use those to query the available offline objects.
Definition at line 38 of file TriggerMatchingTool.h.
| using DerivationFramework::TriggerMatchingTool::particleVec_t = std::vector<const xAOD::IParticle *> |
Helper typedefs.
Definition at line 42 of file TriggerMatchingTool.h.
| DerivationFramework::TriggerMatchingTool::TriggerMatchingTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | pSvcLocator ) |
Constructor.
Definition at line 42 of file TriggerMatchingTool.cxx.
|
overridevirtual |
Calculate the matchings.
Definition at line 96 of file TriggerMatchingTool.cxx.
|
private |
Create an output container for the named chain.
| [out] | container | A pointer to the created container |
| chain | The name of the chain to create the container for The container will be recorded in the StoreGate using the name of the chain as a key. |
Definition at line 241 of file TriggerMatchingTool.cxx.
|
private |
Get all offline particles that could match a given online one.
| part | The online particle to match against. |
| offlineParticles | The offline particles, key by xAOD type. |
| cache | Store past matches here to speed up future look ups. |
Definition at line 258 of file TriggerMatchingTool.cxx.
|
overridevirtual |
Initialize the tool.
Definition at line 79 of file TriggerMatchingTool.cxx.
|
private |
Check if the dR between two particles is below threshold.
Definition at line 296 of file TriggerMatchingTool.cxx.
|
mutableprivate |
The list of chain names to match.
Definition at line 58 of file TriggerMatchingTool.h.
|
private |
If set, discard any triggers with empty chain groups (break the job otherwise).
Definition at line 83 of file TriggerMatchingTool.h.
|
private |
The DR threshold to use.
Definition at line 73 of file TriggerMatchingTool.h.
|
private |
If using an input-file-dependent config then we warn when triggers are removed.
Definition at line 87 of file TriggerMatchingTool.h.
|
private |
The input containers to use. These are keyed by xAOD object type.
Definition at line 70 of file TriggerMatchingTool.h.
|
private |
The prefix to place at the beginning of the output containers.
Definition at line 79 of file TriggerMatchingTool.h.
|
private |
Whether to match in rerun mode or not.
Definition at line 76 of file TriggerMatchingTool.h.
|
private |
The pair scoring tool.
Definition at line 93 of file TriggerMatchingTool.h.
|
private |
The trig decision tool.
Definition at line 90 of file TriggerMatchingTool.h.
|
private |
The tool to retrieve the online candidates.
Definition at line 67 of file TriggerMatchingTool.h.