ATLAS Offline Software
eFexEMRoIThresholdsTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
5 
7  const RoIThresholdsTool::ThrVec& menuThresholds,
8  const TrigConf::L1ThrExtraInfoBase& /*menuExtraInfo*/) const {
9  // Get RoI properties (once, rather than for every threshold in the menu)
10  unsigned int et = roi.etTOB();
11  unsigned int reta = roi.RetaThresholds();
12  unsigned int rhad = roi.RhadThresholds();
13  unsigned int wstot = roi.WstotThresholds();
14  int ieta = roi.iEta();
15 
16  uint64_t thresholdMask = 0;
17  // Iterate through thresholds and see which ones are passed
18  for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) {
19  auto thr = static_cast<TrigConf::L1Threshold_eEM*>(thrBase.get());
20  // Test ET threshold and jet discriminant codes, set bit in threshold word if conditions met
21  if (et > thr->thrValueCounts(ieta) && reta >= (unsigned int)thr->reta() &&
22  rhad >= (unsigned int)thr->rhad() && wstot >= (unsigned int)thr->wstot()) {
23  thresholdMask |= (1<<thr->mapping());
24  }
25  }
26 
27  return thresholdMask;
28 }
xAOD::eFexEMRoI_v1::iEta
int iEta() const
setter for the above
Definition: eFexEMRoI_v1.cxx:243
et
Extra patterns decribing particle interation process.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
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:177
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:157
RoIThresholdsTool::ThrVec
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
Definition: IRoIThresholdsTool.h:24
xAOD::eFexEMRoI_v1::WstotThresholds
unsigned int WstotThresholds() const
Jet Discriminant 3 (W_stot) results.
Definition: eFexEMRoI_v1.cxx:185
xAOD::eFexEMRoI_v1::RhadThresholds
unsigned int RhadThresholds() const
Jet Discriminant 2 (R_had) results.
Definition: eFexEMRoI_v1.cxx:181
eFexEMRoIThresholdsTool::getPattern
virtual uint64_t getPattern(const xAOD::eFexEMRoI &roi, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
Definition: eFexEMRoIThresholdsTool.cxx:6