ATLAS Offline Software
Loading...
Searching...
No Matches
eFexEMRoIThresholdsTool.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
8uint64_t eFexEMRoIThresholdsTool::getPattern(const EventContext& /*ctx*/,
9 const xAOD::eFexEMRoI& roi,
10 const RoIThresholdsTool::ThrVec& menuThresholds,
11 const TrigConf::L1ThrExtraInfoBase& /*menuExtraInfo*/) const {
12 // Get RoI properties (once, rather than for every threshold in the menu)
13 unsigned int et = roi.etTOB();
14 unsigned int reta = roi.RetaThresholds();
15 unsigned int rhad = roi.RhadThresholds();
16 unsigned int wstot = roi.WstotThresholds();
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 auto thr = static_cast<TrigConf::L1Threshold_eEM*>(thrBase.get());
23 // Test ET threshold and jet discriminant codes, set bit in threshold word if conditions met
24 if (et > thr->thrValueCounts(ieta) && reta >= (unsigned int)thr->reta() &&
25 rhad >= (unsigned int)thr->rhad() && wstot >= (unsigned int)thr->wstot()) {
26 thresholdMask |= (1_u64<<thr->mapping());
27 }
28 }
29
30 return thresholdMask;
31}
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
L1 extra information for certain threshold types.
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::eFexEMRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
unsigned int RetaThresholds() const
Jet Discriminant 1 (R_eta) results.
unsigned int WstotThresholds() const
Jet Discriminant 3 (W_stot) results.
unsigned int RhadThresholds() const
Jet Discriminant 2 (R_had) results.
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
int iEta() const
setter for the above
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
Definition eFexEMRoI.h:17
Extra patterns decribing particle interation process.