ATLAS Offline Software
Loading...
Searching...
No Matches
Trig::NavigationDAODTesterAlgv2 Class Reference

#include <NavigationDAODTesterAlgv2.h>

Inheritance diagram for Trig::NavigationDAODTesterAlgv2:
Collaboration diagram for Trig::NavigationDAODTesterAlgv2:

Public Member Functions

 NavigationDAODTesterAlgv2 (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~NavigationDAODTesterAlgv2 () override=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &context) const override
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

std::size_t numberOfLegs (const std::string &chain) const
 Number of legs of a chain, derived from ChainNameParser::multiplicities().
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.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static bool matchesAnyPattern (const std::string &chain, const std::vector< std::string > &patterns)
 True if the chain name contains any of the patterns (substring match).
static const xAOD::IParticle * resolveOriginal (const xAOD::IParticle *p)
 Resolve a possible shallow copy to its original object via the "originalObjectLink" decoration (mirrors the MatchShallow behaviour of MatchFromCompositeTool::areTheSame, plus a defensive validity check on the link).
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.

Private Attributes

PublicToolHandle< Trig::TrigDecisionTool > m_tdt
PublicToolHandle< Trig::R3MatchingTool > m_matchingTool
PublicToolHandle< Trig::MatchFromCompositeTool > m_matchFromCompositeTool
Gaudi::Property< std::vector< std::string > > m_chains
Gaudi::Property< std::vector< std::string > > m_chainsToExclude
Gaudi::Property< std::vector< std::string > > m_linearisedR2Chains
Gaudi::Property< bool > m_failOnDifference
Gaudi::Property< bool > m_verifyCombinationsSize
Gaudi::Property< bool > m_verifyCombinations
Gaudi::Property< std::string > m_inputPrefix
Gaudi::Property< bool > m_printSubfeatures
Gaudi::Property< bool > m_r3MatchingRerun
Gaudi::Property< bool > m_drFromRun2Lists
Gaudi::Property< bool > m_dumpFeaturesWithoutR2
std::map< std::string, int > m_failingChains ATLAS_THREAD_SAFE
std::map< std::string, int > m_emptyR2Chains ATLAS_THREAD_SAFE
 Events where the chain passed and R3 matched, but the R2 TrigMatch reference container is EMPTY.
std::map< std::string, int > m_rerunOnlyChains ATLAS_THREAD_SAFE
 Events with a TrigMatch reference in which the chain passed only in rerun (resurrected decision, not after prescale).
std::mutex m_failingChainsMutex
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 36 of file NavigationDAODTesterAlgv2.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ NavigationDAODTesterAlgv2()

Trig::NavigationDAODTesterAlgv2::NavigationDAODTesterAlgv2 ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 20 of file NavigationDAODTesterAlgv2.cxx.

20 :
21 AthReentrantAlgorithm(name, pSvcLocator)
22{}

◆ ~NavigationDAODTesterAlgv2()

virtual Trig::NavigationDAODTesterAlgv2::~NavigationDAODTesterAlgv2 ( )
overridevirtualdefault

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ dumpFeaturesPerLeg()

void Trig::NavigationDAODTesterAlgv2::dumpFeaturesPerLeg ( const std::string & chain,
std::size_t nLegs,
MSG::Level level,
const std::string & linkName = "" ) const
private

Dump the per-leg R3 features of a chain at the given message level.

Used both for diagnostics on failing chains and for the optional subfeature printout. The linkName selects "feature" (default) or "subfeature".

Definition at line 76 of file NavigationDAODTesterAlgv2.cxx.

79 {
80 const bool isSub = !linkName.empty();
81 const char* tag = isSub ? "[subfeature]" : "[feature]";
82 for (std::size_t leg = 0; leg < nLegs; ++leg) {
83 Trig::FeatureRequestDescriptor frd;
84 frd.setChainGroup(chain);
85 frd.setRestrictRequestToLeg(static_cast<int>(leg));
86 if (isSub) {
87 frd.setLinkName(linkName);
88 }
89 // Default feature collection mode (lastFeatureOfType) is correct for
90 // DAOD - only the final feature is kept after slimming.
91 auto features = m_tdt->features<xAOD::IParticleContainer>(frd);
92 msg() << level << " Leg " << leg << " "
93 << (isSub ? "subfeatures" : "features") << " (" << features.size() << "):" << endmsg;
94 for (const auto& feature : features) {
95 if (feature.isValid()) {
96 msg() << level << " " << tag << " pt=" << (*feature.link)->pt()
97 << " eta=" << (*feature.link)->eta()
98 << " phi=" << (*feature.link)->phi()
99 << " [" << feature.link.dataID() << ":" << feature.link.index() << "]" << endmsg;
100 }
101 }
102 }
103}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
FeatureRequestDescriptor & setLinkName(const std::string &navElementLinkKey)
Set the Link Name Key.
FeatureRequestDescriptor & setChainGroup(std::string_view chainGroupName)
Set the desired Chain or Chain Group.
FeatureRequestDescriptor & setRestrictRequestToLeg(const int restrictToLegIndex)
Set to -1 by default, indicating that all legs of multi-leg chains are searched.
PublicToolHandle< Trig::TrigDecisionTool > m_tdt
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Trig::NavigationDAODTesterAlgv2::execute ( const EventContext & context) const
overridevirtual

Definition at line 105 of file NavigationDAODTesterAlgv2.cxx.

