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 "AthenaKernel/CLASS_DEF.h"
21 
22 #include "xAODBase/IParticle.h"
24 
25 namespace LVL1 {
26 
27  //Doxygen class description below:
40  class jTower {
41 
42  public:
43 
45  jTower();
46  jTower(int ieta, int iphi, int towerid, int posneg, float centre_eta = -1.0, float centre_phi = -1.0, int fcal_layer = -1);
47 
49  virtual ~jTower() = default;
50 
52  void clearET();
53 
55  void clear_EM_scIDs();
56  void clear_HAD_scIDs();
57 
59  void setEMSat(){m_EM_sat = true;};
60  bool getEMSat() const {return m_EM_sat; };
61 
62  void setHADSat(){m_HAD_sat = true;};
63  bool getHADSat() const {return m_HAD_sat;};
64 
65  bool getTowerSat() const { return (m_EM_sat || m_HAD_sat);};
66 
68  void addET(float et, int cell);
69 
71  void recordMD_ET(float et, int cell);
72 
74  void setCentreEta(float ieta);
75  void setCentrePhi(float iphi);
76  void setiEta(int ieta);
77  void setiPhi(int iphi);
78 
80  int iEta() const;
81  int iPhi() const;
82 
83  float centreEta() const {return m_centre_eta;}
84  float centrePhi() const {return m_centre_phi;}
85  float centrephi_toPI() const {return m_centre_phi_toPI;}
86 
88  void setTTowerArea(int area,int layer);
89  int getTTowerArea(int layer) const;
90 
92  void setTTowerAreaInv(int area,int layer);
93  int getTTowerAreaInv(int layer) const;
94 
96  void setMinEtforPileup(int etval){m_minEt_pileup_thr=etval;};
97  int getMinEtforPileup() const {return m_minEt_pileup_thr;};
98  void setMaxEtforPileup(int etval){m_maxEt_pileup_thr=etval;};
99  int getMaxEtforPileup() const {return m_maxEt_pileup_thr;};
100 
101 
102 
103 
104  int fcalLayer() const {return m_fcal_layer;}
105 
106  // jTower ID Online and Offline
107  void setOnlineID(int tower_id_online);
108 
109  int OnlineID() {return m_tower_id_online;};
110  int OnlineID() const {return m_tower_id_online;}
111  int OfflineID() {return m_tower_id;};
112  int OfflineID() const {return m_tower_id;}
113 
114  float constid() const {return m_tower_id;};
115 
117  int getET(unsigned int layer, int cell = 0) const;
118 
120  int getTotalET() const;
121 
123  int getLayerTotalET(unsigned int layer) const;
124 
126  std::vector<int> getLayerETvec(unsigned int layer) const;
127 
129  const std::vector<int>& getETs() const {return m_et;};
130 
132  void set_Et(int layer, int et);
133 
135  int getET_EM() const {return m_et[0];};
136 
138  int getET_HAD() const {return m_et[1];};
139 
141  float getET_float(unsigned int layer, int cell = 0) const;
142 
144  float getTotalET_float() const;
145 
147  float getLayerTotalET_float(unsigned int layer) const;
148 
150  std::vector<float> getLayerETvec_float(unsigned int layer) const;
151 
153  const std::vector<float>& getETs_float() const {return m_et_float_raw;};
154 
155  void set_TileCal_Et(int layer, int et);
156 
158  void set_LAr_Et(Identifier ID, int cell, float et, int layer);
159 
161  void Do_LAr_encoding();
162 
164  void setNoiseForMet(int noiseVal,int layer);
165  int getNoiseForMet(int layer)const;
166  void setNoiseForJet(int noiseVal,int layer);
167  int getNoiseForJet(int layer)const;
168 
169  const std::vector<Identifier>& getEMSCIDs() const { return m_EM_scID; }
170  const std::vector<Identifier>& getHADSCIDs() const { return m_HAD_scID; }
171 
172  Identifier getEMSCID(int cell) const { return m_EM_scID[cell]; }
173  Identifier getHADSCID(int cell) const { return m_HAD_scID[cell]; }
174 
175  std::vector<Identifier> getLayerSCIDs(unsigned int layer) const;
176 
177  void setPosNeg(int posneg);
178 
179  inline int getPosNeg() const {return m_posneg;}
180 
182  private:
183 
184  int m_iEta=0;
185  int m_iPhi=0;
186  int m_tower_id = 0;
188  int m_posneg = 0;
189  float m_centre_eta =0;
190  float m_centre_phi =0;
192 
193  std::vector<Identifier> m_EM_scID;
194  std::vector<Identifier> m_HAD_scID;
195  std::vector<int> m_et; // Real energy from TILE and the decoded energy from LATOME
196  std::vector<float> m_et_float_raw; // Raw imput energy from LATOME (not encoded/decoded) and TILE.
197  std::vector<int> m_TTowerArea{ 1, 1};
198  std::vector<int> m_TTowerAreaInv{ 1, 1};
199  int m_fcal_layer = -1;
200  int m_NoiseForMet[2] = {0};
201  int m_NoiseForJet[2] = {0};
202  int m_minEt_pileup_thr = -999;
203  int m_maxEt_pileup_thr = -999;
204  bool m_EM_sat = false;
205  bool m_HAD_sat = false;
206 
207 
208  };
209 
210 } // end of namespace
211 
212 CLASS_DEF( LVL1::jTower , 41848655 , 1 )
213 
214 #endif
LVL1::jTower::m_HAD_sat
bool m_HAD_sat
Definition: jTower.h:205
LVL1::jTower::OfflineID
int OfflineID()
Definition: jTower.h:111
et
Extra patterns decribing particle interation process.
LVL1::jTower::m_iPhi
int m_iPhi
Definition: jTower.h:185
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:298
IParticle.h
LVL1::jTower::iEta
int iEta() const
Get coordinates of tower.
Definition: jTower.cxx:169
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
AuxStoreAccessorMacros.h
LVL1::jTower::setiEta
void setiEta(int ieta)
Definition: jTower.cxx:302
LVL1::jTower::setTTowerAreaInv
void setTTowerAreaInv(int area, int layer)
Add to Area inverted values of a specified tower.
Definition: jTower.cxx:328
LVL1::jTower::centrephi_toPI
float centrephi_toPI() const
Definition: jTower.h:85
LVL1::jTower::setPosNeg
void setPosNeg(int posneg)
Definition: jTower.cxx:79
LVL1::jTower::setNoiseForMet
void setNoiseForMet(int noiseVal, int layer)
Noise values for each layer and object.
Definition: jTower.cxx:336
LVL1::jTower::fcalLayer
int fcalLayer() const
Definition: jTower.h:104
LVL1::jTower::getET
int getET(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV.
Definition: jTower.cxx:179
LVL1::jTower::m_centre_phi
float m_centre_phi
Definition: jTower.h:190
LVL1::jTower::getPosNeg
int getPosNeg() const
Definition: jTower.h:179
LVL1::jTower::m_TTowerAreaInv
std::vector< int > m_TTowerAreaInv
Definition: jTower.h:198
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:129
LVL1::jTower::getMaxEtforPileup
int getMaxEtforPileup() const
Definition: jTower.h:99
LVL1::jTower::centreEta
float centreEta() const
Definition: jTower.h:83
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:125
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:199
LVL1::jTower::m_tower_id_online
int m_tower_id_online
Definition: jTower.h:187
LVL1::jTower::getTTowerAreaInv
int getTTowerAreaInv(int layer) const
Definition: jTower.cxx:332
LVL1::jTower::m_maxEt_pileup_thr
int m_maxEt_pileup_thr
Definition: jTower.h:203
LVL1::jTower::m_iEta
int m_iEta
Internal data.
Definition: jTower.h:184
LVL1::jTower::getTowerSat
bool getTowerSat() const
Definition: jTower.h:65
LVL1::jTower::getETs_float
const std::vector< float > & getETs_float() const
Get vector of all ET values in MeV FLOAT VERSION.
Definition: jTower.h:153
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:242
LVL1::jTower::OnlineID
int OnlineID() const
Definition: jTower.h:110
LVL1::jTower::getNoiseForJet
int getNoiseForJet(int layer) const
Definition: jTower.cxx:350
LVL1::jTower::clearET
void clearET()
Clear supercell ET values.
Definition: jTower.cxx:58
LVL1::jTower::setiPhi
void setiPhi(int iphi)
Definition: jTower.cxx:312
LVL1::jTower::getHADSat
bool getHADSat() const
Definition: jTower.h:63
LVL1::jTower::setTTowerArea
void setTTowerArea(int area, int layer)
Add to Area values of a specified tower.
Definition: jTower.cxx:320
LVL1::jTower::OnlineID
int OnlineID()
Definition: jTower.h:109
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:190
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:88
LVL1::jTower::setCentrePhi
void setCentrePhi(float iphi)
Definition: jTower.cxx:306
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
LVL1::jTower::getTotalET
int getTotalET() const
Get ET sum of all cells in the jTower in MeV.
Definition: jTower.cxx:201
LVL1::jTower::m_TTowerArea
std::vector< int > m_TTowerArea
Definition: jTower.h:197
LVL1::jTower::iPhi
int iPhi() const
Return global phi index.
Definition: jTower.cxx:174
LVL1::jTower::m_et
std::vector< int > m_et
Definition: jTower.h:195
LVL1::jTower::m_tower_id
int m_tower_id
Definition: jTower.h:186
LVL1::jTower::jTower
jTower()
Constructors.
Definition: jTower.cxx:27
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:108
LVL1::jTower::setOnlineID
void setOnlineID(int tower_id_online)
Definition: jTower.cxx:316
LVL1::jTower::getLayerSCIDs
std::vector< Identifier > getLayerSCIDs(unsigned int layer) const
Definition: jTower.cxx:285
LVL1::jTower::getET_EM
int getET_EM() const
Get EM ET value in MeV.
Definition: jTower.h:135
LVL1::jTower::Do_LAr_encoding
void Do_LAr_encoding()
Applies LAr digitization scheme.
Definition: jTower.cxx:157
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:226
LVL1::jTower::m_HAD_scID
std::vector< Identifier > m_HAD_scID
Definition: jTower.h:194
LVL1::jTower::getET_HAD
int getET_HAD() const
Get HAD ET value in MeV.
Definition: jTower.h:138
LVL1::jTower::getEMSCID
Identifier getEMSCID(int cell) const
Definition: jTower.h:172
LVL1::jTower::m_et_float_raw
std::vector< float > m_et_float_raw
Definition: jTower.h:196
LVL1::jTower::m_centre_eta
float m_centre_eta
Definition: jTower.h:189
CaloCellContainer.h
LVL1::jTower::m_EM_sat
bool m_EM_sat
Definition: jTower.h:204
LVL1::jTower::getMinEtforPileup
int getMinEtforPileup() const
Definition: jTower.h:97
LVL1::jTower::setHADSat
void setHADSat()
Definition: jTower.h:62
LVL1::jTower::m_EM_scID
std::vector< Identifier > m_EM_scID
Definition: jTower.h:193
LVL1::jTower::centrePhi
float centrePhi() const
Definition: jTower.h:84
LVL1::jTower::getTTowerArea
int getTTowerArea(int layer) const
Definition: jTower.cxx:324
LVL1::jTower::setNoiseForJet
void setNoiseForJet(int noiseVal, int layer)
Definition: jTower.cxx:345
LVL1::jTower::getEMSat
bool getEMSat() const
Definition: jTower.h:60
LVL1::jTower::getEMSCIDs
const std::vector< Identifier > & getEMSCIDs() const
Definition: jTower.h:169
LVL1::jTower::setEMSat
void setEMSat()
set and get saturation
Definition: jTower.h:59
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::jTower::getTotalET_float
float getTotalET_float() const
Get ET sum of all cells in the jTower in MeV FLOAT VERSION.
Definition: jTower.cxx:213
LVL1::jTower::setMinEtforPileup
void setMinEtforPileup(int etval)
Add to pilup lower and upper thresholds.
Definition: jTower.h:96
LVL1::jTower
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition: jTower.h:40
LVL1::jTower::set_Et
void set_Et(int layer, int et)
Set ET value in MeV.
Definition: jTower.cxx:103
CaloIdManager.h
LVL1::jTower::setMaxEtforPileup
void setMaxEtforPileup(int etval)
Definition: jTower.h:98
LVL1::jTower::clear_HAD_scIDs
void clear_HAD_scIDs()
Clear and resize HAD SC Identifier value vector.
Definition: jTower.cxx:73
LVL1::jTower::constid
float constid() const
Definition: jTower.h:114
LVL1::jTower::m_NoiseForJet
int m_NoiseForJet[2]
Definition: jTower.h:201
LVL1::jTower::clear_EM_scIDs
void clear_EM_scIDs()
Clear and resize Identifier value vector.
Definition: jTower.cxx:67
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:272
LVL1::jTower::getNoiseForMet
int getNoiseForMet(int layer) const
Definition: jTower.cxx:341
LVL1::jTower::getHADSCID
Identifier getHADSCID(int cell) const
Definition: jTower.h:173
LVL1::jTower::m_posneg
int m_posneg
Definition: jTower.h:188
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
LVL1::jTower::getHADSCIDs
const std::vector< Identifier > & getHADSCIDs() const
Definition: jTower.h:170
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:191
LVL1::jTower::OfflineID
int OfflineID() const
Definition: jTower.h:112
LVL1::jTower::m_minEt_pileup_thr
int m_minEt_pileup_thr
Definition: jTower.h:202
LVL1::jTower::m_NoiseForMet
int m_NoiseForMet[2]
Definition: jTower.h:200
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:258
Identifier
Definition: IdentifierFieldParser.cxx:14