ATLAS Offline Software
EnergyCMX.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 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  // STL
16  #include <string>
17  #include <vector>
18  #include <map>
19 
20  // Athena/Gaudi
22  #include "GaudiKernel/ServiceHandle.h"
23  #include "GaudiKernel/ToolHandle.h"
25  #include "StoreGate/ReadHandleKey.h"
27 
28  // LVL1 Calo Trigger
36  #include "TrigT1CaloEvent/CMXRoI.h"
40  #include "TrigConfData/L1Menu.h"
41 
42 
43  namespace LVL1 {
44  //using namespace TrigConf;
45 
46  //Doxygen class description below:
52  class EnergyCMX : public AthReentrantAlgorithm
53  {
56  public:
57 
58  //-------------------------
59  // Constructors/Destructors
60  //
61  // Athena requires that the constructor takes certain arguments
62  // (and passes them directly to the constructor of the base class)
63  //-------------------------
64 
65  EnergyCMX( const std::string& name, ISvcLocator* pSvcLocator ) ;
66 
67 
68  //------------------------------------------------------
69  // Methods used by Athena to run the algorithm
70  //------------------------------------------------------
71 
72  virtual StatusCode initialize() override;
73  virtual StatusCode start() override;
74  virtual StatusCode execute(const EventContext& ctx) const override;
75 
76 private:
77  /* Service and tool handles */
78  ToolHandle<LVL1::IL1EtTools> m_EtTool {
79  this, "L1EtTools", "LVL1::L1EtTools/L1EtTools", "Tool performing the simulation"};
80 
81  /* Input handles */
83  this, "EnergyCMXDataLocation", TrigT1CaloDefs::EnergyCMXDataLocation,
84  "Read handle key for EnergyCMXDataCollection"};
85 
86  /* Output handles */
88  this, "EnergyCTPLocation", TrigT1CaloDefs::EnergyCTPLocation,
89  "Write handle key for EnergyCTP"};
91  this, "EnergyTopoDataLocation", TrigT1CaloDefs::EnergyTopoDataLocation,
92  "Write handle key for EnergyTopoData"};
94  this, "CMXEtSumsLocation", TrigT1CaloDefs::CMXEtSumsLocation,
95  "Write handle key for CMXEtSumsCollection"};
97  this, "CMXRoILocation", TrigT1CaloDefs::CMXRoILocation,
98  "Write handle key for CMXRoI"};
99 
100  SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };
101 
102 
103 private:
104 
107  const SystemEnergy& resultsTrunc,
108  const EventContext& ctx) const;
110  StatusCode saveRoIs(const SystemEnergy& resultsFull,
111  const SystemEnergy& resultsTrunc,
112  const EventContext& ctx) const;
113 
115  unsigned int ctpWord(unsigned int metSigPassed,
116  unsigned int etMissPassed,
117  unsigned int etSumPassed) const;
118 };
119 
120 } // end of namespace bracket
121 
122 #endif
123 
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:110
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:88
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:103
CrateEnergy.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LVL1::EnergyCMX::CMXEtSumsCollection
DataVector< CMXEtSums > CMXEtSumsCollection
Definition: EnergyCMX.h:65
LVL1::EnergyCMX::EnergyCMXDataCollection
DataVector< EnergyCMXData > EnergyCMXDataCollection
Definition: EnergyCMX.h:64
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:97
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:581
TrigConf::name
Definition: HLTChainList.h:35
AthReentrantAlgorithm.h
EnergyTopoData_ClassDEF.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:106
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:100
CMXEtSums_ClassDEF.h
LVL1::EnergyCMX::m_energyCMXDataLocation
SG::ReadHandleKey< EnergyCMXDataCollection > m_energyCMXDataLocation
Definition: EnergyCMX.h:92
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
EnergyCMXData_ClassDEF.h
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