105 {
106
107 // Get offline particle containers
108 SG::ReadHandle<xAOD::IParticleContainer> particles_muons{"Muons", ctx};
109 SG::ReadHandle<xAOD::IParticleContainer> particles_electrons{"Electrons", ctx};
110 SG::ReadHandle<xAOD::IParticleContainer> particles_taus{"TauJets", ctx};
111 SG::ReadHandle<xAOD::IParticleContainer> particles_photons{"Photons", ctx};
112
113 std::map<std::string, SG::ReadHandle<xAOD::IParticleContainer>*> read_handles;
114 read_handles["e"] = &particles_electrons;
115 read_handles["mu"] = &particles_muons;
116 read_handles["tau"] = &particles_taus;
117 read_handles["g"] = &particles_photons;
118
119 if (!particles_muons.isValid() || !particles_electrons.isValid() ||
120 !particles_taus.isValid() || !particles_photons.isValid()) {
121 ATH_MSG_ERROR("Couldn't retrieve IParticles containers");
122 return StatusCode::FAILURE;
123 }
124
125 for (const std::string& chain : m_chains) {
126 if (!m_tdt->isPassed(chain, TrigDefs::Physics | TrigDefs::allowResurrectedDecision)) continue;
127
128 // Skip chains on the exception list (substring match). These are
129 // pathological chain families whose TrigMatch layout does not support
130 // the generic R2/R3 comparison and have no dedicated handling (yet).
132 ATH_MSG_DEBUG("Chain " << chain << " is on the exclusion list, skipping");
133 continue;
134 }
135
136 // Get the chain structure using ChainNameParser
137 auto ChainMultiplicity = ChainNameParser::multiplicities(chain);
138 auto ChainNameParseSignature = ChainNameParser::signatures(chain);
139
140 // Filter to only process chains with supported signatures (e, mu, g, tau)
141 bool hasSupported = false;
142 for (const std::string& sig : ChainNameParseSignature) {
143 if (read_handles.find(sig) != read_handles.end()) {
144 hasSupported = true;
145 break;
146 }
147 }
148 if (!hasSupported) {
149 ATH_MSG_DEBUG("Chain " << chain << " has no supported signatures, skipping");
150 continue;
151 }
152 ATH_MSG_DEBUG("Passing " << chain);
153
154 // dR of the R3 matching. The TrigMatch_<chain> reference was produced
155 // per trigger list (DerivationFrameworkPhys/PhysCommonConfig.py): 0.2
156 // for the Tau list (tau, di-tau, tau+xe), 0.1 for the NoTau list,
157 // which also holds the e+tau and mu+tau chains. By default
158 // (DRThresholdFromRun2Lists) the same rule is used here: a chain is in
159 // the Tau list iff it has a tau leg and no e/mu/g leg. Otherwise the
160 // previous rule: 0.2 for any chain with a tau leg. With that rule the
161 // R3 matching accepts, for lepton+tau chains, objects in the 0.1-0.2
162 // annulus that the Run 2 reference never considered: mostly "R3
163 // matched, R2 reference EMPTY" warnings, and "R3 found at least one
164 // match but R2 found none" errors when the reference holds only
165 // thinned objects.
166 const bool hasTau = std::find(ChainNameParseSignature.begin(),
167 ChainNameParseSignature.end(),
168 "tau") != ChainNameParseSignature.end();
169 const bool hasEMuG = std::any_of(ChainNameParseSignature.begin(),
170 ChainNameParseSignature.end(),
171 [](const std::string& s) { return s == "e" || s == "mu" || s == "g"; });
172 const bool tauListChain = hasTau && !hasEMuG;
173 const double drThreshold = (m_drFromRun2Lists ? tauListChain : hasTau) ? 0.2 : 0.1;
174
175 // Retrieve the TrigMatch container (used for the R2 match and for the
176 // DEBUG dump below).
177 std::string containerName = m_inputPrefix + chain;
178 std::replace(containerName.begin(), containerName.end(), '.', '_');
179 const xAOD::TrigCompositeContainer* composites(nullptr);
180 if (!evtStore()->retrieve(composites, containerName).isSuccess()) {
181 ATH_MSG_DEBUG("No branch in this DAOD for " << chain);
183 // Converter-debugging mode (e.g. directly after conversion at
184 // AOD level): no R2 reference exists, but the per-leg feature
185 // assignment - where the cross-leg pooling defect shows up -
186 // can still be inspected.
187 const std::size_t nLegs = numberOfLegs(chain);
188 if (nLegs > 0) {
189 ATH_MSG_INFO("Per-leg features of " << chain << " (no R2 reference):");
190 dumpFeaturesPerLeg(chain, nLegs, MSG::INFO);
191 dumpFeaturesPerLeg(chain, nLegs, MSG::INFO, "subfeature");
192 }
193 }
194 continue;
195 }
196
197 // Rerun-only event: the chain passed only in rerun (resurrected
198 // decision, accepted above) and has a TrigMatch reference to compare
199 // with. Counted for the summary.
200 if (!m_tdt->isPassed(chain, TrigDefs::Physics)) {
201 std::lock_guard<std::mutex> lock(m_failingChainsMutex);
202 m_rerunOnlyChains[chain] += 1;
203 }
204
205 // nomucomb-family chains: the derivation stored the R2 matches
206 // linearised - one TrigComposite entry of vector size 1 per
207 // individually matched offline muon (e.g. HLT_2mu10_nomucomb with 3
208 // matched muons -> 3 entries of size 1) instead of one entry of size
209 // = sum of leg multiplicities per matched combination.
210 // MatchFromCompositeTool requires the full combination within a single
211 // entry, so it can never match there. Rebuild the R2 reference instead:
212 // the pool of individually matched offline objects, gathered once per
213 // chain/event.
214 const bool useLinearisedR2 = matchesAnyPattern(chain, m_linearisedR2Chains);
215 std::vector<const xAOD::IParticle*> r2MatchedPool;
216 if (useLinearisedR2) {
217 static const SG::ConstAccessor<std::vector<ElementLink<xAOD::IParticleContainer>>> accMatched("TrigMatchedObjects");
218 for (const xAOD::TrigComposite* entry : *composites) {
219 for (const ElementLink<xAOD::IParticleContainer>& link : accMatched(*entry)) {
220 if (!link.isValid()) continue; // e.g. removed by thinning
221 const xAOD::IParticle* orig = resolveOriginal(*link);
222 if (std::find(r2MatchedPool.begin(), r2MatchedPool.end(), orig) == r2MatchedPool.end()) {
223 r2MatchedPool.push_back(orig);
224 }
225 }
226 }
227 ATH_MSG_DEBUG("Chain " << chain << " uses linearised R2 matching: "
228 << composites->size() << " TrigMatch entries -> pool of "
229 << r2MatchedPool.size() << " individually matched objects");
230 }
231
232 bool isR2R3different = false;
233 size_t nCombinationsTested = 0;
234 bool anyPassR2 = false;
235 bool anyPassR3 = false;
236
237 if (useLinearisedR2) {
238 // Per-object comparison. The linearised reference holds individually
239 // matched objects with no combination structure and no online-object
240 // identity, so combination-level R2 verdicts cannot be reconstructed
241 // faithfully. Two benign cases would otherwise be flagged as ERRORs
242 // (both observed with HLT_2mu10_nomucomb, run 284500):
243 // - a collimated offline pair matched to the SAME single online
244 // muon: per-object R2 stores both, while R3 correctly demands
245 // distinct online objects per combination;
246 // - the converter demotes the lower-pT online muon of a shared RoI
247 // to a "subfeature", which the baseline comparison excludes
248 // (IncludeSubfeatures=False).
249 // Comparing per object keeps the genuine-defect signature visible:
250 // an object the R2 derivation matched but whose feature the
251 // converted navigation lost entirely still gives R2:1 R3:0.
252 std::vector<const SG::ReadHandle<xAOD::IParticleContainer>*> doneContainers;
253 for (const std::string& sig : ChainNameParseSignature) {
254 auto handleItr = read_handles.find(sig);
255 if (handleItr == read_handles.end()) continue;
256 // Legs may share an offline container (e.g. mu6 + 2mu4):
257 // process each container once.
258 if (std::find(doneContainers.begin(), doneContainers.end(), handleItr->second) != doneContainers.end()) continue;
259 doneContainers.push_back(handleItr->second);
260
261 for (const xAOD::IParticle* p : **(handleItr->second)) {
262 const bool passR2 = matchLinearisedR2(r2MatchedPool, {p});
263 const bool passR3 = m_matchingTool->match(*p, chain, drThreshold, m_r3MatchingRerun);
264
265 anyPassR2 |= passR2;
266 anyPassR3 |= passR3;
267
268 if (passR2 && !passR3) {
269 ATH_MSG_ERROR("R2 passes but R3 fails for chain " << chain
270 << " (per-object linearised check) - converted navigation may have lost this object");
271 ATH_MSG_ERROR(" Particle pT=" << p->pt() << " eta=" << p->eta() << " phi=" << p->phi()
272 << " R2:1 R3:0");
273 isR2R3different = true;
274
275 {
276 std::lock_guard<std::mutex> lock(m_failingChainsMutex);
277 m_failingChains[chain] += 1;
278 }
279 }
280 else if (!passR2 && passR3) {
281 ATH_MSG_DEBUG("R3 passes but R2 fails (expected) for chain " << chain
282 << " (per-object linearised check)");
283 ATH_MSG_DEBUG(" Particle pT=" << p->pt() << " eta=" << p->eta() << " phi=" << p->phi()
284 << " R2:0 R3:1");
285 }
286 else {
287 ++nCombinationsTested;
288 if (passR2 && msgLvl(MSG::DEBUG)) {
289 ATH_MSG_DEBUG("R2/R3 match for chain " << chain
290 << " (per-object linearised check) passR2: " << passR2 << " passR3: " << passR3);
291 ATH_MSG_DEBUG(" Particle pT=" << p->pt() << " eta=" << p->eta() << " phi=" << p->phi());
292 }
293 }
294 }
295 }
296 }
297 else {
298
299 // Setup combination generator based on multiplicities of offline physics objects for each leg
300 HLT::NestedUniqueCombinationGenerator nucg;
301 ATH_MSG_DEBUG("NestedUniqueCombinationGenerator: " << ChainMultiplicity.size() << " legs, " << ChainNameParseSignature.size() << " signatures");
302
303 bool tooFewOffline = false;
304 for (size_t readhandlesIndex = 0; readhandlesIndex < ChainNameParseSignature.size(); readhandlesIndex++) {
305 const std::string& sig = ChainNameParseSignature[readhandlesIndex];
306 if (read_handles.find(sig) == read_handles.end()) {
307 ATH_MSG_DEBUG("Signature " << sig << " not supported, skipping chain " << chain);
308 continue;
309 }
310 const size_t nOffline = (*read_handles[sig])->size();
311 const size_t nRequired = static_cast<size_t>(ChainMultiplicity[readhandlesIndex]);
312 ATH_MSG_DEBUG("Signature \"" << sig << "\": " << nOffline
313 << " offline objects, chain requires " << nRequired);
314 // If a leg has fewer offline objects than required, no valid combination
315 // can be formed. Skip to avoid out-of-range access in the generator loop.
316 if (nOffline < nRequired) {
317 tooFewOffline = true;
318 break;
319 }
320 nucg.add({nOffline, nRequired});
321 }
322 if (tooFewOffline) {
323 ATH_MSG_DEBUG("Not enough offline objects to form any combination for chain " << chain << ", skipping");
324 continue;
325 }
326
327 // Loop over all possible combinations of offline physics objects
328 do {
329 const std::vector<size_t> combination = nucg();
330 ++nucg;
331
332 std::vector<const xAOD::IParticle *> particles;
333 size_t location_in_combination = 0;
334
335 for (size_t ChainNameIndex = 0; ChainNameIndex < ChainNameParseSignature.size(); ++ChainNameIndex) {
336 const std::string& sig = ChainNameParseSignature[ChainNameIndex];
337 if (read_handles.find(sig) == read_handles.end()) continue;
338
339 for (size_t ChainMultipIndex = 0; ChainMultipIndex < static_cast<size_t>(ChainMultiplicity[ChainNameIndex]); ++ChainMultipIndex) {
340 const xAOD::IParticle* p = (*read_handles[sig])->at(combination[location_in_combination]);
341 ATH_MSG_VERBOSE("objectIndex --> " << sig << " " << combination[location_in_combination]
342 << " pT: " << p->pt() << " eta: " << p->eta() << " phi: " << p->phi());
343 particles.push_back(p);
344 location_in_combination++;
345 }
346 }
347
348 // Combination hygiene: legs sharing an offline container can draw
349 // the SAME offline object into two slots (the per-leg generators
350 // are independent). Such degenerate combinations are not physical
351 // trigger combinations - the R2 reference never contains them -
352 // while R3 can accept them through duplicated online copies (the
353 // same muon reconstructed in overlapping RoIs appears several
354 // times in the converted navigation). Skip them.
355 bool duplicateOffline = false;
356 for (size_t i = 0; i < particles.size() && !duplicateOffline; ++i) {
357 for (size_t j = i + 1; j < particles.size(); ++j) {
358 if (particles[i] == particles[j]) {
359 duplicateOffline = true;
360 break;
361 }
362 }
363 }
364 if (duplicateOffline) {
365 ATH_MSG_VERBOSE("Skipping combination with a repeated offline object for chain " << chain);
366 continue;
367 }
368
369 // R3: full combination matching via buildCombinations (DR-based,
370 // drThreshold chosen above per DRThresholdFromRun2Lists).
371 // R2: single full-combination match against the pre-stored TrigMatch
372 // container using pointer/shallow equality (configured on the
373 // MatchFromCompositeTool; its DR/rerun arguments are ignored).
374 bool passR3 = m_matchingTool->match(particles, chain, drThreshold, m_r3MatchingRerun);
375 bool passR2 = m_matchFromCompositeTool->match(particles, chain);
376
377 anyPassR2 |= passR2;
378 anyPassR3 |= passR3;
379
380 // ERROR: R2 says pass but R3 doesn't - this indicates missing trigger information in R3
381 if (passR2 && !passR3) {
382 ATH_MSG_ERROR("R2 passes but R3 fails for chain " << chain
383 << " - R3 conversion may be missing trigger information");
384 for (const auto& p : particles) {
385 bool r3 = m_matchingTool->match(*p, chain, drThreshold, m_r3MatchingRerun);
386 bool r2 = m_matchFromCompositeTool->match(*p, chain);
387 ATH_MSG_ERROR(" Particle pT=" << p->pt() << " eta=" << p->eta() << " phi=" << p->phi()
388 << " R2:" << r2 << " R3:" << r3);
389 }
390 isR2R3different = true;
391
392 {
393 std::lock_guard<std::mutex> lock(m_failingChainsMutex);
394 m_failingChains[chain] += 1;
395 }
396 }
397 // EXPECTED (but rare): R3 passes but R2 doesn't - R3 can form more combinations
398 else if (!passR2 && passR3) {
399 ATH_MSG_DEBUG("R3 passes but R2 fails (expected) for chain " << chain);
400 if (msgLvl(MSG::DEBUG)) {
401 for (const auto& p : particles) {
402 bool r3 = m_matchingTool->match(*p, chain, drThreshold, m_r3MatchingRerun);
403 bool r2 = m_matchFromCompositeTool->match(*p, chain);
404 ATH_MSG_DEBUG(" Particle pT=" << p->pt() << " eta=" << p->eta() << " phi=" << p->phi()
405 << " R2:" << r2 << " R3:" << r3);
406 }
407 }
408 }
409 // OK: both agree
410 else {
411 ++nCombinationsTested;
412 if (msgLvl(MSG::DEBUG)) {
413 ATH_MSG_DEBUG("R2/R3 match for chain " << chain << " passR2: " << passR2 << " passR3: " << passR3);
414 for (const auto& p : particles) {
415 bool r3 = m_matchingTool->match(*p, chain, drThreshold, m_r3MatchingRerun);
416 bool r2 = m_matchFromCompositeTool->match(*p, chain);
417 ATH_MSG_DEBUG(" Particle pT=" << p->pt() << " eta=" << p->eta() << " phi=" << p->phi()
418 << " R2:" << r2 << " R3:" << r3);
419 }
420 }
421 }
422 } while (nucg);
423
424 } // end generic combination path
425
426 // Chain-level sanity check: if R3 found at least one matching combination
427 // then R2 should also have found at least one.
428 if (anyPassR3 && !anyPassR2) {
429 if (composites->empty()) {
430 // The chain passed and R3 matched, but the derivation wrote NO
431 // R2 reference entries at all. TrigMatch production reads the
432 // original Run-2 navigation and is independent of the
433 // conversion, so an empty reference cannot indicate a
434 // conversion defect - the event is simply unverifiable by this
435 // comparison. Verified on independent derivations of the same
436 // events (e.g. HLT_g35_loose_g25_loose, HLT_e2x_..._mu8noL1).
437 ATH_MSG_WARNING("Chain " << chain << ": chain passed and R3 matched, "
438 << "but the R2 TrigMatch reference is EMPTY - unverifiable event");
439 std::lock_guard<std::mutex> lock(m_failingChainsMutex);
440 m_emptyR2Chains[chain] += 1;
441 }
442 else {
443 ATH_MSG_ERROR("Chain " << chain << ": R3 found at least one match but R2 found none "
444 << "- possible inconsistency between converted navigation and TrigMatch container");
445 isR2R3different = true;
446 // Count this in the finalize() summary as well. Chains that fail
447 // only this chain-level check would otherwise be missing from
448 // the "Failing chains count" deliverable of a full sweep. The two
449 // increments cannot double-count within one event: the
450 // per-combination one requires passR2, this one requires !anyPassR2.
451 std::lock_guard<std::mutex> lock(m_failingChainsMutex);
452 m_failingChains[chain] += 1;
453 }
454 }
455
456 if (!isR2R3different && nCombinationsTested > 0) {
457 ATH_MSG_INFO("Chain " << chain << ": R2/R3 agreement verified (" << nCombinationsTested
458 << (useLinearisedR2 ? " objects)" : " combinations)"));
459 }
460
461 // Dump TrigMatch container content at DEBUG level (composites already retrieved above)
462 if (msgLvl(MSG::DEBUG)) {
463 ATH_MSG_DEBUG("################################### TrigMatch container for " << chain << " (" << composites->size() << " combinations)");
464 int comboIdx = 0;
465 for (const xAOD::TrigComposite* combination : *composites) {
466 //coverity[UNNECESSARY_STRING_COPY:FALSE]
467 static const SG::ConstAccessor<std::vector<ElementLink<xAOD::IParticleContainer>>> accMatched("TrigMatchedObjects");
468 const std::vector<ElementLink<xAOD::IParticleContainer>> featuresInCombination = accMatched(*combination);
469 ATH_MSG_DEBUG(" Combo[" << comboIdx++ << "] (size=" << featuresInCombination.size() << "):");
470 for (const ElementLink<xAOD::IParticleContainer>& f : featuresInCombination) {
471 if (f.isValid()) {
472 const xAOD::IParticle* iParticleR2 = resolveOriginal(*f);
473 ATH_MSG_DEBUG(" pt=" << iParticleR2->pt() << " eta=" << iParticleR2->eta() << " phi=" << iParticleR2->phi()
474 << " [" << f.dataID() << ":" << f.index() << "]");
475 } else {
476 ATH_MSG_WARNING(" INVALID LINK in TrigMatch container for " << chain);
477 }
478 }
479 }
480 }
481
482 // Optional: print primary features and subfeatures per leg for inspection
483 // (subfeatures are lower-pT objects from the Run2->Run3 conversion).
484 if (m_printSubfeatures && msgLvl(MSG::DEBUG)) {
485 const std::size_t nLegs = numberOfLegs(chain);
486 if (nLegs == 0) {
487 ATH_MSG_ERROR("Could not determine number of legs for chain " << chain);
488 return StatusCode::FAILURE;
489 }
490 ATH_MSG_DEBUG("Subfeature inspection for " << chain);
491 dumpFeaturesPerLeg(chain, nLegs, MSG::DEBUG); // primary features
492 dumpFeaturesPerLeg(chain, nLegs, MSG::DEBUG, "subfeature"); // subfeatures
493 }
494
495 // Diagnostics dump on a failing chain
496 if (isR2R3different) {
497 const std::size_t nLegs = numberOfLegs(chain);
498 if (nLegs == 0) {
499 ATH_MSG_ERROR("Could not determine number of legs for chain " << chain);
500 return StatusCode::FAILURE;
501 }
502
503 // Dump R2 pre-matched objects
504 ATH_MSG_ERROR("R2 pre-matched objects for " << chain << ":");
505 for (const xAOD::TrigComposite* combination : *composites) {
506 static const SG::ConstAccessor<std::vector<ElementLink<xAOD::IParticleContainer>>> accMatched("TrigMatchedObjects");
507 const std::vector<ElementLink<xAOD::IParticleContainer>> featuresInCombination = accMatched(*combination);
508 for (const ElementLink<xAOD::IParticleContainer>& f : featuresInCombination) {
509 if (!f.isValid()) continue;
510 const xAOD::IParticle* iParticleR2 = resolveOriginal(*f);
511 ATH_MSG_ERROR(" R2 object: pT=" << iParticleR2->pt() << " eta=" << iParticleR2->eta() << " phi=" << iParticleR2->phi());
512 }
513 }
514
515 // Dump R3 features and subfeatures per leg
516 ATH_MSG_ERROR("R3 features per leg for " << chain << ":");
517 dumpFeaturesPerLeg(chain, nLegs, MSG::ERROR);
518 dumpFeaturesPerLeg(chain, nLegs, MSG::ERROR, "subfeature");
519 }
520 }
521
522 return StatusCode::SUCCESS;
523}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(x,...)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
size_t size() const
Number of registered mappings.
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
void add(const UniqueCombinationGenerator &gen)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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).
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.
Gaudi::Property< std::vector< std::string > > m_chains
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< std::vector< std::string > > m_linearisedR2Chains
static const xAOD::IParticle * resolveOriginal(const xAOD::IParticle *p)
Resolve a possible shallow copy to its original object via the "originalObjectLink" decoration (mirro...
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.
PublicToolHandle< Trig::R3MatchingTool > m_matchingTool
Gaudi::Property< std::string > m_inputPrefix
Gaudi::Property< std::vector< std::string > > m_chainsToExclude
virtual double eta() const =0
The pseudorapidity ( ) of the particle.
virtual double pt() const =0
The transverse momentum ( ) of the particle.
virtual double phi() const =0
The azimuthal angle ( ) of the particle.
std::vector< int > multiplicities(const std::string &chain)
std::vector< std::string > signatures(const std::string &chain)
mapped_type at(key_type key) const
Look up an element in the map.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570
pointer & link(pointer p) const
Return a reference to the link for an element.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode Trig::NavigationDAODTesterAlgv2::finalize ( )
overridevirtual

Definition at line 525 of file NavigationDAODTesterAlgv2.cxx.

525 {
526 ATH_MSG_INFO("Failing chains count: " << m_failingChains.size());
527
528 std::vector<std::pair<std::string, int>> sortedChains(m_failingChains.begin(), m_failingChains.end());
529 std::sort(sortedChains.begin(), sortedChains.end(), [](const auto& a, const auto& b) {
530 return a.second > b.second;
531 });
532
533 for (const auto& chain : sortedChains) {
534 ATH_MSG_INFO("Failing chain: " << chain.first << " count: " << chain.second);
535 }
536
537 // Chains with events that cannot be verified: the chain passed and the
538 // converted navigation matched, but the R2 TrigMatch reference container
539 // was empty (a derivation-side property, independent of the conversion).
540 ATH_MSG_INFO("Chains with unverifiable events (empty R2 reference): " << m_emptyR2Chains.size());
541 std::vector<std::pair<std::string, int>> sortedEmpty(m_emptyR2Chains.begin(), m_emptyR2Chains.end());
542 std::sort(sortedEmpty.begin(), sortedEmpty.end(), [](const auto& a, const auto& b) {
543 return a.second > b.second;
544 });
545 for (const auto& chain : sortedEmpty) {
546 ATH_MSG_INFO("Unverifiable (empty R2) chain: " << chain.first << " count: " << chain.second);
547 }
548
549 // Chains tested in events where they passed only in rerun (prescaled or
550 // disabled chains). Informational; these events are compared with the R3
551 // matching in rerun mode when R3MatchingRerun is true.
552 ATH_MSG_INFO("Chains with rerun-only events (R3MatchingRerun=" << (m_r3MatchingRerun ? "true" : "false")
553 << "): " << m_rerunOnlyChains.size());
554 std::vector<std::pair<std::string, int>> sortedRerun(m_rerunOnlyChains.begin(), m_rerunOnlyChains.end());
555 std::sort(sortedRerun.begin(), sortedRerun.end(), [](const auto& a, const auto& b) {
556 return a.second > b.second;
557 });
558 for (const auto& chain : sortedRerun) {
559 ATH_MSG_INFO("Rerun-only chain: " << chain.first << " events: " << chain.second);
560 }
561
562 return StatusCode::SUCCESS;
563}
static Double_t a
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ initialize()

StatusCode Trig::NavigationDAODTesterAlgv2::initialize ( )
overridevirtual

Definition at line 24 of file NavigationDAODTesterAlgv2.cxx.

24 {
25 ATH_CHECK(m_tdt.retrieve());
26 ATH_CHECK(m_matchingTool.retrieve());
28
29 if (m_chains.empty()) {
30 ATH_MSG_WARNING("No chains provided, algorithm will be no-op");
31 }
32
33 return StatusCode::SUCCESS;
34}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ matchesAnyPattern()

bool Trig::NavigationDAODTesterAlgv2::matchesAnyPattern ( const std::string & chain,
const std::vector< std::string > & patterns )
staticprivate

True if the chain name contains any of the patterns (substring match).

Definition at line 44 of file NavigationDAODTesterAlgv2.cxx.

45 {
46 for (const std::string& pattern : patterns) {
47 if (chain.find(pattern) != std::string::npos) return true;
48 }
49 return false;
50}
std::vector< std::string > patterns
Definition listroot.cxx:187

◆ matchLinearisedR2()

bool Trig::NavigationDAODTesterAlgv2::matchLinearisedR2 ( std::vector< const xAOD::IParticle * > pool,
const std::vector< const xAOD::IParticle * > & particles )
staticprivate

R2 verdict for chains with linearised TrigMatch layout (e.g.

nomucomb): true if every given particle consumes a distinct object from the pool of individually matched offline objects (the pool is taken by value and consumed during the test). Used with a single particle in the per-object comparison path.

Definition at line 61 of file NavigationDAODTesterAlgv2.cxx.

63 {
64 // Consume-once semantics, mirroring MatchFromCompositeTool::testCombination:
65 // each given particle must find its own entry in the pool of individually
66 // matched objects. For the single-particle calls of the per-object
67 // comparison path this reduces to a plain membership test.
68 for (const xAOD::IParticle* p : particles) {
69 auto itr = std::find(pool.begin(), pool.end(), resolveOriginal(p));
70 if (itr == pool.end()) return false;
71 pool.erase(itr);
72 }
73 return true;
74}

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ numberOfLegs()

std::size_t Trig::NavigationDAODTesterAlgv2::numberOfLegs ( const std::string & chain) const
private

Number of legs of a chain, derived from ChainNameParser::multiplicities().

Returns 0 if the multiplicities could not be determined (caller should treat this as an error).

Definition at line 36 of file NavigationDAODTesterAlgv2.cxx.

36 {
37 // The number of legs is the number of distinct signature blocks in the
38 // chain name, i.e. the size of the multiplicities vector. Note this is NOT
39 // the sum of the multiplicities (that would be the total number of physics
40 // objects required by the chain over all legs).
41 return ChainNameParser::multiplicities(chain).size();
42}

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ resolveOriginal()

const xAOD::IParticle * Trig::NavigationDAODTesterAlgv2::resolveOriginal ( const xAOD::IParticle * p)
staticprivate

Resolve a possible shallow copy to its original object via the "originalObjectLink" decoration (mirrors the MatchShallow behaviour of MatchFromCompositeTool::areTheSame, plus a defensive validity check on the link).

Definition at line 52 of file NavigationDAODTesterAlgv2.cxx.

52 {
54 accOOL("originalObjectLink");
55 if (accOOL.isAvailable(*p) && accOOL(*p).isValid()) {
56 return *accOOL(*p);
57 }
58 return p;
59}

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ updateVHKA()

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

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/3]

