ATLAS Offline Software
Loading...
Searching...
No Matches
eFexTauRoIThresholdsTool.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
7using namespace HLTSeedingNs;
8
9uint64_t eFexTauRoIThresholdsTool::getPattern(const EventContext& /*ctx*/,
10 const xAOD::eFexTauRoI& roi,
11 const RoIThresholdsTool::ThrVec& menuThresholds,
12 const TrigConf::L1ThrExtraInfoBase& /*menuExtraInfo*/) const {
13 // Get RoI properties (once, rather than for every threshold in the menu)
14 unsigned int et = roi.etTOB();
15 unsigned int rcore = roi.tauOneThresholds(); // eTau algorithm agnostic version corresponding to rCoreThresholds or bdtThresholds
16 unsigned int rhad = roi.tauTwoThresholds(); // a.k.a. rHad
17 int ieta = roi.iEta();
18
19 uint64_t thresholdMask = 0;
20 // Iterate through thresholds and see which ones are passed
21 for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) {
22
23 auto thr = static_cast<TrigConf::L1Threshold_eTAU*>(thrBase.get());
24
25 // Test ET threshold and core and hadronic ratio codes, set bit in threshold word if conditions met
26 if (et > thr->thrValueCounts(ieta) && rcore >= static_cast<unsigned int>(thr->rCore()) && rhad >= static_cast<unsigned int>(thr->rHad()) ) {
27 thresholdMask |= (1_u64<<thr->mapping());
28 }
29 }
30 return thresholdMask;
31}
32
33
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
L1 extra information for certain threshold types.
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::eFexTauRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
int iEta() const
setter for the above
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
Definition eFexTauRoI.h:16
Extra patterns decribing particle interation process.