ATLAS Offline Software
L1EnergyCMXTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  * *
7  * *
8  ***************************************************************************/
9 
10 #ifndef LVL1L1ENERGYCMXTOOLS_H
11 #define LVL1L1ENERGYCMXTOOLS_H
12 
13 #include <string>
14 #include <vector>
15 
17 #include "GaudiKernel/ServiceHandle.h"
18 #include "GaudiKernel/ToolHandle.h"
23 
26 
27 namespace LVL1
28 {
29 class ModuleEnergy;
30 class CrateEnergy;
31 class SystemEnergy;
32 
47 class L1EnergyCMXTools : virtual public IL1EnergyCMXTools, public AthAlgTool
48 {
49  public:
50  L1EnergyCMXTools(const std::string &type, const std::string &name,
51  const IInterface *parent);
52 
54  virtual ~L1EnergyCMXTools();
55 
57  virtual StatusCode initialize();
59  virtual StatusCode finalize();
60 
62  virtual void formJEMEtSums(const xAOD::JetElementContainer *jetElementVec,
63  xAOD::JEMEtSumsContainer *jemEtSumsVec) const;
65  virtual void formCMXEtSums(const xAOD::JEMEtSumsContainer *jemEtSumsVec,
66  xAOD::CMXEtSumsContainer *cmxEtSumsVec) const;
68  virtual void formCMXEtSumsModule(const xAOD::JEMEtSumsContainer *jemEtSumsVec,
69  xAOD::CMXEtSumsContainer *cmxEtSumsMod) const;
71  virtual void formCMXEtSumsCrate(const xAOD::CMXEtSumsContainer *cmxEtSumsMod,
72  xAOD::CMXEtSumsContainer *cmxEtSumsCrate) const;
73 
75  virtual void formCMXEtSumsSystem(
76  const xAOD::CMXEtSumsContainer *cmxEtSumsCrate,
77  xAOD::CMXEtSumsContainer *cmxEtSumsSys) const;
79  virtual void formCMXEtSumsEtMaps(const xAOD::CMXEtSumsContainer *cmxEtSumsSys,
80  xAOD::CMXEtSumsContainer *cmxEtSumsMap) const;
81 
82  private:
83  typedef std::vector<uint16_t> EnergyVector;
84  typedef std::vector<uint32_t> ErrorVector;
85  typedef std::vector<DataVector<ModuleEnergy> *> MultiSliceModuleEnergy;
86  typedef std::vector<DataVector<CrateEnergy> *> MultiSliceCrateEnergy;
87  typedef std::vector<SystemEnergy *> MultiSliceSystemEnergy;
88 
91  MultiSliceModuleEnergy &modulesVec, int &peak) const;
94  MultiSliceCrateEnergy &crateVecFull, MultiSliceCrateEnergy &crateVecRestricted,
95  int &peak) const;
98  MultiSliceSystemEnergy &systemVec, int &peak) const;
100  void moduleEnergyToEtSums(const MultiSliceModuleEnergy &modulesVec,
101  xAOD::JEMEtSumsContainer *jemEtSumsVec, int peak) const;
103  void crateEnergyToEtSums(const MultiSliceCrateEnergy &cratesVec,
104  xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak) const;
105  void crateEnergyToEtSums(
106  const MultiSliceCrateEnergy &cratesVecFull, const MultiSliceCrateEnergy &cratesVecRestricted,
107  xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak) const;
108 
110  void systemEnergyToEtSums(const MultiSliceSystemEnergy &systemVec,
113  void etMapsToEtSums(const MultiSliceSystemEnergy &systemVec,
114  xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak) const;
115  void findRestrictedEta(uint32_t &maskXE, uint32_t &maskTE) const;
116 
117  void dumpCrateEnergies(const std::string& msg, const MultiSliceCrateEnergy& crates) const;
118  SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };
120  ToolHandle<LVL1::IL1JetElementTools> m_jeTool;
122  ToolHandle<LVL1::IL1EtTools> m_etTool;
124  bool m_debug = false;
125 };
126 
127 } // end of namespace
128 
129 #endif
IL1JetElementTools.h
LVL1::L1EnergyCMXTools::MultiSliceCrateEnergy
std::vector< DataVector< CrateEnergy > * > MultiSliceCrateEnergy
Definition: L1EnergyCMXTools.h:89
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::L1EnergyCMXTools::L1EnergyCMXTools
L1EnergyCMXTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: L1EnergyCMXTools.cxx:25
LVL1::L1EnergyCMXTools::MultiSliceModuleEnergy
std::vector< DataVector< ModuleEnergy > * > MultiSliceModuleEnergy
Definition: L1EnergyCMXTools.h:88
SG::ReadHandleKey< TrigConf::L1Menu >
LVL1::L1EnergyCMXTools::formCMXEtSumsEtMaps
virtual void formCMXEtSumsEtMaps(const xAOD::CMXEtSumsContainer *cmxEtSumsSys, xAOD::CMXEtSumsContainer *cmxEtSumsMap) const
form partial CMXEtSums (sumEt/missingEt maps) from system CMXEtSums
Definition: L1EnergyCMXTools.cxx:303
IL1EtTools.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::L1EnergyCMXTools::etSumsToSystemEnergy
void etSumsToSystemEnergy(const xAOD::CMXEtSumsContainer *etSums, MultiSliceSystemEnergy &systemVec, int &peak) const
Convert CMXEtSums container to internal SystemEnergy objects.
Definition: L1EnergyCMXTools.cxx:432
LVL1::L1EnergyCMXTools::m_jeTool
ToolHandle< LVL1::IL1JetElementTools > m_jeTool
Tool for JetElement map.
Definition: L1EnergyCMXTools.h:123
LVL1::L1EnergyCMXTools::formCMXEtSumsModule
virtual void formCMXEtSumsModule(const xAOD::JEMEtSumsContainer *jemEtSumsVec, xAOD::CMXEtSumsContainer *cmxEtSumsMod) const
form partial CMXEtSums (module) from JEMEtSums
Definition: L1EnergyCMXTools.cxx:155
LVL1::L1EnergyCMXTools::crateEnergyToEtSums
void crateEnergyToEtSums(const MultiSliceCrateEnergy &cratesVec, xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak) const
Convert internal CrateEnergy containers to CMXEtSums container.
Definition: L1EnergyCMXTools.cxx:527
JEMEtSumsContainer.h
LVL1::L1EnergyCMXTools::m_debug
bool m_debug
Debug flag.
Definition: L1EnergyCMXTools.h:127
LVL1::L1EnergyCMXTools::EnergyVector
std::vector< uint16_t > EnergyVector
Definition: L1EnergyCMXTools.h:86
LVL1::L1EnergyCMXTools::formJEMEtSums
virtual void formJEMEtSums(const xAOD::JetElementContainer *jetElementVec, xAOD::JEMEtSumsContainer *jemEtSumsVec) const
form JEMEtSums from JetElements
Definition: L1EnergyCMXTools.cxx:71
LVL1::L1EnergyCMXTools::ErrorVector
std::vector< uint32_t > ErrorVector
Definition: L1EnergyCMXTools.h:87
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::L1EnergyCMXTools::m_etTool
ToolHandle< LVL1::IL1EtTools > m_etTool
Tool for energy sums.
Definition: L1EnergyCMXTools.h:125
AthAlgTool.h
xAOD::CMXEtSums_v1::TOTAL_STANDARD
@ TOTAL_STANDARD
Definition: CMXEtSums_v1.h:32
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::L1EnergyCMXTools::findRestrictedEta
void findRestrictedEta(uint32_t &maskXE, uint32_t &maskTE) const
form partial CMXEtSums (crate) from module CMXEtSums
Definition: L1EnergyCMXTools.cxx:175
LVL1::L1EnergyCMXTools::formCMXEtSumsSystem
virtual void formCMXEtSumsSystem(const xAOD::CMXEtSumsContainer *cmxEtSumsCrate, xAOD::CMXEtSumsContainer *cmxEtSumsSys) const
form partial CMXEtSums (system) from crate CMXEtSums
Definition: L1EnergyCMXTools.cxx:258
CMXEtSumsContainer.h
LVL1::L1EnergyCMXTools::etSumsToCrateEnergy
void etSumsToCrateEnergy(const xAOD::CMXEtSumsContainer *etSums, MultiSliceCrateEnergy &crateVecFull, MultiSliceCrateEnergy &crateVecRestricted, int &peak) const
Convert CMXEtSums container to internal CrateEnergy containers.
Definition: L1EnergyCMXTools.cxx:361
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::CMXEtSums_v1::Sources
Sources
Definition: CMXEtSums_v1.h:30
TrigConf::name
Definition: HLTChainList.h:35
LVL1::L1EnergyCMXTools::formCMXEtSumsCrate
virtual void formCMXEtSumsCrate(const xAOD::CMXEtSumsContainer *cmxEtSumsMod, xAOD::CMXEtSumsContainer *cmxEtSumsCrate) const
form partial CMXEtSums (crate) from module CMXEtSums
Definition: L1EnergyCMXTools.cxx:216
LVL1::L1EnergyCMXTools::~L1EnergyCMXTools
virtual ~L1EnergyCMXTools()
default destructor
Definition: L1EnergyCMXTools.cxx:39
LVL1::L1EnergyCMXTools::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: L1EnergyCMXTools.h:121
LVL1::L1EnergyCMXTools::systemEnergyToEtSums
void systemEnergyToEtSums(const MultiSliceSystemEnergy &systemVec, xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak, xAOD::CMXEtSums_v1::Sources source=xAOD::CMXEtSums::TOTAL_STANDARD) const
Convert internal SystemEnergy objects to CMXEtSums object.
Definition: L1EnergyCMXTools.cxx:737
LVL1::L1EnergyCMXTools::dumpCrateEnergies
void dumpCrateEnergies(const std::string &msg, const MultiSliceCrateEnergy &crates) const
Definition: L1EnergyCMXTools.cxx:941
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
LVL1::L1EnergyCMXTools::formCMXEtSums
virtual void formCMXEtSums(const xAOD::JEMEtSumsContainer *jemEtSumsVec, xAOD::CMXEtSumsContainer *cmxEtSumsVec) const
form complete CMXEtSums from JEMEtSums
Definition: L1EnergyCMXTools.cxx:115
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1::L1EnergyCMXTools::finalize
virtual StatusCode finalize()
standard Athena-Algorithm method
Definition: L1EnergyCMXTools.cxx:60
copySelective.source
string source
Definition: copySelective.py:32
IL1EnergyCMXTools.h
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::L1EnergyCMXTools::etMapsToEtSums
void etMapsToEtSums(const MultiSliceSystemEnergy &systemVec, xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak) const
Convert maps from internal SystemEnergy objects to CMXEtSums objects.
Definition: L1EnergyCMXTools.cxx:805
LVL1::L1EnergyCMXTools::MultiSliceSystemEnergy
std::vector< SystemEnergy * > MultiSliceSystemEnergy
Definition: L1EnergyCMXTools.h:90
LVL1::L1EnergyCMXTools::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: L1EnergyCMXTools.cxx:45
LVL1::L1EnergyCMXTools::moduleEnergyToEtSums
void moduleEnergyToEtSums(const MultiSliceModuleEnergy &modulesVec, xAOD::JEMEtSumsContainer *jemEtSumsVec, int peak) const
Convert internal ModuleEnergy containers to JEMEtSums container.
Definition: L1EnergyCMXTools.cxx:474
LVL1::L1EnergyCMXTools::etSumsToModuleEnergy
void etSumsToModuleEnergy(const xAOD::CMXEtSumsContainer *etSums, MultiSliceModuleEnergy &modulesVec, int &peak) const
Convert CMXEtSums container to internal ModuleEnergy containers.
Definition: L1EnergyCMXTools.cxx:321