ATLAS Offline Software
eEmSortSelectCountContainerAlgTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GLOBALSIM_EEMSORTSELECTCOUNTCONTAINERALGTOOL_H
6 #define GLOBALSIM_EEMSORTSELECTCOUNTCONTAINERALGTOOL_H
7 
15 #include "eEmTob.h"
16 
17 #include "../../../IGlobalSimAlgTool.h"
19 
20 namespace GlobalSim {
21  class eEmSortSelectCountContainerAlgTool: public extends<AthAlgTool,
22  IGlobalSimAlgTool> {
23 
24  public:
26 
27 
28  eEmSortSelectCountContainerAlgTool(const std::string& type,
29  const std::string& name,
30  const IInterface* parent);
31 
33 
34  virtual StatusCode initialize() override;
35 
36  virtual StatusCode run(const EventContext& ctx) const override;
37 
38  virtual std::string toString() const override;
39 
40  private:
41 
42  Gaudi::Property<bool>
44  "enableDump",
45  {false},
46  "flag to enable dumps"};
47 
48 
51  this,
52  "HypoFIFOReadKey",
53  "hypoFIFO",
54  "key to read input port data for the hypo block"};
55 
56 
57 
60  this,
61  "PortsOutKey",
62  "eEmSortSelectCount",
63  "key to write output ports data"};
64 
65 
66  // FIXME the following should be properties
67 
68  // Select cuts: values set in init()
69  // outer vector: NumSelect entries. Inner vector: N_eta entries
70  std::vector<unsigned> m_EtMin;
71  std::vector<unsigned> m_REtaMin;
72  std::vector<unsigned> m_RHadMin;
73  std::vector<unsigned> m_WsTotMin;
74 
75  // Count cuts. Each count has three eta regions
76  // The outer vector will be initialised to have length
77  // s_NumCnt: one entry per set of count cuts. The inner vector
78  // will be initialised to have length 3, one cut for eacn of the
79  // three eta regions.
80  std::vector<std::vector<int>> m_count_EtMin;
81  std::vector<std::vector<int>> m_count_EtaMin;
82  std::vector<std::vector<int>> m_count_EtaMax;
83 
85  make_selectedTobs(const std::vector<eEmTobPtr>&,
86  std::vector<std::vector<eEmTobPtr>>&) const;
87 
88  std::vector<std::size_t>
89  count_tobs(const std::vector<std::vector<GenTobPtr>>&) const;
90 
91  constexpr static std::size_t s_NumCnt{24};
92  constexpr static std::size_t s_NumEtaRanges{3};
93 
94 
95  // Each count category uses one of many selected GenTob vevtors.
96  // s_CntSelN chooses which of these to use.
97  constexpr static std::array<std::size_t, s_NumCnt> s_CntSelN{
98  0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
99 
100  constexpr static auto& s_NumSelect =
102 
103  constexpr static auto& s_NumSort =
105 
106 
107  constexpr static auto& s_NumNoSort =
109 
110 
111  constexpr static auto& s_SortOutWidths =
113 
114  constexpr static auto& s_SortOutWidth =
116 
117  constexpr static auto& s_SortOutStart =
119 
120  constexpr static auto& s_max_counts =
122 
123  constexpr static auto& s_CountOutWidth =
125 
126 
127  constexpr static auto& s_NumTotalCountWidth =
129 
130 
131  };
132 }
133 
134 #endif
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumSelect
constexpr static auto & s_NumSelect
Definition: eEmSortSelectCountContainerAlgTool.h:100
eEmSortSelectCountContainerPortsOut.h
GlobalSim::eEmSortSelectCountContainerAlgTool::m_WsTotMin
std::vector< unsigned > m_WsTotMin
Definition: eEmSortSelectCountContainerAlgTool.h:73
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumTotalCountWidth
constexpr static auto & s_NumTotalCountWidth
Definition: eEmSortSelectCountContainerAlgTool.h:127
GlobalSim::eEmSortSelectCountContainerAlgTool::m_count_EtMin
std::vector< std::vector< int > > m_count_EtMin
Definition: eEmSortSelectCountContainerAlgTool.h:80
GlobalSim::eEmSortSelectCountContainerAlgTool::m_enableDump
Gaudi::Property< bool > m_enableDump
Definition: eEmSortSelectCountContainerAlgTool.h:43
GlobalSim::eEmSortSelectCountContainerAlgTool::GenTobPtr
typename eEmSortSelectCountContainerPortsOut::GenTobPtr GenTobPtr
Definition: eEmSortSelectCountContainerAlgTool.h:25
GlobalSim::eEmSortSelectCountContainerPortsOut::CountOutWidth
constexpr static std::array< unsigned, NumCount > CountOutWidth
Definition: eEmSortSelectCountContainerPortsOut.h:57
GlobalSim::eEmSortSelectCountContainerAlgTool::m_HypoFIFOReadKey
SG::ReadHandleKey< GlobalSim::GepAlgoHypothesisFIFO > m_HypoFIFOReadKey
Definition: eEmSortSelectCountContainerAlgTool.h:50
GlobalSim::eEmSortSelectCountContainerPortsOut::SortOutStart
constexpr static std::array< std::size_t, NumSort > SortOutStart
Definition: eEmSortSelectCountContainerPortsOut.h:46
GlobalSim::eEmSortSelectCountContainerAlgTool::s_CountOutWidth
constexpr static auto & s_CountOutWidth
Definition: eEmSortSelectCountContainerAlgTool.h:123
GlobalSim::eEmSortSelectCountContainerPortsOut::NumTotalCountWidth
constexpr static std::size_t NumTotalCountWidth
Definition: eEmSortSelectCountContainerPortsOut.h:62
GlobalSim::eEmSortSelectCountContainerAlgTool::~eEmSortSelectCountContainerAlgTool
virtual ~eEmSortSelectCountContainerAlgTool()=default
SG::ReadHandleKey< GlobalSim::GepAlgoHypothesisFIFO >
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumSort
constexpr static auto & s_NumSort
Definition: eEmSortSelectCountContainerAlgTool.h:103
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
GlobalSim::eEmSortSelectCountContainerAlgTool::eEmSortSelectCountContainerAlgTool
eEmSortSelectCountContainerAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: eEmSortSelectCountContainerAlgTool.cxx:27
GlobalSim::eEmSortSelectCountContainerAlgTool::m_RHadMin
std::vector< unsigned > m_RHadMin
Definition: eEmSortSelectCountContainerAlgTool.h:72
GlobalSim::eEmSortSelectCountContainerAlgTool::m_count_EtaMin
std::vector< std::vector< int > > m_count_EtaMin
Definition: eEmSortSelectCountContainerAlgTool.h:81
GlobalSim::eEmSortSelectCountContainerAlgTool::s_SortOutWidth
constexpr static auto & s_SortOutWidth
Definition: eEmSortSelectCountContainerAlgTool.h:114
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
Definition: dump.h:8
SG::WriteHandleKey< GlobalSim::eEmSortSelectCountContainerPortsOut >
GepAlgoHypothesisPortsIn.h
GlobalSim::eEmSortSelectCountContainerAlgTool::make_selectedTobs
StatusCode make_selectedTobs(const std::vector< eEmTobPtr > &, std::vector< std::vector< eEmTobPtr >> &) const
Definition: eEmSortSelectCountContainerAlgTool.cxx:283
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GlobalSim::eEmSortSelectCountContainerAlgTool::m_EtMin
std::vector< unsigned > m_EtMin
Definition: eEmSortSelectCountContainerAlgTool.h:70
AthAlgTool.h
GlobalSim::eEmSortSelectCountContainerAlgTool::s_max_counts
constexpr static auto & s_max_counts
Definition: eEmSortSelectCountContainerAlgTool.h:120
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumEtaRanges
constexpr static std::size_t s_NumEtaRanges
Definition: eEmSortSelectCountContainerAlgTool.h:92
GlobalSim::eEmSortSelectCountContainerPortsOut::NumNoSort
constexpr static std::size_t NumNoSort
Definition: eEmSortSelectCountContainerPortsOut.h:26
GlobalSim::eEmSortSelectCountContainerPortsOut::GenTobPtr
std::shared_ptr< GenericTob > GenTobPtr
Definition: eEmSortSelectCountContainerPortsOut.h:94
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumCnt
constexpr static std::size_t s_NumCnt
Definition: eEmSortSelectCountContainerAlgTool.h:91
eEmTob.h
GlobalSim::eEmSortSelectCountContainerAlgTool::m_portsOutWriteKey
SG::WriteHandleKey< GlobalSim::eEmSortSelectCountContainerPortsOut > m_portsOutWriteKey
Definition: eEmSortSelectCountContainerAlgTool.h:59
GlobalSim::eEmSortSelectCountContainerAlgTool::toString
virtual std::string toString() const override
Definition: eEmSortSelectCountContainerAlgTool.cxx:343
GlobalSim::eEmSortSelectCountContainerPortsOut::SortOutWidth
constexpr static std::size_t SortOutWidth
Definition: eEmSortSelectCountContainerPortsOut.h:34
GlobalSim::eEmSortSelectCountContainerPortsOut::NumSelect
constexpr static std::size_t NumSelect
Definition: eEmSortSelectCountContainerPortsOut.h:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
GlobalSim::eEmSortSelectCountContainerPortsOut::max_counts
constexpr static std::array< std::size_t, NumCount > max_counts
Definition: eEmSortSelectCountContainerPortsOut.h:80
GlobalSim::eEmSortSelectCountContainerAlgTool::s_SortOutWidths
constexpr static auto & s_SortOutWidths
Definition: eEmSortSelectCountContainerAlgTool.h:111
GlobalSim::eEmSortSelectCountContainerAlgTool::run
virtual StatusCode run(const EventContext &ctx) const override
Definition: eEmSortSelectCountContainerAlgTool.cxx:70
GlobalSim::eEmSortSelectCountContainerPortsOut::NumSort
constexpr static std::size_t NumSort
Definition: eEmSortSelectCountContainerPortsOut.h:24
GlobalSim::eEmSortSelectCountContainerAlgTool::s_CntSelN
constexpr static std::array< std::size_t, s_NumCnt > s_CntSelN
Definition: eEmSortSelectCountContainerAlgTool.h:97
GlobalSim::eEmSortSelectCountContainerAlgTool::m_REtaMin
std::vector< unsigned > m_REtaMin
Definition: eEmSortSelectCountContainerAlgTool.h:71
GlobalSim::eEmSortSelectCountContainerPortsOut::SortOutWidths
constexpr static std::array< std::size_t, NumSort > SortOutWidths
Definition: eEmSortSelectCountContainerPortsOut.h:29
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumNoSort
constexpr static auto & s_NumNoSort
Definition: eEmSortSelectCountContainerAlgTool.h:107
GlobalSim::eEmSortSelectCountContainerAlgTool::s_SortOutStart
constexpr static auto & s_SortOutStart
Definition: eEmSortSelectCountContainerAlgTool.h:117
GlobalSim::eEmSortSelectCountContainerAlgTool::count_tobs
std::vector< std::size_t > count_tobs(const std::vector< std::vector< GenTobPtr >> &) const
Definition: eEmSortSelectCountContainerAlgTool.cxx:316
GlobalSim::eEmSortSelectCountContainerAlgTool
Definition: eEmSortSelectCountContainerAlgTool.h:22
GlobalSim::eEmSortSelectCountContainerAlgTool::initialize
virtual StatusCode initialize() override
Definition: eEmSortSelectCountContainerAlgTool.cxx:33
GlobalSim::eEmSortSelectCountContainerAlgTool::m_count_EtaMax
std::vector< std::vector< int > > m_count_EtaMax
Definition: eEmSortSelectCountContainerAlgTool.h:82