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 setSigma (float sigma);
46  void setMUX(std::string muxname);
48  void setLASP(std::string laspname);
50  void setBoardConnector(std::string connector, std::string type, int number, int fiber);
51 
52  // ----- getter functions -----
53 
55  float getEnergy () const;
57  const boost::dynamic_bitset<>& getEnergyBitstring() const;
59  uint32_t getID () const;
61  int getChannel () const;
63  float getSigma () const;
65  float eta () const;
67  float phi () const;
69  const std::string& getFEB2 () const;
71  const std::string& getMUX() const;
73  const std::string& getLASP() const;
75  const std::string& getConnector() const;
77  const std::string& getConnectorType() const;
78 
79 
80  protected:
81 
83  uint32_t m_id = -1;
84 
86  float m_eta = -99.9;
87 
89  float m_phi = -99.9;
90 
92  std::string m_feb2 = "";
93 
95  int m_channel = -1;
96 
98  float m_energy = -1;
99 
101  boost::dynamic_bitset<> m_energy_bitset;
102 
104  float m_sigma = -99.9;
105 
107  std::string m_mux = "";
108 
110  std::string m_lasp = "";
111 
113  std::string m_connector = "";
114 
116  std::string m_connectorType = "";
117 
120 
122  int m_fiber = -1;
123 
124  };
125 
126  // inline functions
127 
129  m_id(0),
130  m_feb2("NONE"),
131  m_channel(0),
132  m_energy(0),
133  m_sigma(0)
134  {}
135 
137  std::string FEB2,
138  int channel) :
139  m_id(ID),
140  m_feb2(FEB2),
141  m_channel(channel),
142  m_energy(0),
143  m_sigma(0)
144  {}
145 
146  // Setter functions
147  inline void GlobalLArCell::setEnergy (float energy) { m_energy = energy; }
148  inline void GlobalLArCell::setEnergy (float energy, boost::dynamic_bitset<>&& energy_bitset) {
149  m_energy = energy;
150  m_energy_bitset = std::move(energy_bitset);
151  }
152  inline void GlobalLArCell::setPosition (float eta, float phi) {
153  m_eta = eta;
154  m_phi = phi;
155  }
156  inline void GlobalLArCell::setSigma (float sigma) { m_sigma = sigma; }
157  inline void GlobalLArCell::setMUX (std::string muxname) { m_mux = std::move(muxname); };
158  inline void GlobalLArCell::setLASP (std::string laspname) { m_lasp = std::move(laspname); };
159  inline void GlobalLArCell::setBoardConnector (std::string connector, std::string type, int number, int fiber) {
160  m_connector = std::move(connector);
161  m_connectorType = std::move(type);
163  m_fiber = fiber;
164  };
165 
166  // Getter functions
167  inline float GlobalLArCell::getEnergy () const { return m_energy; }
168  inline const boost::dynamic_bitset<>& GlobalLArCell::getEnergyBitstring() const { return m_energy_bitset; }
169  inline uint32_t GlobalLArCell::getID () const { return m_id; }
170  inline int GlobalLArCell::getChannel () const { return m_channel; }
171  inline float GlobalLArCell::getSigma () const { return m_sigma; }
172  inline float GlobalLArCell::eta () const { return m_eta; }
173  inline float GlobalLArCell::phi () const { return m_phi; }
174  inline const std::string& GlobalLArCell::getFEB2 () const { return m_feb2; }
175  inline const std::string& GlobalLArCell::getMUX() const { return m_mux; }
176  inline const std::string& GlobalLArCell::getLASP() const { return m_lasp; }
177  inline const std::string& GlobalLArCell::getConnector() const { return m_connector; }
178  inline const std::string& GlobalLArCell::getConnectorType() const { return m_connectorType; }
179 
180 }
181 
182 #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:176
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
GlobalSim::GlobalLArCell::m_mux
std::string m_mux
name of associated MUX
Definition: GlobalLArCell.h:107
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
GlobalSim::GlobalLArCell::getSigma
float getSigma() const
get the significance of the energy deposit of this cell
Definition: GlobalLArCell.h:171
GlobalSim::GlobalLArCell::m_energy
float m_energy
transverse energy (in MeV)
Definition: GlobalLArCell.h:98
GlobalSim::GlobalLArCell::getConnector
const std::string & getConnector() const
get the connector of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:177
GlobalSim::GlobalLArCell::setEnergy
void setEnergy(float energy)
set transverse energy in MeV
Definition: GlobalLArCell.h:147
GlobalSim::GlobalLArCell::m_eta
float m_eta
eta position of this cell
Definition: GlobalLArCell.h:86
GlobalSim::GlobalLArCell::setSigma
void setSigma(float sigma)
set significancy of energy deposit
Definition: GlobalLArCell.h:156
GlobalSim::GlobalLArCell::setBoardConnector
void setBoardConnector(std::string connector, std::string type, int number, int fiber)
set properties of associated board connector
Definition: GlobalLArCell.h:159
GlobalSim::GlobalLArCell::m_connectorType
std::string m_connectorType
type of connector of associated FEB2
Definition: GlobalLArCell.h:116
GlobalSim::GlobalLArCell::m_sigma
float m_sigma
significance of energy deposit (transverse energy divided by total expected noise)
Definition: GlobalLArCell.h:104
GlobalSim::GlobalLArCell::m_connector
std::string m_connector
connector of associated FEB2
Definition: GlobalLArCell.h:113
GlobalSim::GlobalLArCell::getEnergyBitstring
const boost::dynamic_bitset & getEnergyBitstring() const
get the energy bitstring
Definition: GlobalLArCell.h:168
GlobalSim::GlobalLArCell::m_connectorNumber
int m_connectorNumber
connector number of associated FEB2
Definition: GlobalLArCell.h:119
GlobalSim::GlobalLArCell::getConnectorType
const std::string & getConnectorType() const
get the type of connector of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:178
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
GlobalSim::GlobalLArCell::phi
float phi() const
get the phi position of the cell
Definition: GlobalLArCell.h:173
GlobalSim::GlobalLArCell::getFEB2
const std::string & getFEB2() const
get the name of the FEB2 this cell is associated with
Definition: GlobalLArCell.h:174
GlobalSim::GlobalLArCell::GlobalLArCell
GlobalLArCell()
default constructor
Definition: GlobalLArCell.h:128
GlobalSim::GlobalLArCell::GlobalLArCell
GlobalLArCell(const GlobalLArCell &)=default
copy constructor (explicitly defaulted)
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
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:169
GlobalSim::GlobalLArCell::m_id
uint32_t m_id
identifier of this cell
Definition: GlobalLArCell.h:83
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:101
GlobalSim::GlobalLArCell::m_phi
float m_phi
phi position of this cell
Definition: GlobalLArCell.h:89
GlobalSim::GlobalLArCell::getEnergy
float getEnergy() const
get transverse energy in MeV
Definition: GlobalLArCell.h:167
GlobalSim::GlobalLArCell::m_feb2
std::string m_feb2
name of the FEB2 through which this cell is read out
Definition: GlobalLArCell.h:92
GlobalSim::GlobalLArCell::m_lasp
std::string m_lasp
name of associated LASP
Definition: GlobalLArCell.h:110
python.selection.number
number
Definition: selection.py:20
GlobalSim::GlobalLArCell::eta
float eta() const
get the eta position of the cell
Definition: GlobalLArCell.h:172
GlobalSim::GlobalLArCell::m_fiber
int m_fiber
fiber number of associated FEB2
Definition: GlobalLArCell.h:122
GlobalSim::GlobalLArCell::getMUX
const std::string & getMUX() const
get the name of the MUX this cell is associated with
Definition: GlobalLArCell.h:175
GlobalSim::GlobalLArCell::getChannel
int getChannel() const
get the channel of this cell on its associated FEB2
Definition: GlobalLArCell.h:170
GlobalSim::GlobalLArCell::setLASP
void setLASP(std::string laspname)
set name of associated LASP
Definition: GlobalLArCell.h:158
GlobalSim::GlobalLArCell::setMUX
void setMUX(std::string muxname)
set name of associated MUX
Definition: GlobalLArCell.h:157
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:95
GlobalSim::GlobalLArCell::setPosition
void setPosition(float eta, float phi)
set position of cell in eta-phi space
Definition: GlobalLArCell.h:152
GlobalSim::GlobalLArCell::~GlobalLArCell
~GlobalLArCell()
default destructor
Definition: GlobalLArCell.h:33