std::map<std::string, int> m_rerunOnlyChains Trig::NavigationDAODTesterAlgv2::ATLAS_THREAD_SAFE
mutableprivate

Events with a TrigMatch reference in which the chain passed only in rerun (resurrected decision, not after prescale).

Informational: shows how much of the comparison relies on rerun decisions.

Definition at line 142 of file NavigationDAODTesterAlgv2.h.

◆ ATLAS_THREAD_SAFE [2/3]

std::map<std::string, int> m_emptyR2Chains Trig::NavigationDAODTesterAlgv2::ATLAS_THREAD_SAFE
mutableprivate

Events where the chain passed and R3 matched, but the R2 TrigMatch reference container is EMPTY.

TrigMatch production is independent of the navigation conversion, so such events cannot indicate a conversion defect - there is nothing to compare against. Counted separately.

Definition at line 138 of file NavigationDAODTesterAlgv2.h.

◆ ATLAS_THREAD_SAFE [3/3]

std::map<std::string, int> m_failingChains Trig::NavigationDAODTesterAlgv2::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 133 of file NavigationDAODTesterAlgv2.h.

◆ m_chains

Gaudi::Property<std::vector<std::string> > Trig::NavigationDAODTesterAlgv2::m_chains
private
Initial value:
{
this, "Chains", {}, "The trigger chains to test"}

