5#ifndef TRIG_NAVTOOLS_NAVIGATIONDAODTESTERALGV2_H
6#define TRIG_NAVTOOLS_NAVIGATIONDAODTESTERALGV2_H
18#include "GaudiKernel/ToolHandle.h"
19#include "Gaudi/Property.h"
43 virtual StatusCode
execute(
const EventContext &context)
const override;
44 virtual StatusCode
finalize()
override;
49 PublicToolHandle<Trig::TrigDecisionTool>
m_tdt{
50 this,
"TrigDecisionTool",
"",
"Read R3 navigation data from TDT"};
53 this,
"R3MatchingTool",
"Trig::R3MatchingTool",
"R3 matching tool for converted navigation"};
56 this,
"MatchFromCompositeTool",
"Trig::MatchFromCompositeTool",
"R2 matching from pre-stored TrigComposite containers"};
59 Gaudi::Property<std::vector<std::string>>
m_chains{
60 this,
"Chains", {},
"The trigger chains to test"};
63 this,
"ChainsToExclude", {},
64 "Chain name patterns to skip (substring match), e.g. 'noL1'. "
65 "DAOD-tester-local exception list for pathological chain families whose "
66 "TrigMatch layout does not support the generic R2/R3 comparison. "
67 "Note: nomucomb chains no longer need excluding - they are handled by "
68 "the dedicated linearised path (see ChainsWithLinearisedR2Matching)."};
71 this,
"ChainsWithLinearisedR2Matching", {
"nomucomb"},
72 "Chain name patterns (substring match) whose TrigMatch container uses "
73 "the linearised layout: N entries of vector size 1, one per "
74 "individually matched offline object, instead of one entry of size "
75 "= sum of leg multiplicities per matched combination. These chains "
76 "are compared PER OBJECT (pool of individually matched objects vs "
77 "single-object R3 matching) instead of per combination, since the "
78 "reference carries no combination structure."};
82 this,
"FailOnDifference",
false,
83 "Return FAILURE if the navigation does not compare equal"};
86 this,
"VerifyCombinationsSize",
true,
87 "Check if combinations have matching size (that is Run2 >= Run3)"};
90 this,
"VerifyCombinationsContent",
true,
91 "Check if combinations are compatible (point to same objects)"};
94 this,
"InputPrefix",
"TrigMatch_",
95 "Prefix used for pre-matched trigger combinations branches"};
98 this,
"PrintSubfeatures",
false,
99 "When true, print subfeatures (lower-pT objects from Run2->Run3 conversion) for each passing chain"};
102 this,
"DumpFeaturesWithoutR2",
false,
103 "Diagnostic: when the TrigMatch_<chain> container is absent (e.g. when "
104 "running directly on the conversion output at AOD level, where no R2 "
105 "matching reference exists), still print the per-leg R3 features of "
106 "passed chains. The cross-leg feature pooling converter defect shows "
107 "up directly in this dump (identical pooled lists on every leg)."};
123 std::size_t
numberOfLegs(
const std::string& chain)
const;
132 const std::string& linkName =
"")
const;
136 const std::vector<std::string>&
patterns);
150 const std::vector<const xAOD::IParticle*>& particles);
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< bool > m_dumpFeaturesWithoutR2
static bool matchesAnyPattern(const std::string &chain, const std::vector< std::string > &patterns)
True if the chain name contains any of the patterns (substring match).
std::map< std::string, int > m_failingChains ATLAS_THREAD_SAFE
void dumpFeaturesPerLeg(const std::string &chain, std::size_t nLegs, MSG::Level level, const std::string &linkName="") const
Dump the per-leg R3 features of a chain at the given message level.
virtual ~NavigationDAODTesterAlgv2() override=default
PublicToolHandle< Trig::TrigDecisionTool > m_tdt
Gaudi::Property< std::vector< std::string > > m_chains
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &context) const override
PublicToolHandle< Trig::MatchFromCompositeTool > m_matchFromCompositeTool
std::size_t numberOfLegs(const std::string &chain) const
Number of legs of a chain, derived from ChainNameParser::multiplicities().
Gaudi::Property< bool > m_failOnDifference
Gaudi::Property< std::vector< std::string > > m_linearisedR2Chains
virtual StatusCode finalize() override
Gaudi::Property< bool > m_printSubfeatures
static const xAOD::IParticle * resolveOriginal(const xAOD::IParticle *p)
Resolve a possible shallow copy to its original object via the "originalObjectLink" decoration (mirro...
Gaudi::Property< bool > m_verifyCombinations
NavigationDAODTesterAlgv2(const std::string &name, ISvcLocator *pSvcLocator)
static bool matchLinearisedR2(std::vector< const xAOD::IParticle * > pool, const std::vector< const xAOD::IParticle * > &particles)
R2 verdict for chains with linearised TrigMatch layout (e.g.
std::mutex m_failingChainsMutex
Gaudi::Property< bool > m_verifyCombinationsSize
PublicToolHandle< Trig::R3MatchingTool > m_matchingTool
Gaudi::Property< std::string > m_inputPrefix
Gaudi::Property< std::vector< std::string > > m_chainsToExclude
Class providing the definition of the 4-vector interface.
std::vector< std::string > patterns
The common trigger namespace for trigger analysis tools.