ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalLArCell.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2026 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
12namespace GlobalSim{
14 {
15
16 public:
17
20
22 GlobalLArCell(uint32_t ID,
23 const std::string & FEB2,
24 int channel);
25
27
28
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 setSize (float deta, float dphi);
40 void setSampling (int sampling);
42 void setLayer (int layer);
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 float deta () const;
71 float dphi () 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 float m_deta = -99.9;
101
103 float m_dphi = -99.9;
104
106 int m_sampling = -1;
107
109 int m_layer = -1;
110
112 std::string m_feb2 = "";
113
115 int m_channel = -1;
116
118 float m_energy = -1;
119
121 boost::dynamic_bitset<> m_energy_bitset;
122
124 float m_sigma = -99.9;
125
127 std::string m_mux = "";
128
130 std::string m_lasp = "";
131
133 std::string m_connector = "";
134
136 std::string m_connectorType = "";
137
140
142 int m_fiber = -1;
143
144 };
145
146 // inline functions
147
149 m_id(0),
150 m_feb2("NONE"),
151 m_channel(0),
152 m_energy(0),
153 m_sigma(0)
154 {}
155
157 const std::string & FEB2,
158 int channel) :
159 m_id(ID),
160 m_feb2(FEB2),
161 m_channel(channel),
162 m_energy(0),
163 m_sigma(0)
164 {}
165
166 // Setter functions
167 inline void GlobalLArCell::setEnergy (float energy) { m_energy = energy; }
168 inline void GlobalLArCell::setEnergy (float energy, boost::dynamic_bitset<>&& energy_bitset) {
169 m_energy = energy;
170 m_energy_bitset = std::move(energy_bitset);
171 }
172 inline void GlobalLArCell::setPosition (float eta, float phi) {
173 m_eta = eta;
174 m_phi = phi;
175 }
176 inline void GlobalLArCell::setSize (float deta, float dphi) {
177 m_deta = deta;
178 m_dphi = dphi;
179 }
180 inline void GlobalLArCell::setSampling (int sampling) { m_sampling = sampling; }
181 inline void GlobalLArCell::setLayer (int layer) { m_layer = layer; }
182 inline void GlobalLArCell::setSigma (float sigma) { m_sigma = sigma; }
183 inline void GlobalLArCell::setMUX (std::string muxname) { m_mux = std::move(muxname); };
184 inline void GlobalLArCell::setLASP (std::string laspname) { m_lasp = std::move(laspname); };
185 inline void GlobalLArCell::setBoardConnector (std::string connector, std::string type, int number, int fiber) {
186 m_connector = std::move(connector);
187 m_connectorType = std::move(type);
189 m_fiber = fiber;
190 };
191
192 // Getter functions
193 inline float GlobalLArCell::getEnergy () const { return m_energy; }
194 inline const boost::dynamic_bitset<>& GlobalLArCell::getEnergyBitstring() const { return m_energy_bitset; }
195 inline uint32_t GlobalLArCell::getID () const { return m_id; }
196 inline int GlobalLArCell::getChannel () const { return m_channel; }
197 inline float GlobalLArCell::getSigma () const { return m_sigma; }
198 inline float GlobalLArCell::eta () const { return m_eta; }
199 inline float GlobalLArCell::phi () const { return m_phi; }
200 inline float GlobalLArCell::deta () const { return m_deta; }
201 inline float GlobalLArCell::dphi () const { return m_dphi; }
202 inline int GlobalLArCell::getSampling () const { return m_sampling; }
203 inline int GlobalLArCell::getLayer () const { return m_layer; }
204 inline const std::string& GlobalLArCell::getFEB2 () const { return m_feb2; }
205 inline const std::string& GlobalLArCell::getMUX() const { return m_mux; }
206 inline const std::string& GlobalLArCell::getLASP() const { return m_lasp; }
207 inline const std::string& GlobalLArCell::getConnector() const { return m_connector; }
208 inline const std::string& GlobalLArCell::getConnectorType() const { return m_connectorType; }
209
210}
211
212#endif //GLOBALSIM_GLOBALLARCELL_H
boost::dynamic_bitset m_energy_bitset
string of the bitstream encding the transverse energy (in MeV)
void setEnergy(float energy)
copy & move c'tor, assignment, and destructor are automatically generated
void setSampling(int sampling)
set sampling of cell
float m_phi
phi position of this cell
float dphi() const
get the phi width of the cell
int getLayer() const
get the layer of the cell
const std::string & getConnector() const
get the connector of the FEB2 this cell is associated with
int getChannel() const
get the channel of this cell on its associated FEB2
GlobalLArCell()
default constructor
const boost::dynamic_bitset & getEnergyBitstring() const
get the energy bitstring
int m_connectorNumber
connector number of associated FEB2
std::string m_feb2
name of the FEB2 through which this cell is read out
std::string m_connector
connector of associated FEB2
float eta() const
get the eta position of the cell
int getSampling() const
get the sampling of the cell
float getEnergy() const
get transverse energy in MeV
void setBoardConnector(std::string connector, std::string type, int number, int fiber)
set properties of associated board connector
uint32_t m_id
identifier of this cell
std::string m_connectorType
type of connector of associated FEB2
void setMUX(std::string muxname)
set name of associated MUX
float m_deta
eta width of this cell
void setSigma(float sigma)
set significancy of energy deposit
void setSize(float deta, float dphi)
set size of cell in eta-phi space
float deta() const
get the eta width of the cell
int m_fiber
fiber number of associated FEB2
float m_eta
eta position of this cell
float m_sigma
significance of energy deposit (transverse energy divided by total expected noise)
float m_energy
transverse energy (in MeV)
std::string m_lasp
name of associated LASP
const std::string & getMUX() const
get the name of the MUX this cell is associated with
int m_channel
channel number of this cell on its associated FEB2
void setLASP(std::string laspname)
set name of associated LASP
const std::string & getConnectorType() const
get the type of connector of the FEB2 this cell is associated with
void setLayer(int layer)
set layer of cell
int m_sampling
sampling of this cell
std::string m_mux
name of associated MUX
float getSigma() const
get the significance of the energy deposit of this cell
int m_layer
layer of this cell
const std::string & getFEB2() const
get the name of the FEB2 this cell is associated with
float m_dphi
phi width of this cell
float phi() const
get the phi position of the cell
const std::string & getLASP() const
get the name of the LASP this cell is associated with
uint32_t getID() const
get the short identifier of the cell
void setPosition(float eta, float phi)
set position of cell in eta-phi space
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186