ATLAS Offline Software
Loading...
Searching...
No Matches
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"
6using namespace HLTSeedingNs;
7
8
9
10
11uint64_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}
#define ATH_MSG_DEBUG(x)
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
L1 extra information for certain threshold types.
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::jFexTauRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
int globalEta() const
unsigned int iso() const
Iso on TOB scale.
unsigned int et() const
Methods that require combining results or applying scales.
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class.
Definition jFexTauRoI.h:13
Extra patterns decribing particle interation process.