Definition at line 59 of file NavigationDAODTesterAlgv2.h.

59 {
60 this, "Chains", {}, "The trigger chains to test"};

◆ m_chainsToExclude

Gaudi::Property<std::vector<std::string> > Trig::NavigationDAODTesterAlgv2::m_chainsToExclude
private
Initial value:
{
this, "ChainsToExclude", {},
"Chain name patterns to skip (substring match), e.g. 'noL1'. "
"DAOD-tester-local exception list for pathological chain families whose "
"TrigMatch layout does not support the generic R2/R3 comparison. "
"Note: nomucomb chains no longer need excluding - they are handled by "
"the dedicated linearised path (see ChainsWithLinearisedR2Matching)."}

Definition at line 62 of file NavigationDAODTesterAlgv2.h.

62 {
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)."};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_drFromRun2Lists

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_drFromRun2Lists
private
Initial value:
{
this, "DRThresholdFromRun2Lists", true,
"Choose the R3 matching dR as the Run 2 TrigMatch production did, per "
"trigger list (DerivationFrameworkPhys/PhysCommonConfig.py): 0.2 only "
"for chains of the Tau list, i.e. chains with a tau leg and no e/mu/g "
"leg (tau, di-tau, tau+xe), 0.1 for every chain of the NoTau list, "
"which includes the e+tau and mu+tau chains. Exact for the TriggerAPI "
"lists and the run2ExtraMatching*.txt files; chains added through "
"flags.Trigger.derivationsExtraChains are routed by the substring 'tau' "
"in their name instead. With false: 0.2 for any chain with a tau leg, "
"0.1 otherwise (the previous rule, which lets the R3 matching accept "
"lepton+tau objects the Run 2 reference never considered)."}

