ATLAS Offline Software
EnergyCMX.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  /***************************************************************************
6  EnergyCMX.h - description
7  -------------------
8  begin : 04 04 2014
9  email : Alan.Watson@cern.ch
10  ***************************************************************************/
11 
12  #ifndef ENERGYCMX_H
13  #define ENERGYCMX_H
14 
15 
16 
17 
18  // Athena/Gaudi
20  #include "GaudiKernel/ServiceHandle.h"
21  #include "GaudiKernel/ToolHandle.h"
23  #include "StoreGate/ReadHandleKey.h"
25 
26  // LVL1 Calo Trigger
34  #include "TrigT1CaloEvent/CMXRoI.h"
38  #include "TrigConfData/L1Menu.h"
39  // STL
40  #include <string>
41 
42  namespace LVL1 {
43  //using namespace TrigConf;
44 
45  //Doxygen class description below:
51  class EnergyCMX : public AthReentrantAlgorithm
52  {
55  public:
56 
57  //-------------------------
58  // Constructors/Destructors
59  //
60  // Athena requires that the constructor takes certain arguments
61  // (and passes them directly to the constructor of the base class)
62  //-------------------------
63 
64  EnergyCMX( const std::string& name, ISvcLocator* pSvcLocator ) ;
65 
66 
67  //------------------------------------------------------
68  // Methods used by Athena to run the algorithm
69  //------------------------------------------------------
70 
71  virtual StatusCode initialize() override;
72  virtual StatusCode start() override;
73  virtual StatusCode execute(const EventContext& ctx) const override;
74 
75 private:
76  /* Service and tool handles */
77  ToolHandle<LVL1::IL1EtTools> m_EtTool {
78  this, "L1EtTools", "LVL1::L1EtTools/L1EtTools", "Tool performing the simulation"};
79 
80  /* Input handles */
82  this, "EnergyCMXDataLocation", TrigT1CaloDefs::EnergyCMXDataLocation,
83  "Read handle key for EnergyCMXDataCollection"};
84 
85  /* Output handles */
87  this, "EnergyCTPLocation", TrigT1CaloDefs::EnergyCTPLocation,
88  "Write handle key for EnergyCTP"};
90  this, "EnergyTopoDataLocation", TrigT1CaloDefs::EnergyTopoDataLocation,
91  "Write handle key for EnergyTopoData"};
93  this, "CMXEtSumsLocation", TrigT1CaloDefs::CMXEtSumsLocation,
94  "Write handle key for CMXEtSumsCollection"};
96  this, "CMXRoILocation", TrigT1CaloDefs::CMXRoILocation,
97  "Write handle key for CMXRoI"};
98 
99  SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };
100 
101 
102 private:
103 
106  const SystemEnergy& resultsTrunc,
107  const EventContext& ctx) const;
109  StatusCode saveRoIs(const SystemEnergy& resultsFull,
110  const SystemEnergy& resultsTrunc,
111  const EventContext& ctx) const;
112 
114  unsigned int ctpWord(unsigned int metSigPassed,
115  unsigned int etMissPassed,
116  unsigned int etSumPassed) const;
117 };
118 
119 } // end of namespace bracket
120 
121 #endif
122 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LVL1::EnergyCMX::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: EnergyCMX.h:109
LVL1::EnergyCMX::saveCTPObjects
StatusCode saveCTPObjects(const SystemEnergy &resultsFull, const SystemEnergy &resultsTrunc, const EventContext &ctx) const
form CTP objects and store them in SG.
Definition: EnergyCMX.cxx:293
LVL1::EnergyCMX::start
virtual StatusCode start() override
Definition: EnergyCMX.cxx:63
LVL1::EnergyCMX::m_EtTool
ToolHandle< LVL1::IL1EtTools > m_EtTool
Definition: EnergyCMX.h:87
LVL1::TrigT1CaloDefs::EnergyCMXDataLocation
static const std::string EnergyCMXDataLocation
Definition: TrigT1CaloDefs.h:45
LVL1::TrigT1CaloDefs::CMXRoILocation
static const std::string CMXRoILocation
Definition: TrigT1CaloDefs.h:60
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
IL1EtTools.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::EnergyCMX::m_cmxEtsumsLocation
SG::WriteHandleKey< CMXEtSumsCollection > m_cmxEtsumsLocation
Definition: EnergyCMX.h:102
CrateEnergy.h
EnergyCMXData.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
LVL1::EnergyCMX::CMXEtSumsCollection
DataVector< CMXEtSums > CMXEtSumsCollection
Definition: EnergyCMX.h:64
LVL1::EnergyCMX::EnergyCMXDataCollection
DataVector< EnergyCMXData > EnergyCMXDataCollection
Definition: EnergyCMX.h:63
EnergyCTP.h
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
LVL1::EnergyCMX::m_energyCTPLocation
SG::WriteHandleKey< EnergyCTP > m_energyCTPLocation
Definition: EnergyCMX.h:96
LVL1::TrigT1CaloDefs::CMXEtSumsLocation
static const std::string CMXEtSumsLocation
Definition: TrigT1CaloDefs.h:57
LVL1::EnergyCMX::ctpWord
unsigned int ctpWord(unsigned int metSigPassed, unsigned int etMissPassed, unsigned int etSumPassed) const
returns the Energy CTP word
Definition: EnergyCMX.cxx:284
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigConf::name
Definition: HLTChainList.h:35
AthReentrantAlgorithm.h
CMXRoI.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
LVL1::EnergyCMX::EnergyCMX
EnergyCMX(const std::string &name, ISvcLocator *pSvcLocator)
Definition: EnergyCMX.cxx:38
LVL1::EnergyCMX::m_cmxRoILocation
SG::WriteHandleKey< CMXRoI > m_cmxRoILocation
Definition: EnergyCMX.h:105
EnergyRoI_ClassDEF.h
TrigT1CaloDefs.h
L1DataDef.h
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
LVL1::EnergyCMX::m_energyTopoLocation
SG::WriteHandleKey< EnergyTopoData > m_energyTopoLocation
Definition: EnergyCMX.h:99
CMXEtSums_ClassDEF.h
LVL1::EnergyCMX::m_energyCMXDataLocation
SG::ReadHandleKey< EnergyCMXDataCollection > m_energyCMXDataLocation
Definition: EnergyCMX.h:91
EnergyTopoData.h
LVL1::TrigT1CaloDefs::EnergyCTPLocation
static const std::string EnergyCTPLocation
Definition: TrigT1CaloDefs.h:79
LVL1::SystemEnergy
SystemEnergy class declaration Simulates behaviour of the Crate-CMM System CMM logic is done in Energ...
Definition: SystemEnergy.h:35
LVL1::EnergyCMX::initialize
virtual StatusCode initialize() override
Definition: EnergyCMX.cxx:46
L1Menu.h
SystemEnergy.h
LVL1::EnergyCMX::saveRoIs
StatusCode saveRoIs(const SystemEnergy &resultsFull, const SystemEnergy &resultsTrunc, const EventContext &ctx) const
put EnergyRoIs into SG
Definition: EnergyCMX.cxx:247
LVL1::EnergyCMX::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: EnergyCMX.cxx:77
LVL1::TrigT1CaloDefs::EnergyTopoDataLocation
static const std::string EnergyTopoDataLocation
Definition: TrigT1CaloDefs.h:88