ATLAS Offline Software
Loading...
Searching...
No Matches
L0Muon::TgcL0TruthValidationAlg Class Referencefinal

Calculates event-local TGC validation quantities. More...

#include <TgcL0TruthValidationAlg.h>

Inheritance diagram for L0Muon::TgcL0TruthValidationAlg:
Collaboration diagram for L0Muon::TgcL0TruthValidationAlg:

Public Member Functions

StatusCode initialize () override
StatusCode execute (const EventContext &ctx) const 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< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< TgcL0CandidateContainerm_candidateKey
SG::ReadHandleKey< TgcL0SegmentContainerm_segmentKey
SG::ReadHandleKey< McEventCollectionm_truthEventKey
SG::ReadHandleKey< xAOD::TGCCandDataContainerm_finalCandidateKey
SG::ReadHandleKey< xAOD::SectorLogicCandDataContainerm_sectorLogicKey
SG::WriteHandleKey< TgcL0ValidationEventm_outputKey
ToolHandle< Trk::IExtrapolatorm_extrapolator
Gaudi::Property< float > m_maxMeanDeltaR
Gaudi::Property< bool > m_validateFinalCandidates
Gaudi::Property< float > m_maxFinalCandidateDeltaR
Gaudi::Property< bool > m_validateSectorLogic
Gaudi::Property< float > m_maxWireSegmentDeltaEta
Gaudi::Property< float > m_maxStripSegmentDeltaPhi
Gaudi::Property< double > m_minPt
Gaudi::Property< double > m_minAbsEta
Gaudi::Property< double > m_maxAbsEta
Gaudi::Property< int > m_requiredTruthStatus
Gaudi::Property< int > m_maxAbsBarcode
Gaudi::Property< std::uint16_t > m_requiredBcTagMask
Gaudi::Property< std::vector< double > > m_stationAbsZ
Gaudi::Property< double > m_validationMinR
Gaudi::Property< double > m_validationMaxR
Gaudi::Property< double > m_validationPlaneToleranceZ
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

Calculates event-local TGC validation quantities.

The algorithm has no ROOT or histogram dependency. Its transient output can be consumed by replaceable validation-output backends. The optional Sector Logic check validates the downstream conversion without affecting normal truth-validation users.

Definition at line 30 of file TgcL0TruthValidationAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

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.

◆ 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 L0Muon::TgcL0TruthValidationAlg::execute ( const EventContext & ctx) const
override

Definition at line 208 of file TgcL0TruthValidationAlg.cxx.