Definition at line 111 of file NavigationDAODTesterAlgv2.h.

111 {
112 this, "DRThresholdFromRun2Lists", true,
113 "Choose the R3 matching dR as the Run 2 TrigMatch production did, per "
114 "trigger list (DerivationFrameworkPhys/PhysCommonConfig.py): 0.2 only "
115 "for chains of the Tau list, i.e. chains with a tau leg and no e/mu/g "
116 "leg (tau, di-tau, tau+xe), 0.1 for every chain of the NoTau list, "
117 "which includes the e+tau and mu+tau chains. Exact for the TriggerAPI "
118 "lists and the run2ExtraMatching*.txt files; chains added through "
119 "flags.Trigger.derivationsExtraChains are routed by the substring 'tau' "
120 "in their name instead. With false: 0.2 for any chain with a tau leg, "
121 "0.1 otherwise (the previous rule, which lets the R3 matching accept "
122 "lepton+tau objects the Run 2 reference never considered)."};

◆ m_dumpFeaturesWithoutR2

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_dumpFeaturesWithoutR2
private
Initial value:
{
this, "DumpFeaturesWithoutR2", false,
"Diagnostic: when the TrigMatch_<chain> container is absent (e.g. when "
"running directly on the conversion output at AOD level, where no R2 "
"matching reference exists), still print the per-leg R3 features of "
"passed chains. The cross-leg feature pooling converter defect shows "
"up directly in this dump (identical pooled lists on every leg)."}

