ATLAS Offline Software
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 
7 using namespace HLTSeedingNs;
8 
9 uint64_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 
et
Extra patterns decribing particle interation process.
TrigConf::L1Threshold_eTAU
Definition: L1Threshold.h:212
xAOD::eFexTauRoI_v1::tauTwoThresholds
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
Definition: eFexTauRoI_v1.cxx:209
TrigConf::L1ThrExtraInfoBase
L1 extra information for certain threshold types.
Definition: L1ThresholdBase.h:72
xAOD::eFexTauRoI_v1::tauOneThresholds
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
Definition: eFexTauRoI_v1.cxx:205
IBLCalibrationConfig.thr
thr
Definition: IBLCalibrationConfig.py:39
xAOD::eFexTauRoI_v1
Class describing a LVL1 eFEX tau region of interest.
Definition: eFexTauRoI_v1.h:29
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
RoIThresholdsTool::ThrVec
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
Definition: IRoIThresholdsTool.h:24
utilities.h
eFexTauRoIThresholdsTool.h
xAOD::rcore
rcore
Definition: TrigPhoton_v1.cxx:79
eFexTauRoIThresholdsTool::getPattern
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::eFexTauRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
Definition: eFexTauRoIThresholdsTool.cxx:9
xAOD::eFexTauRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexTauRoI_v1.cxx:159
xAOD::eFexTauRoI_v1::iEta
int iEta() const
setter for the above
Definition: eFexTauRoI_v1.cxx:267
HLTSeedingNs
Definition: utilities.h:8