Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
16 #include "../../../IGlobalSimAlgTool.h"
18 
19 namespace GlobalSim {
20  class eEmSortSelectCountContainerAlgTool: public extends<AthAlgTool,
21  IGlobalSimAlgTool> {
22 
23  public:
25 
26 
27  eEmSortSelectCountContainerAlgTool(const std::string& type,
28  const std::string& name,
29  const IInterface* parent);
30 
32 
33  virtual StatusCode initialize() override;
34 
35  virtual StatusCode run(const EventContext& ctx) const override;
36 
37  virtual std::string toString() const override;
38 
39  private:
40 
41  Gaudi::Property<bool>
43  "enableDump",
44  {false},
45  "flag to enable dumps"};
46 
47 
50  this,
51  "HypoFIFOReadKey",
52  "hypoFIFO",
53  "key to read input port data for the hypo block"};
54 
55 
56 
59  this,
60  "PortsOutKey",
61  "eEmSortSelectCount",
62  "key to write output ports data"};
63 
64 
65  // FIXME the following should be properties
66 
67  // Select cuts: values set in init()
68  // outer vector: NumSelect entries. Inner vector: N_eta entries
69  std::vector<unsigned> m_EtMin;
70  std::vector<unsigned> m_REtaMin;
71  std::vector<unsigned> m_RHadMin;
72  std::vector<unsigned> m_WsTotMin;
73 
74  // Count cuts. Each count has three eta regions
75  // The outer vector will be initialised to have length
76  // s_NumCnt: one entry per set of count cuts. The inner vector
77  // will be initialised to have length 3, one cut for eacn of the
78  // three eta regions.
79  std::vector<std::vector<unsigned int>> m_count_EtMin;
80  std::vector<std::vector<int>> m_count_EtaMin;
81  std::vector<std::vector<int>> m_count_EtaMax;
82 
84  make_selectedTobs(const std::vector<eEmTobPtr>&,
85  std::vector<std::vector<eEmTobPtr>>&) const;
86 
87  std::vector<std::size_t>
88  count_tobs(const std::vector<std::vector<GenTobPtr>>&) const;
89 
90  constexpr static std::size_t s_NumCnt{24};
91  constexpr static std::size_t s_NumEtaRanges{3};
92 
93 
94  // Each count category uses one of many selected GenTob vevtors.
95  // s_CntSelN chooses which of these to use.
96  constexpr static std::array<std::size_t, s_NumCnt> s_CntSelN{
97  0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
98 
99  constexpr static auto& s_NumSelect =
101 
102  constexpr static auto& s_NumSort =
104 
105 
106  constexpr static auto& s_NumNoSort =
108 
109 
110  constexpr static auto& s_SortOutWidths =
112 
113  constexpr static auto& s_SortOutWidth =
115 
116  constexpr static auto& s_SortOutStart =
118 
119  constexpr static auto& s_max_counts =
121 
122  constexpr static auto& s_CountOutWidth =
124 
125 
126  constexpr static auto& s_NumTotalCountWidth =
128 
129 
130  };
131 }
132 
133 #endif
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumSelect
constexpr static auto & s_NumSelect
Definition: eEmSortSelectCountContainerAlgTool.h:99
eEmSortSelectCountContainerPortsOut.h
GlobalSim::eEmSortSelectCountContainerAlgTool::m_WsTotMin
std::vector< unsigned > m_WsTotMin
Definition: eEmSortSelectCountContainerAlgTool.h:72
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumTotalCountWidth
constexpr static auto & s_NumTotalCountWidth
Definition: eEmSortSelectCountContainerAlgTool.h:126
GlobalSim::eEmSortSelectCountContainerAlgTool::m_enableDump
Gaudi::Property< bool > m_enableDump
Definition: eEmSortSelectCountContainerAlgTool.h:42
GlobalSim::eEmSortSelectCountContainerAlgTool::GenTobPtr
typename eEmSortSelectCountContainerPortsOut::GenTobPtr GenTobPtr
Definition: eEmSortSelectCountContainerAlgTool.h:24
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:49
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:122
GlobalSim::eEmSortSelectCountContainerPortsOut::NumTotalCountWidth
constexpr static std::size_t NumTotalCountWidth
Definition: eEmSortSelectCountContainerPortsOut.h:62
GlobalSim::eEmSortSelectCountContainerAlgTool::m_count_EtMin
std::vector< std::vector< unsigned int > > m_count_EtMin
Definition: eEmSortSelectCountContainerAlgTool.h:79
GlobalSim::eEmSortSelectCountContainerAlgTool::~eEmSortSelectCountContainerAlgTool
virtual ~eEmSortSelectCountContainerAlgTool()=default
SG::ReadHandleKey< GlobalSim::GepAlgoHypothesisFIFO >
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumSort
constexpr static auto & s_NumSort
Definition: eEmSortSelectCountContainerAlgTool.h:102
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:71
GlobalSim::eEmSortSelectCountContainerAlgTool::m_count_EtaMin
std::vector< std::vector< int > > m_count_EtaMin
Definition: eEmSortSelectCountContainerAlgTool.h:80
GlobalSim::eEmSortSelectCountContainerAlgTool::s_SortOutWidth
constexpr static auto & s_SortOutWidth
Definition: eEmSortSelectCountContainerAlgTool.h:113
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:69
AthAlgTool.h
GlobalSim::eEmSortSelectCountContainerAlgTool::s_max_counts
constexpr static auto & s_max_counts
Definition: eEmSortSelectCountContainerAlgTool.h:119
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GlobalSim::eEmSortSelectCountContainerAlgTool::s_NumEtaRanges
constexpr static std::size_t s_NumEtaRanges
Definition: eEmSortSelectCountContainerAlgTool.h:91
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:90
GlobalSim::eEmSortSelectCountContainerAlgTool::m_portsOutWriteKey
SG::WriteHandleKey< GlobalSim::eEmSortSelectCountContainerPortsOut > m_portsOutWriteKey
Definition: eEmSortSelectCountContainerAlgTool.h:58
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:228
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:110
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:96
GlobalSim::eEmSortSelectCountContainerAlgTool::m_REtaMin
std::vector< unsigned > m_REtaMin
Definition: eEmSortSelectCountContainerAlgTool.h:70
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:106
GlobalSim::eEmSortSelectCountContainerAlgTool::s_SortOutStart
constexpr static auto & s_SortOutStart
Definition: eEmSortSelectCountContainerAlgTool.h:116
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:21
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:81