Definition at line 124 of file NavigationDAODTesterAlgv2.h.

124 {
125 this, "DumpFeaturesWithoutR2", false,
126 "Diagnostic: when the TrigMatch_<chain> container is absent (e.g. when "
127 "running directly on the conversion output at AOD level, where no R2 "
128 "matching reference exists), still print the per-leg R3 features of "
129 "passed chains. The cross-leg feature pooling converter defect shows "
130 "up directly in this dump (identical pooled lists on every leg)."};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_failingChainsMutex

std::mutex Trig::NavigationDAODTesterAlgv2::m_failingChainsMutex
mutableprivate

Definition at line 143 of file NavigationDAODTesterAlgv2.h.

◆ m_failOnDifference

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_failOnDifference
private
Initial value:
{
this, "FailOnDifference", false,
"Return FAILURE if the navigation does not compare equal"}

Definition at line 81 of file NavigationDAODTesterAlgv2.h.

81 {
82 this, "FailOnDifference", false,
83 "Return FAILURE if the navigation does not compare equal"};

◆ m_inputPrefix

Gaudi::Property<std::string> Trig::NavigationDAODTesterAlgv2::m_inputPrefix
private
Initial value:
{
this, "InputPrefix", "TrigMatch_",
"Prefix used for pre-matched trigger combinations branches"}

