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  const std::string & FEB2,
24  int channel);
25 
29  // ----- setter functions -----
30 
32  void setEnergy (float energy);
34  void setEnergy (float energy, boost::dynamic_bitset<>&& energy_bitset);
36  void setPosition (float eta, float phi);
38  void setSampling (int sampling);
40  void setLayer (int layer);
42  void setSigma (float sigma);
44  void setMUX(std::string muxname);
46  void setLASP(std::string laspname);
48  void setBoardConnector(std::string connector, std::string type, int number, int fiber);
49 
50  // ----- getter functions -----
51 
53  float getEnergy () const;
55  const boost::dynamic_bitset<>& getEnergyBitstring() const;
57  uint32_t getID () const;
59  int getChannel () const;
61  float getSigma () const;
63  float eta () const;
65  float phi () const;
67  int getSampling() const;
69  int getLayer() const;
71  const std::string& getFEB2 () const;
73  const std::string& getMUX() const;
75  const std::string& getLASP() const;
77  const std::string& getConnector() const;
79  const std::string& getConnectorType() const;
80 
81 
82  protected:
83 
85  uint32_t m_id = -1;
86 
88  float m_eta = -99.9;
89 
91  float m_phi = -99.9;
92 
94  int m_sampling = -1;
95 
97  int m_layer = -1;
98 
100  std::string m_feb2 = "";
101 
103  int m_channel = -1;
104 
106  float m_energy = -1;
107 
109  boost::dynamic_bitset<> m_energy_bitset;
110 
112  float m_sigma = -99.9;
113 
115  std::string m_mux = "";
116 
118  std::string m_lasp = "";
119 
121  std::string m_connector = "";
122 
124  std::string m_connectorType = "";
125 
128 
130  int m_fiber = -1;
131 
132  };
133 
134  // inline functions
135 
137  m_id(0),
138  m_feb2("NONE"),
139  m_channel(0),
140  m_energy(0),
141  m_sigma(0)
142  {}
143 
145  const std::string & FEB2,
146  int channel) :
147  m_id(ID),
148  m_feb2(FEB2),
149  m_channel(channel),
150  m_energy(0),
151  m_sigma(0)
152  {}
153 
154  // Setter functions
155  inline void GlobalLArCell::setEnergy (float energy) { m_energy = energy; }
156  inline void GlobalLArCell::setEnergy (float energy, boost::dynamic_bitset<>&& energy_bitset) {
157  m_energy = energy;
158  m_energy_bitset = std::move(energy_bitset);
159  }
160  inline void GlobalLArCell::setPosition (float eta, float phi) {
161  m_eta = eta;
162  m_phi = phi;
163  }
164  inline void GlobalLArCell::setSampling (int sampling) { m_sampling = sampling; }
165  inline void GlobalLArCell::setLayer (int layer) { m_layer = layer; }
166  inline void GlobalLArCell::setSigma (float sigma) { m_sigma = sigma; }
167  inline void GlobalLArCell::setMUX (std::string muxname) { m_mux = std::move(muxname); };
168  inline void GlobalLArCell::setLASP (std::string laspname) { m_lasp = std::move(laspname); };
169  inline void GlobalLArCell::setBoardConnector (std::string connector, std::string type, int number, int fiber) {
170  m_connector = std::move(connector);
171  m_connectorType = std::move(type);
173  m_fiber = fiber;
174  };
175 
176  // Getter functions
177  inline float GlobalLArCell::getEnergy () const { return m_energy; }
178  inline const boost::dynamic_bitset<>& GlobalLArCell::getEnergyBitstring() const { return m_energy_bitset; }
179  inline uint32_t GlobalLArCell::getID () const { return m_id; }
180  inline int GlobalLArCell::getChannel () const { return m_channel; }
181  inline float GlobalLArCell::getSigma () const { return m_sigma; }
182  inline float GlobalLArCell::eta () const { return m_eta; }
183  inline float GlobalLArCell::phi () const { return m_phi; }
184  inline int GlobalLArCell::getSampling () const { return m_sampling; }
185  inline int GlobalLArCell::getLayer () const { return m_layer; }
186  inline const std::string& GlobalLArCell::getFEB2 () const { return m_feb2; }
187  inline const std::string& GlobalLArCell::getMUX() const { return m_mux; }
188  inline const std::string& GlobalLArCell::getLASP() const { return m_lasp; }
189  inline const std::string& GlobalLArCell::getConnector() const { return m_connector; }
190  inline const std::string& GlobalLArCell::getConnectorType() const { return m_connectorType; }
191 
192 }
193 
194 #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:188
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
GlobalSim::GlobalLArCell::setSampling
void setSampling(int sampling)
set sampling of cell
Definition: GlobalLArCell.h:164
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:115
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:181
GlobalSim::GlobalLArCell::m_energy
float m_energy
transverse energy (in MeV)
Definition: GlobalLArCell.h:106
GlobalSim::GlobalLArCell::getConnector
const std::string & getConnector() const
get the connector of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:189
GlobalSim::GlobalLArCell::setEnergy
void setEnergy(float energy)
copy & move c'tor, assignment, and destructor are automatically generated
Definition: GlobalLArCell.h:155
GlobalSim::GlobalLArCell::m_eta
float m_eta
eta position of this cell
Definition: GlobalLArCell.h:88
GlobalSim::GlobalLArCell::setSigma
void setSigma(float sigma)
set significancy of energy deposit
Definition: GlobalLArCell.h:166
GlobalSim::GlobalLArCell::setBoardConnector
void setBoardConnector(std::string connector, std::string type, int number, int fiber)
set properties of associated board connector
Definition: GlobalLArCell.h:169
GlobalSim::GlobalLArCell::m_connectorType
std::string m_connectorType
type of connector of associated FEB2
Definition: GlobalLArCell.h:124
GlobalSim::GlobalLArCell::m_sigma
float m_sigma
significance of energy deposit (transverse energy divided by total expected noise)
Definition: GlobalLArCell.h:112
GlobalSim::GlobalLArCell::m_connector
std::string m_connector
connector of associated FEB2
Definition: GlobalLArCell.h:121
GlobalSim::GlobalLArCell::getEnergyBitstring
const boost::dynamic_bitset & getEnergyBitstring() const
get the energy bitstring
Definition: GlobalLArCell.h:178
GlobalSim::GlobalLArCell::m_connectorNumber
int m_connectorNumber
connector number of associated FEB2
Definition: GlobalLArCell.h:127
GlobalSim::GlobalLArCell::getConnectorType
const std::string & getConnectorType() const
get the type of connector of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:190
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
GlobalSim::GlobalLArCell::phi
float phi() const
get the phi position of the cell
Definition: GlobalLArCell.h:183
GlobalSim::GlobalLArCell::getFEB2
const std::string & getFEB2() const
get the name of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:186
GlobalSim::GlobalLArCell::GlobalLArCell
GlobalLArCell()
default constructor
Definition: GlobalLArCell.h:136
GlobalSim
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
Definition: CommonSelector.cxx: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:179
GlobalSim::GlobalLArCell::setLayer
void setLayer(int layer)
set layer of cell
Definition: GlobalLArCell.h:165
GlobalSim::GlobalLArCell::m_layer
int m_layer
layer of this cell
Definition: GlobalLArCell.h:97
GlobalSim::GlobalLArCell::m_id
uint32_t m_id
identifier of this cell
Definition: GlobalLArCell.h:85
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
GlobalSim::GlobalLArCell::m_energy_bitset
boost::dynamic_bitset m_energy_bitset
string of the bitstream encding the transverse energy (in MeV)
Definition: GlobalLArCell.h:109
GlobalSim::GlobalLArCell::m_phi
float m_phi
phi position of this cell
Definition: GlobalLArCell.h:91
GlobalSim::GlobalLArCell::getEnergy
float getEnergy() const
get transverse energy in MeV
Definition: GlobalLArCell.h:177
GlobalSim::GlobalLArCell::m_feb2
std::string m_feb2
name of the FEB2 through which this cell is read out
Definition: GlobalLArCell.h:100
GlobalSim::GlobalLArCell::m_lasp
std::string m_lasp
name of associated LASP
Definition: GlobalLArCell.h:118
python.selection.number
number
Definition: selection.py:20
GlobalSim::GlobalLArCell::eta
float eta() const
get the eta position of the cell
Definition: GlobalLArCell.h:182
GlobalSim::GlobalLArCell::m_fiber
int m_fiber
fiber number of associated FEB2
Definition: GlobalLArCell.h:130
GlobalSim::GlobalLArCell::getMUX
const std::string & getMUX() const
get the name of the MUX this cell is associated with
Definition: GlobalLArCell.h:187
GlobalSim::GlobalLArCell::m_sampling
int m_sampling
sampling of this cell
Definition: GlobalLArCell.h:94
GlobalSim::GlobalLArCell::getChannel
int getChannel() const
get the channel of this cell on its associated FEB2
Definition: GlobalLArCell.h:180
GlobalSim::GlobalLArCell::getSampling
int getSampling() const
get the sampling of the cell
Definition: GlobalLArCell.h:184
GlobalSim::GlobalLArCell::setLASP
void setLASP(std::string laspname)
set name of associated LASP
Definition: GlobalLArCell.h:168
GlobalSim::GlobalLArCell::setMUX
void setMUX(std::string muxname)
set name of associated MUX
Definition: GlobalLArCell.h:167
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:103
GlobalSim::GlobalLArCell::setPosition
void setPosition(float eta, float phi)
set position of cell in eta-phi space
Definition: GlobalLArCell.h:160
GlobalSim::GlobalLArCell::getLayer
int getLayer() const
get the layer of the cell
Definition: GlobalLArCell.h:185