ATLAS Offline Software
Loading...
Searching...
No Matches
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
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 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
std::vector< Identifier > ID
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
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
void setSigma(float sigma)
set significancy of energy deposit
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 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