Definition at line 93 of file NavigationDAODTesterAlgv2.h.

93 {
94 this, "InputPrefix", "TrigMatch_",
95 "Prefix used for pre-matched trigger combinations branches"};

◆ m_linearisedR2Chains

Gaudi::Property<std::vector<std::string> > Trig::NavigationDAODTesterAlgv2::m_linearisedR2Chains
private
Initial value:
{
this, "ChainsWithLinearisedR2Matching", {"nomucomb"},
"Chain name patterns (substring match) whose TrigMatch container uses "
"the linearised layout: N entries of vector size 1, one per "
"individually matched offline object, instead of one entry of size "
"= sum of leg multiplicities per matched combination. These chains "
"are compared PER OBJECT (pool of individually matched objects vs "
"single-object R3 matching) instead of per combination, since the "
"reference carries no combination structure."}

Definition at line 70 of file NavigationDAODTesterAlgv2.h.

70 {
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."};

◆ m_matchFromCompositeTool

PublicToolHandle<Trig::MatchFromCompositeTool> Trig::NavigationDAODTesterAlgv2::m_matchFromCompositeTool
private
Initial value:
{
this, "MatchFromCompositeTool", "Trig::MatchFromCompositeTool", "R2 matching from pre-stored TrigComposite containers"}

Definition at line 55 of file NavigationDAODTesterAlgv2.h.

55 {
56 this, "MatchFromCompositeTool", "Trig::MatchFromCompositeTool", "R2 matching from pre-stored TrigComposite containers"};

◆ m_matchingTool

PublicToolHandle<Trig::R3MatchingTool> Trig::NavigationDAODTesterAlgv2::m_matchingTool
private
Initial value:
{
this, "R3MatchingTool", "Trig::R3MatchingTool", "R3 matching tool for converted navigation"}

Definition at line 52 of file NavigationDAODTesterAlgv2.h.

52 {
53 this, "R3MatchingTool", "Trig::R3MatchingTool", "R3 matching tool for converted navigation"};

◆ m_printSubfeatures

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_printSubfeatures
private
Initial value:
{
this, "PrintSubfeatures", false,
"When true, print subfeatures (lower-pT objects from Run2->Run3 conversion) for each passing chain"}

Definition at line 97 of file NavigationDAODTesterAlgv2.h.

97 {
98 this, "PrintSubfeatures", false,
99 "When true, print subfeatures (lower-pT objects from Run2->Run3 conversion) for each passing chain"};

◆ m_r3MatchingRerun

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_r3MatchingRerun
private
Initial value:
{
this, "R3MatchingRerun", true,
"Pass rerun=true to the R3 matching, i.e. also accept chains whose "
"decision is only resurrected (prescaled or disabled chains evaluated "
"in rerun). This must match how the R2 reference was produced: the "
"DerivationFramework TriggerMatchingTool writes the TrigMatch_<chain> "
"containers with Rerun=true. With false, every rerun-only event of a "
"prescaled chain shows up as 'R2 passes, R3 fails' although the "
"converted navigation holds the matching objects."}

Definition at line 101 of file NavigationDAODTesterAlgv2.h.

101 {
102 this, "R3MatchingRerun", true,
103 "Pass rerun=true to the R3 matching, i.e. also accept chains whose "
104 "decision is only resurrected (prescaled or disabled chains evaluated "
105 "in rerun). This must match how the R2 reference was produced: the "
106 "DerivationFramework TriggerMatchingTool writes the TrigMatch_<chain> "
107 "containers with Rerun=true. With false, every rerun-only event of a "
108 "prescaled chain shows up as 'R2 passes, R3 fails' although the "
109 "converted navigation holds the matching objects."};

◆ m_tdt

PublicToolHandle<Trig::TrigDecisionTool> Trig::NavigationDAODTesterAlgv2::m_tdt
private
Initial value:
{
this, "TrigDecisionTool", "", "Read R3 navigation data from TDT"}

Definition at line 49 of file NavigationDAODTesterAlgv2.h.

49 {
50 this, "TrigDecisionTool", "", "Read R3 navigation data from TDT"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_verifyCombinations

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_verifyCombinations
private
Initial value:
{
this, "VerifyCombinationsContent", true,
"Check if combinations are compatible (point to same objects)"}

Definition at line 89 of file NavigationDAODTesterAlgv2.h.

89 {
90 this, "VerifyCombinationsContent", true,
91 "Check if combinations are compatible (point to same objects)"};

◆ m_verifyCombinationsSize

Gaudi::Property<bool> Trig::NavigationDAODTesterAlgv2::m_verifyCombinationsSize
private
Initial value:
{
this, "VerifyCombinationsSize", true,
"Check if combinations have matching size (that is Run2 >= Run3)"}

Definition at line 85 of file NavigationDAODTesterAlgv2.h.

85 {
86 this, "VerifyCombinationsSize", true,
87 "Check if combinations have matching size (that is Run2 >= Run3)"};

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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