ATLAS Offline Software
eTower.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 // eTower.h - description
7 // -------------------
8 // begin : 19 02 2019
9 // email : Alan.Watson@cern.ch, jacob.julian.kempster@cern.ch
10 // ***************************************************************************/
11 
12 
13 #ifndef eTower_H
14 #define eTower_H
15 
16 #include <vector>
17 #include "AthenaKernel/CLASS_DEF.h"
20 
22 
23 namespace LVL1 {
24 
25  //Doxygen class description below:
38  class eTower {
39 
40  public:
41 
43  eTower();
44  eTower(float eta, float phi, int id_modifier, int posneg);
45 
47  virtual ~eTower() = default;
48 
50  void clearET();
51 
53  void clear_scIDs();
54 
56  void addET(float et, int cell);
57 
59  void recordMD_ET(float et, int cell);
60 
62  int iEta() const;
63  int iPhi() const;
64  float eta() const {return m_eta;};
65  float phi() const {return m_phi;};
66 
67  void setEta(const float thiseta){ m_eta = thiseta; }
68 
69  int id() const {return m_tower_id;}
70 
71  float constid() const {return m_tower_id;};
72 
74  int getET(unsigned int layer, int cell = 0) const;
75 
77  int getTotalET() const;
78 
80  int getLayerTotalET(unsigned int layer) const;
81 
83  std::vector<int> getLayerETvec(unsigned int layer) const;
84 
86  const std::vector<int>& getETs() const {return m_et;};
87 
89  std::vector<unsigned int> getETSplits() const {return m_etSplits;};
90 
92  float getET_float(unsigned int layer, int cell = 0) const;
93 
95  float getTotalET_float() const;
96 
98  float getLayerTotalET_float(unsigned int layer) const;
99 
101  std::vector<float> getLayerETvec_float(unsigned int layer) const;
102 
104  std::vector<float> getETs_float() const {return m_et_float;};
105 
106  void setET(int cell, float et, int layer, bool ignoreDisable=false);
107 
109  void setSCID(Identifier ID, int cell, float et, int layer, bool doenergysplit);
110 
111  std::vector<Identifier> getSCIDs() const { return m_scID; }
112 
113  std::vector<Identifier> getSCIDs_split() const { return m_scID_split; }
114 
115  Identifier getSCID(int cell) const { return m_scID[cell]; }
116 
117  std::vector<Identifier> getLayerSCIDs(unsigned int layer) const;
118 
119  void setPosNeg(int posneg);
120 
121  inline int getPosNeg() const {return m_posneg;}
122 
124  private:
125  float m_eta;
126  float m_phi;
127  std::vector<Identifier> m_scID;
128  std::vector<Identifier> m_scID_split;
129  std::vector<int> m_et;
130  std::vector<float> m_et_float;
131  std::vector<unsigned int> m_etSplits;
133  int m_posneg = 0;
134 
135  };
136 
137 } // end of namespace
138 
139 CLASS_DEF( LVL1::eTower , 32201259 , 1 )
140 
141 
142 #endif
LVL1::eTower::m_tower_id
int m_tower_id
Definition: eTower.h:132
LVL1::eTower::iPhi
int iPhi() const
Return global phi index.
Definition: eTower.cxx:167
et
Extra patterns decribing particle interation process.
LVL1::eTower::getLayerTotalET_float
float getLayerTotalET_float(unsigned int layer) const
Get total ET sum of all cells in a given layer in MeV FLOAT VERSION.
Definition: eTower.cxx:273
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LVL1::eTower::getTotalET
int getTotalET() const
Get ET sum of all cells in the eTower in MeV.
Definition: eTower.cxx:194
LVL1::eTower::getLayerETvec_float
std::vector< float > getLayerETvec_float(unsigned int layer) const
Get vector of ET values for a given layer in MeV FLOAT VERSION.
Definition: eTower.cxx:233
LVL1::eTower
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
Definition: eTower.h:38
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
AuxStoreAccessorMacros.h
LVL1::eTower::clearET
void clearET()
Clear supercell ET values.
Definition: eTower.cxx:47
LVL1::eTower::setPosNeg
void setPosNeg(int posneg)
Definition: eTower.cxx:80
LVL1::eTower::setEta
void setEta(const float thiseta)
Definition: eTower.h:67
LVL1::eTower::constid
float constid() const
Definition: eTower.h:71
LVL1::eTower::m_et
std::vector< int > m_et
Definition: eTower.h:129
LVL1::eTower::getPosNeg
int getPosNeg() const
Definition: eTower.h:121
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eTower::setSCID
void setSCID(Identifier ID, int cell, float et, int layer, bool doenergysplit)
Set supercell position ID.
Definition: eTower.cxx:110
LVL1::eTower::~eTower
virtual ~eTower()=default
Destructor.
LVL1::eTower::id
int id() const
Definition: eTower.h:69
LVL1::eTower::phi
float phi() const
Definition: eTower.h:65
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
LVL1::eTower::getSCIDs
std::vector< Identifier > getSCIDs() const
Definition: eTower.h:111
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1::eTower::m_phi
float m_phi
Definition: eTower.h:126
LVL1::eTower::getLayerSCIDs
std::vector< Identifier > getLayerSCIDs(unsigned int layer) const
Definition: eTower.cxx:296
LVL1::eTower::eTower
eTower()
Constructors.
Definition: eTower.cxx:25
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
LVL1::eTower::getETs
const std::vector< int > & getETs() const
Get vector of all ET values in MeV.
Definition: eTower.h:86
LVL1::eTower::m_et_float
std::vector< float > m_et_float
Definition: eTower.h:130
LVL1::eTower::getET
int getET(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV.
Definition: eTower.cxx:172
LVL1::eTower::getLayerTotalET
int getLayerTotalET(unsigned int layer) const
Get total ET sum of all cells in a given layer in MeV.
Definition: eTower.cxx:249
LVL1::eTower::clear_scIDs
void clear_scIDs()
Clear and resize Identifier value vector.
Definition: eTower.cxx:67
LVL1::eTower::addET
void addET(float et, int cell)
Add to ET of a specified cell in MeV.
Definition: eTower.cxx:89
LVL1::eTower::m_posneg
int m_posneg
Definition: eTower.h:133
LVL1::eTower::recordMD_ET
void recordMD_ET(float et, int cell)
Add to ET of a specified cell.
LVL1::eTower::m_scID
std::vector< Identifier > m_scID
Definition: eTower.h:127
LVL1::eTower::getLayerETvec
std::vector< int > getLayerETvec(unsigned int layer) const
Get vector of ET values for a given layer in MeV.
Definition: eTower.cxx:217
LVL1::eTower::m_etSplits
std::vector< unsigned int > m_etSplits
Definition: eTower.h:131
LVL1::eTower::getSCIDs_split
std::vector< Identifier > getSCIDs_split() const
Definition: eTower.h:113
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::eTower::getET_float
float getET_float(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV FLOAT VERSION.
Definition: eTower.cxx:183
LVL1::eTower::getSCID
Identifier getSCID(int cell) const
Definition: eTower.h:115
CaloIdManager.h
LVL1::eTower::eta
float eta() const
Definition: eTower.h:64
LVL1::eTower::m_eta
float m_eta
Internal data.
Definition: eTower.h:125
LVL1::eTower::getETSplits
std::vector< unsigned int > getETSplits() const
Get vector of INT which describe whether a slot shared split ET from two different supercells - requi...
Definition: eTower.h:89
LVL1::eTower::getTotalET_float
float getTotalET_float() const
Get ET sum of all cells in the eTower in MeV FLOAT VERSION.
Definition: eTower.cxx:204
LVL1::eTower::getETs_float
std::vector< float > getETs_float() const
Get vector of all ET values in MeV FLOAT VERSION.
Definition: eTower.h:104
LVL1::eTower::setET
void setET(int cell, float et, int layer, bool ignoreDisable=false)
Definition: eTower.cxx:99
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::eTower::iEta
int iEta() const
Get coordinates of tower.
Definition: eTower.cxx:159
LVL1::eTower::m_scID_split
std::vector< Identifier > m_scID_split
Definition: eTower.h:128