ATLAS Offline Software
GlobalLArCell.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef GLOBALSIM_GLOBALLARCELL_H
6 #define GLOBALSIM_GLOBALLARCELL_H
7 
8 #include <vector>
9 #include <string>
10 #include <boost/dynamic_bitset.hpp>
11 
12 namespace GlobalSim{
14  {
15 
16  public:
17 
19  GlobalLArCell();
20 
23  std::string FEB2,
24  int channel);
25 
27  GlobalLArCell(const GlobalLArCell&) = default;
28 
31 
34 
35  // ----- setter functions -----
36 
38  void setEnergy (float energy);
40  void setEnergy (float energy, boost::dynamic_bitset<>&& energy_bitset);
42  void setPosition (float eta, float phi);
44  void setSampling (int sampling);
46  void setLayer (int layer);
48  void setSigma (float sigma);
50  void setMUX(std::string muxname);
52  void setLASP(std::string laspname);
54  void setBoardConnector(std::string connector, std::string type, int number, int fiber);
55 
56  // ----- getter functions -----
57 
59  float getEnergy () const;
61  const boost::dynamic_bitset<>& getEnergyBitstring() const;
63  uint32_t getID () const;
65  int getChannel () const;
67  float getSigma () const;
69  float eta () const;
71  float phi () const;
73  int getSampling() const;
75  int getLayer() const;
77  const std::string& getFEB2 () const;
79  const std::string& getMUX() const;
81  const std::string& getLASP() const;
83  const std::string& getConnector() const;
85  const std::string& getConnectorType() const;
86 
87 
88  protected:
89 
91  uint32_t m_id = -1;
92 
94  float m_eta = -99.9;
95 
97  float m_phi = -99.9;
98 
100  int m_sampling = -1;
101 
103  int m_layer = -1;
104 
106  std::string m_feb2 = "";
107 
109  int m_channel = -1;
110 
112  float m_energy = -1;
113 
115  boost::dynamic_bitset<> m_energy_bitset;
116 
118  float m_sigma = -99.9;
119 
121  std::string m_mux = "";
122 
124  std::string m_lasp = "";
125 
127  std::string m_connector = "";
128 
130  std::string m_connectorType = "";
131 
134 
136  int m_fiber = -1;
137 
138  };
139 
140  // inline functions
141 
143  m_id(0),
144  m_feb2("NONE"),
145  m_channel(0),
146  m_energy(0),
147  m_sigma(0)
148  {}
149 
151  std::string FEB2,
152  int channel) :
153  m_id(ID),
154  m_feb2(FEB2),
155  m_channel(channel),
156  m_energy(0),
157  m_sigma(0)
158  {}
159 
160  // Setter functions
161  inline void GlobalLArCell::setEnergy (float energy) { m_energy = energy; }
162  inline void GlobalLArCell::setEnergy (float energy, boost::dynamic_bitset<>&& energy_bitset) {
163  m_energy = energy;
164  m_energy_bitset = std::move(energy_bitset);
165  }
166  inline void GlobalLArCell::setPosition (float eta, float phi) {
167  m_eta = eta;
168  m_phi = phi;
169  }
170  inline void GlobalLArCell::setSampling (int sampling) { m_sampling = sampling; }
171  inline void GlobalLArCell::setLayer (int layer) { m_layer = layer; }
172  inline void GlobalLArCell::setSigma (float sigma) { m_sigma = sigma; }
173  inline void GlobalLArCell::setMUX (std::string muxname) { m_mux = std::move(muxname); };
174  inline void GlobalLArCell::setLASP (std::string laspname) { m_lasp = std::move(laspname); };
175  inline void GlobalLArCell::setBoardConnector (std::string connector, std::string type, int number, int fiber) {
176  m_connector = std::move(connector);
177  m_connectorType = std::move(type);
179  m_fiber = fiber;
180  };
181 
182  // Getter functions
183  inline float GlobalLArCell::getEnergy () const { return m_energy; }
184  inline const boost::dynamic_bitset<>& GlobalLArCell::getEnergyBitstring() const { return m_energy_bitset; }
185  inline uint32_t GlobalLArCell::getID () const { return m_id; }
186  inline int GlobalLArCell::getChannel () const { return m_channel; }
187  inline float GlobalLArCell::getSigma () const { return m_sigma; }
188  inline float GlobalLArCell::eta () const { return m_eta; }
189  inline float GlobalLArCell::phi () const { return m_phi; }
190  inline int GlobalLArCell::getSampling () const { return m_sampling; }
191  inline int GlobalLArCell::getLayer () const { return m_layer; }
192  inline const std::string& GlobalLArCell::getFEB2 () const { return m_feb2; }
193  inline const std::string& GlobalLArCell::getMUX() const { return m_mux; }
194  inline const std::string& GlobalLArCell::getLASP() const { return m_lasp; }
195  inline const std::string& GlobalLArCell::getConnector() const { return m_connector; }
196  inline const std::string& GlobalLArCell::getConnectorType() const { return m_connectorType; }
197 
198 }
199 
200 #endif //GLOBALSIM_GLOBALLARCELL_H
GlobalSim::GlobalLArCell::getLASP
const std::string & getLASP() const
get the name of the LASP this cell is associated with
Definition: GlobalLArCell.h:194
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
GlobalSim::GlobalLArCell::setSampling
void setSampling(int sampling)
set sampling of cell
Definition: GlobalLArCell.h:170
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
GlobalSim::GlobalLArCell::m_mux
std::string m_mux
name of associated MUX
Definition: GlobalLArCell.h:121
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
GlobalSim::GlobalLArCell::getSigma
float getSigma() const
get the significance of the energy deposit of this cell
Definition: GlobalLArCell.h:187
GlobalSim::GlobalLArCell::m_energy
float m_energy
transverse energy (in MeV)
Definition: GlobalLArCell.h:112
GlobalSim::GlobalLArCell::getConnector
const std::string & getConnector() const
get the connector of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:195
GlobalSim::GlobalLArCell::setEnergy
void setEnergy(float energy)
set transverse energy in MeV
Definition: GlobalLArCell.h:161
GlobalSim::GlobalLArCell::m_eta
float m_eta
eta position of this cell
Definition: GlobalLArCell.h:94
GlobalSim::GlobalLArCell::setSigma
void setSigma(float sigma)
set significancy of energy deposit
Definition: GlobalLArCell.h:172
GlobalSim::GlobalLArCell::setBoardConnector
void setBoardConnector(std::string connector, std::string type, int number, int fiber)
set properties of associated board connector
Definition: GlobalLArCell.h:175
GlobalSim::GlobalLArCell::m_connectorType
std::string m_connectorType
type of connector of associated FEB2
Definition: GlobalLArCell.h:130
GlobalSim::GlobalLArCell::m_sigma
float m_sigma
significance of energy deposit (transverse energy divided by total expected noise)
Definition: GlobalLArCell.h:118
GlobalSim::GlobalLArCell::m_connector
std::string m_connector
connector of associated FEB2
Definition: GlobalLArCell.h:127
GlobalSim::GlobalLArCell::getEnergyBitstring
const boost::dynamic_bitset & getEnergyBitstring() const
get the energy bitstring
Definition: GlobalLArCell.h:184
GlobalSim::GlobalLArCell::m_connectorNumber
int m_connectorNumber
connector number of associated FEB2
Definition: GlobalLArCell.h:133
GlobalSim::GlobalLArCell::getConnectorType
const std::string & getConnectorType() const
get the type of connector of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:196
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
GlobalSim::GlobalLArCell::phi
float phi() const
get the phi position of the cell
Definition: GlobalLArCell.h:189
GlobalSim::GlobalLArCell::getFEB2
const std::string & getFEB2() const
get the name of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:192
GlobalSim::GlobalLArCell::GlobalLArCell
GlobalLArCell()
default constructor
Definition: GlobalLArCell.h:142
GlobalSim::GlobalLArCell::GlobalLArCell
GlobalLArCell(const GlobalLArCell &)=default
copy constructor (explicitly defaulted)
GlobalSim
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
Definition: dump.h:8
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
GlobalSim::GlobalLArCell::getID
uint32_t getID() const
get the short identifier of the cell
Definition: GlobalLArCell.h:185
GlobalSim::GlobalLArCell::setLayer
void setLayer(int layer)
set layer of cell
Definition: GlobalLArCell.h:171
GlobalSim::GlobalLArCell::m_layer
int m_layer
layer of this cell
Definition: GlobalLArCell.h:103
GlobalSim::GlobalLArCell::m_id
uint32_t m_id
identifier of this cell
Definition: GlobalLArCell.h:91
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
GlobalSim::GlobalLArCell::operator=
GlobalLArCell & operator=(const GlobalLArCell &)=default
copy assignment operator (explicitly defaulted)
GlobalSim::GlobalLArCell::m_energy_bitset
boost::dynamic_bitset m_energy_bitset
string of the bitstream encding the transverse energy (in MeV)
Definition: GlobalLArCell.h:115
GlobalSim::GlobalLArCell::m_phi
float m_phi
phi position of this cell
Definition: GlobalLArCell.h:97
GlobalSim::GlobalLArCell::getEnergy
float getEnergy() const
get transverse energy in MeV
Definition: GlobalLArCell.h:183
GlobalSim::GlobalLArCell::m_feb2
std::string m_feb2
name of the FEB2 through which this cell is read out
Definition: GlobalLArCell.h:106
GlobalSim::GlobalLArCell::m_lasp
std::string m_lasp
name of associated LASP
Definition: GlobalLArCell.h:124
python.selection.number
number
Definition: selection.py:20
GlobalSim::GlobalLArCell::eta
float eta() const
get the eta position of the cell
Definition: GlobalLArCell.h:188
GlobalSim::GlobalLArCell::m_fiber
int m_fiber
fiber number of associated FEB2
Definition: GlobalLArCell.h:136
GlobalSim::GlobalLArCell::getMUX
const std::string & getMUX() const
get the name of the MUX this cell is associated with
Definition: GlobalLArCell.h:193
GlobalSim::GlobalLArCell::m_sampling
int m_sampling
sampling of this cell
Definition: GlobalLArCell.h:100
GlobalSim::GlobalLArCell::getChannel
int getChannel() const
get the channel of this cell on its associated FEB2
Definition: GlobalLArCell.h:186
GlobalSim::GlobalLArCell::getSampling
int getSampling() const
get the sampling of the cell
Definition: GlobalLArCell.h:190
GlobalSim::GlobalLArCell::setLASP
void setLASP(std::string laspname)
set name of associated LASP
Definition: GlobalLArCell.h:174
GlobalSim::GlobalLArCell::setMUX
void setMUX(std::string muxname)
set name of associated MUX
Definition: GlobalLArCell.h:173
GlobalSim::GlobalLArCell
Definition: GlobalLArCell.h:14
GlobalSim::GlobalLArCell::m_channel
int m_channel
channel number of this cell on its associated FEB2
Definition: GlobalLArCell.h:109
GlobalSim::GlobalLArCell::setPosition
void setPosition(float eta, float phi)
set position of cell in eta-phi space
Definition: GlobalLArCell.h:166
GlobalSim::GlobalLArCell::~GlobalLArCell
~GlobalLArCell()
default destructor
Definition: GlobalLArCell.h:33
GlobalSim::GlobalLArCell::getLayer
int getLayer() const
get the layer of the cell
Definition: GlobalLArCell.h:191