ATLAS Offline Software
gFEXOutputCollection.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 // gFEXOutputCollection
6 // -------------------
7 // begin : 01 04 2021
8 // email : cecilia.tosciri@cern.ch
9 //***************************************************************************
10 
11 
12 #ifndef gFEXOutputCollection_H
13 #define gFEXOutputCollection_H
14 
15 #include "AthenaKernel/CLASS_DEF.h"
16 #include <unordered_map>
17 #include <vector>
18 #include <string>
19 
20 namespace LVL1 {
22  {
23  //gFEXOutputCollection class stores the output of gFEX simulation for the use of gFEXNtupleWriter.
24 
25 
26  public:
27  //constructor
29 
30  //Destructor
32 
33 
34  void clearJets();
35  void clearGlobals();
36 
44  void addValueJet(std::string key, float value);
45  void addValueGlobal(std::string key, float value);
46 
47  //Save all jet values. Use only after finishing defining all jet values for one TOB.
48  void fillJet();
49  void fillGlobal();
50 
51  //Get total number of TOBs saved
52  int jetsSize() const;
53  int globalsSize() const;
54 
55  //Get all jets related values
56  std::unordered_map<std::string, float> getJet(int) const;
57  std::unordered_map<std::string, float> getGlobal(int) const;
58 
59  //Add a 32-bit jet TOB word
60  void addJetTob(uint32_t);
61  void addGlobalTob(uint32_t);
62 
63  //Get all jet TOB words of an event
64  std::vector<uint32_t> getJetTob() const;
65  std::vector<uint32_t> getGlobalTob() const;
66 
67  //setting true if ntuple output is needed
68  void setdooutput(bool);
69 
70  //return true if ntuple output is needed
71  bool getdooutput() const;
72 
73  private:
74  bool m_dooutput; //if write Ntuple
75  //vector of TOB words
76  std::vector<uint32_t> m_jettob;
77  std::vector<uint32_t> m_globaltob;
78  // /// jet related values of a TOB
79  std::unordered_map<std::string, float> m_values_gFEXJet;
80  std::unordered_map<std::string, float> m_values_gFEXGlobal;
82  std::vector<std::unordered_map<std::string, float>> m_allvalues_gFEXjet;
83  std::vector<std::unordered_map<std::string, float>> m_allvalues_gFEXglobal;
84 
85  };
86 }
88 
89 #endif
LVL1::gFEXOutputCollection::fillJet
void fillJet()
Definition: gFEXOutputCollection.cxx:42
LVL1::gFEXOutputCollection::getJet
std::unordered_map< std::string, float > getJet(int) const
Definition: gFEXOutputCollection.cxx:53
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
athena.value
value
Definition: athena.py:122
LVL1::gFEXOutputCollection::clearJets
void clearJets()
Definition: gFEXOutputCollection.cxx:21
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::gFEXOutputCollection::m_globaltob
std::vector< uint32_t > m_globaltob
Definition: gFEXOutputCollection.h:77
LVL1::gFEXOutputCollection::setdooutput
void setdooutput(bool)
Definition: gFEXOutputCollection.cxx:102
LVL1::gFEXOutputCollection
Definition: gFEXOutputCollection.h:22
LVL1::gFEXOutputCollection::getJetTob
std::vector< uint32_t > getJetTob() const
Definition: gFEXOutputCollection.cxx:63
LVL1::gFEXOutputCollection::addValueGlobal
void addValueGlobal(std::string key, float value)
Definition: gFEXOutputCollection.cxx:70
LVL1::gFEXOutputCollection::m_values_gFEXGlobal
std::unordered_map< std::string, float > m_values_gFEXGlobal
Definition: gFEXOutputCollection.h:80
LVL1::gFEXOutputCollection::m_allvalues_gFEXjet
std::vector< std::unordered_map< std::string, float > > m_allvalues_gFEXjet
jet related values of all TOBs in an event
Definition: gFEXOutputCollection.h:82
LVL1::gFEXOutputCollection::clearGlobals
void clearGlobals()
Definition: gFEXOutputCollection.cxx:29
LVL1::gFEXOutputCollection::m_values_gFEXJet
std::unordered_map< std::string, float > m_values_gFEXJet
Definition: gFEXOutputCollection.h:79
LVL1::gFEXOutputCollection::~gFEXOutputCollection
~gFEXOutputCollection()
Definition: gFEXOutputCollection.cxx:17
LVL1::gFEXOutputCollection::fillGlobal
void fillGlobal()
Definition: gFEXOutputCollection.cxx:75
LVL1::gFEXOutputCollection::m_jettob
std::vector< uint32_t > m_jettob
Definition: gFEXOutputCollection.h:76
LVL1::gFEXOutputCollection::gFEXOutputCollection
gFEXOutputCollection()
Definition: gFEXOutputCollection.cxx:13
LVL1::gFEXOutputCollection::jetsSize
int jetsSize() const
Definition: gFEXOutputCollection.cxx:48
LVL1::gFEXOutputCollection::addJetTob
void addJetTob(uint32_t)
Definition: gFEXOutputCollection.cxx:58
LVL1::gFEXOutputCollection::m_dooutput
bool m_dooutput
Definition: gFEXOutputCollection.h:74
LVL1::gFEXOutputCollection::m_allvalues_gFEXglobal
std::vector< std::unordered_map< std::string, float > > m_allvalues_gFEXglobal
Definition: gFEXOutputCollection.h:83
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
LVL1::gFEXOutputCollection::getdooutput
bool getdooutput() const
Definition: gFEXOutputCollection.cxx:106
LVL1::gFEXOutputCollection::getGlobalTob
std::vector< uint32_t > getGlobalTob() const
Definition: gFEXOutputCollection.cxx:96
LVL1::gFEXOutputCollection::getGlobal
std::unordered_map< std::string, float > getGlobal(int) const
Definition: gFEXOutputCollection.cxx:86
LVL1::gFEXOutputCollection::globalsSize
int globalsSize() const
Definition: gFEXOutputCollection.cxx:81
LVL1::gFEXOutputCollection::addGlobalTob
void addGlobalTob(uint32_t)
Definition: gFEXOutputCollection.cxx:91
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::gFEXOutputCollection::addValueJet
void addValueJet(std::string key, float value)
add a value related to the jet finder algorithm for a TOB
Definition: gFEXOutputCollection.cxx:37
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37