ATLAS Offline Software
jFexTauRoIThresholdsTool.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 using namespace HLTSeedingNs;
7 
8 
9 
10 
11 uint64_t jFexTauRoIThresholdsTool::getPattern(const EventContext& /*ctx*/,
12  const xAOD::jFexTauRoI& roi,
13  const RoIThresholdsTool::ThrVec& menuThresholds,
14  const TrigConf::L1ThrExtraInfoBase& menuExtraInfo) const {
15 
16  // Get RoI properties (once, rather than for every threshold in the menu)
17  unsigned int et = roi.et();
18  unsigned int iso = roi.iso();
19  int ieta = roi.globalEta(); //Note: possible this may need to replaced by: std::abs(TSU::toTopoEta( roi.eta() ))/4;
20  uint64_t thresholdMask = 0;
21 
22  // calculate the isolation bit from the thresholds
23  const TrigConf::L1ThrExtraInfo_jTAU& extra = static_cast<const TrigConf::L1ThrExtraInfo_jTAU&>(menuExtraInfo);
24  int loose = extra.isolation(TrigConf::Selection::WP::LOOSE,0).isolation_fw();
25  int medium = extra.isolation(TrigConf::Selection::WP::MEDIUM,0).isolation_fw();
26  int tight = extra.isolation(TrigConf::Selection::WP::TIGHT,0).isolation_fw();
27  unsigned int isobit = 0;
28  if ( iso*1024 < et*loose ) isobit = 1;
29  if ( iso*1024 < et*medium ) isobit = 2;
30  if ( iso*1024 < et*tight ) isobit = 3;
31 
32  // Iterate through thresholds and see which ones are passed
33  for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) {
34  auto thr = static_cast<TrigConf::L1Threshold_jTAU*>(thrBase.get());
35 
36 
37  // Checking et and isolation thresholds
38  if (et > thr->thrValueMeV(ieta) && isobit >= static_cast<unsigned int>(thr->isolation()) ) {
39  thresholdMask |= (1_u64<<thr->mapping());
40  }
41 
42  ATH_MSG_DEBUG("jFEX Taus HLT seeding for ("<< thr->name() <<"): et=" << et << " > "<<thr->thrValueMeV(ieta) << " and iso="<<iso << " >= "<<static_cast<unsigned int>(thr->isolation()));
43  }
44  return thresholdMask;
45 
46 }
TrigConf::Selection::WP::LOOSE
@ LOOSE
xAOD::jFexTauRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexTauRoI_v1.h:23
et
Extra patterns decribing particle interation process.
TrigConf::L1Threshold_jTAU
Definition: L1Threshold.h:234
xAOD::jFexTauRoI_v1::globalEta
int globalEta() const
TrigConf::L1ThrExtraInfoBase
L1 extra information for certain threshold types.
Definition: L1ThresholdBase.h:72
xAOD::jFexTauRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexTauRoI_v1.cxx:114
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.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
python.handimod.extra
int extra
Definition: handimod.py:521
jFexTauRoIThresholdsTool.h
TrigConf::L1ThrExtraInfo_jTAU
Definition: L1ThrExtraInfo.h:298
TrigConf::Selection::WP::MEDIUM
@ MEDIUM
xAOD::jFexTauRoI_v1::iso
unsigned int iso() const
Iso on TOB scale.
Definition: jFexTauRoI_v1.cxx:120
TrigConf::Selection::WP::TIGHT
@ TIGHT
jFexTauRoIThresholdsTool::getPattern
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::jFexTauRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
Definition: jFexTauRoIThresholdsTool.cxx:11
HLTSeedingNs
Definition: utilities.h:8