ATLAS Offline Software
jFEXSysSim.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //***************************************************************************
6 // jFEXSysSim.h -
7 // -------------------
8 // begin : 12 07 2019
9 // email : alison.elliot@cern.ch, jacob.julian.kempster@cern.ch
10 // ***************************************************************************/
11 
12 #ifndef jFEXSysSim_H
13 #define jFEXSysSim_H
16 #include "AthenaKernel/CLASS_DEF.h"
17 
22 
23 #include "L1CaloFEXSim/jFEXSim.h"
24 #include "L1CaloFEXSim/jTower.h"
29 
42 #include "TrigConfData/L1Menu.h"
43 
44 #include "L1CaloFEXSim/jFEXTOB.h"
45 
46 namespace LVL1 {
47 
48  //Doxygen class description below:
56  class jFEXSysSim : public AthAlgTool, virtual public IjFEXSysSim {
57 
58  public:
59 
62  jFEXSysSim(const std::string& type,const std::string& name,const IInterface* parent);
64  jFEXSysSim&& operator= (const jFEXSysSim& ) = delete;
65 
67  virtual StatusCode initialize() override;
69  virtual StatusCode finalize () override;
70 
71  virtual StatusCode execute(jFEXOutputCollection* inputOutputCollection) override ;
72 
73  virtual void init() const override;
74 
75  virtual void cleanup() override;
76 
77  virtual int calcTowerID(int eta, int phi, int mod) const override;
78 
79 
80 
82  private:
83  std::vector<jFEXSim*> m_jFEXCollection;
84 
85  SG::ReadCondHandleKey<jFEXDBCondData> m_DBToolKey {this, "DBToolKey", "jFEXDBParams", "DB tool key"};
86 
87  ToolHandle<IjFEXSim> m_jFEXSimTool {this, "jFEXSimTool", "LVL1::jFEXSim", "Tool that creates the jFEX Simulation"};
88 
89  SG::ReadHandleKey<LVL1::jTowerContainer> m_jTowerContainerSGKey {this, "MyETowers", "jTowerContainer", "Input container for jTowers"};
90 
91  SG::ReadHandleKey<TrigConf::L1Menu> m_l1MenuKey{this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu","Name of the L1Menu object to read configuration from"};
92 
93  // HLT TOBs
94  SG::WriteHandleKey< xAOD::jFexSRJetRoIContainer> m_TobOutKey_jJ {this,"Key_jFexSRJetOutputContainer","L1_jFexSRJetRoI","Output jFexEDM jets container"};
95  SG::WriteHandleKey< xAOD::jFexLRJetRoIContainer> m_TobOutKey_jLJ {this,"Key_jFexLRJetOutputContainer","L1_jFexLRJetRoI","Output jFexEDM Ljets container"};
96  SG::WriteHandleKey< xAOD::jFexTauRoIContainer> m_TobOutKey_jTau {this,"Key_jFexTauOutputContainer" ,"L1_jFexTauRoI" ,"Output jFexEDM tau container"};
97  SG::WriteHandleKey< xAOD::jFexFwdElRoIContainer> m_TobOutKey_jEM {this,"Key_jFexFwdElOutputContainer","L1_jFexFwdElRoI","Output jFexEDM fwdEl container"};
98  SG::WriteHandleKey< xAOD::jFexSumETRoIContainer> m_TobOutKey_jTE {this,"Key_jFexSumETOutputContainer","L1_jFexSumETRoI","Output jFexEDM SumET container"};
99  SG::WriteHandleKey< xAOD::jFexMETRoIContainer> m_TobOutKey_jXE {this,"Key_jFexMETOutputContainer" ,"L1_jFexMETRoI" ,"Output jFexEDM Met container"};
100 
101  // xTOBS
102  SG::WriteHandleKey< xAOD::jFexSRJetRoIContainer> m_xTobOutKey_jJ {this,"Key_xTobOutKey_jJ" ,"L1_jFexSRJetxRoI","Output jFexEDM xTOBs jets container"};
103  SG::WriteHandleKey< xAOD::jFexLRJetRoIContainer> m_xTobOutKey_jLJ {this,"Key_xTobOutKey_jLJ" ,"L1_jFexLRJetxRoI","Output jFexEDM xTOBs Ljets container"};
104  SG::WriteHandleKey< xAOD::jFexTauRoIContainer> m_xTobOutKey_jTau {this,"Key_xTobOutKey_jTau" ,"L1_jFexTauxRoI" ,"Output jFexEDM xTOBs tau container"};
105  SG::WriteHandleKey< xAOD::jFexFwdElRoIContainer> m_xTobOutKey_jEM {this,"Key_xTobOutKey_jEM" ,"L1_jFexFwdElxRoI","Output jFexEDM xTOBs fwdEl container"};
106 
107  // decoration handles for sim-only quantities
108  SG::WriteDecorHandleKey<xAOD::jFexSRJetRoIContainer> m_TobDecorKey_jJ_seedET { this, "Key_tobDecor_jJ_seedET" , m_TobOutKey_jJ , "seedETMeV" , "jJet seed ET value in MeV" };
109  SG::WriteDecorHandleKey<xAOD::jFexSRJetRoIContainer> m_xTobDecorKey_jJ_seedET { this, "Key_xTobDecor_jJ_seedET" , m_xTobOutKey_jJ , "seedETMeV" , "jJet seed ET value in MeV" };
110 
111 
112 
113  std::unordered_map<int,jTower> m_jTowersColl;
114 
115  std::unordered_map<uint8_t, std::vector<std::vector<std::vector<uint32_t>>> > m_allfwdElTobs;
116 
117  std::unordered_map<uint8_t, std::vector<std::vector<std::unique_ptr<jFEXTOB>>> > m_alltauTobs;
118  std::unordered_map<uint8_t, std::vector<std::vector<std::unique_ptr<jFEXTOB>>> > m_allSmallRJetTobs;
119  std::unordered_map<uint8_t, std::vector<std::vector<std::unique_ptr<jFEXTOB>>> > m_allLargeRJetTobs;
120  std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> > m_allsumEtTobs;
121  std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> > m_allMetTobs;
122 
123 
124  // Create and fill a new EDMs object
125 
126  StatusCode fillSRJetEDM(const std::unique_ptr<jFEXTOB>& internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle<xAOD::jFexSRJetRoIContainer> &jContainer) const;
127  StatusCode fillLRJetEDM(const std::unique_ptr<jFEXTOB>& internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexLRJetRoIContainer > &jContainer) const;
128  StatusCode fillTauEDM (const std::unique_ptr<jFEXTOB>& internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexTauRoIContainer > &jContainer) const;
129  StatusCode fillFwdElEDM(uint8_t jFexNum, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexFwdElRoIContainer > &jContainer) const; //for fwdEl no "internal" jFEXTOB is created, thus more plain signature
130  StatusCode fillSumEtEDM(const std::unique_ptr<jFEXTOB>& internalTob, SG::WriteHandle< xAOD::jFexSumETRoIContainer > &jContainer) const;
131  StatusCode fillMetEDM (const std::unique_ptr<jFEXTOB>& internalTob, SG::WriteHandle< xAOD::jFexMETRoIContainer > &jContainer) const;
132 
133  };
134 
135 } // end of namespace
136 
137 //CLASS_DEF( LVL1::jFEXSysSim , 141823245 , 1 )
138 
139 
140 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LVL1::jFEXSysSim::fillLRJetEDM
StatusCode fillLRJetEDM(const std::unique_ptr< jFEXTOB > &internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexLRJetRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1165
jFEXTOB.h
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
jFexFwdElRoIContainer.h
LVL1::jFEXSysSim::m_TobOutKey_jJ
SG::WriteHandleKey< xAOD::jFexSRJetRoIContainer > m_TobOutKey_jJ
Definition: jFEXSysSim.h:94
LVL1::jFEXSysSim::m_allLargeRJetTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::unique_ptr< jFEXTOB > > > > m_allLargeRJetTobs
Definition: jFEXSysSim.h:119
LVL1::jFEXSysSim::fillMetEDM
StatusCode fillMetEDM(const std::unique_ptr< jFEXTOB > &internalTob, SG::WriteHandle< xAOD::jFexMETRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1189
jFexSumETRoIContainer.h
IjFEXSysSim.h
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::jFEXSysSim
The jFEXSysSim class defines the structure of the jFEX system Its purpose is:
Definition: jFEXSysSim.h:56
jFEXSim.h
jFexSumETRoIAuxContainer.h
LVL1::jFEXSysSim::m_allSmallRJetTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::unique_ptr< jFEXTOB > > > > m_allSmallRJetTobs
Definition: jFEXSysSim.h:118
LVL1::jFEXSysSim::m_jFEXSimTool
ToolHandle< IjFEXSim > m_jFEXSimTool
Definition: jFEXSysSim.h:87
LVL1::jFEXSysSim::m_alltauTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::unique_ptr< jFEXTOB > > > > m_alltauTobs
Definition: jFEXSysSim.h:117
jFEXDBCondData.h
jFexLRJetRoIAuxContainer.h
SG::ReadHandleKey< LVL1::jTowerContainer >
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::jFEXSysSim::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: jFEXSysSim.h:91
Dedxcorrection::resolution
double resolution[nGasTypes][nParametersResolution]
Definition: TRT_ToT_Corrections.h:46
jFexTauRoIContainer.h
jFexTauRoIAuxContainer.h
LVL1::jFEXSysSim::m_xTobDecorKey_jJ_seedET
SG::WriteDecorHandleKey< xAOD::jFexSRJetRoIContainer > m_xTobDecorKey_jJ_seedET
Definition: jFEXSysSim.h:109
LVL1::jFEXSysSim::jFEXSysSim
jFEXSysSim(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: jFEXSysSim.cxx:51
LVL1::jFEXSysSim::m_TobOutKey_jEM
SG::WriteHandleKey< xAOD::jFexFwdElRoIContainer > m_TobOutKey_jEM
Definition: jFEXSysSim.h:97
LVL1::jFEXSysSim::calcTowerID
virtual int calcTowerID(int eta, int phi, int mod) const override
Definition: jFEXSysSim.cxx:117
LVL1::jFEXSysSim::m_jTowersColl
std::unordered_map< int, jTower > m_jTowersColl
Definition: jFEXSysSim.h:113
jFexLRJetRoIContainer.h
LVL1::jFEXSysSim::m_jTowerContainerSGKey
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerSGKey
Definition: jFEXSysSim.h:89
LVL1::jFEXSysSim::execute
virtual StatusCode execute(jFEXOutputCollection *inputOutputCollection) override
Definition: jFEXSysSim.cxx:122
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
jFexSRJetRoIContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::jFEXSysSim::m_xTobOutKey_jEM
SG::WriteHandleKey< xAOD::jFexFwdElRoIContainer > m_xTobOutKey_jEM
Definition: jFEXSysSim.h:105
LVL1::jFEXSysSim::fillSRJetEDM
StatusCode fillSRJetEDM(const std::unique_ptr< jFEXTOB > &internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexSRJetRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1128
AthAlgTool.h
WriteDecorHandle.h
Handle class for adding a decoration to an object.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
LVL1::jFEXSysSim::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: jFEXSysSim.cxx:66
LVL1::jFEXSysSim::m_allMetTobs
std::unordered_map< uint8_t, std::vector< std::unique_ptr< jFEXTOB > > > m_allMetTobs
Definition: jFEXSysSim.h:121
LVL1::jFEXOutputCollection
Definition: jFEXOutputCollection.h:23
jFexMETRoIAuxContainer.h
TrigConf::name
Definition: HLTChainList.h:35
LVL1::jFEXSysSim::m_xTobOutKey_jJ
SG::WriteHandleKey< xAOD::jFexSRJetRoIContainer > m_xTobOutKey_jJ
Definition: jFEXSysSim.h:102
LVL1::jFEXSysSim::m_TobOutKey_jTE
SG::WriteHandleKey< xAOD::jFexSumETRoIContainer > m_TobOutKey_jTE
Definition: jFEXSysSim.h:98
ReadCondHandleKey.h
LVL1::jFEXSysSim::operator=
jFEXSysSim && operator=(const jFEXSysSim &)=delete
Destructor.
jTowerContainer.h
LVL1::jFEXSysSim::fillTauEDM
StatusCode fillTauEDM(const std::unique_ptr< jFEXTOB > &internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexTauRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1141
LVL1::jFEXSysSim::m_xTobOutKey_jLJ
SG::WriteHandleKey< xAOD::jFexLRJetRoIContainer > m_xTobOutKey_jLJ
Definition: jFEXSysSim.h:103
LVL1::jFEXSysSim::init
virtual void init() const override
Definition: jFEXSysSim.cxx:105
LVL1::jFEXSysSim::fillSumEtEDM
StatusCode fillSumEtEDM(const std::unique_ptr< jFEXTOB > &internalTob, SG::WriteHandle< xAOD::jFexSumETRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1177
CaloCellContainer.h
LVL1::jFEXSysSim::m_jFEXCollection
std::vector< jFEXSim * > m_jFEXCollection
Internal data.
Definition: jFEXSysSim.h:83
jFexFwdElRoIAuxContainer.h
LVL1::jFEXSysSim::m_TobOutKey_jXE
SG::WriteHandleKey< xAOD::jFexMETRoIContainer > m_TobOutKey_jXE
Definition: jFEXSysSim.h:99
LVL1::jFEXSysSim::m_TobOutKey_jLJ
SG::WriteHandleKey< xAOD::jFexLRJetRoIContainer > m_TobOutKey_jLJ
Definition: jFEXSysSim.h:95
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
LVL1::jFEXSysSim::cleanup
virtual void cleanup() override
Definition: jFEXSysSim.cxx:109
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
LVL1::jFEXSysSim::m_TobDecorKey_jJ_seedET
SG::WriteDecorHandleKey< xAOD::jFexSRJetRoIContainer > m_TobDecorKey_jJ_seedET
Definition: jFEXSysSim.h:108
LVL1::jFEXSysSim::m_allfwdElTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::vector< uint32_t > > > > m_allfwdElTobs
Definition: jFEXSysSim.h:115
LVL1::IjFEXSysSim
Definition: IjFEXSysSim.h:41
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::jFEXSysSim::finalize
virtual StatusCode finalize() override
standard Athena-Algorithm method
Definition: jFEXSysSim.cxx:99
LVL1::jFEXSysSim::m_DBToolKey
SG::ReadCondHandleKey< jFEXDBCondData > m_DBToolKey
Definition: jFEXSysSim.h:85
CaloIdManager.h
LVL1::jFEXSysSim::fillFwdElEDM
StatusCode fillFwdElEDM(uint8_t jFexNum, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexFwdElRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1153
AthAlgTool
Definition: AthAlgTool.h:26
L1Menu.h
LVL1::jFEXSysSim::m_xTobOutKey_jTau
SG::WriteHandleKey< xAOD::jFexTauRoIContainer > m_xTobOutKey_jTau
Definition: jFEXSysSim.h:104
LVL1::jFEXSysSim::m_allsumEtTobs
std::unordered_map< uint8_t, std::vector< std::unique_ptr< jFEXTOB > > > m_allsumEtTobs
Definition: jFEXSysSim.h:120
jTower.h
LVL1::jFEXSysSim::m_TobOutKey_jTau
SG::WriteHandleKey< xAOD::jFexTauRoIContainer > m_TobOutKey_jTau
Definition: jFEXSysSim.h:96
CLASS_DEF.h
macros to associate a CLID to a type
jFexSRJetRoIAuxContainer.h
jFexMETRoIContainer.h