ATLAS Offline Software
jTower.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //***************************************************************************
6 // jTower.h - description
7 // -------------------
8 // begin : 19 02 2019
9 // email : Alan.Watson@cern.ch, jacob.julian.kempster@cern.ch
10 // ***************************************************************************/
11 
12 
13 #ifndef jTower_H
14 #define jTower_H
15 
16 #include <vector>
17 #include "Identifier/Identifier.h"
18 #include "AthenaKernel/CLASS_DEF.h"
20 
21 namespace LVL1 {
22 
23  //Doxygen class description below:
36  class jTower {
37 
38  public:
39 
41  jTower();
42  jTower(int ieta, int iphi, int towerid, int posneg, float centre_eta = -1.0, float centre_phi = -1.0, int fcal_layer = -1);
43 
45  virtual ~jTower() = default;
46 
48  void clearET();
49 
51  void clear_EM_scIDs();
52  void clear_HAD_scIDs();
53 
55  void setEMSat(){m_EM_sat = true;};
56  bool getEMSat() const {return m_EM_sat; };
57 
58  void setHADSat(){m_HAD_sat = true;};
59  bool getHADSat() const {return m_HAD_sat;};
60 
61  bool getTowerSat() const { return (m_EM_sat || m_HAD_sat);};
62 
64  void addET(float et, int cell);
65 
67  void recordMD_ET(float et, int cell);
68 
70  void setCentreEta(float ieta);
71  void setCentrePhi(float iphi);
72  void setiEta(int ieta);
73  void setiPhi(int iphi);
74 
76  int iEta() const;
77  int iPhi() const;
78 
79  float centreEta() const {return m_centre_eta;}
80  float centrePhi() const {return m_centre_phi;}
81  float centrephi_toPI() const {return m_centre_phi_toPI;}
82 
84  void setTTowerArea(int area,int layer);
85  int getTTowerArea(int layer) const;
86 
88  void setTTowerAreaInv(int area,int layer);
89  int getTTowerAreaInv(int layer) const;
90 
92  void setMinEtforPileup(int etval){m_minEt_pileup_thr=etval;};
93  int getMinEtforPileup() const {return m_minEt_pileup_thr;};
94  void setMaxEtforPileup(int etval){m_maxEt_pileup_thr=etval;};
95  int getMaxEtforPileup() const {return m_maxEt_pileup_thr;};
96 
97 
98 
99 
100  int fcalLayer() const {return m_fcal_layer;}
101 
102  // jTower ID Online and Offline
103  void setOnlineID(int tower_id_online);
104 
105  int OnlineID() {return m_tower_id_online;};
106  int OnlineID() const {return m_tower_id_online;}
107  int OfflineID() {return m_tower_id;};
108  int OfflineID() const {return m_tower_id;}
109 
110  float constid() const {return m_tower_id;};
111 
113  int getET(unsigned int layer, int cell = 0) const;
114 
116  int getTotalET() const;
117 
119  int getLayerTotalET(unsigned int layer) const;
120 
122  std::vector<int> getLayerETvec(unsigned int layer) const;
123 
125  const std::vector<int>& getETs() const {return m_et;};
126 
128  void set_Et(int layer, int et);
129 
131  int getET_EM() const {return m_et[0];};
132 
134  int getET_HAD() const {return m_et[1];};
135 
137  float getET_float(unsigned int layer, int cell = 0) const;
138 
140  float getTotalET_float() const;
141 
143  float getLayerTotalET_float(unsigned int layer) const;
144 
146  std::vector<float> getLayerETvec_float(unsigned int layer) const;
147 
149  const std::vector<float>& getETs_float() const {return m_et_float_raw;};
150 
151  void set_TileCal_Et(int layer, int et);
152 
154  void set_LAr_Et(Identifier ID, int cell, float et, int layer);
155 
157  void Do_LAr_encoding();
158 
160  void setNoiseForMet(int noiseVal,int layer);
161  int getNoiseForMet(int layer)const;
162  void setNoiseForJet(int noiseVal,int layer);
163  int getNoiseForJet(int layer)const;
164 
165  const std::vector<Identifier>& getEMSCIDs() const { return m_EM_scID; }
166  const std::vector<Identifier>& getHADSCIDs() const { return m_HAD_scID; }
167 
168  Identifier getEMSCID(int cell) const { return m_EM_scID[cell]; }
169  Identifier getHADSCID(int cell) const { return m_HAD_scID[cell]; }
170 
171  std::vector<Identifier> getLayerSCIDs(unsigned int layer) const;
172 
173  void setPosNeg(int posneg);
174 
175  inline int getPosNeg() const {return m_posneg;}
176 
178  private:
179 
180  int m_iEta=0;
181  int m_iPhi=0;
182  int m_tower_id = 0;
184  int m_posneg = 0;
185  float m_centre_eta =0;
186  float m_centre_phi =0;
188 
189  std::vector<Identifier> m_EM_scID;
190  std::vector<Identifier> m_HAD_scID;
191  std::vector<int> m_et; // Real energy from TILE and the decoded energy from LATOME
192  std::vector<float> m_et_float_raw; // Raw imput energy from LATOME (not encoded/decoded) and TILE.
193  std::vector<int> m_TTowerArea{ 1, 1};
194  std::vector<int> m_TTowerAreaInv{ 1, 1};
195  int m_fcal_layer = -1;
196  int m_NoiseForMet[2] = {0};
197  int m_NoiseForJet[2] = {0};
198  int m_minEt_pileup_thr = -999;
199  int m_maxEt_pileup_thr = -999;
200  bool m_EM_sat = false;
201  bool m_HAD_sat = false;
202 
203 
204  };
205 
206 } // end of namespace
207 
208 CLASS_DEF( LVL1::jTower , 41848655 , 1 )
209 
210 #endif
LVL1::jTower::m_HAD_sat
bool m_HAD_sat
Definition: jTower.h:201
LVL1::jTower::OfflineID
int OfflineID()
Definition: jTower.h:107
et
Extra patterns decribing particle interation process.
LVL1::jTower::m_iPhi
int m_iPhi
Definition: jTower.h:181
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LVL1::jTower::setCentreEta
void setCentreEta(float ieta)
Add to eta/phi values of a specified tower.
Definition: jTower.cxx:295
LVL1::jTower::iEta
int iEta() const
Get coordinates of tower.
Definition: jTower.cxx:166
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
AuxStoreAccessorMacros.h
LVL1::jTower::setiEta
void setiEta(int ieta)
Definition: jTower.cxx:299
LVL1::jTower::setTTowerAreaInv
void setTTowerAreaInv(int area, int layer)
Add to Area inverted values of a specified tower.
Definition: jTower.cxx:325
LVL1::jTower::centrephi_toPI
float centrephi_toPI() const
Definition: jTower.h:81
LVL1::jTower::setPosNeg
void setPosNeg(int posneg)
Definition: jTower.cxx:76
LVL1::jTower::setNoiseForMet
void setNoiseForMet(int noiseVal, int layer)
Noise values for each layer and object.
Definition: jTower.cxx:333
LVL1::jTower::fcalLayer
int fcalLayer() const
Definition: jTower.h:100
LVL1::jTower::getET
int getET(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV.
Definition: jTower.cxx:176
LVL1::jTower::m_centre_phi
float m_centre_phi
Definition: jTower.h:186
LVL1::jTower::getPosNeg
int getPosNeg() const
Definition: jTower.h:175
LVL1::jTower::m_TTowerAreaInv
std::vector< int > m_TTowerAreaInv
Definition: jTower.h:194
LVL1::jTower::~jTower
virtual ~jTower()=default
Destructor.
LVL1::jTower::getETs
const std::vector< int > & getETs() const
Get vector of all ET values in MeV.
Definition: jTower.h:125
LVL1::jTower::getMaxEtforPileup
int getMaxEtforPileup() const
Definition: jTower.h:95
LVL1::jTower::centreEta
float centreEta() const
Definition: jTower.h:79
LVL1::jTower::set_LAr_Et
void set_LAr_Et(Identifier ID, int cell, float et, int layer)
Set LAr supercell position ID.
Definition: jTower.cxx:122
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::jTower::m_fcal_layer
int m_fcal_layer
Definition: jTower.h:195
LVL1::jTower::m_tower_id_online
int m_tower_id_online
Definition: jTower.h:183
LVL1::jTower::getTTowerAreaInv
int getTTowerAreaInv(int layer) const
Definition: jTower.cxx:329
LVL1::jTower::m_maxEt_pileup_thr
int m_maxEt_pileup_thr
Definition: jTower.h:199
LVL1::jTower::m_iEta
int m_iEta
Internal data.
Definition: jTower.h:180
LVL1::jTower::getTowerSat
bool getTowerSat() const
Definition: jTower.h:61
LVL1::jTower::getETs_float
const std::vector< float > & getETs_float() const
Get vector of all ET values in MeV FLOAT VERSION.
Definition: jTower.h:149
LVL1::jTower::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: jTower.cxx:239
LVL1::jTower::OnlineID
int OnlineID() const
Definition: jTower.h:106
LVL1::jTower::getNoiseForJet
int getNoiseForJet(int layer) const
Definition: jTower.cxx:347
LVL1::jTower::clearET
void clearET()
Clear supercell ET values.
Definition: jTower.cxx:55
LVL1::jTower::setiPhi
void setiPhi(int iphi)
Definition: jTower.cxx:309
LVL1::jTower::getHADSat
bool getHADSat() const
Definition: jTower.h:59
LVL1::jTower::setTTowerArea
void setTTowerArea(int area, int layer)
Add to Area values of a specified tower.
Definition: jTower.cxx:317
LVL1::jTower::OnlineID
int OnlineID()
Definition: jTower.h:105
LVL1::jTower::getET_float
float getET_float(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV FLOAT VERSION.
Definition: jTower.cxx:187
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1::jTower::addET
void addET(float et, int cell)
Add to ET of a specified cell in MeV.
Definition: jTower.cxx:85
LVL1::jTower::setCentrePhi
void setCentrePhi(float iphi)
Definition: jTower.cxx:303
LVL1::jTower::getTotalET
int getTotalET() const
Get ET sum of all cells in the jTower in MeV.
Definition: jTower.cxx:198
LVL1::jTower::m_TTowerArea
std::vector< int > m_TTowerArea
Definition: jTower.h:193
LVL1::jTower::iPhi
int iPhi() const
Return global phi index.
Definition: jTower.cxx:171
LVL1::jTower::m_et
std::vector< int > m_et
Definition: jTower.h:191
LVL1::jTower::m_tower_id
int m_tower_id
Definition: jTower.h:182
LVL1::jTower::jTower
jTower()
Constructors.
Definition: jTower.cxx:24
LVL1::jTower::recordMD_ET
void recordMD_ET(float et, int cell)
Add to ET of a specified cell.
LVL1::jTower::set_TileCal_Et
void set_TileCal_Et(int layer, int et)
Definition: jTower.cxx:105
LVL1::jTower::setOnlineID
void setOnlineID(int tower_id_online)
Definition: jTower.cxx:313
LVL1::jTower::getLayerSCIDs
std::vector< Identifier > getLayerSCIDs(unsigned int layer) const
Definition: jTower.cxx:282
LVL1::jTower::getET_EM
int getET_EM() const
Get EM ET value in MeV.
Definition: jTower.h:131
LVL1::jTower::Do_LAr_encoding
void Do_LAr_encoding()
Applies LAr digitization scheme.
Definition: jTower.cxx:154
LVL1::jTower::getLayerETvec
std::vector< int > getLayerETvec(unsigned int layer) const
Get vector of ET values for a given layer in MeV.
Definition: jTower.cxx:223
LVL1::jTower::m_HAD_scID
std::vector< Identifier > m_HAD_scID
Definition: jTower.h:190
LVL1::jTower::getET_HAD
int getET_HAD() const
Get HAD ET value in MeV.
Definition: jTower.h:134
LVL1::jTower::getEMSCID
Identifier getEMSCID(int cell) const
Definition: jTower.h:168
LVL1::jTower::m_et_float_raw
std::vector< float > m_et_float_raw
Definition: jTower.h:192
LVL1::jTower::m_centre_eta
float m_centre_eta
Definition: jTower.h:185
LVL1::jTower::m_EM_sat
bool m_EM_sat
Definition: jTower.h:200
LVL1::jTower::getMinEtforPileup
int getMinEtforPileup() const
Definition: jTower.h:93
LVL1::jTower::setHADSat
void setHADSat()
Definition: jTower.h:58
LVL1::jTower::m_EM_scID
std::vector< Identifier > m_EM_scID
Definition: jTower.h:189
LVL1::jTower::centrePhi
float centrePhi() const
Definition: jTower.h:80
LVL1::jTower::getTTowerArea
int getTTowerArea(int layer) const
Definition: jTower.cxx:321
LVL1::jTower::setNoiseForJet
void setNoiseForJet(int noiseVal, int layer)
Definition: jTower.cxx:342
LVL1::jTower::getEMSat
bool getEMSat() const
Definition: jTower.h:56
LVL1::jTower::getEMSCIDs
const std::vector< Identifier > & getEMSCIDs() const
Definition: jTower.h:165
LVL1::jTower::setEMSat
void setEMSat()
set and get saturation
Definition: jTower.h:55
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:67
LVL1::jTower::getTotalET_float
float getTotalET_float() const
Get ET sum of all cells in the jTower in MeV FLOAT VERSION.
Definition: jTower.cxx:210
LVL1::jTower::setMinEtforPileup
void setMinEtforPileup(int etval)
Add to pilup lower and upper thresholds.
Definition: jTower.h:92
LVL1::jTower
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition: jTower.h:36
LVL1::jTower::set_Et
void set_Et(int layer, int et)
Set ET value in MeV.
Definition: jTower.cxx:100
LVL1::jTower::setMaxEtforPileup
void setMaxEtforPileup(int etval)
Definition: jTower.h:94
LVL1::jTower::clear_HAD_scIDs
void clear_HAD_scIDs()
Clear and resize HAD SC Identifier value vector.
Definition: jTower.cxx:70
LVL1::jTower::constid
float constid() const
Definition: jTower.h:110
LVL1::jTower::m_NoiseForJet
int m_NoiseForJet[2]
Definition: jTower.h:197
LVL1::jTower::clear_EM_scIDs
void clear_EM_scIDs()
Clear and resize Identifier value vector.
Definition: jTower.cxx:64
LVL1::jTower::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: jTower.cxx:269
LVL1::jTower::getNoiseForMet
int getNoiseForMet(int layer) const
Definition: jTower.cxx:338
LVL1::jTower::getHADSCID
Identifier getHADSCID(int cell) const
Definition: jTower.h:169
LVL1::jTower::m_posneg
int m_posneg
Definition: jTower.h:184
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
LVL1::jTower::getHADSCIDs
const std::vector< Identifier > & getHADSCIDs() const
Definition: jTower.h:166
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::jTower::m_centre_phi_toPI
float m_centre_phi_toPI
Definition: jTower.h:187
LVL1::jTower::OfflineID
int OfflineID() const
Definition: jTower.h:108
LVL1::jTower::m_minEt_pileup_thr
int m_minEt_pileup_thr
Definition: jTower.h:198
LVL1::jTower::m_NoiseForMet
int m_NoiseForMet[2]
Definition: jTower.h:196
LVL1::jTower::getLayerTotalET
int getLayerTotalET(unsigned int layer) const
Get total ET sum of all cells in a given layer in MeV.
Definition: jTower.cxx:255
Identifier
Definition: IdentifierFieldParser.cxx:14