ATLAS Offline Software
Loading...
Searching...
No Matches
eFexRoIAlgTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "./eFexRoIAlgTool.h"
7
8#include <cmath> //for abs
9
10namespace GlobalSim {
11
13 const std::string& name,
14 const IInterface* parent):
15 AthAlgTool(type, name, parent){
16 }
17
19 CHECK(m_eEmRoIKey.initialize());
20
21 return StatusCode::SUCCESS;
22 }
23
24 StatusCode
25 eFexRoIAlgTool::RoIs(std::vector<const xAOD::eFexEMRoI*>& selectedRoIs,
26 const EventContext& ctx) const {
28 eFexEMRoIContainer(m_eEmRoIKey, ctx);
29
30 CHECK(eFexEMRoIContainer.isValid());
31
32
33
34 /*
35 * eFexNumber() : 8 bit unsigned integer eFEX number
36 * et() : et value of the EM cluster in MeV
37 * etTOB() : et value of the EM cluster in units of 100 MeV
38 * eta() : floating point global eta
39 * phi() : floating point global phi
40 * iEtaTopo() : 40 x eta (custom function for L1Topo)
41 * iPhiTopo() : 20 x phi (custom function for L1Topo)
42 * RetaThresholds() : jet disc 1
43 * RhadThresholds() : jet disc 2
44 * WstotThresholds() : jet disc 3
45 */
46
47
48 auto roiSelector = [&etMin=m_etMin,
49 &etaMin=m_etaMin,
50 &etaMax=m_etaMax](const auto& roi) {
51
52 auto abs_eta = std::abs(roi->eta());
53 return (etaMin <= abs_eta) and
54 (abs_eta < etaMax) and
55 (roi->et() > etMin);
56 };
57
58 std::copy_if((*eFexEMRoIContainer).begin(),
59 (*eFexEMRoIContainer).end(),
60 std::back_inserter(selectedRoIs),
61 std::move(roiSelector));
62
63 return StatusCode::SUCCESS;
64 }
65
66 std::string eFexRoIAlgTool::toString() const {
67 std::string s = "eFexRoIAlgTool: name" + name() + '\n'
68 + m_eEmRoIKey.key() + '\n';
69 return s;
70 }
71}
72
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< double > m_etaMin
virtual std::string toString() const
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEmRoIKey
StatusCode initialize() override
virtual StatusCode RoIs(std::vector< const xAOD::eFexEMRoI * > &, const EventContext &ctx) const
Gaudi::Property< double > m_etaMax
eFexRoIAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< double > m_etMin
AlgTool to read in LArStripNeighborhoods, and run the eRatio Algorithm.