208 {
209 SG::ReadHandle<TgcL0CandidateContainer> candidates{m_candidateKey, ctx};
210 if (!candidates.isValid()) {
211 ATH_MSG_ERROR("Failed to retrieve " << m_candidateKey.fullKey());
212 return StatusCode::FAILURE;
213 }
214 SG::ReadHandle<TgcL0SegmentContainer> segments{m_segmentKey, ctx};
215 if (!segments.isValid()) {
216 ATH_MSG_ERROR("Failed to retrieve " << m_segmentKey.fullKey());
217 return StatusCode::FAILURE;
218 }
219 SG::ReadHandle<McEventCollection> truthEvents{m_truthEventKey, ctx};
220 if (!truthEvents.isValid()) {
221 ATH_MSG_ERROR("Failed to retrieve " << m_truthEventKey.fullKey());
222 return StatusCode::FAILURE;
223 }
224 auto output = std::make_unique<TgcL0ValidationEvent>();
225 output->event.runNumber = ctx.eventID().run_number();
226 output->event.eventNumber = ctx.eventID().event_number();
227 output->event.lumiBlock = ctx.eventID().lumi_block();
228 output->event.bcid = ctx.eventID().bunch_crossing_id();
229
230 const bool readFinalCandidates = m_validateFinalCandidates.value() ||
231 m_validateSectorLogic.value();
232 const xAOD::TGCCandDataContainer* finalCandidateContainer{nullptr};
233 if (readFinalCandidates) {
234 SG::ReadHandle<xAOD::TGCCandDataContainer> finalCandidates{
236 if (!finalCandidates.isValid()) {
237 ATH_MSG_ERROR("Failed to retrieve " << m_finalCandidateKey.fullKey());
238 return StatusCode::FAILURE;
239 }
240 finalCandidateContainer = finalCandidates.cptr();
241 for (std::size_t inputIndex = 0U;
242 inputIndex < finalCandidateContainer->size(); ++inputIndex) {
243 const xAOD::TGCCandData* inputCandidate =
244 (*finalCandidateContainer)[inputIndex];
245 if (inputCandidate == nullptr) {
246 ATH_MSG_ERROR("Null final TGC candidate at index " << inputIndex);
247 return StatusCode::FAILURE;
248 }
249
250 const float eta = decodeEta(*inputCandidate);
251 const float phi = decodePhi(*inputCandidate);
252 int sourceIndex{-1};
253 int station{-1};
254 if (inputCandidate->tcId() != 0U) {
255 sourceIndex =
256 sourceCandidateIndex(*inputCandidate, *candidates, eta, phi);
257 if (sourceIndex < 0) {
258 ATH_MSG_ERROR("Final TGC candidate " << inputIndex
259 << (sourceIndex == -2 ? " has ambiguous"
260 : " has no")
261 << " pre-Inner source candidate");
262 return StatusCode::FAILURE;
263 }
264 station = pivotStation(
265 (*candidates)[static_cast<std::size_t>(sourceIndex)]
266 .positionStationMask);
267 if (station < 0) {
268 ATH_MSG_ERROR("Final TGC candidate " << inputIndex
269 << " has no valid reference station");
270 return StatusCode::FAILURE;
271 }
272 }
273
274 output->finalCandidates.sourceCandidateIndex.emplace_back(sourceIndex);
275 output->finalCandidates.referenceStation.emplace_back(
276 station < 0
277 ? static_cast<std::uint8_t>(TgcL0ValidationStation::Invalid)
278 : static_cast<std::uint8_t>(station));
279 output->finalCandidates.subdetectorId.emplace_back(
280 inputCandidate->subdetectorId());
281 output->finalCandidates.triggerSector.emplace_back(
282 inputCandidate->sectorId());
283 output->finalCandidates.bcTag.emplace_back(inputCandidate->bcTag());
284 output->finalCandidates.tcId.emplace_back(inputCandidate->tcId());
285 output->finalCandidates.rawEta.emplace_back(inputCandidate->eta());
286 output->finalCandidates.rawPhi.emplace_back(inputCandidate->phi());
287 output->finalCandidates.eta.emplace_back(eta);
288 output->finalCandidates.phi.emplace_back(phi);
289 output->finalCandidates.ptCode.emplace_back(inputCandidate->pt());
290 output->finalCandidates.pt.emplace_back(inputCandidate->ptValueGeV());
291 output->finalCandidates.threshold.emplace_back(
292 inputCandidate->threshold());
293 output->finalCandidates.charge.emplace_back(
294 inputCandidate->candCharge() != 0U ? 1 : -1);
295 output->finalCandidates.innerCoincidence.emplace_back(
296 inputCandidate->hasInnerCoincidence() ? 1U : 0U);
297 output->finalCandidates.goodMagneticField.emplace_back(
298 inputCandidate->goodMagneticField() ? 1U : 0U);
299 output->finalCandidates.truthIndex.emplace_back(-1);
300 output->finalCandidates.truthMatchDeltaR.emplace_back(
302 }
303 }
304
306 SG::ReadHandle<xAOD::SectorLogicCandDataContainer> sectorLogicCandidates{
307 m_sectorLogicKey, ctx};
308 if (!sectorLogicCandidates.isValid()) {
309 ATH_MSG_ERROR("Failed to retrieve " << m_sectorLogicKey.fullKey());
310 return StatusCode::FAILURE;
311 }
312 if (!finalCandidateContainer)[[unlikely]]{
313 ATH_MSG_ERROR("finalCandidateContainer is null.");
314 return StatusCode::FAILURE;
315 }
316 std::size_t sectorLogicIndex{0U};
317 for (std::size_t inputIndex = 0U;
318 inputIndex < finalCandidateContainer->size();
319 ++inputIndex) {
320 const xAOD::TGCCandData* inputCandidate =
321 (*finalCandidateContainer)[inputIndex];
322 if (inputCandidate->tcId() == 0U) continue;
323 if (sectorLogicIndex >= sectorLogicCandidates->size()) {
325 "Fewer Sector Logic candidates than non-empty TGC candidates");
326 return StatusCode::FAILURE;
327 }
328 const xAOD::SectorLogicCandData* sectorLogicCandidate =
329 (*sectorLogicCandidates)[sectorLogicIndex];
330 if (sectorLogicCandidate == nullptr) {
331 ATH_MSG_ERROR("Null Sector Logic candidate at index "
332 << sectorLogicIndex);
333 return StatusCode::FAILURE;
334 }
335 if (!matchesTgcFields(*inputCandidate, *sectorLogicCandidate)) {
336 ATH_MSG_ERROR("Sector Logic candidate " << sectorLogicIndex
337 << " does not preserve TGC candidate " << inputIndex);
338 return StatusCode::FAILURE;
339 }
340 if (!hasOnlyTgcFields(*sectorLogicCandidate)) {
341 ATH_MSG_ERROR("Sector Logic candidate " << sectorLogicIndex
342 << " contains non-TGC payload");
343 return StatusCode::FAILURE;
344 }
345 if (sectorLogicCandidate->boardID() != 0U ||
346 sectorLogicCandidate->fiberID() != 0U ||
347 sectorLogicCandidate->BCIDOffset() != 0 ||
348 sectorLogicCandidate->veto() != 0U) {
349 ATH_MSG_ERROR("Sector Logic candidate " << sectorLogicIndex
350 << " has unexpected placeholder metadata");
351 return StatusCode::FAILURE;
352 }
353 output->sectorLogic.inputCandidateIndex.emplace_back(
354 static_cast<std::uint32_t>(inputIndex));
355 output->sectorLogic.candWord.emplace_back(
356 sectorLogicCandidate->candWord());
357 output->sectorLogic.candExtraWord.emplace_back(
358 sectorLogicCandidate->candExtraWord());
359 output->sectorLogic.boardId.emplace_back(sectorLogicCandidate->boardID());
360 output->sectorLogic.fiberId.emplace_back(sectorLogicCandidate->fiberID());
361 output->sectorLogic.bcidOffset.emplace_back(
362 sectorLogicCandidate->BCIDOffset());
363 output->sectorLogic.veto.emplace_back(sectorLogicCandidate->veto());
364 ++sectorLogicIndex;
365 }
366 if (sectorLogicIndex != sectorLogicCandidates->size()) {
368 "More Sector Logic candidates than non-empty TGC candidates");
369 return StatusCode::FAILURE;
370 }
371 }
372
373 const auto processParticle = [&](const auto& particle) -> StatusCode {
374 if (!particle || std::abs(particle->pdg_id()) != 13 ||
375 particle->status() != m_requiredTruthStatus.value() ||
376 std::abs(HepMC::barcode(particle)) > m_maxAbsBarcode.value()) {
377 return StatusCode::SUCCESS;
378 }
379
380 const auto& momentum = particle->momentum();
381 const double pt = momentum.perp();
382 const double eta = momentum.eta();
383 const double phi = momentum.phi();
384 if (pt < m_minPt.value() || std::abs(eta) < m_minAbsEta.value() ||
385 std::abs(eta) > m_maxAbsEta.value() || !std::isfinite(phi)) {
386 return StatusCode::SUCCESS;
387 }
388
389 const int pdgId = particle->pdg_id();
390 const double theta = 2.0 * std::atan(std::exp(-eta));
391 const double momentumMagnitude = pt * std::cosh(eta);
392 if (momentumMagnitude <= 0.0 || !std::isfinite(theta)) {
393 return StatusCode::SUCCESS;
394 }
395
396 const double charge = pdgId == 13 ? -1.0 : 1.0;
397 const Trk::PerigeeSurface perigeeSurface{Amg::Vector3D{0.0, 0.0, 0.0}};
398 const Trk::Perigee perigee{0.0, 0.0, phi, theta,
399 charge / momentumMagnitude, perigeeSurface};
400
401 StationPositions positions{};
402 std::uint8_t stationMask{0U};
403 const std::vector<double>& stationAbsZ = m_stationAbsZ.value();
404 for (std::size_t station = 0U; station < positions.size(); ++station) {
405 const double z = eta >= 0.0 ? stationAbsZ[station] : -stationAbsZ[station];
406 Amg::Transform3D transform = Amg::Transform3D::Identity();
407 transform.translation().z() = z;
408 const Trk::DiscSurface disc{transform, m_validationMinR.value(),
409 m_validationMaxR.value()};
410 const Trk::BoundaryCheck boundaryCheck{true};
411 const auto extrapolated = m_extrapolator->extrapolate(
412 ctx, perigee, disc, Trk::alongMomentum, boundaryCheck, Trk::muon);
413 if (!extrapolated) continue;
414 const Amg::Vector3D& position = extrapolated->position();
415 if (!std::isfinite(position.eta()) || !std::isfinite(position.phi()) ||
416 std::abs(position.z() - z) > m_validationPlaneToleranceZ.value()) {
417 continue;
418 }
419 positions[station] = StationPosition{
420 true, static_cast<float>(position.eta()),
421 static_cast<float>(xAOD::P4Helpers::deltaPhi(position.phi(), 0.))};
422 stationMask |= stationBit(station);
423 }
424
425 output->truth.pdgId.emplace_back(pdgId);
426 output->truth.barcode.emplace_back(HepMC::barcode(particle));
427 output->truth.pt.emplace_back(static_cast<float>(pt));
428 output->truth.eta.emplace_back(static_cast<float>(eta));
429 output->truth.phi.emplace_back(static_cast<float>(phi));
430 output->truth.charge.emplace_back(static_cast<float>(charge));
431 output->truth.extrapolatedStationMask.emplace_back(stationMask);
432 output->truth.m1Eta.emplace_back(positions[0].eta);
433 output->truth.m1Phi.emplace_back(positions[0].phi);
434 output->truth.m2Eta.emplace_back(positions[1].eta);
435 output->truth.m2Phi.emplace_back(positions[1].phi);
436 output->truth.m3Eta.emplace_back(positions[2].eta);
437 output->truth.m3Phi.emplace_back(positions[2].phi);
438 output->truth.matched.emplace_back(0U);
439 output->truth.matchedCandidateIndex.emplace_back(-1);
440 output->truth.matchMeanDeltaR.emplace_back(TgcL0ValidationInvalidValue);
441 output->truth.unmatchedReason.emplace_back(
442 stationMask == 0x7U
443 ? static_cast<std::uint8_t>(
445 : static_cast<std::uint8_t>(
447 output->truth.finalCandidateMatched.emplace_back(0U);
448 output->truth.matchedFinalCandidateIndex.emplace_back(-1);
449 output->truth.finalCandidateMatchDeltaR.emplace_back(
451 output->truth.finalCandidateUnmatchedReason.emplace_back(
452 stationMask == 0x7U
453 ? static_cast<std::uint8_t>(
455 : static_cast<std::uint8_t>(
457 output->truth.wireSegmentMatched.emplace_back(0U);
458 output->truth.stripSegmentMatched.emplace_back(0U);
459 output->truth.matchedWireSegmentIndex.emplace_back(-1);
460 output->truth.matchedStripSegmentIndex.emplace_back(-1);
461 output->truth.wireSegmentMatchResidual.emplace_back(
463 output->truth.stripSegmentMatchResidual.emplace_back(
465 return StatusCode::SUCCESS;
466 };
467
468 for (const HepMC::GenEvent* event : *truthEvents) {
469 if (event == nullptr) continue;
470#if __has_include("HepMC3/GenEvent.h")
471 for (const auto& particle : event->particles()) {
472 ATH_CHECK(processParticle(particle));
473 }
474#else
475 for (auto particle = event->particles_begin();
476 particle != event->particles_end(); ++particle) {
477 ATH_CHECK(processParticle(*particle));
478 }
479#endif
480 }
481
482 for (const TgcL0Candidate& candidate : *candidates) {
483 output->candidates.subdetectorId.emplace_back(candidate.subdetectorId);
484 output->candidates.triggerSector.emplace_back(candidate.sectorId);
485 output->candidates.readoutSector.emplace_back(candidate.readoutSector);
486 output->candidates.bcTag.emplace_back(candidate.bcTag);
487 output->candidates.stationMask.emplace_back(candidate.positionStationMask);
488 output->candidates.wireStationMask.emplace_back(candidate.wireStationMask);
489 output->candidates.stripStationMask.emplace_back(candidate.stripStationMask);
490 output->candidates.eta.emplace_back(candidate.eta);
491 output->candidates.phi.emplace_back(candidate.phi);
492 output->candidates.deltaTheta.emplace_back(candidate.deltaTheta);
493 output->candidates.deltaPhi.emplace_back(candidate.deltaPhi);
494 output->candidates.pt.emplace_back(candidate.preInnerCoincidencePt);
495 output->candidates.threshold.emplace_back(
496 candidate.preInnerCoincidenceThreshold);
497 output->candidates.charge.emplace_back(candidate.charge);
498 output->candidates.goodMagneticField.emplace_back(
499 candidate.goodMagneticField ? 1U : 0U);
500 output->candidates.truthIndex.emplace_back(-1);
501 }
502
503 std::vector<CandidateMatch> candidateMatches;
504 std::vector<bool> hasCandidateInWindow(output->truth.pt.size(), false);
505 for (std::size_t truth = 0U; truth < output->truth.pt.size(); ++truth) {
506 if (output->truth.extrapolatedStationMask[truth] != 0x7U) continue;
507 const StationPositions positions = truthPositions(*output, truth);
508 for (std::size_t candidate = 0U; candidate < candidates->size();
509 ++candidate) {
510 const TgcL0Candidate& inputCandidate = (*candidates)[candidate];
511 if (m_requiredBcTagMask.value() != 0U &&
512 (inputCandidate.bcTag & m_requiredBcTagMask.value()) == 0U) {
513 continue;
514 }
515 if (output->truth.eta[truth] * inputCandidate.eta < 0.F) continue;
516 const float residual = meanDeltaR(inputCandidate, positions);
517 if (!std::isfinite(residual) || residual > m_maxMeanDeltaR.value()) continue;
518 hasCandidateInWindow[truth] = true;
519 candidateMatches.push_back({residual, truth, candidate});
520 }
521 }
522 std::stable_sort(candidateMatches.begin(), candidateMatches.end(),
523 [](const CandidateMatch& lhs, const CandidateMatch& rhs) {
524 if (lhs.residual != rhs.residual) {
525 return lhs.residual < rhs.residual;
526 }
527 if (lhs.truth != rhs.truth) return lhs.truth < rhs.truth;
528 return lhs.candidate < rhs.candidate;
529 });
530 for (const CandidateMatch& match : candidateMatches) {
531 if (output->truth.matchedCandidateIndex[match.truth] >= 0 ||
532 output->candidates.truthIndex[match.candidate] >= 0) {
533 continue;
534 }
535 output->truth.matched[match.truth] = 1U;
536 output->truth.matchedCandidateIndex[match.truth] =
537 static_cast<int>(match.candidate);
538 output->truth.matchMeanDeltaR[match.truth] = match.residual;
539 output->truth.unmatchedReason[match.truth] =
541 output->candidates.truthIndex[match.candidate] =
542 static_cast<int>(match.truth);
543 }
544 for (std::size_t truth = 0U; truth < output->truth.pt.size(); ++truth) {
545 if (output->truth.matched[truth] != 0U ||
546 output->truth.extrapolatedStationMask[truth] != 0x7U) {
547 continue;
548 }
549 output->truth.unmatchedReason[truth] = static_cast<std::uint8_t>(
550 hasCandidateInWindow[truth]
553 }
554
556 std::vector<FinalCandidateMatch> finalCandidateMatches;
557 std::vector<bool> hasFinalCandidateInWindow(output->truth.pt.size(),
558 false);
559 for (std::size_t truth = 0U; truth < output->truth.pt.size(); ++truth) {
560 if (output->truth.extrapolatedStationMask[truth] != 0x7U) continue;
561 const StationPositions positions = truthPositions(*output, truth);
562 for (std::size_t candidate = 0U;
563 candidate < output->finalCandidates.tcId.size(); ++candidate) {
564 if (output->finalCandidates.tcId[candidate] == 0U) continue;
565 if (m_requiredBcTagMask.value() != 0U &&
566 (output->finalCandidates.bcTag[candidate] &
567 m_requiredBcTagMask.value()) == 0U) {
568 continue;
569 }
570 if (output->truth.eta[truth] *
571 output->finalCandidates.eta[candidate] <
572 0.F) {
573 continue;
574 }
575 const std::size_t station =
576 output->finalCandidates.referenceStation[candidate];
577 if (station >= positions.size() || !positions[station].valid) continue;
578 const float deltaEta = output->finalCandidates.eta[candidate] -
579 positions[station].eta;
580 const float deltaPhi = static_cast<float>(
581 xAOD::P4Helpers::deltaPhi(output->finalCandidates.phi[candidate],
582 positions[station].phi));
583 const float residual = std::hypot(deltaEta, deltaPhi);
584 if (residual > m_maxFinalCandidateDeltaR.value()) {
585 continue;
586 }
587 hasFinalCandidateInWindow[truth] = true;
588 finalCandidateMatches.push_back({residual, truth, candidate});
589 }
590 }
592 finalCandidateMatches.begin(), finalCandidateMatches.end(),
593 [](const FinalCandidateMatch& lhs, const FinalCandidateMatch& rhs) {
594 if (lhs.residual != rhs.residual) {
595 return lhs.residual < rhs.residual;
596 }
597 if (lhs.truth != rhs.truth) return lhs.truth < rhs.truth;
598 return lhs.candidate < rhs.candidate;
599 });
600 for (const FinalCandidateMatch& match : finalCandidateMatches) {
601 if (output->truth.matchedFinalCandidateIndex[match.truth] >= 0 ||
602 output->finalCandidates.truthIndex[match.candidate] >= 0) {
603 continue;
604 }
605 output->truth.finalCandidateMatched[match.truth] = 1U;
606 output->truth.matchedFinalCandidateIndex[match.truth] =
607 static_cast<int>(match.candidate);
608 output->truth.finalCandidateMatchDeltaR[match.truth] = match.residual;
609 output->truth.finalCandidateUnmatchedReason[match.truth] =
611 output->finalCandidates.truthIndex[match.candidate] =
612 static_cast<int>(match.truth);
613 output->finalCandidates.truthMatchDeltaR[match.candidate] =
614 match.residual;
615 }
616 for (std::size_t truth = 0U; truth < output->truth.pt.size(); ++truth) {
617 if (output->truth.finalCandidateMatched[truth] != 0U ||
618 output->truth.extrapolatedStationMask[truth] != 0x7U) {
619 continue;
620 }
621 output->truth.finalCandidateUnmatchedReason[truth] =
622 static_cast<std::uint8_t>(
623 hasFinalCandidateInWindow[truth]
626 }
627 }
628
629 for (const TgcL0Segment& segment : *segments) {
630 output->segments.subdetectorId.emplace_back(segment.subdetectorId);
631 output->segments.triggerSector.emplace_back(segment.triggerSector);
632 output->segments.bcTag.emplace_back(segment.bcTag);
633 output->segments.projection.emplace_back(
634 static_cast<std::uint8_t>(segment.projection));
635 output->segments.stationMask.emplace_back(segment.stationMask);
636 output->segments.summedQuality.emplace_back(segment.summedQuality);
637 output->segments.nStations.emplace_back(segment.nStations);
638 output->segments.eta.emplace_back(segment.eta);
639 output->segments.phi.emplace_back(segment.phi);
640 output->segments.residual.emplace_back(segment.residual);
641 output->segments.outputResidual.emplace_back(segment.outputResidual);
642 output->segments.consistency.emplace_back(segment.consistency);
643 output->segments.pivotChannel.emplace_back(segment.pivotChannel);
644 output->segments.truthIndex.emplace_back(-1);
645 output->segments.truthMatchResidual.emplace_back(
647 }
648
649 const auto matchProjection = [&](const TgcL0ValidationProjection projection,
650 const float maximumResidual) {
651 const auto projectionValue = static_cast<std::uint8_t>(projection);
652 std::vector<SegmentMatch> possibleMatches;
653 for (std::size_t truth = 0U; truth < output->truth.pt.size(); ++truth) {
654 for (std::size_t segment = 0U;
655 segment < output->segments.projection.size(); ++segment) {
656 if (output->segments.projection[segment] != projectionValue) continue;
657 if (m_requiredBcTagMask.value() != 0U &&
658 (output->segments.bcTag[segment] &
659 m_requiredBcTagMask.value()) == 0U) {
660 continue;
661 }
662 if (output->truth.eta[truth] * output->segments.eta[segment] < 0.F) {
663 continue;
664 }
665 const int station = pivotStation(output->segments.stationMask[segment]);
666 if (station < 0 ||
667 (output->truth.extrapolatedStationMask[truth] &
668 stationBit(static_cast<std::size_t>(station))) == 0U) {
669 continue;
670 }
671 const std::array<float, 3> truthEta{
672 output->truth.m1Eta[truth], output->truth.m2Eta[truth],
673 output->truth.m3Eta[truth]};
674 const std::array<float, 3> truthPhi{
675 output->truth.m1Phi[truth], output->truth.m2Phi[truth],
676 output->truth.m3Phi[truth]};
677 const float residual =
679 ? std::abs(output->segments.eta[segment] - truthEta[station])
680 : std::abs(static_cast<float>(xAOD::P4Helpers::deltaPhi(
681 output->segments.phi[segment], truthPhi[station])));
682 if (std::isfinite(residual) && residual <= maximumResidual) {
683 possibleMatches.push_back({residual, truth, segment});
684 }
685 }
686 }
687 std::stable_sort(possibleMatches.begin(), possibleMatches.end(),
688 [](const SegmentMatch& lhs, const SegmentMatch& rhs) {
689 if (lhs.residual != rhs.residual) {
690 return lhs.residual < rhs.residual;
691 }
692 if (lhs.truth != rhs.truth) return lhs.truth < rhs.truth;
693 return lhs.segment < rhs.segment;
694 });
695 for (const SegmentMatch& match : possibleMatches) {
696 int& truthSegment =
698 ? output->truth.matchedWireSegmentIndex[match.truth]
699 : output->truth.matchedStripSegmentIndex[match.truth];
700 if (truthSegment >= 0 ||
701 output->segments.truthIndex[match.segment] >= 0) {
702 continue;
703 }
704 truthSegment = static_cast<int>(match.segment);
705 output->segments.truthIndex[match.segment] =
706 static_cast<int>(match.truth);
707 output->segments.truthMatchResidual[match.segment] = match.residual;
708 if (projection == TgcL0ValidationProjection::Wire) {
709 output->truth.wireSegmentMatched[match.truth] = 1U;
710 output->truth.wireSegmentMatchResidual[match.truth] = match.residual;
711 } else {
712 output->truth.stripSegmentMatched[match.truth] = 1U;
713 output->truth.stripSegmentMatchResidual[match.truth] = match.residual;
714 }
715 }
716 };
717
718 matchProjection(TgcL0ValidationProjection::Wire,
720 matchProjection(TgcL0ValidationProjection::Strip,
722
723 const TgcL0ValidationCheckResult check = checkTgcL0ValidationEvent(*output);
724 if (!check.valid) {
725 ATH_MSG_ERROR("Refusing to record inconsistent validation data: "
726 << check.message);
727 return StatusCode::FAILURE;
728 }
729
730 SG::WriteHandle<TgcL0ValidationEvent> outputHandle{m_outputKey, ctx};
731 ATH_CHECK(outputHandle.record(std::move(output)));
732 return StatusCode::SUCCESS;
733}
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
double charge(const T &p)
Definition AtlasPID.h:1003
if(pathvar)
#define z
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< float > m_maxMeanDeltaR
Gaudi::Property< int > m_requiredTruthStatus
SG::WriteHandleKey< TgcL0ValidationEvent > m_outputKey
Gaudi::Property< std::uint16_t > m_requiredBcTagMask
Gaudi::Property< std::vector< double > > m_stationAbsZ
Gaudi::Property< double > m_validationMinR
SG::ReadHandleKey< TgcL0CandidateContainer > m_candidateKey
SG::ReadHandleKey< xAOD::TGCCandDataContainer > m_finalCandidateKey
Gaudi::Property< bool > m_validateSectorLogic
Gaudi::Property< double > m_validationMaxR
SG::ReadHandleKey< TgcL0SegmentContainer > m_segmentKey
Gaudi::Property< float > m_maxStripSegmentDeltaPhi
Gaudi::Property< double > m_minAbsEta
Gaudi::Property< bool > m_validateFinalCandidates
Gaudi::Property< double > m_maxAbsEta
Gaudi::Property< float > m_maxWireSegmentDeltaEta
Gaudi::Property< float > m_maxFinalCandidateDeltaR
Gaudi::Property< double > m_validationPlaneToleranceZ
ToolHandle< Trk::IExtrapolator > m_extrapolator
SG::ReadHandleKey< xAOD::SectorLogicCandDataContainer > m_sectorLogicKey
SG::ReadHandleKey< McEventCollection > m_truthEventKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
uint16_t sectorId() const
Retrieve the sector id.
uint16_t eta() const
Retrieve the eta.
uint8_t candCharge() const
Retrieve the candidate charge.
uint8_t threshold() const
Retrieve the threshold.
uint16_t bcTag() const
Retrieve the bunch crossing tag.
uint8_t pt() const
Retrieve the encoded candidate pT.
uint16_t phi() const
Retrieve the phi.
uint16_t subdetectorId() const
Retrieve the sub detector id.
uint16_t fiberID() const
Retrieve the fiber ID.
unsigned short veto() const
Retrieve the veto flag.
uint32_t candWord() const
Retrieve the candidate word (first 32-bits).
int BCIDOffset() const
Retrieve the bunch crossing identifier offset.
uint16_t boardID() const
Retrieve the board ID.
uint32_t candExtraWord() const
Retrieve the candidate extra word (second 32-bits).
bool goodMagneticField() const
Check whether the candidate is in a good magnetic-field region.
bool hasInnerCoincidence() const
Check whether the candidate passed Inner Coincidence.
float ptValueGeV() const
Retrieve the inherited encoded pT value in GeV.
uint8_t tcId() const
Retrieve the trigger-candidate identifier.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:359
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Eigen::Matrix< double, 3, 1 > Vector3D
int barcode(const T *p)
Definition Barcode.h:15
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39
TgcL0ValidationProjection
Projection encoding used in the validation segment block.
TgcL0ValidationCheckResult checkTgcL0ValidationEvent(const TgcL0ValidationEvent &event)
Check vector sizes and reciprocal cross-block indices.
static constexpr float TgcL0ValidationInvalidValue
Common sentinel for unavailable floating-point validation data.
static constexpr std::uint8_t TgcL0ValidationNoUnmatchedReason
Sentinel indicating that a matched truth object has no failure code.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition P4Helpers.h:66
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
@ alongMomentum
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
output
Definition merge.py:16
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
SectorLogicCandData_v1 SectorLogicCandData
#define unlikely(x)

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

◆ initialize()

StatusCode L0Muon::TgcL0TruthValidationAlg::initialize ( )
override

Definition at line 182 of file TgcL0TruthValidationAlg.cxx.

182 {
183 ATH_CHECK(m_candidateKey.initialize());
184 ATH_CHECK(m_segmentKey.initialize());
185 ATH_CHECK(m_truthEventKey.initialize());
189 ATH_CHECK(m_outputKey.initialize());
190 ATH_CHECK(m_extrapolator.retrieve());
191
192 if (m_stationAbsZ.value().size() != 3U) {
193 ATH_MSG_ERROR("StationAbsZ must contain exactly M1, M2, and M3 values");
194 return StatusCode::FAILURE;
195 }
196 if (m_validationMinR.value() < 0.0 || m_validationMaxR.value() <= m_validationMinR.value()) {
197 ATH_MSG_ERROR("Validation radii are invalid: min=" << m_validationMinR.value()
198 << ", max=" << m_validationMaxR.value());
199 return StatusCode::FAILURE;
200 }
201 if (m_validationPlaneToleranceZ.value() < 0.0) {
202 ATH_MSG_ERROR("ValidationPlaneToleranceZ must be non-negative");
203 return StatusCode::FAILURE;
204 }
205 return StatusCode::SUCCESS;
206}

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

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

◆ 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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

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

Set filter decision:

Reimplemented in AthFilterAlgorithm.

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, AthFilterAlgorithm, 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}
#define ATH_MSG_WARNING(x,...)
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 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_candidateKey

SG::ReadHandleKey<TgcL0CandidateContainer> L0Muon::TgcL0TruthValidationAlg::m_candidateKey
private
Initial value:
{
this, "CandidateKey", "L0MuonTGCValidationCandidates",
"Pre-Inner-Coincidence transient candidates"}

Definition at line 38 of file TgcL0TruthValidationAlg.h.

38 {
39 this, "CandidateKey", "L0MuonTGCValidationCandidates",
40 "Pre-Inner-Coincidence transient candidates"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 390 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_extrapolator

ToolHandle<Trk::IExtrapolator> L0Muon::TgcL0TruthValidationAlg::m_extrapolator
private
Initial value:
{
this, "TrackExtrapolator", "", "Truth-only extrapolator"}

Definition at line 55 of file TgcL0TruthValidationAlg.h.

55 {
56 this, "TrackExtrapolator", "", "Truth-only extrapolator"};

◆ m_finalCandidateKey

SG::ReadHandleKey<xAOD::TGCCandDataContainer> L0Muon::TgcL0TruthValidationAlg::m_finalCandidateKey
private
Initial value:
{
this, "FinalCandidateKey", "L0MuonTGCCandData",
"Final TGC candidates sent to L0MuonEndcap"}

Definition at line 46 of file TgcL0TruthValidationAlg.h.

46 {
47 this, "FinalCandidateKey", "L0MuonTGCCandData",
48 "Final TGC candidates sent to L0MuonEndcap"};

◆ m_maxAbsBarcode

Gaudi::Property<int> L0Muon::TgcL0TruthValidationAlg::m_maxAbsBarcode
private
Initial value:
{
this, "MaxAbsBarcode", 9999,
"Maximum absolute HepMC barcode for selected truth muons"}

Definition at line 85 of file TgcL0TruthValidationAlg.h.

85 {
86 this, "MaxAbsBarcode", 9999,
87 "Maximum absolute HepMC barcode for selected truth muons"};

◆ m_maxAbsEta

Gaudi::Property<double> L0Muon::TgcL0TruthValidationAlg::m_maxAbsEta
private
Initial value:
{
this, "MaxTruthAbsEta", 2.50, "Maximum absolute truth eta"}

Definition at line 80 of file TgcL0TruthValidationAlg.h.

80 {
81 this, "MaxTruthAbsEta", 2.50, "Maximum absolute truth eta"};

◆ m_maxFinalCandidateDeltaR

Gaudi::Property<float> L0Muon::TgcL0TruthValidationAlg::m_maxFinalCandidateDeltaR
private
Initial value:
{
this, "FinalCandidateTruthMatchMaxDeltaR", 0.08F,
"Maximum pivot-station deltaR for final-candidate truth matching"}

Definition at line 64 of file TgcL0TruthValidationAlg.h.

64 {
65 this, "FinalCandidateTruthMatchMaxDeltaR", 0.08F,
66 "Maximum pivot-station deltaR for final-candidate truth matching"};

◆ m_maxMeanDeltaR

Gaudi::Property<float> L0Muon::TgcL0TruthValidationAlg::m_maxMeanDeltaR
private
Initial value:
{
this, "TruthMatchMaxMeanDeltaR", 0.08F,
"Maximum station-averaged deltaR for truth matching"}

Definition at line 58 of file TgcL0TruthValidationAlg.h.

58 {
59 this, "TruthMatchMaxMeanDeltaR", 0.08F,
60 "Maximum station-averaged deltaR for truth matching"};

◆ m_maxStripSegmentDeltaPhi

Gaudi::Property<float> L0Muon::TgcL0TruthValidationAlg::m_maxStripSegmentDeltaPhi
private
Initial value:
{
this, "TruthStripSegmentMaxDeltaPhi", 0.08F,
"Maximum |delta phi| for truth-to-strip-segment matching"}

Definition at line 73 of file TgcL0TruthValidationAlg.h.

73 {
74 this, "TruthStripSegmentMaxDeltaPhi", 0.08F,
75 "Maximum |delta phi| for truth-to-strip-segment matching"};

◆ m_maxWireSegmentDeltaEta

Gaudi::Property<float> L0Muon::TgcL0TruthValidationAlg::m_maxWireSegmentDeltaEta
private
Initial value:
{
this, "TruthWireSegmentMaxDeltaEta", 0.08F,
"Maximum |delta eta| for truth-to-wire-segment matching"}

Definition at line 70 of file TgcL0TruthValidationAlg.h.

70 {
71 this, "TruthWireSegmentMaxDeltaEta", 0.08F,
72 "Maximum |delta eta| for truth-to-wire-segment matching"};

◆ m_minAbsEta

Gaudi::Property<double> L0Muon::TgcL0TruthValidationAlg::m_minAbsEta
private
Initial value:
{
this, "MinTruthAbsEta", 0.95, "Minimum absolute truth eta"}

Definition at line 78 of file TgcL0TruthValidationAlg.h.

78 {
79 this, "MinTruthAbsEta", 0.95, "Minimum absolute truth eta"};

◆ m_minPt

Gaudi::Property<double> L0Muon::TgcL0TruthValidationAlg::m_minPt
private
Initial value:
{
this, "MinTruthPt", 2000.0, "Minimum truth-muon pT in MeV"}

Definition at line 76 of file TgcL0TruthValidationAlg.h.

76 {
77 this, "MinTruthPt", 2000.0, "Minimum truth-muon pT in MeV"};

◆ m_outputKey

SG::WriteHandleKey<TgcL0ValidationEvent> L0Muon::TgcL0TruthValidationAlg::m_outputKey
private
Initial value:
{
this, "OutputKey", "L0MuonTGCValidationEvent",
"Calculated event-local truth-validation data"}

Definition at line 52 of file TgcL0TruthValidationAlg.h.

52 {
53 this, "OutputKey", "L0MuonTGCValidationEvent",
54 "Calculated event-local truth-validation data"};

◆ m_requiredBcTagMask

Gaudi::Property<std::uint16_t> L0Muon::TgcL0TruthValidationAlg::m_requiredBcTagMask
private
Initial value:
{
this, "RequiredBcTagMask", 0x2U,
"Required BC-tag bit mask for truth matching; zero disables the filter"}

Definition at line 88 of file TgcL0TruthValidationAlg.h.

88 {
89 this, "RequiredBcTagMask", 0x2U,
90 "Required BC-tag bit mask for truth matching; zero disables the filter"};

◆ m_requiredTruthStatus

Gaudi::Property<int> L0Muon::TgcL0TruthValidationAlg::m_requiredTruthStatus
private
Initial value:
{
this, "RequiredTruthStatus", 1,
"Generator status required for selected truth muons"}

Definition at line 82 of file TgcL0TruthValidationAlg.h.

82 {
83 this, "RequiredTruthStatus", 1,
84 "Generator status required for selected truth muons"};

◆ m_sectorLogicKey

SG::ReadHandleKey<xAOD::SectorLogicCandDataContainer> L0Muon::TgcL0TruthValidationAlg::m_sectorLogicKey
private
Initial value:
{
this, "SectorLogicKey", "L0MuonTGCSectorLogicCandData",
"TGC Sector Logic candidates sent towards MuCTPI"}

Definition at line 49 of file TgcL0TruthValidationAlg.h.

49 {
50 this, "SectorLogicKey", "L0MuonTGCSectorLogicCandData",
51 "TGC Sector Logic candidates sent towards MuCTPI"};

◆ m_segmentKey

SG::ReadHandleKey<TgcL0SegmentContainer> L0Muon::TgcL0TruthValidationAlg::m_segmentKey
private
Initial value:
{
this, "SegmentKey", "L0MuonTGCValidationSegments",
"Projection segments published by reconstruction"}

Definition at line 41 of file TgcL0TruthValidationAlg.h.

41 {
42 this, "SegmentKey", "L0MuonTGCValidationSegments",
43 "Projection segments published by reconstruction"};

◆ m_stationAbsZ

Gaudi::Property<std::vector<double> > L0Muon::TgcL0TruthValidationAlg::m_stationAbsZ
private
Initial value:
{
this, "StationAbsZ", {13436.5, 14728.2, 15148.2},
"Nominal absolute z positions of the M1, M2, and M3 validation planes"}

Definition at line 91 of file TgcL0TruthValidationAlg.h.

91 {
92 this, "StationAbsZ", {13436.5, 14728.2, 15148.2},
93 "Nominal absolute z positions of the M1, M2, and M3 validation planes"};

◆ m_truthEventKey

SG::ReadHandleKey<McEventCollection> L0Muon::TgcL0TruthValidationAlg::m_truthEventKey
private
Initial value:
{
this, "TruthEventKey", "TruthEvent", "Input truth-event collection"}

Definition at line 44 of file TgcL0TruthValidationAlg.h.

44 {
45 this, "TruthEventKey", "TruthEvent", "Input truth-event collection"};

◆ m_validateFinalCandidates

Gaudi::Property<bool> L0Muon::TgcL0TruthValidationAlg::m_validateFinalCandidates
private
Initial value:
{
this, "ValidateFinalCandidates", false,
"Validate and truth-match final post-selection TGC candidates"}

Definition at line 61 of file TgcL0TruthValidationAlg.h.

61 {
62 this, "ValidateFinalCandidates", false,
63 "Validate and truth-match final post-selection TGC candidates"};

◆ m_validateSectorLogic

Gaudi::Property<bool> L0Muon::TgcL0TruthValidationAlg::m_validateSectorLogic
private
Initial value:
{
this, "ValidateSectorLogic", false,
"Validate and publish the TGC Sector Logic conversion"}

Definition at line 67 of file TgcL0TruthValidationAlg.h.

67 {
68 this, "ValidateSectorLogic", false,
69 "Validate and publish the TGC Sector Logic conversion"};

◆ m_validationMaxR

Gaudi::Property<double> L0Muon::TgcL0TruthValidationAlg::m_validationMaxR
private
Initial value:
{
this, "ValidationMaxR", 11977.0,
"Maximum radius of the truth-extrapolation validation planes"}

Definition at line 97 of file TgcL0TruthValidationAlg.h.

97 {
98 this, "ValidationMaxR", 11977.0,
99 "Maximum radius of the truth-extrapolation validation planes"};

◆ m_validationMinR

Gaudi::Property<double> L0Muon::TgcL0TruthValidationAlg::m_validationMinR
private
Initial value:
{
this, "ValidationMinR", 0.0,
"Minimum radius of the truth-extrapolation validation planes"}

Definition at line 94 of file TgcL0TruthValidationAlg.h.

94 {
95 this, "ValidationMinR", 0.0,
96 "Minimum radius of the truth-extrapolation validation planes"};

◆ m_validationPlaneToleranceZ

Gaudi::Property<double> L0Muon::TgcL0TruthValidationAlg::m_validationPlaneToleranceZ
private
Initial value:
{
this, "ValidationPlaneToleranceZ", 20.0,
"Maximum distance in z from an extrapolation target plane"}

Definition at line 100 of file TgcL0TruthValidationAlg.h.

100 {
101 this, "ValidationPlaneToleranceZ", 20.0,
102 "Maximum distance in z from an extrapolation target plane"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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