ATLAS Offline Software
Loading...
Searching...
No Matches
MURoIThresholdsTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
5#include "utilities.h"
6#include <memory>
7using namespace HLTSeedingNs;
8
9uint64_t MURoIThresholdsTool::getPattern(const EventContext& /*ctx*/,
10 const xAOD::MuonRoI& roi,
11 const RoIThresholdsTool::ThrVec& menuThresholds,
12 const TrigConf::L1ThrExtraInfoBase& /*menuExtraInfo*/) const {
13 uint32_t thr_num = static_cast<uint32_t>(roi.getThrNumber());
14
15 uint64_t thresholdsPattern = 0;
16
17 // Iterate through thresholds and see which ones are passed
18 for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) {
19 std::shared_ptr<TrigConf::L1Threshold_MU> thr = std::static_pointer_cast<TrigConf::L1Threshold_MU>(thrBase);
20
21 bool passed{false};
22
23 // e.g. threshold number is simply required.
24 if (thr_num >= thr->idxBarrel() || thr_num >= thr->idxEndcap() || thr_num >= thr->idxForward()) {
25 passed = true;
26 }
27
28 if (passed) {
29 // set the corresponding bit in the pattern
30 thresholdsPattern |= (1_u64 << thr->mapping());
31 }
32
33 } // loop over thresholds
34
35 return thresholdsPattern;
36}
bool passed(DecisionID id, const DecisionIDContainer &)
checks if required decision ID is in the set of IDs in the container
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::MuonRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
L1 extra information for certain threshold types.
int getThrNumber() const
Get the logic number of the highest threshold this RoI passed.
MuonRoI_v1 MuonRoI
Definition MuonRoI.h:15