ATLAS Offline Software
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"
6 using namespace HLTSeedingNs;
7 
8 uint64_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 }
xAOD::eFexEMRoI_v1::iEta
int iEta() const
setter for the above
Definition: eFexEMRoI_v1.cxx:250
et
Extra patterns decribing particle interation process.
eFexEMRoIThresholdsTool.h
TrigConf::L1ThrExtraInfoBase
L1 extra information for certain threshold types.
Definition: L1ThresholdBase.h:72
xAOD::wstot
setEt setPhi setE277 setWeta2 setEta1 setE2tsts1 wstot
Definition: TrigEMCluster_v1.cxx:49
xAOD::eFexEMRoI_v1
Class describing a LVL1 eFEX EM region of interest.
Definition: eFexEMRoI_v1.h:33
TrigConf::L1Threshold_eEM
Definition: L1Threshold.h:166
xAOD::eFexEMRoI_v1::RetaThresholds
unsigned int RetaThresholds() const
Jet Discriminant 1 (R_eta) results.
Definition: eFexEMRoI_v1.cxx:182
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
xAOD::eFexEMRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexEMRoI_v1.cxx:162
RoIThresholdsTool::ThrVec
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
Definition: IRoIThresholdsTool.h:24
utilities.h
xAOD::eFexEMRoI_v1::WstotThresholds
unsigned int WstotThresholds() const
Jet Discriminant 3 (W_stot) results.
Definition: eFexEMRoI_v1.cxx:190
eFexEMRoIThresholdsTool::getPattern
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::eFexEMRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
Definition: eFexEMRoIThresholdsTool.cxx:8
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
xAOD::eFexEMRoI_v1::RhadThresholds
unsigned int RhadThresholds() const
Jet Discriminant 2 (R_had) results.
Definition: eFexEMRoI_v1.cxx:186
HLTSeedingNs
Definition: utilities.h:8