ATLAS Offline Software
jFexTauRoIThresholdsTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
5 
6 
7 
8 
10  const RoIThresholdsTool::ThrVec& menuThresholds,
11  const TrigConf::L1ThrExtraInfoBase& menuExtraInfo) const {
12 
13  // Get RoI properties (once, rather than for every threshold in the menu)
14  unsigned int et = roi.et();
15  unsigned int iso = roi.iso();
16  int ieta = roi.globalEta(); //Note: possible this may need to replaced by: std::abs(TSU::toTopoEta( roi.eta() ))/4;
17  uint64_t thresholdMask = 0;
18 
19  // calculate the isolation bit from the thresholds
20  const TrigConf::L1ThrExtraInfo_jTAU& extra = static_cast<const TrigConf::L1ThrExtraInfo_jTAU&>(menuExtraInfo);
21  int loose = extra.isolation(TrigConf::Selection::WP::LOOSE,0).isolation_fw();
22  int medium = extra.isolation(TrigConf::Selection::WP::MEDIUM,0).isolation_fw();
23  int tight = extra.isolation(TrigConf::Selection::WP::TIGHT,0).isolation_fw();
24  unsigned int isobit = 0;
25  if ( iso*1024 < et*loose ) isobit = 1;
26  if ( iso*1024 < et*medium ) isobit = 2;
27  if ( iso*1024 < et*tight ) isobit = 3;
28 
29  // Iterate through thresholds and see which ones are passed
30  for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) {
31  auto thr = static_cast<TrigConf::L1Threshold_jTAU*>(thrBase.get());
32 
33 
34  // Checking et and isolation thresholds
35  if (et > thr->thrValueMeV(ieta) && isobit >= static_cast<unsigned int>(thr->isolation()) ) {
36  thresholdMask |= (1<<thr->mapping());
37  }
38 
39  ATH_MSG_DEBUG("jFEX Taus HLT seeding for ("<< thr->name() <<"): et=" << et << " > "<<thr->thrValueMeV(ieta) << " and iso="<<iso << " >= "<<static_cast<unsigned int>(thr->isolation()));
40  }
41  return thresholdMask;
42 
43 }
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:22
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
jFexTauRoIThresholdsTool::getPattern
virtual uint64_t getPattern(const xAOD::jFexTauRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
Definition: jFexTauRoIThresholdsTool.cxx:9
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
python.handimod.extra
int extra
Definition: handimod.py:522
jFexTauRoIThresholdsTool.h
TrigConf::L1ThrExtraInfo_jTAU
Definition: L1ThrExtraInfo.h:296
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